feat(Selling): Gross Profit In Quotation (#21795)
* added valuation rate and gross_profit in quotation item table * modified code to not fetch valuation_rate manually, used set_gross_profit from selling controller
This commit is contained in:
@@ -361,7 +361,7 @@ class SellingController(StockController):
|
||||
self.po_no = ', '.join(list(set([d.po_no for d in po_nos if d.po_no])))
|
||||
|
||||
def set_gross_profit(self):
|
||||
if self.doctype == "Sales Order":
|
||||
if self.doctype in ["Sales Order", "Quotation"]:
|
||||
for item in self.items:
|
||||
item.gross_profit = flt(((item.base_rate - item.valuation_rate) * item.stock_qty), self.precision("amount", item))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user