mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 14:09:19 +00:00
Merge branch 'develop' into fix-#23231
This commit is contained in:
@@ -218,7 +218,9 @@ class Customer(TransactionBase):
|
|||||||
else:
|
else:
|
||||||
company_record.append(limit.company)
|
company_record.append(limit.company)
|
||||||
|
|
||||||
outstanding_amt = get_customer_outstanding(self.name, limit.company)
|
outstanding_amt = get_customer_outstanding(
|
||||||
|
self.name, limit.company, ignore_outstanding_sales_order=limit.bypass_credit_limit_check
|
||||||
|
)
|
||||||
if flt(limit.credit_limit) < outstanding_amt:
|
if flt(limit.credit_limit) < outstanding_amt:
|
||||||
frappe.throw(_("""New credit limit is less than current outstanding amount for the customer. Credit limit has to be atleast {0}""").format(outstanding_amt))
|
frappe.throw(_("""New credit limit is less than current outstanding amount for the customer. Credit limit has to be atleast {0}""").format(outstanding_amt))
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,16 @@ frappe.ui.form.on("Item Group", {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
frm.fields_dict['item_group_defaults'].grid.get_field("default_discount_account").get_query = function(doc, cdt, cdn) {
|
||||||
|
const row = locals[cdt][cdn];
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
'report_type': 'Profit and Loss',
|
||||||
|
'company': row.company,
|
||||||
|
"is_group": 0
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
frm.fields_dict["item_group_defaults"].grid.get_field("expense_account").get_query = function(doc, cdt, cdn) {
|
frm.fields_dict["item_group_defaults"].grid.get_field("expense_account").get_query = function(doc, cdt, cdn) {
|
||||||
const row = locals[cdt][cdn];
|
const row = locals[cdt][cdn];
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user