From 9071a7de82f1e3e663f3ec7bb998e566598853cf Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Wed, 8 Jul 2020 11:27:25 +0530 Subject: [PATCH] fix: Add default cost center in payment reconciliation JV --- .../payment_reconciliation/payment_reconciliation.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py index 8eaad7acd4..35d8d34c51 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py @@ -281,7 +281,8 @@ def reconcile_dr_cr_note(dr_cr_notes, company): 'party_type': d.party_type, d.dr_or_cr: abs(d.allocated_amount), 'reference_type': d.against_voucher_type, - 'reference_name': d.against_voucher + 'reference_name': d.against_voucher, + 'cost_center': erpnext.get_default_cost_center(company) }, { 'account': d.account, @@ -290,7 +291,8 @@ def reconcile_dr_cr_note(dr_cr_notes, company): reconcile_dr_or_cr: (abs(d.allocated_amount) if abs(d.unadjusted_amount) > abs(d.allocated_amount) else abs(d.unadjusted_amount)), 'reference_type': d.voucher_type, - 'reference_name': d.voucher_no + 'reference_name': d.voucher_no, + 'cost_center': erpnext.get_default_cost_center(company) } ] })