fix: buying rate for service item in gross profit report
(cherry picked from commit 8d6e79a16f)
This commit is contained in:
@@ -726,12 +726,13 @@ class GrossProfitGenerator:
|
||||
.inner_join(purchase_invoice)
|
||||
.on(purchase_invoice.name == purchase_invoice_item.parent)
|
||||
.select(
|
||||
purchase_invoice.name,
|
||||
purchase_invoice_item.base_rate / purchase_invoice_item.conversion_factor,
|
||||
)
|
||||
.where(purchase_invoice.docstatus == 1)
|
||||
.where(purchase_invoice.posting_date <= self.filters.to_date)
|
||||
.where(purchase_invoice_item.item_code == item_code)
|
||||
.where(purchase_invoice.is_return == 0)
|
||||
.where(purchase_invoice_item.parenttype == "Purchase Invoice")
|
||||
)
|
||||
|
||||
if row.project:
|
||||
|
||||
Reference in New Issue
Block a user