fix: buying rate for service item in gross profit report

(cherry picked from commit 8d6e79a16f)
This commit is contained in:
ljain112
2024-12-17 17:54:08 +05:30
committed by Mergify
parent 647f039598
commit 7fa3a789b1

View File

@@ -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: