Payment Terms: doctypes, schedule, payments and more

fix payment terms template setup:
- add_fetch to correct credit_days and credit_months not credit_days_months

fixed bug in `make_customer_gl_entry` and `make_supplier_entry:
all sales invoice were failing because they were all attempting to
make gl entry from payment schedule. Same with purchase invoices
This commit is contained in:
Nabin Hait
2017-08-15 08:23:51 +05:30
committed by tunde
parent 592e8c2e77
commit 9275969b51
30 changed files with 1436 additions and 32 deletions

View File

@@ -3,7 +3,7 @@
from __future__ import unicode_literals
import frappe, erpnext
from frappe.utils import flt, cstr, cint
from frappe.utils import flt, cstr, cint, getdate
from frappe import _
from frappe.model.meta import get_field_precision
from erpnext.accounts.doctype.budget.budget import validate_expense_against_budget
@@ -75,7 +75,8 @@ def check_if_in_list(gle, gl_map):
and cstr(e.get('against_voucher'))==cstr(gle.get('against_voucher')) \
and cstr(e.get('against_voucher_type')) == cstr(gle.get('against_voucher_type')) \
and cstr(e.get('cost_center')) == cstr(gle.get('cost_center')) \
and cstr(e.get('project')) == cstr(gle.get('project')):
and cstr(e.get('project')) == cstr(gle.get('project')) \
and getdate(e.get('due_date')) == getdate(gle.get('due_date')):
return e
def save_entries(gl_map, adv_adj, update_outstanding, from_repost=False):