mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
aii: stock reconciliation with test case
This commit is contained in:
@@ -24,8 +24,10 @@ def execute(filters=None):
|
||||
data = []
|
||||
for row in delivery_note_items:
|
||||
selling_amount = flt(row.amount)
|
||||
buying_amount = get_buying_amount(row.item_code, row.warehouse,
|
||||
row.qty, "Delivery Note", row.name, row.item_row, stock_ledger_entries, item_sales_bom)
|
||||
buying_amount = get_buying_amount(row.item_code, row.warehouse, -1*row.qty,
|
||||
"Delivery Note", row.name, row.item_row, stock_ledger_entries, item_sales_bom)
|
||||
buying_amount = buying_amount > 0 and buying_amount or 0
|
||||
|
||||
if selling_amount:
|
||||
gross_profit = selling_amount - buying_amount
|
||||
gross_profit_percent = (gross_profit / selling_amount) * 100.0
|
||||
|
||||
Reference in New Issue
Block a user