From 6ed0450dba393b53991b602695f156b5b847501b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 28 Mar 2012 11:32:44 +0530 Subject: [PATCH 01/22] reload mapper for checking ref value --- .../Delivery Note-Receivable Voucher.txt | 12 +++++++++++- .../Sales Order-Receivable Voucher.txt | 12 +++++++++++- erpnext/patches/jan_mar_2012/reload_mapper.py | 7 +++++++ erpnext/patches/patch_list.py | 5 +++++ .../Sales Order-Delivery Note.txt | 6 +++--- 5 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 erpnext/patches/jan_mar_2012/reload_mapper.py diff --git a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt index 9ed756f023..185af99c26 100644 --- a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt @@ -134,6 +134,16 @@ 'to_field': 'serial_no' }, + # Field Mapper Detail + { + 'checking_operator': u'=', + 'doctype': u'Field Mapper Detail', + 'from_field': u'export_rate', + 'map': u'Yes', + 'match_id': 1, + 'to_field': u'export_rate' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail', @@ -186,4 +196,4 @@ 'to_table': 'Sales Team', 'validation_logic': 'name is not null' } -] \ No newline at end of file +] diff --git a/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt index 630fb1502a..fb180ff1f8 100644 --- a/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt @@ -136,6 +136,16 @@ 'to_field': 'incentives' }, + # Field Mapper Detail + { + 'checking_operator': u'=', + 'doctype': u'Field Mapper Detail', + 'from_field': u'export_rate', + 'map': u'Yes', + 'match_id': 1, + 'to_field': u'export_rate' + }, + # Table Mapper Detail { 'doctype': 'Table Mapper Detail', @@ -188,4 +198,4 @@ 'to_table': 'Sales Team', 'validation_logic': 'name is not null' } -] \ No newline at end of file +] diff --git a/erpnext/patches/jan_mar_2012/reload_mapper.py b/erpnext/patches/jan_mar_2012/reload_mapper.py new file mode 100644 index 0000000000..3a43d871b9 --- /dev/null +++ b/erpnext/patches/jan_mar_2012/reload_mapper.py @@ -0,0 +1,7 @@ +def execute(): + import webnotes + from webnotes.modules.module_manager import reload_doc + + reload_doc('stock', 'DocType Mapper', 'Sales Order-Delivery Note') + reload_doc('accounts', 'DocType Mapper', 'Sales Order-Receivable Voucher') + reload_doc('accounts', 'DocType Mapper', 'Delivery Note-Receivable Voucher') diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 3bf4b6a3ae..247f5d88ea 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -207,5 +207,10 @@ patch_list = [ 'patch_file': 'update_se_fld_options', 'description': 'Purpose SE: Others to Other' }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'reload_mapper', + 'description': 'SO-DN, SO-Rv, DN-RV' + }, ] diff --git a/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt b/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt index fcadcd4245..43e800fef3 100644 --- a/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt +++ b/erpnext/stock/DocType Mapper/Sales Order-Delivery Note/Sales Order-Delivery Note.txt @@ -131,10 +131,10 @@ { 'checking_operator': u'=', 'doctype': u'Field Mapper Detail', - 'from_field': u'basic_rate', + 'from_field': u'export_rate', 'map': u'Yes', 'match_id': 1, - 'to_field': u'basic_rate' + 'to_field': u'export_rate' }, # Field Mapper Detail @@ -264,4 +264,4 @@ 'to_table': u'Delivery Note', 'validation_logic': u'docstatus = 1' } -] \ No newline at end of file +] From 13f789701efeb273de65985fbbaa07a3b0bfbb88 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 28 Mar 2012 11:33:25 +0530 Subject: [PATCH 02/22] erro fixed in reorder_item --- erpnext/stock/doctype/bin/bin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py index dc847f6f6a..de2d1315c4 100644 --- a/erpnext/stock/doctype/bin/bin.py +++ b/erpnext/stock/doctype/bin/bin.py @@ -337,12 +337,12 @@ class DocType: and t1.docstatus != 2 """, self.doc.item_code) - if ((flt(ret[0]['re_order_level']) > flt(current_qty)) and ret[0]['re_order_level']): - self.create_auto_indent(ret[0], doc_type, doc_name) + if ((flt(ret[0]['re_order_level']) > flt(current_qty[0][0])) and ret[0]['re_order_level']): + self.create_auto_indent(ret[0], doc_type, doc_name, current_qty[0][0]) - def create_auto_indent(self, i , doc_type, doc_name): + def create_auto_indent(self, i , doc_type, doc_name, cur_qty): """ Create indent on reaching reorder level """ indent = Document('Indent') @@ -361,7 +361,7 @@ class DocType: indent_details_child.item_name = i['item_name'] indent_details_child.description = i['description'] indent_details_child.item_group = i['item_group'] - indent_details_child.qty = i['re_order_qty'] + indent_details_child.qty = i['re_order_qty'] or (flt(i['re_order_level']) - flt(cur_qty)) indent_details_child.brand = i['brand'] indent_details_child.save() indent_obj = get_obj('Indent',indent.name,with_children=1) From 5b00addaf777cbf708ba58f969ee676d36dee726 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 28 Mar 2012 11:38:25 +0530 Subject: [PATCH 03/22] reload mapper for checking ref value --- erpnext/patches/jan_mar_2012/reload_mapper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/patches/jan_mar_2012/reload_mapper.py b/erpnext/patches/jan_mar_2012/reload_mapper.py index 3a43d871b9..a6e3102bba 100644 --- a/erpnext/patches/jan_mar_2012/reload_mapper.py +++ b/erpnext/patches/jan_mar_2012/reload_mapper.py @@ -5,3 +5,5 @@ def execute(): reload_doc('stock', 'DocType Mapper', 'Sales Order-Delivery Note') reload_doc('accounts', 'DocType Mapper', 'Sales Order-Receivable Voucher') reload_doc('accounts', 'DocType Mapper', 'Delivery Note-Receivable Voucher') + + webnotes.conn.sql("delete from `tabField Mapper Detail` where parent = 'Sales Order-Delivery Note' and from_field = 'basic_rate' and to_field = 'basic_rate'") From e6340f26c2861545dfffb61177a2b9170d598101 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 28 Mar 2012 14:11:31 +0530 Subject: [PATCH 04/22] mapper fix in DN_RV --- .../Delivery Note-Receivable Voucher.txt | 11 ----------- erpnext/patches/jan_mar_2012/mapper_fix.py | 3 +++ erpnext/patches/patch_list.py | 5 +++++ 3 files changed, 8 insertions(+), 11 deletions(-) create mode 100644 erpnext/patches/jan_mar_2012/mapper_fix.py diff --git a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt index 185af99c26..7a4544fff8 100644 --- a/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Delivery Note-Receivable Voucher/Delivery Note-Receivable Voucher.txt @@ -153,17 +153,6 @@ 'validation_logic': 'docstatus=1' }, - # Table Mapper Detail - { - 'doctype': 'Table Mapper Detail', - 'from_field': 'delivery_note_details', - 'from_table': 'Delivery Note Detail', - 'match_id': 1, - 'to_field': 'entries', - 'to_table': 'RV Detail', - 'validation_logic': 'amount > ifnull(billed_amt, 0) and docstatus = 1' - }, - # Table Mapper Detail { 'doctype': 'Table Mapper Detail', diff --git a/erpnext/patches/jan_mar_2012/mapper_fix.py b/erpnext/patches/jan_mar_2012/mapper_fix.py new file mode 100644 index 0000000000..c651c5ed74 --- /dev/null +++ b/erpnext/patches/jan_mar_2012/mapper_fix.py @@ -0,0 +1,3 @@ +def execute(): + import webnotes + webnotes.conn.sql("delete from `tabTable Mapper Detail` where to_table = 'RV Detail' and parent = 'Delivery Note-Receivable Voucher' and validation_logic = 'amount > ifnull(billed_amt, 0) and docstatus = 1'") diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 247f5d88ea..5e6a50423d 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -212,5 +212,10 @@ patch_list = [ 'patch_file': 'reload_mapper', 'description': 'SO-DN, SO-Rv, DN-RV' }, + { + 'patch_module': 'patches.jan_mar_2012', + 'patch_file': 'mapper_fix', + 'description': 'DN-RV duplicate table entry' + }, ] From 779a365420fa0094fe8711c2f8196e7da8b29146 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 28 Mar 2012 18:31:26 +0530 Subject: [PATCH 05/22] fix in print hide of amount in words --- .../doctype/receivable_voucher/receivable_voucher.txt | 4 ++-- erpnext/selling/doctype/quotation/quotation.txt | 4 ++-- erpnext/selling/doctype/sales_order/sales_order.txt | 4 ++-- erpnext/setup/doctype/other_charges/other_charges.js | 6 +++++- erpnext/stock/doctype/delivery_note/delivery_note.txt | 4 ++-- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt index 546d99781d..9d84f21d64 100644 --- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt +++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt @@ -935,7 +935,7 @@ 'oldfieldname': u'in_words_export', 'oldfieldtype': u'Data', 'permlevel': 1, - 'print_hide': 1 + 'print_hide': 0 }, # DocField @@ -1518,4 +1518,4 @@ 'permlevel': 0, 'print_hide': 1 } -] \ No newline at end of file +] diff --git a/erpnext/selling/doctype/quotation/quotation.txt b/erpnext/selling/doctype/quotation/quotation.txt index c8e3ecb37f..39a7327728 100644 --- a/erpnext/selling/doctype/quotation/quotation.txt +++ b/erpnext/selling/doctype/quotation/quotation.txt @@ -875,7 +875,7 @@ 'oldfieldname': u'in_words_export', 'oldfieldtype': u'Data', 'permlevel': 1, - 'print_hide': 1, + 'print_hide': 0, 'width': u'200px' }, @@ -1199,4 +1199,4 @@ 'permlevel': 0, 'print_hide': 1 } -] \ No newline at end of file +] diff --git a/erpnext/selling/doctype/sales_order/sales_order.txt b/erpnext/selling/doctype/sales_order/sales_order.txt index a82f9704f2..7a11bda9ce 100644 --- a/erpnext/selling/doctype/sales_order/sales_order.txt +++ b/erpnext/selling/doctype/sales_order/sales_order.txt @@ -963,7 +963,7 @@ 'oldfieldname': u'in_words_export', 'oldfieldtype': u'Data', 'permlevel': 1, - 'print_hide': 1, + 'print_hide': 0, 'width': u'200px' }, @@ -1333,4 +1333,4 @@ 'permlevel': 0, 'print_hide': 1 } -] \ No newline at end of file +] diff --git a/erpnext/setup/doctype/other_charges/other_charges.js b/erpnext/setup/doctype/other_charges/other_charges.js index a6f457d8df..85bdb7968a 100644 --- a/erpnext/setup/doctype/other_charges/other_charges.js +++ b/erpnext/setup/doctype/other_charges/other_charges.js @@ -36,6 +36,10 @@ cur_frm.pformat.rounded_total_export = function(doc) { return ''; } +cur_frm.pformat.in_words_export = function(doc) { + return ''; +} + cur_frm.pformat.other_charges= function(doc){ //function to make row of table var make_row = function(title,val,bold){ @@ -89,7 +93,7 @@ cur_frm.pformat.other_charges= function(doc){ out += make_row('Rounded Total',fmt_money(doc.rounded_total_export),1); } - if(doc.in_words_export){ + if(doc.in_words_export && !print_hide_dict['in_words_export']){ out +=''; out += ''; out += '' diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt index 4878c36bad..7bbd7d58e7 100644 --- a/erpnext/stock/doctype/delivery_note/delivery_note.txt +++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt @@ -869,7 +869,7 @@ 'oldfieldname': u'in_words_export', 'oldfieldtype': u'Data', 'permlevel': 1, - 'print_hide': 1, + 'print_hide': 0, 'width': u'150px' }, @@ -1346,4 +1346,4 @@ 'permlevel': 0, 'print_hide': 1 } -] \ No newline at end of file +] From 419260298bffcfe8080e92ece816c6c9223508c7 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 28 Mar 2012 19:12:36 +0530 Subject: [PATCH 06/22] fix in mapper --- erpnext/patches/mar_2012/so_rv_mapper_fix.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 erpnext/patches/mar_2012/so_rv_mapper_fix.py diff --git a/erpnext/patches/mar_2012/so_rv_mapper_fix.py b/erpnext/patches/mar_2012/so_rv_mapper_fix.py new file mode 100644 index 0000000000..9e7fc998d9 --- /dev/null +++ b/erpnext/patches/mar_2012/so_rv_mapper_fix.py @@ -0,0 +1,7 @@ +def execute(): + import webnotes + webnotes.conn.sql("""DELETE FROM `tabTable Mapper Detail` + WHERE parent='Sales Order-Receivable Voucher' + AND from_table='Sales Order Detail'""") + from webnotes.modules.module_manager import reload_doc + reload_doc('accounts', 'DocType Mapper', 'Sales Order-Receivable Voucher') From 9767f79845262c54f4782b815e65c14eaf1f4371 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 28 Mar 2012 19:25:29 +0530 Subject: [PATCH 07/22] fix in Sales Order-Receivable Voucher Mapper --- .../Sales Order-Receivable Voucher.txt | 173 ++++++++---------- erpnext/patches/mar_2012/so_rv_mapper_fix.py | 9 +- 2 files changed, 87 insertions(+), 95 deletions(-) diff --git a/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt b/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt index fb180ff1f8..d076d9f01d 100644 --- a/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt +++ b/erpnext/accounts/DocType Mapper/Sales Order-Receivable Voucher/Sales Order-Receivable Voucher.txt @@ -3,137 +3,137 @@ # These values are common in all dictionaries { - 'creation': '2010-08-08 17:09:36', + 'creation': '2010-09-20 12:33:35', 'docstatus': 0, - 'modified': '2011-09-15 15:04:45', - 'modified_by': 'Administrator', - 'owner': 'Administrator' + 'modified': '2012-03-28 19:19:38', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all Table Mapper Detail { - 'doctype': 'Table Mapper Detail', + 'doctype': u'Table Mapper Detail', 'name': '__common__', - 'parent': 'Sales Order-Receivable Voucher', - 'parentfield': 'table_mapper_details', - 'parenttype': 'DocType Mapper' + 'parent': u'Sales Order-Receivable Voucher', + 'parentfield': u'table_mapper_details', + 'parenttype': u'DocType Mapper' }, # These values are common for all Field Mapper Detail { - 'doctype': 'Field Mapper Detail', + 'doctype': u'Field Mapper Detail', 'name': '__common__', - 'parent': 'Sales Order-Receivable Voucher', - 'parentfield': 'field_mapper_details', - 'parenttype': 'DocType Mapper' + 'parent': u'Sales Order-Receivable Voucher', + 'parentfield': u'field_mapper_details', + 'parenttype': u'DocType Mapper' }, # These values are common for all DocType Mapper { 'doctype': u'DocType Mapper', - 'from_doctype': 'Sales Order', - 'module': 'Accounts', + 'from_doctype': u'Sales Order', + 'module': u'Accounts', 'name': '__common__', 'ref_doc_submitted': 1, - 'to_doctype': 'Receivable Voucher' + 'to_doctype': u'Receivable Voucher' }, # DocType Mapper, Sales Order-Receivable Voucher { 'doctype': u'DocType Mapper', - 'name': 'Sales Order-Receivable Voucher' + 'name': u'Sales Order-Receivable Voucher' }, # Field Mapper Detail { - 'checking_operator': '=', - 'doctype': 'Field Mapper Detail', - 'from_field': 'customer', - 'map': 'Yes', + 'checking_operator': u'=', + 'doctype': u'Field Mapper Detail', + 'from_field': u'customer', + 'map': u'Yes', 'match_id': 0, - 'to_field': 'customer' + 'to_field': u'customer' }, # Field Mapper Detail { - 'doctype': 'Field Mapper Detail', - 'from_field': 'eval: obj.basic_rate and (flt(obj.amount) - flt(obj.billed_amt))/flt(obj.basic_rate) or obj.qty', - 'map': 'Yes', + 'doctype': u'Field Mapper Detail', + 'from_field': u'eval: obj.basic_rate and (flt(obj.amount) - flt(obj.billed_amt))/flt(obj.basic_rate) or obj.qty', + 'map': u'Yes', 'match_id': 1, - 'to_field': 'qty' + 'to_field': u'qty' }, # Field Mapper Detail { - 'doctype': 'Field Mapper Detail', - 'from_field': 'parent', - 'map': 'Yes', + 'doctype': u'Field Mapper Detail', + 'from_field': u'parent', + 'map': u'Yes', 'match_id': 1, - 'to_field': 'sales_order' + 'to_field': u'sales_order' }, # Field Mapper Detail { - 'doctype': 'Field Mapper Detail', - 'from_field': 'name', - 'map': 'Yes', + 'doctype': u'Field Mapper Detail', + 'from_field': u'name', + 'map': u'Yes', 'match_id': 1, - 'to_field': 'so_detail' + 'to_field': u'so_detail' }, # Field Mapper Detail { - 'doctype': 'Field Mapper Detail', - 'from_field': 'eval:flt(obj.amount) - flt(obj.billed_amt)', - 'map': 'Yes', + 'doctype': u'Field Mapper Detail', + 'from_field': u'eval:flt(obj.amount) - flt(obj.billed_amt)', + 'map': u'Yes', 'match_id': 1, - 'to_field': 'amount' + 'to_field': u'amount' }, # Field Mapper Detail { - 'doctype': 'Field Mapper Detail', - 'from_field': 'eval: (flt(obj.amount) - flt(obj.billed_amt))* flt(obj.export_rate)/flt(obj.basic_rate)', - 'map': 'Yes', + 'doctype': u'Field Mapper Detail', + 'from_field': u'eval: (flt(obj.amount) - flt(obj.billed_amt))* flt(obj.export_rate)/flt(obj.basic_rate)', + 'map': u'Yes', 'match_id': 1, - 'to_field': 'export_amount' + 'to_field': u'export_amount' }, # Field Mapper Detail { - 'checking_operator': '=', - 'doctype': 'Field Mapper Detail', - 'from_field': 'project_name', - 'map': 'Yes', + 'checking_operator': u'=', + 'doctype': u'Field Mapper Detail', + 'from_field': u'project_name', + 'map': u'Yes', 'match_id': 0, - 'to_field': 'project_name' + 'to_field': u'project_name' }, # Field Mapper Detail { - 'doctype': 'Field Mapper Detail', - 'from_field': 'reserved_warehouse', - 'map': 'Yes', + 'doctype': u'Field Mapper Detail', + 'from_field': u'reserved_warehouse', + 'map': u'Yes', 'match_id': 1, - 'to_field': 'warehouse' + 'to_field': u'warehouse' }, # Field Mapper Detail { - 'doctype': 'Field Mapper Detail', - 'from_field': 'naming_series', - 'map': 'No', + 'doctype': u'Field Mapper Detail', + 'from_field': u'naming_series', + 'map': u'No', 'match_id': 0, - 'to_field': 'naming_series' + 'to_field': u'naming_series' }, # Field Mapper Detail { - 'doctype': 'Field Mapper Detail', - 'from_field': 'incentives', - 'map': 'No', + 'doctype': u'Field Mapper Detail', + 'from_field': u'incentives', + 'map': u'No', 'match_id': 3, - 'to_field': 'incentives' + 'to_field': u'incentives' }, # Field Mapper Detail @@ -148,54 +148,43 @@ # Table Mapper Detail { - 'doctype': 'Table Mapper Detail', - 'from_table': 'Sales Order', + 'doctype': u'Table Mapper Detail', + 'from_table': u'Sales Order', 'match_id': 0, - 'to_table': 'Receivable Voucher', - 'validation_logic': 'docstatus=1' + 'to_table': u'Receivable Voucher', + 'validation_logic': u'docstatus=1' }, # Table Mapper Detail { - 'doctype': 'Table Mapper Detail', - 'from_field': 'sales_order_detail', - 'from_table': 'Sales Order Detail', + 'doctype': u'Table Mapper Detail', + 'from_field': u'sales_order_detail', + 'from_table': u'Sales Order Detail', 'match_id': 1, - 'to_field': 'entries', - 'to_table': 'RV Detail', - 'validation_logic': 'docstatus = 1' + 'to_field': u'entries', + 'to_table': u'RV Detail', + 'validation_logic': u'(ifnull(amount, 0) = 0 or amount > ifnull(billed_amt, 0)) and docstatus = 1' }, # Table Mapper Detail { - 'doctype': 'Table Mapper Detail', - 'from_field': 'sales_order_detail', - 'from_table': 'Sales Order Detail', - 'match_id': 1, - 'to_field': 'entries', - 'to_table': 'RV Detail', - 'validation_logic': '(ifnull(amount, 0) = 0 or amount > ifnull(billed_amt, 0)) and docstatus = 1' - }, - - # Table Mapper Detail - { - 'doctype': 'Table Mapper Detail', - 'from_field': 'other_charges', - 'from_table': 'RV Tax Detail', + 'doctype': u'Table Mapper Detail', + 'from_field': u'other_charges', + 'from_table': u'RV Tax Detail', 'match_id': 2, - 'to_field': 'other_charges', - 'to_table': 'RV Tax Detail', - 'validation_logic': 'name is not null' + 'to_field': u'other_charges', + 'to_table': u'RV Tax Detail', + 'validation_logic': u'name is not null' }, # Table Mapper Detail { - 'doctype': 'Table Mapper Detail', - 'from_field': 'sales_team', - 'from_table': 'Sales Team', + 'doctype': u'Table Mapper Detail', + 'from_field': u'sales_team', + 'from_table': u'Sales Team', 'match_id': 3, - 'to_field': 'sales_team', - 'to_table': 'Sales Team', - 'validation_logic': 'name is not null' + 'to_field': u'sales_team', + 'to_table': u'Sales Team', + 'validation_logic': u'name is not null' } -] +] \ No newline at end of file diff --git a/erpnext/patches/mar_2012/so_rv_mapper_fix.py b/erpnext/patches/mar_2012/so_rv_mapper_fix.py index 9e7fc998d9..8844773a2c 100644 --- a/erpnext/patches/mar_2012/so_rv_mapper_fix.py +++ b/erpnext/patches/mar_2012/so_rv_mapper_fix.py @@ -1,7 +1,10 @@ def execute(): import webnotes - webnotes.conn.sql("""DELETE FROM `tabTable Mapper Detail` + count = webnotes.conn.sql("""SELECT COUNT(*) FROM `tabTable Mapper Detail` WHERE parent='Sales Order-Receivable Voucher' AND from_table='Sales Order Detail'""") - from webnotes.modules.module_manager import reload_doc - reload_doc('accounts', 'DocType Mapper', 'Sales Order-Receivable Voucher') + if count and count[0][0]==2: + webnotes.conn.sql("""DELETE FROM `tabTable Mapper Detail` + WHERE parent='Sales Order-Receivable Voucher' + AND from_table='Sales Order Detail' + AND validation_logic='docstatus = 1'""") From 8ac5ccae0ac7ca0cbcccbed08cafdd938db0eca0 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 28 Mar 2012 19:29:55 +0530 Subject: [PATCH 08/22] fix in Sales Order-Receivable Voucher Mapper --- erpnext/patches/patch_list.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 5e6a50423d..3099456f19 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -217,5 +217,10 @@ patch_list = [ 'patch_file': 'mapper_fix', 'description': 'DN-RV duplicate table entry' }, + { + 'patch_module': 'patches.mar_2012', + 'patch_file': 'so_rv_mapper_fix', + 'description': 'SO-RV duplicate mapper entry removal' + }, ] From 1b81badd5803302fe419baf5b25855f87b9c0e5e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 3 Apr 2012 11:27:03 +0530 Subject: [PATCH 09/22] validation changes for po item --- erpnext/buying/doctype/purchase_common/purchase_common.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.py b/erpnext/buying/doctype/purchase_common/purchase_common.py index ca9181f154..597eec4fde 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.py +++ b/erpnext/buying/doctype/purchase_common/purchase_common.py @@ -227,7 +227,7 @@ class DocType(TransactionBase): if d.fields.has_key(x): d.fields[x] = f_lst[x] - item = sql("select is_stock_item, is_purchase_item from tabItem where name=%s and (ifnull(end_of_life,'')='' or end_of_life = '0000-00-00' or end_of_life > now())", d.item_code) + item = sql("select is_stock_item, is_purchase_item, is_sub_contracted_item from tabItem where name=%s and (ifnull(end_of_life,'')='' or end_of_life = '0000-00-00' or end_of_life > now())", d.item_code) if not item: msgprint("Item %s does not exist in Item Master." % cstr(d.item_code)) raise Exception @@ -239,9 +239,10 @@ class DocType(TransactionBase): raise Exception # validate purchase item - if not item[0][1]=='Yes': - msgprint("Item %s is not purchase item." % (d.item_code)) + if item[0][1] != 'Yes' and item[0][2] != 'Yes': + msgprint("Item %s is not a purchase item or sub-contracted item. Please check" % (d.item_code)) raise Exception + if d.fields.has_key('prevdoc_docname') and d.prevdoc_docname: # check warehouse, uom in previous doc and in current doc are same. From a6eb15df4a29a659a47341cf26b63543e016d3c0 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 3 Apr 2012 13:22:20 +0530 Subject: [PATCH 10/22] fix in earning and deduction type field tyep --- .../mar_2012/earning_deduction_type_patch.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 erpnext/patches/mar_2012/earning_deduction_type_patch.py diff --git a/erpnext/patches/mar_2012/earning_deduction_type_patch.py b/erpnext/patches/mar_2012/earning_deduction_type_patch.py new file mode 100644 index 0000000000..438b34e946 --- /dev/null +++ b/erpnext/patches/mar_2012/earning_deduction_type_patch.py @@ -0,0 +1,14 @@ +def execute(): + import webnotes + webnotes.conn.sql(""" + UPDATE `tabDocField` + SET fieldtype = 'Link', options = 'Deduction Type' + WHERE parent = 'Deduction Detail' + AND fieldname = 'd_type' + """) + webnotes.conn.sql(""" + UPDATE `tabDocField` + SET fieldtype = 'Link', options = 'Earning Type' + WHERE parent = 'Earning Detail' + AND fieldname = 'e_type' + """) From fc8bf7b1d87be5018ea79ff4c6b45cadc2334657 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 3 Apr 2012 13:49:14 +0530 Subject: [PATCH 11/22] add select type link fields in permission control --- .../setup/doctype/permission_control/permission_control.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/setup/doctype/permission_control/permission_control.py b/erpnext/setup/doctype/permission_control/permission_control.py index 049a3f518d..bb05bec1cd 100644 --- a/erpnext/setup/doctype/permission_control/permission_control.py +++ b/erpnext/setup/doctype/permission_control/permission_control.py @@ -70,7 +70,10 @@ class DocType: ret.append(p) # fields list - fl = ['', 'owner'] + [l[0] for l in sql("select fieldname from tabDocField where parent=%s and fieldtype='Link' and ifnull(options,'')!=''", doctype)] + fl = ['', 'owner'] + [l[0] for l in sql("""\ + select fieldname from tabDocField where parent=%s + and ((fieldtype='Link' and ifnull(options,'')!='') or + (fieldtype='Select') and lcase(ifnull(options,'')) like 'link:%%')""", doctype)] return {'perms':ret, 'fields':fl} From 00ceafb42d7da5f7f318caded189d5c65206a754 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 3 Apr 2012 18:43:17 +0530 Subject: [PATCH 12/22] fix in fiscal year of email digest --- erpnext/setup/doctype/email_digest/email_digest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py index ff9bf68719..fb3730cb25 100644 --- a/erpnext/setup/doctype/email_digest/email_digest.py +++ b/erpnext/setup/doctype/email_digest/email_digest.py @@ -240,7 +240,9 @@ class DocType: Adds common conditions in dictionary "args" """ start_date, end_date = self.get_start_end_dates() - fiscal_start_date = webnotes.utils.get_defaults()['year_start_date'] + fiscal_year = webnotes.utils.get_defaults()['fiscal_year'] + fiscal_start_date = webnotes.conn.get_value('Fiscal Year', fiscal_year, + 'year_start_date') if 'new' in args['type']: args.update({ From f77c940fcfc8a0c459d53a12a2dd6111ae59137e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 5 Apr 2012 16:29:02 +0530 Subject: [PATCH 13/22] fixed price list currency issue --- .../selling/doctype/sales_common/sales_common.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js index cad8ec16f7..a3470ec460 100644 --- a/erpnext/selling/doctype/sales_common/sales_common.js +++ b/erpnext/selling/doctype/sales_common/sales_common.js @@ -157,11 +157,17 @@ cur_frm.cscript.hide_price_list_currency = function(doc, cdt, cdn, callback1) { args: {'price_list':doc.price_list_name, 'company': doc.company}, callback: function(r, rt) { pl_currency = r.message[0]?r.message[0]:[]; + unhide_field(['price_list_currency', 'plc_conversion_rate']); + if (pl_currency.length==1) { - if (pl_currency[0] == doc.currency) set_multiple(cdt, cdn, {price_list_currency:doc.currency, plc_conversion_rate:doc.conversion_rate}); - else if (pl_currency[0] = r.message[1]) set_multiple(cdt, cdn, {price_list_currency:pl_currency[0], plc_conversion_rate:1}) - hide_field(['price_list_currency', 'plc_conversion_rate']); - } else unhide_field(['price_list_currency', 'plc_conversion_rate']); + if (pl_currency[0] == doc.currency) { + set_multiple(cdt, cdn, {price_list_currency:doc.currency, plc_conversion_rate:doc.conversion_rate}); + hide_field(['price_list_currency', 'plc_conversion_rate']); + } else if (pl_currency[0] = r.message[1]) { + set_multiple(cdt, cdn, {price_list_currency:pl_currency[0], plc_conversion_rate:1}) + hide_field(['price_list_currency', 'plc_conversion_rate']); + } + } if (r.message[1] == doc.currency) { set_multiple(cdt, cdn, {conversion_rate:1}); From 758eed555c8f837f8938e517d70680b1c1e1e64f Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 5 Apr 2012 16:45:33 +0530 Subject: [PATCH 14/22] Update erpnext/selling/doctype/sales_common/sales_common.js --- erpnext/selling/doctype/sales_common/sales_common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js index a3470ec460..5dcdb69339 100644 --- a/erpnext/selling/doctype/sales_common/sales_common.js +++ b/erpnext/selling/doctype/sales_common/sales_common.js @@ -163,7 +163,7 @@ cur_frm.cscript.hide_price_list_currency = function(doc, cdt, cdn, callback1) { if (pl_currency[0] == doc.currency) { set_multiple(cdt, cdn, {price_list_currency:doc.currency, plc_conversion_rate:doc.conversion_rate}); hide_field(['price_list_currency', 'plc_conversion_rate']); - } else if (pl_currency[0] = r.message[1]) { + } else if (pl_currency[0] == r.message[1]) { set_multiple(cdt, cdn, {price_list_currency:pl_currency[0], plc_conversion_rate:1}) hide_field(['price_list_currency', 'plc_conversion_rate']); } From 9ba2e49468f87fe1af147a8860d25de9e5cb3fde Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 5 Apr 2012 16:54:19 +0530 Subject: [PATCH 15/22] Update erpnext/selling/doctype/sales_common/sales_common.js --- erpnext/selling/doctype/sales_common/sales_common.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js index 5dcdb69339..b257d6da51 100644 --- a/erpnext/selling/doctype/sales_common/sales_common.js +++ b/erpnext/selling/doctype/sales_common/sales_common.js @@ -160,11 +160,12 @@ cur_frm.cscript.hide_price_list_currency = function(doc, cdt, cdn, callback1) { unhide_field(['price_list_currency', 'plc_conversion_rate']); if (pl_currency.length==1) { + set_multiple(cdt, cdn, {price_list_currency:pl_currency[0]}); if (pl_currency[0] == doc.currency) { - set_multiple(cdt, cdn, {price_list_currency:doc.currency, plc_conversion_rate:doc.conversion_rate}); + set_multiple(cdt, cdn, {plc_conversion_rate:doc.conversion_rate}); hide_field(['price_list_currency', 'plc_conversion_rate']); } else if (pl_currency[0] == r.message[1]) { - set_multiple(cdt, cdn, {price_list_currency:pl_currency[0], plc_conversion_rate:1}) + set_multiple(cdt, cdn, {plc_conversion_rate:1}) hide_field(['price_list_currency', 'plc_conversion_rate']); } } From 05e4fc6eb68c8aec65fbc5e9da0900d2d9b606a4 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 6 Apr 2012 15:19:02 +0530 Subject: [PATCH 16/22] Chart of account/cc link only for accounts user and account manager role in account home page --- erpnext/accounts/page/accounts_home/accounts_home.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/page/accounts_home/accounts_home.js b/erpnext/accounts/page/accounts_home/accounts_home.js index 4551db0caa..52738a83bd 100644 --- a/erpnext/accounts/page/accounts_home/accounts_home.js +++ b/erpnext/accounts/page/accounts_home/accounts_home.js @@ -19,4 +19,12 @@ pscript['onload_accounts-home'] = function(wrapper) { if(wn.control_panel.country!='India') { $('.india-specific').toggle(false); } -} \ No newline at end of file + + if(wn.boot.profile.roles.indexOf('Accounts Manager')==-1 && wn.boot.profile.roles.indexOf('Accounts User')==-1) { + $('[href*="Accounts Browser"]').each(function() { + var txt = $(this).text(); + $(this).parent().css('color', '#999').html(txt); + }); + } + +} From 7da6ebc9af429fae358c34fec3721121bf5aa755 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 6 Apr 2012 17:30:53 +0530 Subject: [PATCH 17/22] Attachment option and total invoiced amt added in c-form --- erpnext/accounts/doctype/c_form/c_form.py | 8 + erpnext/accounts/doctype/c_form/c_form.txt | 195 ++++++++++++--------- 2 files changed, 123 insertions(+), 80 deletions(-) diff --git a/erpnext/accounts/doctype/c_form/c_form.py b/erpnext/accounts/doctype/c_form/c_form.py index 367b27aca6..bc5ed7b2a7 100644 --- a/erpnext/accounts/doctype/c_form/c_form.py +++ b/erpnext/accounts/doctype/c_form/c_form.py @@ -46,6 +46,14 @@ class DocType: else: msgprint("Please enter atleast 1 invoice in the table below", raise_exception=1) + self.calculate_total_invoiced_amount() + + def calculate_total_invoiced_amount(self): + total = 0 + for d in getlist(self.doclist, 'invoice_details'): + total += flt(d.grand_total) + webnotes.conn.set(self.doc, 'total_invoiced_amount', total) + def get_invoice_details(self, invoice_no): """ Pull details from invoices for referrence """ diff --git a/erpnext/accounts/doctype/c_form/c_form.txt b/erpnext/accounts/doctype/c_form/c_form.txt index 987bc9a7b3..2cead8913f 100644 --- a/erpnext/accounts/doctype/c_form/c_form.txt +++ b/erpnext/accounts/doctype/c_form/c_form.txt @@ -3,188 +3,223 @@ # These values are common in all dictionaries { - 'creation': '2011-12-07 16:16:16', + 'creation': '2011-12-14 11:40:47', 'docstatus': 0, - 'modified': '2011-12-07 17:50:17', - 'modified_by': 'Administrator', - 'owner': 'Administrator' + 'modified': '2012-04-06 17:29:50', + 'modified_by': u'Administrator', + 'owner': u'Administrator' }, # These values are common for all DocType { - '_last_update': '1323255350', - 'colour': 'White:FFF', + '_last_update': u'1333712835', + 'allow_attach': 1, + 'colour': u'White:FFF', 'doctype': 'DocType', - 'module': 'Accounts', + 'max_attachments': 3, + 'module': u'Accounts', 'name': '__common__', - 'section_style': 'Simple', + 'section_style': u'Simple', 'show_in_menu': 0, - 'version': 11 + 'version': 19 }, # These values are common for all DocField { - 'doctype': 'DocField', + 'doctype': u'DocField', 'name': '__common__', - 'parent': 'C-Form', - 'parentfield': 'fields', - 'parenttype': 'DocType', - 'permlevel': 0 + 'parent': u'C-Form', + 'parentfield': u'fields', + 'parenttype': u'DocType' }, # These values are common for all DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'name': '__common__', - 'parent': 'C-Form', - 'parentfield': 'permissions', - 'parenttype': 'DocType', + 'parent': u'C-Form', + 'parentfield': u'permissions', + 'parenttype': u'DocType', 'read': 1 }, # DocType, C-Form { 'doctype': 'DocType', - 'name': 'C-Form' + 'name': u'C-Form' }, # DocPerm { 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Accounts User', + 'role': u'Accounts User', 'write': 1 }, # DocPerm { 'create': 1, - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 0, - 'role': 'Accounts Manager', + 'role': u'Accounts Manager', 'submit': 0, 'write': 1 }, # DocPerm { - 'doctype': 'DocPerm', + 'doctype': u'DocPerm', 'permlevel': 1, - 'role': 'All' + 'role': u'All' }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'width': '50%' + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'naming_series', - 'fieldtype': 'Select', - 'label': 'Series', - 'options': '\nC-FORM/', + 'doctype': u'DocField', + 'fieldname': u'naming_series', + 'fieldtype': u'Select', + 'label': u'Series', + 'options': u'\nC-FORM/', + 'permlevel': 0, 'reqd': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'c_form_no', - 'fieldtype': 'Data', - 'label': 'C-Form No', + 'doctype': u'DocField', + 'fieldname': u'c_form_no', + 'fieldtype': u'Data', + 'label': u'C-Form No', + 'permlevel': 0, 'reqd': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'received_date', - 'fieldtype': 'Date', - 'label': 'Received Date', + 'doctype': u'DocField', + 'fieldname': u'received_date', + 'fieldtype': u'Date', + 'label': u'Received Date', + 'permlevel': 0, 'reqd': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'customer', - 'fieldtype': 'Link', - 'label': 'Customer', - 'options': 'Customer', + 'doctype': u'DocField', + 'fieldname': u'customer', + 'fieldtype': u'Link', + 'label': u'Customer', + 'options': u'Customer', + 'permlevel': 0, 'reqd': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Column Break', - 'width': '50%' + 'doctype': u'DocField', + 'fieldtype': u'Column Break', + 'permlevel': 0, + 'width': u'50%' }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'company', - 'fieldtype': 'Select', - 'label': 'Company', - 'options': 'link:Company' + 'doctype': u'DocField', + 'fieldname': u'company', + 'fieldtype': u'Select', + 'label': u'Company', + 'options': u'link:Company', + 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'fiscal_year', - 'fieldtype': 'Select', - 'label': 'Fiscal Year', - 'options': 'link:Fiscal Year', + 'doctype': u'DocField', + 'fieldname': u'fiscal_year', + 'fieldtype': u'Select', + 'label': u'Fiscal Year', + 'options': u'link:Fiscal Year', + 'permlevel': 0, 'reqd': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'quarter', - 'fieldtype': 'Select', - 'label': 'Quarter', - 'options': '\nI\nII\nIII\nIV' + 'doctype': u'DocField', + 'fieldname': u'quarter', + 'fieldtype': u'Select', + 'label': u'Quarter', + 'options': u'\nI\nII\nIII\nIV', + 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'total_amount', - 'fieldtype': 'Currency', - 'label': 'Total Amount', + 'doctype': u'DocField', + 'fieldname': u'total_amount', + 'fieldtype': u'Currency', + 'label': u'Total Amount', + 'permlevel': 0, 'reqd': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'state', - 'fieldtype': 'Select', - 'label': 'State', - 'options': "link:State\ncountry='India'", + 'doctype': u'DocField', + 'fieldname': u'state', + 'fieldtype': u'Select', + 'label': u'State', + 'options': u"link:State\ncountry='India'", + 'permlevel': 0, 'reqd': 1 }, # DocField { - 'doctype': 'DocField', - 'fieldtype': 'Section Break' + 'doctype': u'DocField', + 'fieldtype': u'Section Break', + 'permlevel': 0 }, # DocField { - 'doctype': 'DocField', - 'fieldname': 'invoice_details', - 'fieldtype': 'Table', - 'label': 'Invoice Details', - 'options': 'C-Form Invoice Detail' + 'doctype': u'DocField', + 'fieldname': u'invoice_details', + 'fieldtype': u'Table', + 'label': u'Invoice Details', + 'options': u'C-Form Invoice Detail', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'total_invoiced_amount', + 'fieldtype': u'Currency', + 'label': u'Total Invoiced Amount', + 'permlevel': 1, + 'print_hide': 0 + }, + + # DocField + { + 'doctype': u'DocField', + 'fieldname': u'file_list', + 'fieldtype': u'Text', + 'hidden': 1, + 'label': u'File List', + 'permlevel': 0, + 'print_hide': 1 } ] \ No newline at end of file From c63a58d4168093bd6a0fcaa2ade35966dc331748 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 6 Apr 2012 17:42:02 +0530 Subject: [PATCH 18/22] c-form reload pach --- erpnext/patches/april_2012/reload_c_form.py | 4 ++++ erpnext/patches/patch_list.py | 5 +++++ 2 files changed, 9 insertions(+) create mode 100644 erpnext/patches/april_2012/reload_c_form.py diff --git a/erpnext/patches/april_2012/reload_c_form.py b/erpnext/patches/april_2012/reload_c_form.py new file mode 100644 index 0000000000..246ea0fdb1 --- /dev/null +++ b/erpnext/patches/april_2012/reload_c_form.py @@ -0,0 +1,4 @@ +def execute(): + import webnotes + from webnotes.modules.module_manager import reload_doc + reload_doc('accounts', 'doctype', 'c_form') diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 3099456f19..cd38480100 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -222,5 +222,10 @@ patch_list = [ 'patch_file': 'so_rv_mapper_fix', 'description': 'SO-RV duplicate mapper entry removal' }, + { + 'patch_module': 'patches.april_2012', + 'patch_file': 'reload_c_form', + 'description': 'Added attchemnt option and total field' + }, ] From 3525d92cfbc0bc9c9fe28decc6626e72f9f427d0 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 6 Apr 2012 17:49:25 +0530 Subject: [PATCH 19/22] c-form reload pach --- erpnext/patches/april_2012/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 erpnext/patches/april_2012/__init__.py diff --git a/erpnext/patches/april_2012/__init__.py b/erpnext/patches/april_2012/__init__.py new file mode 100644 index 0000000000..e69de29bb2 From 0a8a4872307ba2f76eb97192f1066b2ad4cf9e6a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 10 Apr 2012 16:50:23 +0530 Subject: [PATCH 20/22] Update erpnext/stock/doctype/item/item.js --- erpnext/stock/doctype/item/item.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 59235ab032..f60a5f0e23 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -41,13 +41,13 @@ cur_frm.fields_dict['default_bom'].get_query = function(doc) { // Expense Account // --------------------------------- cur_frm.fields_dict['purchase_account'].get_query = function(doc){ - return 'SELECT DISTINCT `tabAccount`.`name` FROM `tabAccount` WHERE `tabAccount`.`debit_or_credit`="Debit" AND `tabAccount`.`group_or_ledger`="Ledger" AND `tabAccount`.`docstatus`!=2 AND `tabAccount`.`is_pl_account` = "Yes" AND `tabAccount`.%(key)s LIKE "%s" ORDER BY `tabAccount`.`name` LIMIT 50' + return 'SELECT DISTINCT `tabAccount`.`name` FROM `tabAccount` WHERE `tabAccount`.`debit_or_credit`="Debit" AND `tabAccount`.`group_or_ledger`="Ledger" AND `tabAccount`.`docstatus`!=2 AND `tabAccount`.%(key)s LIKE "%s" ORDER BY `tabAccount`.`name` LIMIT 50' } // Income Account // -------------------------------- cur_frm.fields_dict['default_income_account'].get_query = function(doc) { - return 'SELECT DISTINCT `tabAccount`.`name` FROM `tabAccount` WHERE `tabAccount`.`debit_or_credit`="Credit" AND `tabAccount`.`group_or_ledger`="Ledger" AND `tabAccount`.`is_pl_account` = "Yes" AND `tabAccount`.`docstatus`!=2 AND `tabAccount`.`account_type` ="Income Account" AND `tabAccount`.%(key)s LIKE "%s" ORDER BY `tabAccount`.`name` LIMIT 50' + return 'SELECT DISTINCT `tabAccount`.`name` FROM `tabAccount` WHERE `tabAccount`.`debit_or_credit`="Credit" AND `tabAccount`.`group_or_ledger`="Ledger" AND `tabAccount`.`docstatus`!=2 AND `tabAccount`.`account_type` ="Income Account" AND `tabAccount`.%(key)s LIKE "%s" ORDER BY `tabAccount`.`name` LIMIT 50' } From af094b9daf37b3fe43aae8ba78941a98b35a8541 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 10 Apr 2012 18:07:36 +0530 Subject: [PATCH 21/22] ledger balance export report in new format --- .../ledger_balance_export.py | 122 ++++++++++++++---- 1 file changed, 94 insertions(+), 28 deletions(-) diff --git a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py b/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py index b790d066d4..88a31f2226 100755 --- a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py +++ b/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py @@ -35,45 +35,111 @@ class DocType: yr = sql("select name from `tabFiscal Year` where %s between year_start_date and date_sub(date_add(year_start_date,interval 1 year), interval 1 day)",dt) return yr and yr[0][0] or '' - # Get gl entries for the period and account - def get_gl_entries(self, lft, rgt): - gle = sql("select t1.posting_date, t1.voucher_type, t1.voucher_no, t1.debit, t1.credit, t1.remarks from `tabGL Entry` t1, `tabAccount` t2 WHERE t1.posting_date >= %s AND t1.posting_date <= %s and ifnull(t1.is_opening, 'No') = 'No' AND t1.account = t2.name AND t2.lft >= %s AND t2.rgt <= %s and ifnull(t1.is_cancelled, 'No') = 'No'", (self.doc.from_date, self.doc.to_date, lft, rgt), as_dict=1) + + def validate_date(self): + """check for from date and to date within same year""" + if not sql("select name from `tabFiscal Year` where %s between year_start_date and date_sub(date_add(year_start_date,interval 1 year), interval 1 day) and %s between year_start_date and date_sub(date_add(year_start_date,interval 1 year), interval 1 day)",(self.doc.from_date, self.doc.to_date)): + msgprint("From Date and To Date must be within same year") + raise Exception + + if not self.doc.from_date or not self.doc.to_date: + msgprint("From Date and To Date is mandatory") + raise Exception + + + def add_header(self): + title = 'Ledger Balances Between ' + getdate(self.doc.from_date).strftime('%d-%m-%Y') + ' and ' + getdate(self.doc.to_date).strftime('%d-%m-%Y') + return [[title], ['Account', 'Opening(Dr)', 'Opening (Cr)', 'Debit', 'Credit', 'Closing(Dr)', 'Closing(Cr)'], ['', '', '', '', '', '', '', 'Posting Date', 'Voucher Type', 'Voucher No', 'Debit', 'Credit', 'Remarks']] + + + + def get_account_subtree(self, acc): + return sql(""" + SELECT + CONCAT(REPEAT(' ', COUNT(parent.name) - (sub_tree.depth + 1)), node.name) as account, + node.lft AS lft, node.rgt AS rgt, + node.debit_or_credit as dr_or_cr, node.group_or_ledger as group_or_ledger, node.is_pl_account as is_pl_account + FROM tabAccount AS node, + tabAccount AS parent, + tabAccount AS sub_parent, + ( + SELECT node.name, (COUNT(parent.name) - 1) AS depth + FROM tabAccount AS node, tabAccount AS parent + WHERE node.lft BETWEEN parent.lft AND parent.rgt + AND node.name = %s + GROUP BY node.name + ORDER BY node.lft + )AS sub_tree + WHERE node.lft BETWEEN parent.lft AND parent.rgt + AND node.lft BETWEEN sub_parent.lft AND sub_parent.rgt + AND sub_parent.name = sub_tree.name + GROUP BY node.name + ORDER BY node.lft""", acc, as_dict = 1) + + + + def show_acc_summary(self, glc, acc_det): + from_date_year = self.get_year(add_days(self.doc.from_date, -1)) + to_date_year = self.get_year(self.doc.to_date) + acc = acc_det['account'].strip() + + if from_date_year == to_date_year: + debit_on_fromdate, credit_on_fromdate, opening = glc.get_as_on_balance(acc, from_date_year, add_days(self.doc.from_date, -1), acc_det['dr_or_cr'], acc_det['lft'], acc_det['rgt']) # opening = closing of prev_date + elif acc_det['is_pl_account'] == 'No': # if there is no previous year in system and not pl account + opening = sql("select opening from `tabAccount Balance` where account = %s and period = %s", (acc, to_date_year)) + debit_on_fromdate, credit_on_fromdate, opening = 0, 0, flt(opening[0][0]) + else: # if pl account and there is no previous year in system + debit_on_fromdate, credit_on_fromdate, opening = 0,0,0 + + # closing balance + #-------------------------------- + debit_on_todate, credit_on_todate, closing = glc.get_as_on_balance(acc, to_date_year, self.doc.to_date, acc_det['dr_or_cr'], acc_det['lft'], acc_det['rgt']) + + # transaction betn the period + #---------------------------------------- + debit = flt(debit_on_todate) - flt(debit_on_fromdate) + credit = flt(credit_on_todate) - flt(credit_on_fromdate) + + # Debit / Credit + if acc_det['dr_or_cr'] == 'Credit': + opening, closing = -1*opening, -1*closing + + return [acc_det['account'], flt(opening>0 and opening or 0), flt(opening<0 and -opening or 0), + debit, credit, flt(closing>0.01 and closing or 0), flt(closing<-0.01 and -closing or 0)] + + + def show_gl_entries(self, acc): + """Get gl entries for the period and account""" + gle = sql("select posting_date, voucher_type, voucher_no, debit, credit, remarks from `tabGL Entry` WHERE account = %s and posting_date >= %s AND posting_date <= %s and ifnull(is_opening, 'No') = 'No' and ifnull(is_cancelled, 'No') = 'No'", (acc, self.doc.from_date, self.doc.to_date), as_dict=1) entries, dr, cr = [], 0, 0 for d in gle: - dr, cr = dr + flt(d['debit']), cr + flt(d['credit']) - entries.append(['', d['posting_date'], d['voucher_type'], d['voucher_no'], d['debit'], d['credit'], d['remarks']]) - return entries, dr, cr + entries.append(['', '', '', '', '', '', '', d['posting_date'], d['voucher_type'], d['voucher_no'], d['debit'], d['credit'], d['remarks']]) + return entries + + + # Get Report Data def get_report_data(self): - from_date_year = self.get_year(add_days(self.doc.from_date, -1)) - to_date_year = self.get_year(self.doc.to_date) + self.validate_date() + + res = [] + res += self.add_header() - # result initiatlization - header = 'Ledger Balances Between ' + getdate(self.doc.from_date).strftime('%d-%m-%Y') + ' and ' + getdate(self.doc.to_date).strftime('%d-%m-%Y') - res = [[header], ['Account', 'Posting Date', 'Voucher Type', 'Voucher No', 'Debit', 'Credit', 'Remarks']] glc = get_obj('GL Control') for d in getlist(self.doclist, 'ledger_details'): # Fetch acc details - acc_det = sql("select debit_or_credit, is_pl_account, lft, rgt from tabAccount where name = '%s'" % d.account, as_dict=1)[0] + sub_tree = self.get_account_subtree(d.account) - # Opening - opening = glc.get_as_on_balance(d.account, from_date_year, add_days(self.doc.from_date, -1), acc_det['debit_or_credit'], acc_det['lft'], acc_det['rgt'])[2] - if acc_det['debit_or_credit'] == 'Credit': - opening = -1*opening + for acc_det in sub_tree: + acc_summary = self.show_acc_summary(glc, acc_det) + res.append(acc_summary) + + # Show gl entries if account is ledger + if acc_det['group_or_ledger'] == 'Ledger' and (acc_summary[3] or acc_summary[4]): + gle = self.show_gl_entries(acc_det['account'].strip()) + res += gle - # GL Entries - gle, debit, credit = self.get_gl_entries(acc_det['lft'], acc_det['rgt']) - - # Closing - closing = opening + debit - credit - - # Append to result - res.append([d.account]) - res += gle - res.append(['', '', '', 'Total Debit/Credit', debit, credit]) - res.append(['', '', '', 'Opening Balance', opening]) - res.append(['', '', '', 'Closing Balance', closing]) return res From b09b3bc253858d28db0d100c85311c4832cc1118 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 13 Apr 2012 14:13:02 +0530 Subject: [PATCH 22/22] all fields visible if any other custom purpose in stock entry --- .../stock/doctype/stock_entry/stock_entry.js | 6 +- .../stock/doctype/stock_entry/stock_entry.py | 11 +- .../stock/doctype/stock_entry/stock_entry.txt | 140 +++++++++++------- 3 files changed, 96 insertions(+), 61 deletions(-) diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js index 07e83edc14..55e7b41236 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.js +++ b/erpnext/stock/doctype/stock_entry/stock_entry.js @@ -23,7 +23,10 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { var cfn_set_fields = function(doc, cdt, cdn) { lst = ['supplier','supplier_name','supplier_address','customer','customer_name','customer_address']; - hide_field(lst); + if (in_list(['Material Issue', 'Material Transfer', 'Material Receipt', 'Production Order', 'Subcontracting', 'Other'], doc.purpose)) { + hide_field(lst); + } else unhide_field(lst); + if (doc.purpose == 'Production Order' || doc.purpose == 'Other'){ unhide_field('Get Items'); @@ -52,6 +55,7 @@ var cfn_set_fields = function(doc, cdt, cdn) { if(doc.purpose == 'Purchase Return'){ doc.customer=doc.customer_name = doc.customer_address=doc.delivery_note_no=doc.sales_invoice_no=''; unhide_field(['supplier','supplier_name','supplier_address','purchase_receipt_no']); + } else if(doc.purpose == 'Sales Return'){ doc.supplier=doc.supplier_name = doc.supplier_address=doc.purchase_receipt_no=''; diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py index 96642d0dc2..a6fbba02b0 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/stock_entry.py @@ -31,8 +31,9 @@ in_transaction = webnotes.conn.in_transaction convert_to_lists = webnotes.conn.convert_to_lists # ----------------------------------------------------------------------------------------- +from utilities.transaction_base import TransactionBase -class DocType: +class DocType(TransactionBase): def __init__(self, doc, doclist=[]): self.doc = doc self.doclist = doclist @@ -510,10 +511,11 @@ class DocType: def get_cust_addr(self): - res = sql("select customer_name,address from `tabCustomer` where name = '%s'"%self.doc.customer) + res = sql("select customer_name from `tabCustomer` where name = '%s'"%self.doc.customer) + addr = self.get_address_text(customer = self.doc.customer) ret = { 'customer_name' : res and res[0][0] or '', - 'customer_address' : res and res[0][1] or ''} + 'customer_address' : addr and addr[0] or ''} return ret @@ -530,7 +532,8 @@ class DocType: def get_supp_addr(self): res = sql("select supplier_name,address from `tabSupplier` where name = '%s'"%self.doc.supplier) + addr = self.get_address_text(supplier = self.doc.supplier) ret = { 'supplier_name' : res and res[0][0] or '', - 'supplier_address' : res and res[0][1] or ''} + 'supplier_address' : addr and addr[0] or ''} return ret diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.txt b/erpnext/stock/doctype/stock_entry/stock_entry.txt index 9792fc91c5..54053b74fa 100644 --- a/erpnext/stock/doctype/stock_entry/stock_entry.txt +++ b/erpnext/stock/doctype/stock_entry/stock_entry.txt @@ -3,16 +3,16 @@ # These values are common in all dictionaries { - 'creation': '2010-08-08 17:09:25', + 'creation': '2009-05-12 16:46:45', 'docstatus': 0, - 'modified': '2012-03-21 11:00:48', + 'modified': '2012-04-13 14:12:02', 'modified_by': u'Administrator', 'owner': u'Administrator' }, # These values are common for all DocType { - '_last_update': u'1332233897', + '_last_update': u'1334303911', 'allow_attach': 0, 'allow_copy': 0, 'allow_email': 0, @@ -41,7 +41,7 @@ 'subject': u'%(remarks)s', 'tag_fields': u'purpose', 'use_template': 0, - 'version': 259 + 'version': 263 }, # These values are common for all DocField @@ -71,26 +71,26 @@ # DocPerm { - 'amend': 0, - 'cancel': 0, - 'create': 0, + 'amend': 1, + 'cancel': 1, + 'create': 1, 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Material Manager', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, + 'permlevel': 0, 'role': u'Material User', - 'submit': 0, - 'write': 0 + 'submit': 1, + 'write': 1 + }, + + # DocPerm + { + 'amend': 1, + 'cancel': 1, + 'create': 1, + 'doctype': u'DocPerm', + 'permlevel': 0, + 'role': u'Material Manager', + 'submit': 1, + 'write': 1 }, # DocPerm @@ -105,30 +105,6 @@ 'write': 1 }, - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 1, - 'role': u'Production User', - 'submit': 0, - 'write': 0 - }, - - # DocPerm - { - 'amend': 0, - 'cancel': 0, - 'create': 0, - 'doctype': u'DocPerm', - 'permlevel': 2, - 'role': u'Production User', - 'submit': 0, - 'write': 1 - }, - # DocPerm { 'amend': 1, @@ -148,20 +124,25 @@ 'create': 0, 'doctype': u'DocPerm', 'permlevel': 1, - 'role': u'Production Manager', + 'role': u'All', 'submit': 0, 'write': 0 }, # DocPerm { - 'amend': 0, - 'cancel': 0, 'create': 0, + 'doctype': u'DocPerm', + 'permlevel': 2, + 'role': u'Production User', + 'write': 1 + }, + + # DocPerm + { 'doctype': u'DocPerm', 'permlevel': 2, 'role': u'Production Manager', - 'submit': 0, 'write': 1 }, @@ -191,12 +172,13 @@ 'doctype': u'DocField', 'fieldname': u'naming_series', 'fieldtype': u'Select', + 'hidden': 0, 'in_filter': 0, 'label': u'Series', 'no_copy': 1, 'oldfieldname': u'naming_series', 'oldfieldtype': u'Select', - 'options': u'STE', + 'options': u'\nSTE', 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, @@ -211,6 +193,7 @@ 'doctype': u'DocField', 'fieldname': u'amendment_date', 'fieldtype': u'Date', + 'hidden': 0, 'in_filter': 0, 'label': u'Amendment Date', 'no_copy': 1, @@ -219,6 +202,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -229,6 +213,7 @@ 'doctype': u'DocField', 'fieldname': u'purpose', 'fieldtype': u'Select', + 'hidden': 0, 'in_filter': 1, 'label': u'Purpose', 'no_copy': 0, @@ -236,6 +221,7 @@ 'oldfieldtype': u'Select', 'options': u'Material Issue\nMaterial Receipt\nMaterial Transfer\nSales Return\nPurchase Return\nSubcontracting\nProduction Order\nOther', 'permlevel': 0, + 'print_hide': 0, 'report_hide': 0, 'reqd': 1, 'search_index': 0, @@ -259,6 +245,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 1, 'trigger': u'Client' }, @@ -280,6 +267,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 1, 'trigger': u'Client' }, @@ -303,7 +291,7 @@ 'doctype': u'DocField', 'fieldname': u'supplier', 'fieldtype': u'Link', - 'hidden': 1, + 'hidden': 0, 'in_filter': 0, 'label': u'Supplier', 'no_copy': 0, @@ -313,6 +301,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0, 'trigger': u'Client' }, @@ -323,13 +312,16 @@ 'doctype': u'DocField', 'fieldname': u'supplier_name', 'fieldtype': u'Data', + 'hidden': 0, 'in_filter': 0, 'label': u'Supplier Name', 'no_copy': 0, 'oldfieldname': u'supplier_name', 'oldfieldtype': u'Data', 'permlevel': 1, + 'print_hide': 0, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -340,14 +332,16 @@ 'doctype': u'DocField', 'fieldname': u'supplier_address', 'fieldtype': u'Small Text', - 'hidden': 1, + 'hidden': 0, 'in_filter': 0, 'label': u'Supplier Address', 'no_copy': 0, 'oldfieldname': u'supplier_address', 'oldfieldtype': u'Small Text', 'permlevel': 0, + 'print_hide': 0, 'report_hide': 0, + 'reqd': 0, 'search_index': 0, 'trigger': u'Client' }, @@ -359,7 +353,7 @@ 'doctype': u'DocField', 'fieldname': u'customer', 'fieldtype': u'Link', - 'hidden': 1, + 'hidden': 0, 'in_filter': 0, 'label': u'Customer', 'no_copy': 0, @@ -369,6 +363,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0, 'trigger': u'Client' }, @@ -379,14 +374,16 @@ 'doctype': u'DocField', 'fieldname': u'customer_name', 'fieldtype': u'Data', - 'hidden': 1, + 'hidden': 0, 'in_filter': 0, 'label': u'Customer Name', 'no_copy': 0, 'oldfieldname': u'customer_name', 'oldfieldtype': u'Data', 'permlevel': 1, + 'print_hide': 0, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -396,14 +393,16 @@ 'doctype': u'DocField', 'fieldname': u'customer_address', 'fieldtype': u'Small Text', - 'hidden': 1, + 'hidden': 0, 'in_filter': 0, 'label': u'Customer Address', 'no_copy': 0, 'oldfieldname': u'customer_address', 'oldfieldtype': u'Small Text', 'permlevel': 0, + 'print_hide': 0, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -424,6 +423,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0, 'trigger': u'Client' }, @@ -445,6 +445,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 1, 'trigger': u'Client' }, @@ -479,6 +480,7 @@ 'doctype': u'DocField', 'fieldname': u'fg_completed_qty', 'fieldtype': u'Currency', + 'hidden': 0, 'in_filter': 0, 'label': u'FG Completed Qty', 'no_copy': 0, @@ -487,6 +489,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0, 'trigger': u'Client' }, @@ -511,6 +514,7 @@ 'doctype': u'DocField', 'fieldname': u'from_warehouse', 'fieldtype': u'Link', + 'hidden': 0, 'in_filter': 0, 'label': u'Source Warehouse', 'no_copy': 0, @@ -533,6 +537,7 @@ 'doctype': u'DocField', 'fieldname': u'to_warehouse', 'fieldtype': u'Link', + 'hidden': 0, 'in_filter': 0, 'label': u'Target Warehouse', 'no_copy': 0, @@ -576,6 +581,7 @@ 'doctype': u'DocField', 'fieldname': u'transfer_date', 'fieldtype': u'Date', + 'hidden': 0, 'in_filter': 1, 'label': u'Transfer Date', 'no_copy': 1, @@ -595,6 +601,7 @@ 'doctype': u'DocField', 'fieldname': u'posting_date', 'fieldtype': u'Date', + 'hidden': 0, 'in_filter': 1, 'label': u'Posting Date', 'no_copy': 1, @@ -613,6 +620,7 @@ 'doctype': u'DocField', 'fieldname': u'posting_time', 'fieldtype': u'Time', + 'hidden': 0, 'in_filter': 0, 'label': u'Posting Time', 'no_copy': 1, @@ -631,6 +639,7 @@ 'doctype': u'DocField', 'fieldname': u'amended_from', 'fieldtype': u'Link', + 'hidden': 0, 'in_filter': 0, 'label': u'Amended From', 'no_copy': 1, @@ -640,6 +649,7 @@ 'permlevel': 1, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -649,6 +659,7 @@ 'doctype': u'DocField', 'fieldname': u'transporter', 'fieldtype': u'Data', + 'hidden': 0, 'in_filter': 0, 'label': u'Transporter', 'no_copy': 0, @@ -657,6 +668,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -666,6 +678,7 @@ 'doctype': u'DocField', 'fieldname': u'is_excisable_goods', 'fieldtype': u'Select', + 'hidden': 0, 'in_filter': 0, 'label': u'Is Excisable Goods', 'no_copy': 0, @@ -675,6 +688,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -684,6 +698,7 @@ 'doctype': u'DocField', 'fieldname': u'excisable_goods', 'fieldtype': u'Select', + 'hidden': 0, 'in_filter': 0, 'label': u'Excisable Goods', 'no_copy': 0, @@ -693,6 +708,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -712,6 +728,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -721,6 +738,7 @@ 'doctype': u'DocField', 'fieldname': u'remarks', 'fieldtype': u'Text', + 'hidden': 0, 'in_filter': 0, 'label': u'Remarks', 'no_copy': 1, @@ -795,6 +813,7 @@ 'permlevel': 0, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -814,6 +833,7 @@ 'doctype': u'DocField', 'fieldname': u'mtn_details', 'fieldtype': u'Table', + 'hidden': 0, 'in_filter': 0, 'label': u'MTN Details', 'no_copy': 0, @@ -823,6 +843,7 @@ 'permlevel': 0, 'print_hide': 0, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -832,6 +853,7 @@ 'doctype': u'DocField', 'fieldname': u'total_amount', 'fieldtype': u'Currency', + 'hidden': 0, 'in_filter': 0, 'label': u'Total Amount', 'no_copy': 0, @@ -840,6 +862,7 @@ 'permlevel': 1, 'print_hide': 1, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 }, @@ -858,6 +881,7 @@ 'doctype': u'DocField', 'fieldname': u'company', 'fieldtype': u'Link', + 'hidden': 0, 'in_filter': 1, 'label': u'Company', 'no_copy': 0, @@ -877,6 +901,7 @@ 'doctype': u'DocField', 'fieldname': u'fiscal_year', 'fieldtype': u'Select', + 'hidden': 0, 'in_filter': 0, 'label': u'Fiscal Year', 'no_copy': 0, @@ -896,6 +921,7 @@ 'doctype': u'DocField', 'fieldname': u'select_print_heading', 'fieldtype': u'Link', + 'hidden': 0, 'in_filter': 0, 'label': u'Select Print Heading', 'no_copy': 0, @@ -903,7 +929,9 @@ 'oldfieldtype': u'Link', 'options': u'Print Heading', 'permlevel': 0, + 'print_hide': 0, 'report_hide': 0, + 'reqd': 0, 'search_index': 0 } ] \ No newline at end of file
In Words