Skip to content

fix: Set asset purchase amount based on qty and valuation_rate by nabinhait [frappe] PR#39238 [backport/v4]

Bot Dokos requested to merge backport/v4-dev/1249 into v4-dev

Backport of !1249 (merged)

Conflicts detected for source commit: 67d33c1d8d8866ac38bbd879309813b3a80ed242
diff --cc erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
index e7d2bf99ff,3b411ac75d..0000000000
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
@@@ -1196,11 -1208,14 +1208,22 @@@ class PurchaseInvoice(BuyingController)
  			fields=["name", "asset_quantity"],
  		)
  		for asset in assets:
++<<<<<<< HEAD
 +			frappe.db.set_value(
 +				"Asset", asset.name, "gross_purchase_amount", flt(item.valuation_rate) * asset.asset_quantity
 +			)
 +			frappe.db.set_value(
 +				"Asset", asset.name, "purchase_receipt_amount", flt(item.valuation_rate) * asset.asset_quantity
++=======
+ 			purchase_amount = flt(item.valuation_rate) * asset.asset_quantity
+ 			frappe.db.set_value(
+ 				"Asset",
+ 				asset.name,
+ 				{
+ 					"gross_purchase_amount": purchase_amount,
+ 					"purchase_receipt_amount": purchase_amount,
+ 				},
++>>>>>>> 67d33c1d8d8866ac38bbd879309813b3a80ed242
  			)
  
  	def make_stock_adjustment_entry(
diff --cc erpnext/accounts/report/general_ledger/general_ledger.py
index 139d381172,6a3545dff1..0000000000
--- a/erpnext/accounts/report/general_ledger/general_ledger.py
+++ b/erpnext/accounts/report/general_ledger/general_ledger.py
@@@ -276,6 -276,9 +276,12 @@@ def get_conditions(filters)
  	if filters.get("voucher_no"):
  		conditions.append("voucher_no=%(voucher_no)s")
  
++<<<<<<< HEAD
++=======
+ 	if filters.get("against_voucher_no"):
+ 		conditions.append("against_voucher=%(against_voucher_no)s")
+ 
++>>>>>>> 67d33c1d8d8866ac38bbd879309813b3a80ed242
  	if filters.get("voucher_no_not_in"):
  		conditions.append("voucher_no not in %(voucher_no_not_in)s")
  

Merge request reports