fix: set tax_withholding_category from Purchase Order while creating pi form po

(cherry picked from commit b9048ca6fa)
This commit is contained in:
ljain112
2024-09-04 13:57:03 +05:30
committed by Mergify
parent 01f30682ee
commit 7027be8fbc

View File

@@ -769,6 +769,11 @@ def get_mapped_purchase_invoice(source_name, target_doc=None, ignore_permissions
def postprocess(source, target):
target.flags.ignore_permissions = ignore_permissions
set_missing_values(source, target)
# set tax_withholding_category from Purchase Order
if source.apply_tds and source.tax_withholding_category and target.apply_tds:
target.tax_withholding_category = source.tax_withholding_category
# Get the advance paid Journal Entries in Purchase Invoice Advance
if target.get("allocate_advances_automatically"):
target.set_advances()