mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
Merge branch 'master' of github.com:webnotes/erpnext into responsive
Conflicts: accounts/doctype/sales_invoice/sales_invoice.py selling/doctype/sales_common/sales_common.py
This commit is contained in:
@@ -219,27 +219,8 @@ class DocType(TransactionBase):
|
||||
def on_rename(self, new, old, merge=False):
|
||||
#update customer_name if not naming series
|
||||
if webnotes.defaults.get_global_default('cust_master_name') == 'Customer Name':
|
||||
update_fields = [
|
||||
('Customer', 'name'),
|
||||
('Address', 'customer'),
|
||||
('Contact', 'customer'),
|
||||
('Customer Issue', 'customer'),
|
||||
('Delivery Note', 'customer'),
|
||||
('Opportunity', 'customer'),
|
||||
('Installation Note', 'customer'),
|
||||
('Maintenance Schedule', 'customer'),
|
||||
('Maintenance Visit', 'customer'),
|
||||
('Project', 'customer'),
|
||||
('Quotation', 'customer'),
|
||||
('Sales Invoice', 'customer'),
|
||||
('Sales Order', 'customer'),
|
||||
('Serial No', 'customer'),
|
||||
('Shipping Address', 'customer'),
|
||||
('Stock Entry', 'customer'),
|
||||
('Support Ticket', 'customer')]
|
||||
for rec in update_fields:
|
||||
sql("""update `tab%s` set customer_name = %s
|
||||
where `%s` = %s""" % (rec[0], "%s" ,rec[1], "%s"), (new, old))
|
||||
webnotes.conn.sql("""update `tabCustomer` set customer_name = %s where name = %s""",
|
||||
(new, old))
|
||||
|
||||
for account in webnotes.conn.sql("""select name, account_name from
|
||||
tabAccount where master_name=%s and master_type='Customer'""", old, as_dict=1):
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
[
|
||||
{
|
||||
"creation": "2013-05-03 14:38:34",
|
||||
"creation": "2013-05-23 17:42:24",
|
||||
"docstatus": 0,
|
||||
"modified": "2013-05-07 11:19:40",
|
||||
"modified": "2013-05-24 12:20:17",
|
||||
"modified_by": "Administrator",
|
||||
"owner": "Administrator"
|
||||
},
|
||||
{
|
||||
"add_total_row": 1,
|
||||
"disabled": 0,
|
||||
"doctype": "Report",
|
||||
"is_standard": "Yes",
|
||||
"name": "__common__",
|
||||
|
||||
@@ -50,5 +50,11 @@ wn.query_reports["Sales Person-wise Transaction Summary"] = {
|
||||
fieldtype: "Link",
|
||||
options: "Customer",
|
||||
},
|
||||
{
|
||||
fieldname:"territory",
|
||||
label: "Territory",
|
||||
fieldtype: "Link",
|
||||
options: "Territory",
|
||||
},
|
||||
]
|
||||
}
|
||||
@@ -54,6 +54,7 @@ def get_conditions(filters, date_field):
|
||||
conditions = ""
|
||||
if filters.get("company"): conditions += " and dt.company = '%s'" % filters["company"]
|
||||
if filters.get("customer"): conditions += " and dt.customer = '%s'" % filters["customer"]
|
||||
if filters.get("territory"): conditions += " and dt.territory = '%s'" % filters["territory"]
|
||||
|
||||
if filters.get("from_date"): conditions += " and dt.%s >= '%s'" % \
|
||||
(date_field, filters["from_date"])
|
||||
|
||||
Reference in New Issue
Block a user