Merge branch 'Mangesh-Khairnar-feat-customer-credit-limit' into develop
This commit is contained in:
commit
d30f87bbdf
@ -304,8 +304,10 @@ class SalesInvoice(SellingController):
|
|||||||
from erpnext.selling.doctype.customer.customer import check_credit_limit
|
from erpnext.selling.doctype.customer.customer import check_credit_limit
|
||||||
|
|
||||||
validate_against_credit_limit = False
|
validate_against_credit_limit = False
|
||||||
bypass_credit_limit_check_at_sales_order = cint(frappe.get_cached_value("Customer", self.customer,
|
bypass_credit_limit_check_at_sales_order = frappe.db.get_value("Customer Credit Limit",
|
||||||
"bypass_credit_limit_check_at_sales_order"))
|
filters={'parent': self.customer, 'parenttype': 'Customer', 'company': self.company},
|
||||||
|
fieldname=["bypass_credit_limit_check"])
|
||||||
|
|
||||||
if bypass_credit_limit_check_at_sales_order:
|
if bypass_credit_limit_check_at_sales_order:
|
||||||
validate_against_credit_limit = True
|
validate_against_credit_limit = True
|
||||||
|
|
||||||
|
@ -632,3 +632,4 @@ execute:frappe.reload_doc('desk', 'doctype','dashboard_chart')
|
|||||||
erpnext.patches.v12_0.add_default_dashboards
|
erpnext.patches.v12_0.add_default_dashboards
|
||||||
erpnext.patches.v12_0.remove_bank_remittance_custom_fields
|
erpnext.patches.v12_0.remove_bank_remittance_custom_fields
|
||||||
erpnext.patches.v12_0.generate_leave_ledger_entries
|
erpnext.patches.v12_0.generate_leave_ledger_entries
|
||||||
|
erpnext.patches.v12_0.move_credit_limit_to_customer_credit_limit
|
@ -0,0 +1,46 @@
|
|||||||
|
# Copyright (c) 2019, Frappe and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
''' Move credit limit and bypass credit limit to the child table of customer credit limit '''
|
||||||
|
frappe.reload_doc("Selling", "doctype", "Customer Credit Limit")
|
||||||
|
frappe.reload_doc("Selling", "doctype", "Customer")
|
||||||
|
frappe.reload_doc("Setup", "doctype", "Customer Group")
|
||||||
|
|
||||||
|
if frappe.db.a_row_exists("Customer Credit Limit"):
|
||||||
|
return
|
||||||
|
|
||||||
|
move_credit_limit_to_child_table()
|
||||||
|
|
||||||
|
def move_credit_limit_to_child_table():
|
||||||
|
''' maps data from old field to the new field in the child table '''
|
||||||
|
|
||||||
|
companies = frappe.get_all("Company", 'name')
|
||||||
|
for doctype in ("Customer", "Customer Group"):
|
||||||
|
fields = ""
|
||||||
|
if doctype == "Customer" \
|
||||||
|
and frappe.db.has_column('Customer', 'bypass_credit_limit_check_at_sales_order'):
|
||||||
|
fields = ", bypass_credit_limit_check_at_sales_order"
|
||||||
|
|
||||||
|
credit_limit_records = frappe.db.sql('''
|
||||||
|
SELECT name, credit_limit {0}
|
||||||
|
FROM `tab{1}` where credit_limit > 0
|
||||||
|
'''.format(fields, doctype), as_dict=1) #nosec
|
||||||
|
|
||||||
|
for record in credit_limit_records:
|
||||||
|
doc = frappe.get_doc(doctype, record.name)
|
||||||
|
for company in companies:
|
||||||
|
row = frappe._dict({
|
||||||
|
'credit_limit': record.credit_limit,
|
||||||
|
'company': company.name
|
||||||
|
})
|
||||||
|
if doctype == "Customer":
|
||||||
|
row.bypass_credit_limit_check = record.bypass_credit_limit_check_at_sales_order
|
||||||
|
|
||||||
|
doc.append("credit_limits", row)
|
||||||
|
|
||||||
|
for row in doc.credit_limits:
|
||||||
|
row.db_insert()
|
File diff suppressed because it is too large
Load Diff
@ -167,13 +167,18 @@ class Customer(TransactionBase):
|
|||||||
frappe.throw(_("A Customer Group exists with same name please change the Customer name or rename the Customer Group"), frappe.NameError)
|
frappe.throw(_("A Customer Group exists with same name please change the Customer name or rename the Customer Group"), frappe.NameError)
|
||||||
|
|
||||||
def validate_credit_limit_on_change(self):
|
def validate_credit_limit_on_change(self):
|
||||||
if self.get("__islocal") or not self.credit_limit \
|
if self.get("__islocal") or not self.credit_limits:
|
||||||
or self.credit_limit == frappe.db.get_value("Customer", self.name, "credit_limit"):
|
|
||||||
return
|
return
|
||||||
|
|
||||||
for company in frappe.get_all("Company"):
|
company_record = []
|
||||||
outstanding_amt = get_customer_outstanding(self.name, company.name)
|
for limit in self.credit_limits:
|
||||||
if flt(self.credit_limit) < outstanding_amt:
|
if limit.company in company_record:
|
||||||
|
frappe.throw(_("Credit limit is already defined for the Company {0}").format(limit.company, self.name))
|
||||||
|
else:
|
||||||
|
company_record.append(limit.company)
|
||||||
|
|
||||||
|
outstanding_amt = get_customer_outstanding(self.name, limit.company)
|
||||||
|
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))
|
||||||
|
|
||||||
def on_trash(self):
|
def on_trash(self):
|
||||||
@ -322,11 +327,13 @@ def get_credit_limit(customer, company):
|
|||||||
credit_limit = None
|
credit_limit = None
|
||||||
|
|
||||||
if customer:
|
if customer:
|
||||||
credit_limit, customer_group = frappe.get_cached_value("Customer",
|
credit_limit = frappe.db.get_value("Customer Credit Limit",
|
||||||
customer, ["credit_limit", "customer_group"])
|
{'parent': customer, 'parenttype': 'Customer', 'company': company}, 'credit_limit')
|
||||||
|
|
||||||
if not credit_limit:
|
if not credit_limit:
|
||||||
credit_limit = frappe.get_cached_value("Customer Group", customer_group, "credit_limit")
|
customer_group = frappe.get_cached_value("Customer", customer, 'customer_group')
|
||||||
|
credit_limit = frappe.db.get_value("Customer Credit Limit",
|
||||||
|
{'parent': customer_group, 'parenttype': 'Customer Group', 'company': company}, 'credit_limit')
|
||||||
|
|
||||||
if not credit_limit:
|
if not credit_limit:
|
||||||
credit_limit = frappe.get_cached_value('Company', company, "credit_limit")
|
credit_limit = frappe.get_cached_value('Company', company, "credit_limit")
|
||||||
|
@ -25,7 +25,7 @@ class TestCustomer(unittest.TestCase):
|
|||||||
make_test_records('Item')
|
make_test_records('Item')
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
frappe.db.set_value("Customer", '_Test Customer', 'credit_limit', 0.0)
|
set_credit_limit('_Test Customer', '_Test Company', 0)
|
||||||
|
|
||||||
def test_party_details(self):
|
def test_party_details(self):
|
||||||
from erpnext.accounts.party import get_party_details
|
from erpnext.accounts.party import get_party_details
|
||||||
@ -225,8 +225,8 @@ class TestCustomer(unittest.TestCase):
|
|||||||
item_qty = int((abs(outstanding_amt) + 200)/100)
|
item_qty = int((abs(outstanding_amt) + 200)/100)
|
||||||
make_sales_order(qty=item_qty)
|
make_sales_order(qty=item_qty)
|
||||||
|
|
||||||
if credit_limit == 0.0:
|
if not credit_limit:
|
||||||
frappe.db.set_value("Customer", '_Test Customer', 'credit_limit', outstanding_amt - 50.0)
|
set_credit_limit('_Test Customer', '_Test Company', outstanding_amt - 50)
|
||||||
|
|
||||||
# Sales Order
|
# Sales Order
|
||||||
so = make_sales_order(do_not_submit=True)
|
so = make_sales_order(do_not_submit=True)
|
||||||
@ -241,7 +241,7 @@ class TestCustomer(unittest.TestCase):
|
|||||||
self.assertRaises(frappe.ValidationError, si.submit)
|
self.assertRaises(frappe.ValidationError, si.submit)
|
||||||
|
|
||||||
if credit_limit > outstanding_amt:
|
if credit_limit > outstanding_amt:
|
||||||
frappe.db.set_value("Customer", '_Test Customer', 'credit_limit', credit_limit)
|
set_credit_limit('_Test Customer', '_Test Company', credit_limit)
|
||||||
|
|
||||||
# Makes Sales invoice from Sales Order
|
# Makes Sales invoice from Sales Order
|
||||||
so.save(ignore_permissions=True)
|
so.save(ignore_permissions=True)
|
||||||
@ -252,7 +252,10 @@ class TestCustomer(unittest.TestCase):
|
|||||||
def test_customer_credit_limit_on_change(self):
|
def test_customer_credit_limit_on_change(self):
|
||||||
outstanding_amt = self.get_customer_outstanding_amount()
|
outstanding_amt = self.get_customer_outstanding_amount()
|
||||||
customer = frappe.get_doc("Customer", '_Test Customer')
|
customer = frappe.get_doc("Customer", '_Test Customer')
|
||||||
customer.credit_limit = flt(outstanding_amt - 100)
|
customer.append('credit_limits', {'credit_limit': flt(outstanding_amt - 100), 'company': '_Test Company'})
|
||||||
|
|
||||||
|
''' define new credit limit for same company '''
|
||||||
|
customer.append('credit_limits', {'credit_limit': flt(outstanding_amt - 100), 'company': '_Test Company'})
|
||||||
self.assertRaises(frappe.ValidationError, customer.save)
|
self.assertRaises(frappe.ValidationError, customer.save)
|
||||||
|
|
||||||
def test_customer_payment_terms(self):
|
def test_customer_payment_terms(self):
|
||||||
@ -292,3 +295,20 @@ def get_customer_dict(customer_name):
|
|||||||
"doctype": "Customer",
|
"doctype": "Customer",
|
||||||
"territory": "_Test Territory"
|
"territory": "_Test Territory"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def set_credit_limit(customer, company, credit_limit):
|
||||||
|
customer = frappe.get_doc("Customer", customer)
|
||||||
|
existing_row = None
|
||||||
|
for d in customer.credit_limits:
|
||||||
|
if d.company == company:
|
||||||
|
existing_row = d
|
||||||
|
d.credit_limit = credit_limit
|
||||||
|
d.db_update()
|
||||||
|
break
|
||||||
|
|
||||||
|
if not existing_row:
|
||||||
|
customer.append('credit_limits', {
|
||||||
|
'company': company,
|
||||||
|
'credit_limit': credit_limit
|
||||||
|
})
|
||||||
|
customer.credit_limits[-1].db_insert()
|
||||||
|
@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
"creation": "2019-08-28 17:29:42.115592",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"company",
|
||||||
|
"column_break_2",
|
||||||
|
"credit_limit",
|
||||||
|
"bypass_credit_limit_check"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"columns": 4,
|
||||||
|
"fieldname": "credit_limit",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Credit Limit"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_2",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"columns": 4,
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Company",
|
||||||
|
"options": "Company"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "bypass_credit_limit_check",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Bypass credit limit_check"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"istable": 1,
|
||||||
|
"modified": "2019-08-29 20:46:36.073953",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Selling",
|
||||||
|
"name": "Customer Credit Limit",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC"
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class CustomerCreditLimit(Document):
|
||||||
|
pass
|
@ -208,7 +208,9 @@ class SalesOrder(SellingController):
|
|||||||
def check_credit_limit(self):
|
def check_credit_limit(self):
|
||||||
# if bypass credit limit check is set to true (1) at sales order level,
|
# if bypass credit limit check is set to true (1) at sales order level,
|
||||||
# then we need not to check credit limit and vise versa
|
# then we need not to check credit limit and vise versa
|
||||||
if not cint(frappe.get_cached_value("Customer", self.customer, "bypass_credit_limit_check_at_sales_order")):
|
if not cint(frappe.db.get_value("Customer Credit Limit",
|
||||||
|
{'parent': self.customer, 'parenttype': 'Customer', 'company': self.company},
|
||||||
|
"bypass_credit_limit_check")):
|
||||||
check_credit_limit(self.customer, self.company)
|
check_credit_limit(self.customer, self.company)
|
||||||
|
|
||||||
def check_nextdoc_docstatus(self):
|
def check_nextdoc_docstatus(self):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
QUnit.module('Sales Order');
|
QUnit.module('Sales Order');
|
||||||
|
|
||||||
QUnit.test("test_sales_order_with_bypass_credit_limit_check", function(assert) {
|
QUnit.test("test_sales_order_with_bypass_credit_limit_check", function(assert) {
|
||||||
//#PR : 10861, Author : ashish-greycube & jigneshpshah, Email:mr.ashish.shah@gmail.com
|
//#PR : 10861, Author : ashish-greycube & jigneshpshah, Email:mr.ashish.shah@gmail.com
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
let done = assert.async();
|
let done = assert.async();
|
||||||
frappe.run_serially([
|
frappe.run_serially([
|
||||||
@ -10,8 +10,10 @@ QUnit.test("test_sales_order_with_bypass_credit_limit_check", function(assert) {
|
|||||||
() => frappe.quick_entry.dialog.$wrapper.find('.edit-full').click(),
|
() => frappe.quick_entry.dialog.$wrapper.find('.edit-full').click(),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
() => cur_frm.set_value("customer_name", "Test Customer 10"),
|
() => cur_frm.set_value("customer_name", "Test Customer 10"),
|
||||||
() => cur_frm.set_value("credit_limit", 100.00),
|
() => cur_frm.add_child('credit_limits', {
|
||||||
() => cur_frm.set_value("bypass_credit_limit_check_at_sales_order", 1),
|
'company': cur_frm.doc.company || '_Test Company'
|
||||||
|
'credit_limit': 1000,
|
||||||
|
'bypass_credit_limit_check': 1}),
|
||||||
// save form
|
// save form
|
||||||
() => cur_frm.save(),
|
() => cur_frm.save(),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
@ -22,10 +24,10 @@ QUnit.test("test_sales_order_with_bypass_credit_limit_check", function(assert) {
|
|||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
() => cur_frm.set_value("item_code", "Test Product 10"),
|
() => cur_frm.set_value("item_code", "Test Product 10"),
|
||||||
() => cur_frm.set_value("item_group", "Products"),
|
() => cur_frm.set_value("item_group", "Products"),
|
||||||
() => cur_frm.set_value("standard_rate", 100),
|
() => cur_frm.set_value("standard_rate", 100),
|
||||||
// save form
|
// save form
|
||||||
() => cur_frm.save(),
|
() => cur_frm.save(),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
|
|
||||||
() => {
|
() => {
|
||||||
return frappe.tests.make('Sales Order', [
|
return frappe.tests.make('Sales Order', [
|
||||||
@ -46,11 +48,11 @@ QUnit.test("test_sales_order_with_bypass_credit_limit_check", function(assert) {
|
|||||||
() => frappe.tests.click_button('Yes'),
|
() => frappe.tests.click_button('Yes'),
|
||||||
() => frappe.timeout(3),
|
() => frappe.timeout(3),
|
||||||
() => {
|
() => {
|
||||||
|
|
||||||
assert.ok(cur_frm.doc.status=="To Deliver and Bill", "It is submited. Credit limit is NOT checked for sales order");
|
assert.ok(cur_frm.doc.status=="To Deliver and Bill", "It is submited. Credit limit is NOT checked for sales order");
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
() => done()
|
() => done()
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
QUnit.module('Sales Order');
|
QUnit.module('Sales Order');
|
||||||
|
|
||||||
QUnit.test("test_sales_order_without_bypass_credit_limit_check", function(assert) {
|
QUnit.test("test_sales_order_without_bypass_credit_limit_check", function(assert) {
|
||||||
//#PR : 10861, Author : ashish-greycube & jigneshpshah, Email:mr.ashish.shah@gmail.com
|
//#PR : 10861, Author : ashish-greycube & jigneshpshah, Email:mr.ashish.shah@gmail.com
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
let done = assert.async();
|
let done = assert.async();
|
||||||
frappe.run_serially([
|
frappe.run_serially([
|
||||||
@ -10,8 +10,10 @@ QUnit.test("test_sales_order_without_bypass_credit_limit_check", function(assert
|
|||||||
() => frappe.quick_entry.dialog.$wrapper.find('.edit-full').click(),
|
() => frappe.quick_entry.dialog.$wrapper.find('.edit-full').click(),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
() => cur_frm.set_value("customer_name", "Test Customer 11"),
|
() => cur_frm.set_value("customer_name", "Test Customer 11"),
|
||||||
() => cur_frm.set_value("credit_limit", 100.00),
|
() => cur_frm.add_child('credit_limits', {
|
||||||
() => cur_frm.set_value("bypass_credit_limit_check_at_sales_order", 0),
|
'credit_limit': 1000,
|
||||||
|
'company': '_Test Company',
|
||||||
|
'bypass_credit_limit_check': 1}),
|
||||||
// save form
|
// save form
|
||||||
() => cur_frm.save(),
|
() => cur_frm.save(),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
@ -21,10 +23,10 @@ QUnit.test("test_sales_order_without_bypass_credit_limit_check", function(assert
|
|||||||
() => frappe.click_link('Edit in full page'),
|
() => frappe.click_link('Edit in full page'),
|
||||||
() => cur_frm.set_value("item_code", "Test Product 11"),
|
() => cur_frm.set_value("item_code", "Test Product 11"),
|
||||||
() => cur_frm.set_value("item_group", "Products"),
|
() => cur_frm.set_value("item_group", "Products"),
|
||||||
() => cur_frm.set_value("standard_rate", 100),
|
() => cur_frm.set_value("standard_rate", 100),
|
||||||
// save form
|
// save form
|
||||||
() => cur_frm.save(),
|
() => cur_frm.save(),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
|
|
||||||
() => {
|
() => {
|
||||||
return frappe.tests.make('Sales Order', [
|
return frappe.tests.make('Sales Order', [
|
||||||
@ -45,14 +47,14 @@ QUnit.test("test_sales_order_without_bypass_credit_limit_check", function(assert
|
|||||||
() => frappe.tests.click_button('Yes'),
|
() => frappe.tests.click_button('Yes'),
|
||||||
() => frappe.timeout(3),
|
() => frappe.timeout(3),
|
||||||
() => {
|
() => {
|
||||||
|
|
||||||
if (cur_dialog.body.innerText.match(/^Credit limit has been crossed for customer.*$/))
|
if (cur_dialog.body.innerText.match(/^Credit limit has been crossed for customer.*$/))
|
||||||
{
|
{
|
||||||
/*Match found */
|
/*Match found */
|
||||||
assert.ok(true, "Credit Limit crossed message received");
|
assert.ok(true, "Credit Limit crossed message received");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
() => cur_dialog.cancel(),
|
() => cur_dialog.cancel(),
|
||||||
() => done()
|
() => done()
|
||||||
|
@ -29,7 +29,7 @@ def execute(filters=None):
|
|||||||
|
|
||||||
if customer_naming_type == "Naming Series":
|
if customer_naming_type == "Naming Series":
|
||||||
row = [d.name, d.customer_name, credit_limit, outstanding_amt, bal,
|
row = [d.name, d.customer_name, credit_limit, outstanding_amt, bal,
|
||||||
d.bypass_credit_limit_check_at_sales_order, d.is_frozen,
|
d.bypass_credit_limit_check, d.is_frozen,
|
||||||
d.disabled]
|
d.disabled]
|
||||||
else:
|
else:
|
||||||
row = [d.name, credit_limit, outstanding_amt, bal,
|
row = [d.name, credit_limit, outstanding_amt, bal,
|
||||||
@ -60,9 +60,15 @@ def get_details(filters):
|
|||||||
conditions = ""
|
conditions = ""
|
||||||
|
|
||||||
if filters.get("customer"):
|
if filters.get("customer"):
|
||||||
conditions += " where name = %(customer)s"
|
conditions += " AND c.name = " + filters.get("customer")
|
||||||
|
|
||||||
return frappe.db.sql("""select name, customer_name,
|
|
||||||
bypass_credit_limit_check_at_sales_order, is_frozen, disabled from `tabCustomer` %s
|
|
||||||
""" % conditions, filters, as_dict=1)
|
|
||||||
|
|
||||||
|
return frappe.db.sql("""SELECT
|
||||||
|
c.name, c.customer_name,
|
||||||
|
ccl.bypass_credit_limit_check,
|
||||||
|
c.is_frozen, c.disabled
|
||||||
|
FROM `tabCustomer` c, `tabCustomer Credit Limit` ccl
|
||||||
|
WHERE
|
||||||
|
c.name = ccl.parent
|
||||||
|
AND ccl.company = %s
|
||||||
|
{0}
|
||||||
|
""".format(conditions), (filters.get("company")), as_dict=1) #nosec
|
||||||
|
@ -1,553 +1,194 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"_comments": "[]",
|
||||||
"allow_guest_to_view": 0,
|
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:customer_group_name",
|
"autoname": "field:customer_group_name",
|
||||||
"beta": 0,
|
|
||||||
"creation": "2013-01-10 16:34:23",
|
"creation": "2013-01-10 16:34:23",
|
||||||
"custom": 0,
|
|
||||||
"docstatus": 0,
|
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Setup",
|
"document_type": "Setup",
|
||||||
"editable_grid": 0,
|
"field_order": [
|
||||||
|
"customer_group_name",
|
||||||
|
"parent_customer_group",
|
||||||
|
"is_group",
|
||||||
|
"cb0",
|
||||||
|
"default_price_list",
|
||||||
|
"payment_terms",
|
||||||
|
"lft",
|
||||||
|
"rgt",
|
||||||
|
"old_parent",
|
||||||
|
"default_receivable_account",
|
||||||
|
"accounts",
|
||||||
|
"credit_limit_section",
|
||||||
|
"credit_limits"
|
||||||
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "customer_group_name",
|
"fieldname": "customer_group_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Customer Group Name",
|
"label": "Customer Group Name",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "customer_group_name",
|
"oldfieldname": "customer_group_name",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 1
|
"unique": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"description": "",
|
|
||||||
"fieldname": "parent_customer_group",
|
"fieldname": "parent_customer_group",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 1,
|
"ignore_user_permissions": 1,
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Parent Customer Group",
|
"label": "Parent Customer Group",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "parent_customer_group",
|
"oldfieldname": "parent_customer_group",
|
||||||
"oldfieldtype": "Link",
|
"oldfieldtype": "Link",
|
||||||
"options": "Customer Group",
|
"options": "Customer Group"
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"default": "0",
|
||||||
"columns": 0,
|
|
||||||
"description": "Only leaf nodes are allowed in transaction",
|
"description": "Only leaf nodes are allowed in transaction",
|
||||||
"fieldname": "is_group",
|
"fieldname": "is_group",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Is Group",
|
"label": "Is Group",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"oldfieldname": "is_group",
|
"oldfieldname": "is_group",
|
||||||
"oldfieldtype": "Select",
|
"oldfieldtype": "Select"
|
||||||
"options": "",
|
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "cb0",
|
"fieldname": "cb0",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break"
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "default_price_list",
|
"fieldname": "default_price_list",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 1,
|
"ignore_user_permissions": 1,
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Default Price List",
|
"label": "Default Price List",
|
||||||
"length": 0,
|
"options": "Price List"
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Price List",
|
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"depends_on": "",
|
|
||||||
"fieldname": "payment_terms",
|
"fieldname": "payment_terms",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Default Payment Terms Template",
|
"label": "Default Payment Terms Template",
|
||||||
"length": 0,
|
"options": "Payment Terms Template"
|
||||||
"no_copy": 0,
|
|
||||||
"options": "Payment Terms Template",
|
|
||||||
"permlevel": 0,
|
|
||||||
"precision": "",
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "credit_limit",
|
|
||||||
"fieldtype": "Currency",
|
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Credit Limit",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 1,
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "lft",
|
"fieldname": "lft",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "lft",
|
"label": "lft",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "lft",
|
"oldfieldname": "lft",
|
||||||
"oldfieldtype": "Int",
|
"oldfieldtype": "Int",
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 1,
|
"report_hide": 1,
|
||||||
"reqd": 0,
|
"search_index": 1
|
||||||
"search_index": 1,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "rgt",
|
"fieldname": "rgt",
|
||||||
"fieldtype": "Int",
|
"fieldtype": "Int",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "rgt",
|
"label": "rgt",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "rgt",
|
"oldfieldname": "rgt",
|
||||||
"oldfieldtype": "Int",
|
"oldfieldtype": "Int",
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 1,
|
"report_hide": 1,
|
||||||
"reqd": 0,
|
"search_index": 1
|
||||||
"search_index": 1,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"description": "",
|
|
||||||
"fieldname": "old_parent",
|
"fieldname": "old_parent",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
"ignore_user_permissions": 1,
|
"ignore_user_permissions": 1,
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "old_parent",
|
"label": "old_parent",
|
||||||
"length": 0,
|
|
||||||
"no_copy": 1,
|
"no_copy": 1,
|
||||||
"oldfieldname": "old_parent",
|
"oldfieldname": "old_parent",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
"options": "Customer Group",
|
"options": "Customer Group",
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
"report_hide": 1
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 1,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"fieldname": "default_receivable_account",
|
"fieldname": "default_receivable_account",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"label": "Default Receivable Account"
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Default Receivable Account",
|
|
||||||
"length": 0,
|
|
||||||
"no_copy": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print_hide": 0,
|
|
||||||
"print_hide_if_no_value": 0,
|
|
||||||
"read_only": 0,
|
|
||||||
"remember_last_selected_value": 0,
|
|
||||||
"report_hide": 0,
|
|
||||||
"reqd": 0,
|
|
||||||
"search_index": 0,
|
|
||||||
"set_only_once": 0,
|
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_bulk_edit": 0,
|
|
||||||
"allow_in_quick_entry": 0,
|
|
||||||
"allow_on_submit": 0,
|
|
||||||
"bold": 0,
|
|
||||||
"collapsible": 0,
|
|
||||||
"columns": 0,
|
|
||||||
"depends_on": "eval:!doc.__islocal",
|
"depends_on": "eval:!doc.__islocal",
|
||||||
"description": "Mention if non-standard receivable account applicable",
|
"description": "Mention if non-standard receivable account applicable",
|
||||||
"fieldname": "accounts",
|
"fieldname": "accounts",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
|
||||||
"ignore_user_permissions": 0,
|
|
||||||
"ignore_xss_filter": 0,
|
|
||||||
"in_filter": 0,
|
|
||||||
"in_global_search": 0,
|
|
||||||
"in_list_view": 0,
|
|
||||||
"in_standard_filter": 0,
|
|
||||||
"label": "Accounts",
|
"label": "Accounts",
|
||||||
"length": 0,
|
"options": "Party Account"
|
||||||
"no_copy": 0,
|
},
|
||||||
"options": "Party Account",
|
{
|
||||||
"permlevel": 0,
|
"fieldname": "credit_limit_section",
|
||||||
"print_hide": 0,
|
"fieldtype": "Section Break",
|
||||||
"print_hide_if_no_value": 0,
|
"label": "Credit Limits"
|
||||||
"read_only": 0,
|
},
|
||||||
"remember_last_selected_value": 0,
|
{
|
||||||
"report_hide": 0,
|
"fieldname": "credit_limits",
|
||||||
"reqd": 0,
|
"fieldtype": "Table",
|
||||||
"search_index": 0,
|
"label": "Credit Limit",
|
||||||
"set_only_once": 0,
|
"options": "Customer Credit Limit"
|
||||||
"translatable": 0,
|
|
||||||
"unique": 0
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"has_web_view": 0,
|
|
||||||
"hide_heading": 0,
|
|
||||||
"hide_toolbar": 0,
|
|
||||||
"icon": "fa fa-sitemap",
|
"icon": "fa fa-sitemap",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"image_view": 0,
|
"modified": "2019-09-06 12:40:14.954697",
|
||||||
"in_create": 0,
|
|
||||||
"is_submittable": 0,
|
|
||||||
"issingle": 0,
|
|
||||||
"istable": 0,
|
|
||||||
"max_attachments": 0,
|
|
||||||
"modified": "2018-08-29 06:26:05.935871",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Setup",
|
"module": "Setup",
|
||||||
"name": "Customer Group",
|
"name": "Customer Group",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"amend": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 0,
|
|
||||||
"delete": 0,
|
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 0,
|
|
||||||
"if_owner": 0,
|
|
||||||
"import": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Sales Manager",
|
"role": "Sales Manager"
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 0,
|
|
||||||
"submit": 0,
|
|
||||||
"write": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 0,
|
|
||||||
"delete": 0,
|
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 0,
|
|
||||||
"if_owner": 0,
|
|
||||||
"import": 0,
|
|
||||||
"permlevel": 0,
|
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Sales User",
|
"role": "Sales User"
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 0,
|
|
||||||
"submit": 0,
|
|
||||||
"write": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 1,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
"if_owner": 0,
|
|
||||||
"import": 1,
|
"import": 1,
|
||||||
"permlevel": 0,
|
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
"role": "Sales Master Manager",
|
"role": "Sales Master Manager",
|
||||||
"set_user_permissions": 1,
|
"set_user_permissions": 1,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"submit": 0,
|
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 0,
|
|
||||||
"delete": 0,
|
|
||||||
"email": 0,
|
|
||||||
"export": 0,
|
|
||||||
"if_owner": 0,
|
|
||||||
"import": 0,
|
|
||||||
"permlevel": 1,
|
"permlevel": 1,
|
||||||
"print": 0,
|
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
|
||||||
"role": "Sales Master Manager",
|
"role": "Sales Master Manager",
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 0,
|
|
||||||
"submit": 0,
|
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 0,
|
|
||||||
"delete": 0,
|
|
||||||
"email": 0,
|
|
||||||
"export": 0,
|
|
||||||
"if_owner": 0,
|
|
||||||
"import": 0,
|
|
||||||
"permlevel": 1,
|
"permlevel": 1,
|
||||||
"print": 0,
|
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"role": "Sales User"
|
||||||
"role": "Sales User",
|
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 0,
|
|
||||||
"submit": 0,
|
|
||||||
"write": 0
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"amend": 0,
|
|
||||||
"cancel": 0,
|
|
||||||
"create": 0,
|
|
||||||
"delete": 0,
|
|
||||||
"email": 0,
|
|
||||||
"export": 0,
|
|
||||||
"if_owner": 0,
|
|
||||||
"import": 0,
|
|
||||||
"permlevel": 1,
|
"permlevel": 1,
|
||||||
"print": 0,
|
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"role": "Sales Manager"
|
||||||
"role": "Sales Manager",
|
|
||||||
"set_user_permissions": 0,
|
|
||||||
"share": 0,
|
|
||||||
"submit": 0,
|
|
||||||
"write": 0
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 1,
|
"quick_entry": 1,
|
||||||
"read_only": 0,
|
|
||||||
"read_only_onload": 0,
|
|
||||||
"search_fields": "parent_customer_group",
|
"search_fields": "parent_customer_group",
|
||||||
"show_name_in_global_search": 1,
|
"show_name_in_global_search": 1,
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC"
|
||||||
"track_changes": 0,
|
|
||||||
"track_seen": 0,
|
|
||||||
"track_views": 0
|
|
||||||
}
|
}
|
@ -234,8 +234,10 @@ class DeliveryNote(SellingController):
|
|||||||
|
|
||||||
extra_amount = 0
|
extra_amount = 0
|
||||||
validate_against_credit_limit = False
|
validate_against_credit_limit = False
|
||||||
bypass_credit_limit_check_at_sales_order = cint(frappe.db.get_value("Customer", self.customer,
|
bypass_credit_limit_check_at_sales_order = cint(frappe.db.get_value("Customer Credit Limit",
|
||||||
"bypass_credit_limit_check_at_sales_order"))
|
filters={'parent': self.customer, 'parenttype': 'Customer', 'company': self.company},
|
||||||
|
fieldname="bypass_credit_limit_check"))
|
||||||
|
|
||||||
if bypass_credit_limit_check_at_sales_order:
|
if bypass_credit_limit_check_at_sales_order:
|
||||||
validate_against_credit_limit = True
|
validate_against_credit_limit = True
|
||||||
extra_amount = self.base_grand_total
|
extra_amount = self.base_grand_total
|
||||||
|
Loading…
x
Reference in New Issue
Block a user