chore: patch correction

This commit is contained in:
Khushi Rawat
2024-09-03 03:35:19 +05:30
parent f369b583b9
commit 418f7e97b9
2 changed files with 5 additions and 3 deletions

View File

@@ -378,4 +378,5 @@ erpnext.patches.v15_0.do_not_use_batchwise_valuation
erpnext.patches.v15_0.drop_index_posting_datetime_from_sle
erpnext.patches.v15_0.add_disassembly_order_stock_entry_type #1
erpnext.patches.v15_0.set_standard_stock_entry_type
erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment
erpnext.patches.v15_0.link_purchase_item_to_asset_doc

View File

@@ -65,9 +65,10 @@ def get_linked_item(doctype, parent, item_code, amount, quantity):
if quantity > 1:
if item.amount + landed_cost == amount and item.qty == quantity:
return item.name
elif item.qty == quantity:
return item.name
else:
if item.rate + landed_cost == amount:
if item.rate + (landed_cost / item.qty) == amount:
return item.name
# If no exact match, return None
return None
return items[0].name if items else None