mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-28 09:24:45 +00:00
Merge pull request #23414 from rohitwaghchaure/book-loss-amount-in-cogs-pre-release
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
|
from erpnext.accounts.general_ledger import process_gl_map
|
||||||
|
|
||||||
stock_rbnb = self.get_company_default("stock_received_but_not_billed")
|
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)
|
landed_cost_entries = get_item_account_wise_additional_cost(self.name)
|
||||||
expenses_included_in_valuation = self.get_company_default("expenses_included_in_valuation")
|
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):
|
if self.is_return or flt(d.item_tax_amount):
|
||||||
loss_account = expenses_included_in_valuation
|
loss_account = expenses_included_in_valuation
|
||||||
else:
|
else:
|
||||||
loss_account = stock_rbnb
|
loss_account = cogs_account
|
||||||
|
|
||||||
gl_entries.append(self.get_gl_dict({
|
gl_entries.append(self.get_gl_dict({
|
||||||
"account": loss_account,
|
"account": loss_account,
|
||||||
|
|||||||
Reference in New Issue
Block a user