Skip to content

Commit

Permalink
fix: buying rate for service item in gross profit report
Browse files Browse the repository at this point in the history
(cherry picked from commit 8d6e79a)
  • Loading branch information
ljain112 authored and mergify[bot] committed Dec 23, 2024
1 parent 041d94f commit a55aaea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion erpnext/accounts/report/gross_profit/gross_profit.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,12 +748,13 @@ def get_last_purchase_rate(self, item_code, row):
.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:
Expand Down

0 comments on commit a55aaea

Please sign in to comment.