From d1b87ba41c4ed4b1442cb99306d3f94b6d6a8ce1 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 3 Oct 2018 16:29:43 +0530 Subject: [PATCH] Book cost of goods sold instead of stock adjustment --- erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py index 8e2fd82f1d..5d11797a5c 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py @@ -484,13 +484,13 @@ class PurchaseInvoice(BuyingController): if (self.update_stock and voucher_wise_stock_value.get(item.name) and warehouse_debit_amount != flt(voucher_wise_stock_value.get(item.name), net_amt_precision)): - stock_adjustment_account = self.get_company_default("stock_adjustment_account") + cost_of_goods_sold_account = self.get_company_default("default_expense_account") stock_amount = flt(voucher_wise_stock_value.get(item.name), net_amt_precision) stock_adjustment_amt = warehouse_debit_amount - stock_amount gl_entries.append( self.get_gl_dict({ - "account": stock_adjustment_account, + "account": cost_of_goods_sold_account, "against": item.expense_account, "debit": stock_adjustment_amt, "remarks": self.get("remarks") or _("Stock Adjustment"),