fix: adjustment entries for SE and SCR after LCV
This commit is contained in:
@@ -1660,14 +1660,16 @@ class StockEntry(StockController):
|
|||||||
)
|
)
|
||||||
|
|
||||||
account_currency = get_account_currency(item.expense_account)
|
account_currency = get_account_currency(item.expense_account)
|
||||||
|
|
||||||
|
# credit amount in negative to knock off the debit entry
|
||||||
gl_entries.append(
|
gl_entries.append(
|
||||||
self.get_gl_dict(
|
self.get_gl_dict(
|
||||||
{
|
{
|
||||||
"account": item.expense_account,
|
"account": item.expense_account,
|
||||||
"against": account,
|
"against": warehouse_account.get(item.t_warehouse)["account"],
|
||||||
"cost_center": item.cost_center,
|
"cost_center": item.cost_center,
|
||||||
"debit": credit_amount,
|
"debit": 0.0,
|
||||||
"credit": 0.0,
|
"credit": credit_amount * -1,
|
||||||
"remarks": _("Accounting Entry for LCV in Stock Entry {0}").format(self.name),
|
"remarks": _("Accounting Entry for LCV in Stock Entry {0}").format(self.name),
|
||||||
"debit_in_account_currency": flt(amount["amount"]),
|
"debit_in_account_currency": flt(amount["amount"]),
|
||||||
"account_currency": account_currency,
|
"account_currency": account_currency,
|
||||||
|
|||||||
@@ -777,12 +777,14 @@ class SubcontractingReceipt(SubcontractingController):
|
|||||||
)
|
)
|
||||||
|
|
||||||
account_currency = get_account_currency(item.expense_account)
|
account_currency = get_account_currency(item.expense_account)
|
||||||
|
|
||||||
|
# credit amount in negative to knock off the debit entry
|
||||||
self.add_gl_entry(
|
self.add_gl_entry(
|
||||||
gl_entries=gl_entries,
|
gl_entries=gl_entries,
|
||||||
account=item.expense_account,
|
account=item.expense_account,
|
||||||
cost_center=item.cost_center,
|
cost_center=item.cost_center,
|
||||||
debit=credit_amount,
|
debit=0.0,
|
||||||
credit=0.0,
|
credit=credit_amount * -1,
|
||||||
remarks=remarks,
|
remarks=remarks,
|
||||||
against_account=warehouse_account.get(item.warehouse)["account"],
|
against_account=warehouse_account.get(item.warehouse)["account"],
|
||||||
debit_in_account_currency=flt(amount["amount"]),
|
debit_in_account_currency=flt(amount["amount"]),
|
||||||
|
|||||||
Reference in New Issue
Block a user