mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
@@ -174,12 +174,12 @@ class GrossProfitGenerator(object):
|
|||||||
return flt(row.qty) * item_rate
|
return flt(row.qty) * item_rate
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if row.update_stock or row.dn_detail:
|
my_sle = self.sle.get((item_code, row.warehouse))
|
||||||
|
if (row.update_stock or row.dn_detail) and my_sle:
|
||||||
parenttype, parent, item_row = row.parenttype, row.parent, row.item_row
|
parenttype, parent, item_row = row.parenttype, row.parent, row.item_row
|
||||||
if row.dn_detail:
|
if row.dn_detail:
|
||||||
parenttype, parent, item_row = "Delivery Note", row.delivery_note, row.dn_detail
|
parenttype, parent, item_row = "Delivery Note", row.delivery_note, row.dn_detail
|
||||||
|
|
||||||
my_sle = self.sle.get((item_code, row.warehouse))
|
|
||||||
for i, sle in enumerate(my_sle):
|
for i, sle in enumerate(my_sle):
|
||||||
# find the stock valution rate from stock ledger entry
|
# find the stock valution rate from stock ledger entry
|
||||||
if sle.voucher_type == parenttype and parent == sle.voucher_no and \
|
if sle.voucher_type == parenttype and parent == sle.voucher_no and \
|
||||||
|
|||||||
Reference in New Issue
Block a user