fix: set default asset quantity as 1 [v14] (#38224)

fix: set default asset quantity as 1
This commit is contained in:
Anand Baburajan
2023-11-20 22:27:25 +05:30
committed by GitHub
parent d7278477d6
commit 3daf6f822a
5 changed files with 11 additions and 2 deletions

View File

@@ -746,7 +746,7 @@ class BuyingController(SubcontractingController):
"calculate_depreciation": 1,
"purchase_receipt_amount": purchase_amount,
"gross_purchase_amount": purchase_amount,
"asset_quantity": row.qty if is_grouped_asset else 0,
"asset_quantity": row.qty if is_grouped_asset else 1,
"purchase_receipt": self.name if self.doctype == "Purchase Receipt" else None,
"purchase_invoice": self.name if self.doctype == "Purchase Invoice" else None,
"cost_center": row.cost_center,