fix: don't assign the advance payment entries if Allocate Advances Automatically is disabled

This commit is contained in:
Rohit Waghchaure 2019-04-10 16:16:30 +05:30
parent 4873875c1c
commit b286fc99b8
4 changed files with 323 additions and 4 deletions

File diff suppressed because it is too large Load Diff

View File

@ -379,6 +379,8 @@ def make_purchase_invoice(source_name, target_doc=None):
def postprocess(source, target):
set_missing_values(source, target)
#Get the advance paid Journal Entries in Purchase Invoice Advance
if target.get("allocate_advances_automatically"):
target.set_advances()
def update_item(obj, target, source_parent):

View File

@ -612,6 +612,7 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False):
def postprocess(source, target):
set_missing_values(source, target)
#Get the advance paid Journal Entries in Sales Invoice Advance
if target.get("allocate_advances_automatically"):
target.set_advances()
def set_missing_values(source, target):