fix: Codacy
This commit is contained in:
parent
3c63f5b76b
commit
1b30ca6a36
@ -500,7 +500,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
"account": warehouse_account[item.warehouse]['account'],
|
"account": warehouse_account[item.warehouse]['account'],
|
||||||
"against": warehouse_account[item.from_warehouse]["account"],
|
"against": warehouse_account[item.from_warehouse]["account"],
|
||||||
"cost_center": item.cost_center,
|
"cost_center": item.cost_center,
|
||||||
"project": item_row.project or self.project,
|
"project": item.project or self.project,
|
||||||
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
|
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
|
||||||
"debit": warehouse_debit_amount,
|
"debit": warehouse_debit_amount,
|
||||||
}, warehouse_account[item.warehouse]["account_currency"], item=item))
|
}, warehouse_account[item.warehouse]["account_currency"], item=item))
|
||||||
@ -510,7 +510,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
"account": warehouse_account[item.from_warehouse]['account'],
|
"account": warehouse_account[item.from_warehouse]['account'],
|
||||||
"against": warehouse_account[item.warehouse]["account"],
|
"against": warehouse_account[item.warehouse]["account"],
|
||||||
"cost_center": item.cost_center,
|
"cost_center": item.cost_center,
|
||||||
"project": item_row.project or self.project,
|
"project": item.project or self.project,
|
||||||
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
|
"remarks": self.get("remarks") or _("Accounting Entry for Stock"),
|
||||||
"debit": -1 * flt(item.base_net_amount, item.precision("base_net_amount")),
|
"debit": -1 * flt(item.base_net_amount, item.precision("base_net_amount")),
|
||||||
}, warehouse_account[item.from_warehouse]["account_currency"], item=item))
|
}, warehouse_account[item.from_warehouse]["account_currency"], item=item))
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe, erpnext
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils import flt, today, getdate, cint
|
from frappe.utils import flt, today, getdate, cint
|
||||||
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_checks_for_pl_and_bs_accounts
|
from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import get_checks_for_pl_and_bs_accounts
|
||||||
|
@ -96,7 +96,7 @@ class StockController(AccountsController):
|
|||||||
"account": warehouse_account[sle.warehouse]["account"],
|
"account": warehouse_account[sle.warehouse]["account"],
|
||||||
"against": item_row.expense_account,
|
"against": item_row.expense_account,
|
||||||
"cost_center": item_row.cost_center,
|
"cost_center": item_row.cost_center,
|
||||||
"project": item_row.project or self.project if hasattr(self, 'project') else None,
|
"project": item_row.project or self.get('project'),
|
||||||
"remarks": self.get("remarks") or "Accounting Entry for Stock",
|
"remarks": self.get("remarks") or "Accounting Entry for Stock",
|
||||||
"debit": flt(sle.stock_value_difference, precision),
|
"debit": flt(sle.stock_value_difference, precision),
|
||||||
"is_opening": item_row.get("is_opening") or self.get("is_opening") or "No",
|
"is_opening": item_row.get("is_opening") or self.get("is_opening") or "No",
|
||||||
@ -107,7 +107,7 @@ class StockController(AccountsController):
|
|||||||
"account": item_row.expense_account,
|
"account": item_row.expense_account,
|
||||||
"against": warehouse_account[sle.warehouse]["account"],
|
"against": warehouse_account[sle.warehouse]["account"],
|
||||||
"cost_center": item_row.cost_center,
|
"cost_center": item_row.cost_center,
|
||||||
"project": item_row.project or self.project if hasattr(self, 'project') else None,
|
"project": item_row.project or self.get('project'),
|
||||||
"remarks": self.get("remarks") or "Accounting Entry for Stock",
|
"remarks": self.get("remarks") or "Accounting Entry for Stock",
|
||||||
"credit": flt(sle.stock_value_difference, precision),
|
"credit": flt(sle.stock_value_difference, precision),
|
||||||
"project": item_row.get("project") or self.get("project"),
|
"project": item_row.get("project") or self.get("project"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user