[Fix] Is fixed asset checkbox not checked if user duplicate the existing invoice

This commit is contained in:
Rohit Waghchaure
2018-12-19 15:06:44 +05:30
parent 402ffa8b29
commit f6f503a1f6
2 changed files with 14 additions and 1 deletions

View File

@@ -218,6 +218,9 @@ class AccountsController(TransactionBase):
if stock_qty != len(get_serial_nos(item.get('serial_no'))):
item.set(fieldname, value)
if self.doctype in ["Purchase Invoice", "Sales Invoice"] and item.meta.get_field('is_fixed_asset'):
item.set('is_fixed_asset', ret.get('is_fixed_asset', 0))
if ret.get("pricing_rule"):
# if user changed the discount percentage then set user's discount percentage ?
item.set("discount_percentage", ret.get("discount_percentage"))