refactor: pass dimensions on advance allocation
This commit is contained in:
@@ -28,6 +28,7 @@ from frappe.utils import (
|
|||||||
import erpnext
|
import erpnext
|
||||||
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
|
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
|
||||||
get_accounting_dimensions,
|
get_accounting_dimensions,
|
||||||
|
get_dimensions,
|
||||||
)
|
)
|
||||||
from erpnext.accounts.doctype.pricing_rule.utils import (
|
from erpnext.accounts.doctype.pricing_rule.utils import (
|
||||||
apply_pricing_rule_for_free_items,
|
apply_pricing_rule_for_free_items,
|
||||||
@@ -1423,7 +1424,13 @@ class AccountsController(TransactionBase):
|
|||||||
if lst:
|
if lst:
|
||||||
from erpnext.accounts.utils import reconcile_against_document
|
from erpnext.accounts.utils import reconcile_against_document
|
||||||
|
|
||||||
reconcile_against_document(lst)
|
# pass dimension values to utility method
|
||||||
|
active_dimensions = get_dimensions()[0]
|
||||||
|
for x in lst:
|
||||||
|
for dim in active_dimensions:
|
||||||
|
if self.get(dim.fieldname):
|
||||||
|
x.update({dim.fieldname: self.get(dim.fieldname)})
|
||||||
|
reconcile_against_document(lst, active_dimensions=active_dimensions)
|
||||||
|
|
||||||
def on_cancel(self):
|
def on_cancel(self):
|
||||||
from erpnext.accounts.doctype.bank_transaction.bank_transaction import (
|
from erpnext.accounts.doctype.bank_transaction.bank_transaction import (
|
||||||
|
|||||||
Reference in New Issue
Block a user