Removed fiscal year related things from, Recurrent Document, Leave Application, Upload attendance, Stock Reconciliation and Stock Balance
This commit is contained in:
parent
063946a02f
commit
13bb2ba779
@ -72,7 +72,6 @@ def manage_recurring_documents(doctype, next_date=None, commit=True):
|
||||
frappe.throw(exception_message)
|
||||
|
||||
def make_new_document(reference_doc, date_field, posting_date):
|
||||
from erpnext.accounts.utils import get_fiscal_year
|
||||
new_document = frappe.copy_doc(reference_doc, ignore_no_copy=True)
|
||||
mcount = month_map[reference_doc.recurring_type]
|
||||
|
||||
@ -90,8 +89,7 @@ def make_new_document(reference_doc, date_field, posting_date):
|
||||
date_field: posting_date,
|
||||
"from_date": from_date,
|
||||
"to_date": to_date,
|
||||
"fiscal_year": get_fiscal_year(posting_date)[0],
|
||||
"next_date": get_next_date(from_date, mcount,cint(reference_doc.repeat_on_day_of_month))
|
||||
"next_date": get_next_date(from_date, mcount,cint(reference_doc.repeat_on_day_of_month))
|
||||
})
|
||||
|
||||
# copy document fields
|
||||
|
@ -6,7 +6,6 @@ import frappe
|
||||
import frappe.permissions
|
||||
from erpnext.controllers.recurring_document import date_field_map
|
||||
from frappe.utils import get_first_day, get_last_day, add_to_date, nowdate, getdate, add_days
|
||||
from erpnext.accounts.utils import get_fiscal_year
|
||||
|
||||
def test_recurring_document(obj, test_records):
|
||||
frappe.db.set_value("Print Settings", "Print Settings", "send_print_as_pdf", 1)
|
||||
@ -20,7 +19,6 @@ def test_recurring_document(obj, test_records):
|
||||
"notification_email_address": "test@example.com, test1@example.com, test2@example.com",
|
||||
"repeat_on_day_of_month": getdate(today).day,
|
||||
"due_date": None,
|
||||
"fiscal_year": get_fiscal_year(today)[0],
|
||||
"from_date": get_first_day(today),
|
||||
"to_date": get_last_day(today)
|
||||
})
|
||||
|
@ -15,7 +15,6 @@ _test_records = [
|
||||
"company": "_Test Company",
|
||||
"doctype": "Leave Application",
|
||||
"employee": "_T-Employee-0001",
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"from_date": "2013-05-01",
|
||||
"leave_type": "_Test Leave Type",
|
||||
"posting_date": "2013-01-02",
|
||||
@ -25,7 +24,6 @@ _test_records = [
|
||||
"company": "_Test Company",
|
||||
"doctype": "Leave Application",
|
||||
"employee": "_T-Employee-0002",
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"from_date": "2013-05-01",
|
||||
"leave_type": "_Test Leave Type",
|
||||
"posting_date": "2013-01-02",
|
||||
@ -35,7 +33,6 @@ _test_records = [
|
||||
"company": "_Test Company",
|
||||
"doctype": "Leave Application",
|
||||
"employee": "_T-Employee-0001",
|
||||
"fiscal_year": "_Test Fiscal Year 2013",
|
||||
"from_date": "2013-01-15",
|
||||
"leave_type": "_Test Leave Type LWP",
|
||||
"posting_date": "2013-01-02",
|
||||
|
@ -41,8 +41,6 @@ def add_header(w):
|
||||
return w
|
||||
|
||||
def add_data(w, args):
|
||||
from erpnext.accounts.utils import get_fiscal_year
|
||||
|
||||
dates = get_dates(args)
|
||||
employees = get_active_employees()
|
||||
existing_attendance_records = get_existing_attendance_records(args)
|
||||
|
@ -7,7 +7,7 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe, unittest
|
||||
from frappe.utils import flt, nowdate, nowtime
|
||||
from erpnext.accounts.utils import get_fiscal_year, get_stock_and_account_difference
|
||||
from erpnext.accounts.utils import get_stock_and_account_difference
|
||||
from erpnext.stock.doctype.purchase_receipt.test_purchase_receipt import set_perpetual_inventory
|
||||
from erpnext.stock.stock_ledger import get_previous_sle, update_entries_after
|
||||
from erpnext.stock.doctype.stock_reconciliation.stock_reconciliation import EmptyStockReconciliationItemsError
|
||||
@ -97,7 +97,6 @@ def create_stock_reconciliation(**args):
|
||||
sr.posting_date = args.posting_date or nowdate()
|
||||
sr.posting_time = args.posting_time or nowtime()
|
||||
sr.company = args.company or "_Test Company"
|
||||
sr.fiscal_year = get_fiscal_year(sr.posting_date)[0]
|
||||
sr.expense_account = args.expense_account or \
|
||||
("Stock Adjustment - _TC" if frappe.get_all("Stock Ledger Entry") else "Temporary Opening - _TC")
|
||||
sr.cost_center = args.cost_center or "_Test Cost Center - _TC"
|
||||
|
@ -7,7 +7,6 @@ import frappe
|
||||
from frappe.utils import flt, cstr, nowdate, nowtime
|
||||
from erpnext.stock.utils import update_bin
|
||||
from erpnext.stock.stock_ledger import update_entries_after
|
||||
from erpnext.accounts.utils import get_fiscal_year
|
||||
|
||||
def repost(only_actual=False, allow_negative_stock=False, allow_zero_rate=False, only_bin=False):
|
||||
"""
|
||||
@ -158,7 +157,6 @@ def set_stock_balance_as_per_serial_no(item_code=None, posting_date=None, postin
|
||||
fiscal_year=None):
|
||||
if not posting_date: posting_date = nowdate()
|
||||
if not posting_time: posting_time = nowtime()
|
||||
if not fiscal_year: fiscal_year = get_fiscal_year(posting_date)[0]
|
||||
|
||||
condition = " and item.name='%s'" % item_code.replace("'", "\'") if item_code else ""
|
||||
|
||||
@ -191,7 +189,6 @@ def set_stock_balance_as_per_serial_no(item_code=None, posting_date=None, postin
|
||||
'stock_uom' : d[3],
|
||||
'incoming_rate' : sle and flt(serial_nos[0][0]) > flt(d[2]) and flt(sle[0][0]) or 0,
|
||||
'company' : sle and cstr(sle[0][1]) or 0,
|
||||
'fiscal_year' : fiscal_year,
|
||||
'is_cancelled' : 'No',
|
||||
'batch_no' : '',
|
||||
'serial_no' : ''
|
||||
|
Loading…
Reference in New Issue
Block a user