fix: Codacy

This commit is contained in:
Deepesh Garg 2020-06-19 12:12:08 +05:30
parent 3c63f5b76b
commit 1b30ca6a36
3 changed files with 5 additions and 5 deletions

View File

@ -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))

View File

@ -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

View File

@ -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"),