From 15afe879846aa131d0df4296f0e4c1e91687cf91 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 16 Mar 2012 15:11:02 +0530 Subject: [PATCH 1/4] cost center will be fetched from other charges master --- erpnext/selling/doctype/sales_common/sales_common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_common/sales_common.py b/erpnext/selling/doctype/sales_common/sales_common.py index 9186bb831b..33a1d1d57d 100644 --- a/erpnext/selling/doctype/sales_common/sales_common.py +++ b/erpnext/selling/doctype/sales_common/sales_common.py @@ -209,13 +209,14 @@ class DocType(TransactionBase): if default: add_cond = 'ifnull(t2.is_default,0) = 1' else: add_cond = 't1.parent = "'+cstr(obj.doc.charge)+'"' idx = 0 - other_charge = webnotes.conn.sql("select t1.charge_type,t1.row_id,t1.description,t1.account_head,t1.rate,t1.tax_amount,t1.included_in_print_rate from `tabRV Tax Detail` t1, `tabOther Charges` t2 where t1.parent = t2.name and t2.company = '%s' and %s order by t1.idx" % (obj.doc.company, add_cond), as_dict = 1) + other_charge = webnotes.conn.sql("select t1.charge_type,t1.row_id,t1.description,t1.account_head,t1.rate,t1.tax_amount,t1.included_in_print_rate, t1.cost_center from `tabRV Tax Detail` t1, `tabOther Charges` t2 where t1.parent = t2.name and t2.company = '%s' and %s order by t1.idx" % (obj.doc.company, add_cond), as_dict = 1) for other in other_charge: d = addchild(obj.doc, 'other_charges', 'RV Tax Detail', 1, obj.doclist) d.charge_type = other['charge_type'] d.row_id = other['row_id'] d.description = other['description'] d.account_head = other['account_head'] + d.cost_center = other['cost_center'] d.rate = flt(other['rate']) d.tax_amount = flt(other['tax_amount']) d.included_in_print_rate = cint(other['included_in_print_rate']) From deac31fd2dd3b5c636038042ee40ac674c37a095 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 16 Mar 2012 15:14:27 +0530 Subject: [PATCH 2/4] Update erpnext/selling/doctype/sales_common/sales_common.py --- erpnext/selling/doctype/sales_common/sales_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/sales_common/sales_common.py b/erpnext/selling/doctype/sales_common/sales_common.py index 33a1d1d57d..63f53eab7b 100644 --- a/erpnext/selling/doctype/sales_common/sales_common.py +++ b/erpnext/selling/doctype/sales_common/sales_common.py @@ -209,14 +209,14 @@ class DocType(TransactionBase): if default: add_cond = 'ifnull(t2.is_default,0) = 1' else: add_cond = 't1.parent = "'+cstr(obj.doc.charge)+'"' idx = 0 - other_charge = webnotes.conn.sql("select t1.charge_type,t1.row_id,t1.description,t1.account_head,t1.rate,t1.tax_amount,t1.included_in_print_rate, t1.cost_center from `tabRV Tax Detail` t1, `tabOther Charges` t2 where t1.parent = t2.name and t2.company = '%s' and %s order by t1.idx" % (obj.doc.company, add_cond), as_dict = 1) + other_charge = webnotes.conn.sql("select t1.charge_type,t1.row_id,t1.description,t1.account_head,t1.rate,t1.tax_amount,t1.included_in_print_rate, t1.cost_center_other_charges from `tabRV Tax Detail` t1, `tabOther Charges` t2 where t1.parent = t2.name and t2.company = '%s' and %s order by t1.idx" % (obj.doc.company, add_cond), as_dict = 1) for other in other_charge: d = addchild(obj.doc, 'other_charges', 'RV Tax Detail', 1, obj.doclist) d.charge_type = other['charge_type'] d.row_id = other['row_id'] d.description = other['description'] d.account_head = other['account_head'] - d.cost_center = other['cost_center'] + d.cost_center_other_charges = other['cost_center_other_charges'] d.rate = flt(other['rate']) d.tax_amount = flt(other['tax_amount']) d.included_in_print_rate = cint(other['included_in_print_rate']) From 9f5b2cd8d94458458752577fe2165e27292a36c0 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 19 Mar 2012 10:20:22 +0530 Subject: [PATCH 3/4] Update erpnext/stock/doctype/delivery_note/delivery_note.txt --- erpnext/stock/doctype/delivery_note/delivery_note.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt index 314d0d9481..4878c36bad 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.txt +++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt @@ -31,11 +31,11 @@ 'module': u'Stock', 'name': '__common__', 'read_only_onload': 1, - 'search_fields': u'status,transaction_date,customer,customer_name, territory,grand_total', + 'search_fields': u'status,customer,customer_name, territory,grand_total', 'section_style': u'Tabbed', 'server_code_error': u' ', 'show_in_menu': 0, - 'subject': u'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed', + 'subject': u'To %(customer_name)s on %(posting_date)s | %(per_billed)s% billed', 'tag_fields': u'billing_status', 'version': 475 }, From 15a02715573d36991c3b8532523bb8d5841d6dde Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 19 Mar 2012 10:22:32 +0530 Subject: [PATCH 4/4] Update erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt --- erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt index 525bcfcef2..6724b694ef 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt @@ -21,11 +21,11 @@ 'module': u'Stock', 'name': '__common__', 'read_only_onload': 1, - 'search_fields': u'status, transaction_date, supplier', + 'search_fields': u'status, posting_date, supplier', 'section_style': u'Tabbed', 'server_code_error': u' ', 'show_in_menu': 0, - 'subject': u'From %(supplier_name)s against %(purchase_order)s on %(transaction_date)s', + 'subject': u'From %(supplier_name)s against %(purchase_order)s on %(posting_date)s', 'version': 325 },