[minor]
This commit is contained in:
parent
bc92824bc4
commit
0dcb861b56
@ -7,7 +7,6 @@ import frappe
|
|||||||
from frappe.utils import nowdate, cstr, flt, cint, now, getdate
|
from frappe.utils import nowdate, cstr, flt, cint, now, getdate
|
||||||
from frappe import throw, _
|
from frappe import throw, _
|
||||||
from frappe.utils import formatdate
|
from frappe.utils import formatdate
|
||||||
import frappe.desk.reportview
|
|
||||||
|
|
||||||
# imported to enable erpnext.accounts.utils.get_account_currency
|
# imported to enable erpnext.accounts.utils.get_account_currency
|
||||||
from erpnext.accounts.doctype.account.account import get_account_currency
|
from erpnext.accounts.doctype.account.account import get_account_currency
|
||||||
@ -128,20 +127,20 @@ def add_ac(args=None):
|
|||||||
if not args:
|
if not args:
|
||||||
args = frappe.local.form_dict
|
args = frappe.local.form_dict
|
||||||
args.pop("cmd")
|
args.pop("cmd")
|
||||||
|
|
||||||
ac = frappe.new_doc("Account")
|
ac = frappe.new_doc("Account")
|
||||||
|
|
||||||
if args.get("ignore_permissions"):
|
if args.get("ignore_permissions"):
|
||||||
ac.flags.ignore_permissions = True
|
ac.flags.ignore_permissions = True
|
||||||
args.pop("ignore_permissions")
|
args.pop("ignore_permissions")
|
||||||
|
|
||||||
ac.update(args)
|
ac.update(args)
|
||||||
ac.old_parent = ""
|
ac.old_parent = ""
|
||||||
ac.freeze_account = "No"
|
ac.freeze_account = "No"
|
||||||
if cint(ac.get("is_root")):
|
if cint(ac.get("is_root")):
|
||||||
ac.parent_account = None
|
ac.parent_account = None
|
||||||
ac.flags.ignore_mandatory = True
|
ac.flags.ignore_mandatory = True
|
||||||
|
|
||||||
ac.insert()
|
ac.insert()
|
||||||
|
|
||||||
return ac.name
|
return ac.name
|
||||||
|
|||||||
@ -79,6 +79,7 @@ erpnext.stock.ItemDashboard = Class.extend({
|
|||||||
},
|
},
|
||||||
get_item_dashboard_data: function(data, max_count, show_item) {
|
get_item_dashboard_data: function(data, max_count, show_item) {
|
||||||
if(!max_count) max_count = 0;
|
if(!max_count) max_count = 0;
|
||||||
|
if(!data) data = [];
|
||||||
data.forEach(function(d) {
|
data.forEach(function(d) {
|
||||||
d.actual_or_pending = d.projected_qty + d.reserved_qty + d.reserved_qty_for_production;
|
d.actual_or_pending = d.projected_qty + d.reserved_qty + d.reserved_qty_for_production;
|
||||||
d.pending_qty = 0;
|
d.pending_qty = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user