mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-11 22:38:25 +00:00
Merge pull request #23412 from rohitwaghchaure/book-loss-amount-in-cogs
refactor: book loss amount in the COGS instead of stock received but not billed
This commit is contained in:
@@ -207,6 +207,7 @@ class PurchaseReceipt(BuyingController):
|
||||
from erpnext.accounts.general_ledger import process_gl_map
|
||||
|
||||
stock_rbnb = self.get_company_default("stock_received_but_not_billed")
|
||||
cogs_account = self.get_company_default("default_expense_account")
|
||||
landed_cost_entries = get_item_account_wise_additional_cost(self.name)
|
||||
expenses_included_in_valuation = self.get_company_default("expenses_included_in_valuation")
|
||||
|
||||
@@ -288,7 +289,7 @@ class PurchaseReceipt(BuyingController):
|
||||
if self.is_return or flt(d.item_tax_amount):
|
||||
loss_account = expenses_included_in_valuation
|
||||
else:
|
||||
loss_account = stock_rbnb
|
||||
loss_account = cogs_account
|
||||
|
||||
gl_entries.append(self.get_gl_dict({
|
||||
"account": loss_account,
|
||||
|
||||
Reference in New Issue
Block a user