From 8c6b0b48ed50549b584f9cbb23a0abdbdfd84e98 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 26 Jul 2011 17:21:36 +0530 Subject: [PATCH 1/8] fixed issue in stock reco if no prev sle exists --- stock/doctype/stock_reconciliation/stock_reconciliation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stock/doctype/stock_reconciliation/stock_reconciliation.py b/stock/doctype/stock_reconciliation/stock_reconciliation.py index 69710f0eaba..f040df38392 100644 --- a/stock/doctype/stock_reconciliation/stock_reconciliation.py +++ b/stock/doctype/stock_reconciliation/stock_reconciliation.py @@ -118,7 +118,7 @@ class DocType: # ------------------ def get_current_stock(self, item_code, warehouse): bin = sql("select name from `tabBin` where item_code = '%s' and warehouse = '%s'" % (item_code, warehouse)) - prev_sle = bin and get_obj('Bin', bin[0][0]).get_prev_sle(self.doc.reconciliation_date,self.doc.reconciliation_time) or 0 + prev_sle = bin and get_obj('Bin', bin[0][0]).get_prev_sle(self.doc.reconciliation_date,self.doc.reconciliation_time) or {} stock_uom = sql("select stock_uom from `tabItem` where name = %s",item_code) return {'actual_qty': prev_sle.get('bin_aqat', 0), 'stock_uom': stock_uom[0][0]} From 07385ac812666351c1393f54c01292f58968928a Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 27 Jul 2011 14:12:14 +0530 Subject: [PATCH 2/8] Bulk rename tool included in setup module --- setup/page/setup/setup.js | 1 + .../doctype/bulk_rename_tool/bulk_rename_tool.txt | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/setup/page/setup/setup.js b/setup/page/setup/setup.js index c0ba3d4dc0d..b29e7ad9e0a 100644 --- a/setup/page/setup/setup.js +++ b/setup/page/setup/setup.js @@ -183,6 +183,7 @@ SetupData = function(cnty){ ['Country',1,'Country','','Country master'], ['State',1,'State','','State master'], ['Rename Tool',3,'Rename Tool','','Rename a record'], + ['Bulk Rename Tool',3,'Bulk Rename Tool','','Rename multiple records at a time'], ['Activty Type',1,'Activity Type','','Types of activities that you can select in your Timesheet'], ['City',1,'City','','City master']]}; diff --git a/utilities/doctype/bulk_rename_tool/bulk_rename_tool.txt b/utilities/doctype/bulk_rename_tool/bulk_rename_tool.txt index f15d3a9dbdc..f0f4c723c63 100644 --- a/utilities/doctype/bulk_rename_tool/bulk_rename_tool.txt +++ b/utilities/doctype/bulk_rename_tool/bulk_rename_tool.txt @@ -3,16 +3,16 @@ # These values are common in all dictionaries { - 'creation': '2011-07-08 13:30:05', + 'creation': '2011-07-07 17:47:52', 'docstatus': 0, - 'modified': '2011-07-08 13:30:05', + 'modified': '2011-07-27 13:19:22', 'modified_by': 'Administrator', 'owner': 'Administrator' }, # These values are common for all DocType { - '_last_update': '1310035501', + '_last_update': '1311622167', 'allow_attach': 1, 'autoname': 'field:rename_doctype', 'colour': 'White:FFF', @@ -21,7 +21,7 @@ 'name': '__common__', 'section_style': 'Simple', 'show_in_menu': 0, - 'version': 6 + 'version': 7 }, # These values are common for all DocField @@ -96,4 +96,4 @@ 'label': 'Rename', 'options': 'do_rename' } -] \ No newline at end of file +] From 31a407dc87ce844c6b2b74bb84e8215517fa0559 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 28 Jul 2011 11:47:45 +0530 Subject: [PATCH 3/8] fixed module name in previous patch and proper path somewhere --- patches/patch.py | 140 +++++++++++++++++++++++------------------------ 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/patches/patch.py b/patches/patch.py index 47f39bf21de..6eaced73ea9 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -57,7 +57,7 @@ def execute(patch_no): elif patch_no == 40: - import_from_files(record_list=[['material_management','doctype','item']]) + import_from_files(record_list=[['stock','doctype','item']]) elif patch_no == 42: acc = sql("select name, lft, rgt from tabAccount where account_name in ('Incomes', 'Expenses')") for d in acc: @@ -126,7 +126,7 @@ def execute(patch_no): sql("delete from `tabModule Def Item` where parent = 'CRM' and doc_type = 'Reports' and doc_name = 'Delivery Note' and display_name = 'Territory, Item Group wise GP'") elif patch_no == 57: - import_from_files(record_list=[['crm','doctype','sales_order_detail']]) + import_from_files(record_list=[['selling','doctype','sales_order_detail']]) elif patch_no == 58: # module def patches sql("update `tabModule Def` set module_page = NULL where name not in ('Event Updates', 'Setup', 'My Company')") @@ -161,7 +161,7 @@ def execute(patch_no): elif patch_no == 62: # Import Supplier Quotation - import_from_files(record_list=[['srm','doctype','supplier_quotation']]) + import_from_files(record_list=[['buying','doctype','supplier_quotation']]) # Adding Status Filter sql("update tabDocType set search_fields = concat('status,',search_fields) where name IN ('Delivery Note','Leave Transaction')") # Import Other Charges @@ -170,7 +170,7 @@ def execute(patch_no): elif patch_no == 63: sql("update `tabDocField` set permlevel = 1 where fieldname in ('return_date', 'return_details') and parent = 'Sales and Purchase Return Wizard'") - import_from_files(record_list = [['accounts', 'doctype', 'rv_detail'], ['material_management', 'doctype', 'sales_and_purchase_return_wizard'], ['material_management', 'doctype', 'stock_entry']]) + import_from_files(record_list = [['accounts', 'doctype', 'rv_detail'], ['stock', 'doctype', 'sales_and_purchase_return_wizard'], ['stock', 'doctype', 'stock_entry']]) elif patch_no == 64: sql("update tabDocField set `hidden` = 1, `print_hide` = 1, `report_hide` = 1 where options in ('RFQ','Supplier Quotation')") sql("update tabDocType set `read_only` = 1, in_create = 1 where name in ('RFQ','Supplier Quotation')") @@ -192,7 +192,7 @@ def execute(patch_no): sql("delete from `tabModule Def Item` where (display_name = 'Sales Invoice' and parent = 'CRM') or (display_name = 'Purchase Invoice' and parent = 'SRM')") elif patch_no == 68: from webnotes.modules.import_module import import_from_files - import_from_files(record_list=[['payroll','doctype','employee'],['roles','Role','Employee']]) + import_from_files(record_list=[['hr','doctype','employee'],['roles','Role','Employee']]) elif patch_no == 69: # delete flds from employee master p = get_obj('Patch Util') @@ -252,7 +252,7 @@ def execute(patch_no): # import Contact, Employee from webnotes.modules.import_module import import_from_files - import_from_files(record_list=[['tools','doctype','contact']]) + import_from_files(record_list=[['utilities','doctype','contact']]) # remove last_contact_date from Lead @@ -294,7 +294,7 @@ def execute(patch_no): #sal structure patch # import from webnotes.modules.import_module import import_from_files - import_from_files(record_list=[['payroll','doctype','salary_structure'], ['payroll','doctype','earning_detail'],['payroll','doctype','deduction_detail']]) + import_from_files(record_list=[['hr','doctype','salary_structure'], ['hr','doctype','earning_detail'],['hr','doctype','deduction_detail']]) elif patch_no == 76: # property p = get_obj('Patch Util') @@ -321,7 +321,7 @@ def execute(patch_no): # sal slip patch # import from webnotes.modules.import_module import import_from_files - import_from_files(record_list=[['payroll','doctype','salary_slip'], ['payroll','doctype','ss_earning_detail'],['payroll','doctype','ss_deduction_detail'], ['mapper', 'DocType Mapper', 'Salary Structure-Salary Slip']]) + import_from_files(record_list=[['hr','doctype','salary_slip'], ['hr','doctype','ss_earning_detail'],['hr','doctype','ss_deduction_detail'], ['mapper', 'DocType Mapper', 'Salary Structure-Salary Slip']]) elif patch_no == 78: p = get_obj('Patch Util') # delete @@ -352,7 +352,7 @@ def execute(patch_no): elif patch_no == 79: # Import Modules - import_from_files(record_list=[['payroll','doctype','leave_application'],['payroll','doctype','leave_allocation'],['payroll','doctype','leave_control_panel'],['payroll','doctype','holiday_list'],['payroll','doctype','holiday_list_detail'],['payroll','Module Def','Payroll']]) + import_from_files(record_list=[['hr','doctype','leave_application'],['hr','doctype','leave_allocation'],['hr','doctype','leave_control_panel'],['hr','doctype','holiday_list'],['hr','doctype','holiday_list_detail'],['hr','Module Def','Payroll']]) elif patch_no == 80: # Holiday List sql("update `tabHoliday List Detail` set description = holiday_name") @@ -406,7 +406,7 @@ def execute(patch_no): elif patch_no == 81: # Import Modules - import_from_files(record_list=[['payroll','Module Def','Payroll']]) + import_from_files(record_list=[['hr','Module Def','Payroll']]) elif patch_no == 82: sql("update tabDocType set search_fields = 'employee,leave_type,total_leaves_allocated,fiscal_year' where name = 'Leave Allocation'") sql("update tabDocType set search_fields = 'employee,leave_type,from_date,to_date,total_leave_days,fiscal_year' where name = 'Leave Application'") @@ -433,13 +433,13 @@ def execute(patch_no): elif patch_no == 86: # Import Modules - import_from_files(record_list=[['payroll','doctype','leave_type']]) + import_from_files(record_list=[['hr','doctype','leave_type']]) elif patch_no == 87: sql("update `tabLeave Type` set is_lwp = 1 where name = 'Leave Without Pay'") elif patch_no == 88: # Import Modules - import_from_files(record_list=[['payroll','doctype','leave_allocation']]) + import_from_files(record_list=[['hr','doctype','leave_allocation']]) elif patch_no == 89: sql("delete from `tabModule Def Item` where doc_type = 'Setup Forms' and doc_name in ('Payroll Rule', 'IT Checklist', 'Employee Profile') and parent = 'Payroll'") sql("update `tabDocField` set `hidden` = 1, `print_hide` = 1, `report_hide` = 1 where parent = 'Leave Type' and fieldname = 'is_encash'") @@ -458,7 +458,7 @@ def execute(patch_no): sql("update `tabField Mapper Detail` set from_field = 'customer' where to_field = 'customer' and parent = 'Sales Order-Receivable Voucher'") elif patch_no == 94: - import_from_files(record_list=[['crm','doctype','sms_center']]) + import_from_files(record_list=[['selling','doctype','sms_center']]) elif patch_no == 95: import_from_files(record_list=[['mapper','DocType Mapper','Sales Order-Receivable Voucher'], ['mapper','DocType Mapper','Delivery Note-Receivable Voucher']]) @@ -491,7 +491,7 @@ def execute(patch_no): sql("update tabDocField set fieldname = '' where fieldtype = 'HTML'") elif patch_no == 104: - import_from_files(record_list=[['payroll','search_criteria','stdsrch_00001'],['payroll','search_criteria','stdsrch_00002'],['payroll','search_criteria','stdsrch_00003'],['payroll','Module Def','Payroll'],['payroll','doctype','leave_application'],['payroll','doctype','leave_allocation']]) + import_from_files(record_list=[['hr','search_criteria','stdsrch_00001'],['hr','search_criteria','stdsrch_00002'],['hr','search_criteria','stdsrch_00003'],['hr','Module Def','Payroll'],['hr','doctype','leave_application'],['hr','doctype','leave_allocation']]) elif patch_no == 105: # Employee Leave Balance sql("delete from `tabModule Def Item` where parent = 'Payroll' and doc_type = 'Reports' and display_name IN ('Employeewise Leave Transaction Details','Employeewise Balance Leave Report')") @@ -508,11 +508,11 @@ def execute(patch_no): elif patch_no == 107: sql("delete from `tabDocField` where fieldname = 'fiscal_year' and parent = 'Employee'") elif patch_no == 108: - import_from_files(record_list=[['payroll','search_criteria','srch_std_00013']]) + import_from_files(record_list=[['hr','search_criteria','srch_std_00013']]) elif patch_no == 109: - import_from_files(record_list=[['payroll','search_criteria','srch_std_00015']]) + import_from_files(record_list=[['hr','search_criteria','srch_std_00015']]) elif patch_no == 110: - import_from_files(record_list=[['payroll','doctype','salary_structure'], ['payroll', 'doctype', 'salary_slip']]) + import_from_files(record_list=[['hr','doctype','salary_structure'], ['hr', 'doctype', 'salary_slip']]) elif patch_no == 111: sql("update tabDocType set search_fields = 'transfer_date, from_warehouse, to_warehouse, purpose, remarks' where name = 'Stock Entry'") elif patch_no == 112: @@ -582,7 +582,7 @@ def execute(patch_no): p.add_permission('Expense Voucher', 'HR User', 0, read = 1, write = 1, create = 1, submit = 1, cancel = 1, amend = 1) elif patch_no == 128: from webnotes.modules import import_module - import_module.import_from_files(record_list=[['crm','doctype','sales_order'], ['crm','doctype','sales_order_detail'], ['material_management','doctype','delivery_note'], ['material_management','doctype','delivery_note_detail']]) + import_module.import_from_files(record_list=[['selling','doctype','sales_order'], ['selling','doctype','sales_order_detail'], ['stock','doctype','delivery_note'], ['stock','doctype','delivery_note_detail']]) elif patch_no == 129: sql("update `tabTable Mapper Detail` set validation_logic = '(qty > ifnull(billed_qty, 0) or amount > ifnull(billed_amt, 0)) and docstatus = 1' where parent = 'Sales Order-Receivable Voucher' and from_table = 'Sales Order Detail' and to_table = 'RV Detail'") sql("update `tabTable Mapper Detail` set validation_logic = '(qty > ifnull(billed_qty, 0) or amount > ifnull(billed_amt, 0)) and docstatus = 1' where parent = 'Delivery Note-Receivable Voucher' and from_table = 'Delivery Note Detail' and to_table = 'RV Detail'") @@ -680,11 +680,11 @@ def execute(patch_no): sql("delete from tabDocField where label = 'Add / Manage Contacts' and fieldtype = 'Button' and parent = 'Customer'") sql("delete from `tabField Mapper Detail` where parent = 'Sales Order-Delivery Note' and from_field = 'note' and to_field = 'note'") elif patch_no == 152: - import_from_files(record_list=[['crm','doctype','sales_order'], ['material_management','doctype','delivery_note'], ['crm','doctype','customer'], ['crm','doctype','shipping_address'], ['mapper', 'DocType Mapper', 'Sales Order-Delivery Note']]) + import_from_files(record_list=[['selling','doctype','sales_order'], ['stock','doctype','delivery_note'], ['selling','doctype','customer'], ['selling','doctype','shipping_address'], ['mapper', 'DocType Mapper', 'Sales Order-Delivery Note']]) elif patch_no == 153: sql("delete from `tabDocField` where fieldname = 'sales_person' and parent = 'Customer'") elif patch_no == 154: - import_from_files(record_list=[['material_management','doctype','serial_no'], ['maintenance','doctype','customer_issue']]) + import_from_files(record_list=[['stock','doctype','serial_no'], ['support','doctype','customer_issue']]) elif patch_no == 155: for d in sql("select name, item_code from `tabSerial No`"): sql("COMMIT") @@ -707,16 +707,16 @@ def execute(patch_no): sql("update tabDocType set autoname = 'field:batch_id' where name = 'Batch'") sql("update tabDocField set no_copy = 1 where parent = 'Batch' and fieldname = 'batch_id'") elif patch_no == 162: - import_from_files(record_list=[['crm', 'search_criteria', 'sales_order_pending_items1']]) + import_from_files(record_list=[['selling', 'search_criteria', 'sales_order_pending_items1']]) elif patch_no == 163: sql("delete from `tabModule Def Item` where display_name = 'Sales Orderwise Pending Packing Item Summary' and parent = 'CRM'") - import_from_files(record_list=[['crm', 'search_criteria', 'sales_orderwise_pending_qty_to_deliver'], ['crm', 'search_criteria', 'sales_orderwise_pending_amount_to_bill'], ['crm', 'search_criteria', 'delivered_items_to_be_install']]) + import_from_files(record_list=[['selling', 'search_criteria', 'sales_orderwise_pending_qty_to_deliver'], ['selling', 'search_criteria', 'sales_orderwise_pending_amount_to_bill'], ['selling', 'search_criteria', 'delivered_items_to_be_install']]) elif patch_no == 164: - import_from_files(record_list=[['srm', 'search_criteria', 'pending_po_items_to_receive'], ['srm', 'search_criteria', 'pending_po_items_to_bill']]) + import_from_files(record_list=[['buying', 'search_criteria', 'pending_po_items_to_receive'], ['buying', 'search_criteria', 'pending_po_items_to_bill']]) elif patch_no == 165: pass elif patch_no == 166: - import_from_files(record_list=[['srm', 'doctype', 'purchase_order']]) + import_from_files(record_list=[['buying', 'doctype', 'purchase_order']]) elif patch_no == 167: if webnotes.conn.get_value('Control Panel', None, 'account_id') not in ['ax0000956', 'ax0001338']: sql("delete from tabDocField where parent = 'Purchase Order' and fieldname in ('test_certificate_required', 'estimated_cost', 'transport', 'vendor_reference', 'transportation_required', 'mode_of_dispatch', 'octroi')") @@ -727,7 +727,7 @@ def execute(patch_no): elif patch_no == 170: import_from_files(record_list=[['mapper', 'DocType Mapper', 'Delivery Note-Receivable Voucher']]) elif patch_no == 171: - import_from_files(record_list=[['srm', 'doctype', 'supplier']]) + import_from_files(record_list=[['buying', 'doctype', 'supplier']]) elif patch_no == 172: import webnotes webnotes.conn.set_global("system_message", """Welcome to the new financial year 2011-2012 !!!

So obvious question in your mind is how to start Entries in the New Fiscal Year in ERPNext? What are the changes you have to make in the system?
We have made some guidelines regarding the basic steps you should follow. Please click on link How to start Entries in the New Fiscal Year in ERPNext?""") @@ -749,7 +749,7 @@ def execute(patch_no): sql("delete from `tabDocField` where label = 'Next Steps' and parent = 'Purchase Order'") sql("update tabDocField set options = 'Material Issue\nMaterial Receipt\nMaterial Transfer\nSales Return\nPurchase Return\nSubcontracting\nProduction Order' where parent = 'Stock Entry' and fieldname = 'purpose'") elif patch_no == 178: - import_from_files(record_list = [['payroll', 'doctype', 'salary_slip']]) + import_from_files(record_list = [['hr', 'doctype', 'salary_slip']]) elif patch_no == 179: from webnotes.utils import get_defaults sl = sql("select name, net_pay from `tabSalary Slip`") @@ -792,21 +792,21 @@ def execute(patch_no): elif patch_no == 187: sql("update tabDocType set autoname = '' where name = 'QA Inspection Report'") elif patch_no == 188: - import_from_files(record_list = [['srm', 'doctype', 'qa_inspection_report']]) + import_from_files(record_list = [['buying', 'doctype', 'qa_inspection_report']]) elif patch_no == 189: sql("update `tabDocField` set allow_on_submit = 1 where fieldname in ('entries', 'other_charges') and parent = 'Receivable Voucher'") elif patch_no == 190: sql("update tabDocField set permlevel=0 where fieldname = 'fiscal_year' and parent = 'Stock Entry'") elif patch_no == 191: - import_from_files(record_list = [['maintenance', 'doctype', 'customer_issue']]) + import_from_files(record_list = [['support', 'doctype', 'customer_issue']]) elif patch_no == 192: sql("delete from `tabModule Def Item` where parent = 'Material Management' and doc_name = 'Landed Cost Wizard' and display_name = 'Landed Cost Wizard'") - import_from_files(record_list = [['srm', 'Module Def', 'SRM']]) + import_from_files(record_list = [['buying', 'Module Def', 'SRM']]) elif patch_no == 193: sql("update tabDocField set fieldtype='Button', `trigger`='Client' where parent='Letter Head' and fieldname='set_from_image'") elif patch_no == 194: sql("delete from `tabModule Def Item` where parent = 'SRM' and doc_name = 'Landed Cost Wizard' and display_name = 'Landed Cost Wizard'") - import_from_files(record_list = [['material_management', 'Module Def', 'Material Management']]) + import_from_files(record_list = [['stock', 'Module Def', 'Material Management']]) elif patch_no == 195: from webnotes.modules.module_manager import reload_doc reload_doc('setup','doctype','manage_account') @@ -814,7 +814,7 @@ def execute(patch_no): sql("update `tabModule Def` set module_page = null where name = 'Material Management'") elif patch_no == 197: sql("update `tabDocField` set permlevel = 0, in_filter = 1 where fieldname = 'warranty_amc_status' and parent = 'Customer Issue'") - import_from_files(record_list = [['maintenance', 'doctype', 'customer_issue']]) + import_from_files(record_list = [['support', 'doctype', 'customer_issue']]) elif patch_no == 198: sql("delete from `tabDocField` where (label in ('SMS', 'Send SMS') or fieldname in ('message', 'customer_mobile_no')) and parent in ('Quoattion', 'Sales Order', 'Delivery Note', 'Receivable Voucher')") sql("delete from `tabDocField` where label in ('SMS', 'Send SMS') and parent = 'Purchase Order'") @@ -842,7 +842,7 @@ def execute(patch_no): elif patch_no == 205: sql("update `tabDocField` set `default` = '' where fieldname = 'naming_series' and parent = 'Installation Note'") elif patch_no == 206: - reload_doc('crm','doctype','installation_note') + reload_doc('selling','doctype','installation_note') elif patch_no == 207: import_from_files(record_list = [['setup', 'doctype', 'company']]) elif patch_no == 208: @@ -857,17 +857,17 @@ def execute(patch_no): # reload company because of disturbed UI import_from_files(record_list = [['setup', 'doctype', 'company']]) elif patch_no == 213: - reload_doc('crm','doctype','lead') + reload_doc('selling','doctype','lead') reload_doc('setup','doctype','company') elif patch_no == 214: - reload_doc('crm','doctype','sales_order') + reload_doc('selling','doctype','sales_order') elif patch_no == 215: # patch for item and image in description sql("update tabDocField set width = '300px' where fieldname='description'") - reload_doc('material_management', 'doctype', 'item') + reload_doc('stock', 'doctype', 'item') sql("delete from __DocTypeCache") elif patch_no == 216: - import_from_files(record_list = [['material_management', 'doctype', 'serial_no'], ['material_management', 'doctype', 'stock_ledger_entry']]) + import_from_files(record_list = [['stock', 'doctype', 'serial_no'], ['stock', 'doctype', 'stock_ledger_entry']]) elif patch_no == 217: sql("update tabDocField set options = '\nIn Store\nDelivered\nNot in Use' where fieldname = 'status' and parent = 'Serial No'") sql("update tabDocField set no_copy = 1 where fieldname = 'serial_no' and parent = 'Delivery Note Detail'") @@ -901,13 +901,13 @@ def execute(patch_no): sql("update tabDocField set hidden = 0 where fieldname in ('pay_to_recd_from', 'total_amount', 'total_amount_in_words') and parent = 'Journal Voucher'") sql("update tabDocField set permlevel = 0 where fieldname = 'pay_to_recd_from' and parent = 'Journal Voucher'") elif patch_no == 224: - import_from_files(record_list = [['material_management', 'doctype', 'delivery_note_packing_detail'], ['accounts', 'Print Format', 'Payment Receipt Voucher']]) + import_from_files(record_list = [['stock', 'doctype', 'delivery_note_packing_detail'], ['accounts', 'Print Format', 'Payment Receipt Voucher']]) elif patch_no == 225: - import_from_files(record_list = [['material_management', 'doctype', 'delivery_note_packing_detail']]) + import_from_files(record_list = [['stock', 'doctype', 'delivery_note_packing_detail']]) elif patch_no == 226: - import_from_files(record_list = [['material_management', 'doctype', 'delivery_note_packing_detail']]) + import_from_files(record_list = [['stock', 'doctype', 'delivery_note_packing_detail']]) elif patch_no == 227: - reload_doc('material_management', 'doctype', 'item') + reload_doc('stock', 'doctype', 'item') if webnotes.conn.get_value('Control Panel', None, 'account_id') != 'axjanak2011': sql("delete from tabDocField where parent = 'Item' and fieldname='alternate_description' limit 1") elif patch_no == 228: @@ -920,8 +920,8 @@ def execute(patch_no): elif patch_no == 229: reload_doc('knowledge_base', 'page', 'question_view') elif patch_no == 230: - reload_doc('srm', 'doctype', 'indent') - reload_doc('srm', 'doctype', 'indent_detail') + reload_doc('buying', 'doctype', 'indent') + reload_doc('buying', 'doctype', 'indent_detail') reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Indent') elif patch_no == 231: reload_doc('Mapper', 'DocType Mapper', 'Sales Order-Indent') @@ -952,11 +952,11 @@ def execute(patch_no): reload_doc('core', 'doctype', 'docfield') reload_doc('core', 'doctype', 'doctype') - from patches.feed_patch import set_subjects_and_tagfields + from patches.old_patches.feed_patch import set_subjects_and_tagfields set_subjects_and_tagfields() elif patch_no == 240: # again for sales order (status) - from patches.feed_patch import set_subjects_and_tagfields + from patches.old_patches.feed_patch import set_subjects_and_tagfields set_subjects_and_tagfields() elif patch_no == 241: sql("update `tabDocField` set fieldtype = 'Text', options = '', in_filter = '' where fieldname = 'serial_no' and parent = 'Stock Ledger Entry'") @@ -975,12 +975,12 @@ def execute(patch_no): webnotes.conn.set_value('DocType', 'Custom Field', 'module', 'Core') reload_doc('setup', 'doctype', 'company') elif patch_no == 244: - reload_doc('material_management', 'search_criteria', 'shortage_to_indent') + reload_doc('stock', 'search_criteria', 'shortage_to_indent') elif patch_no == 245: - from patches.doctype_permission_patch import set_doctype_permissions + from patches.old_patches.doctype_permission_patch import set_doctype_permissions set_doctype_permissions() - from patches.feed_patch import set_subjects_and_tagfields + from patches.old_patches.feed_patch import set_subjects_and_tagfields set_subjects_and_tagfields() elif patch_no == 246: webnotes.conn.set_value('DocType','Stock Entry','tag_fields','purpose') @@ -992,16 +992,16 @@ def execute(patch_no): elif patch_no == 249: sql("update `tabDocPerm` t1, `tabDocType` t2 set t1.role = 'System Manager' where t1.role = 'Administrator' and t1.parent = t2.name and t2.module != 'Core'") elif patch_no == 250: - from patches.feed_patch import support_patch + from patches.old_patches.feed_patch import support_patch support_patch() elif patch_no == 251: from webnotes.model import db_schema db_schema.remove_all_foreign_keys() - from patches.customer_address import run_patch + from patches.old_patches.customer_address import run_patch run_patch() elif patch_no == 252: - reload_doc('maintenance','doctype','support_ticket') - reload_doc('maintenance','doctype','support_ticket_response') + reload_doc('support','doctype','support_ticket') + reload_doc('support','doctype','support_ticket_response') elif patch_no == 253: reload_doc('accounts','doctype','ledger_balance_export') reload_doc('accounts','doctype','ledger_detail') @@ -1011,21 +1011,21 @@ def execute(patch_no): updatedb('Ledger Balance Export') updatedb('Ledger Detail') elif patch_no == 254: - reload_doc('settings', 'doctype', 'sms_settings') - reload_doc('settings', 'doctype', 'static_parameter_detail') + reload_doc('setup', 'doctype', 'sms_settings') + reload_doc('setup', 'doctype', 'static_parameter_detail') from webnotes.model.db_schema import updatedb updatedb('SMS Settings') updatedb('Static Parameter Detail') elif patch_no == 255: - from patches.customer_address import run_old_data_sync_patch + from patches.old_patches.customer_address import run_old_data_sync_patch run_old_data_sync_patch() elif patch_no == 256: sql("update `tabLetter Head` set content = replace(content, 'http://46.4.50.84/v170-test/', '')") sql("update `tabSingles` set value = replace(value, 'http://46.4.50.84/v170-test/', '') where field in ('letter_head', 'client_name') and doctype = 'Control Panel'") sql("update `tabItem` set description_html = replace(description_html, 'http://46.4.50.84/v170-test/', '')") elif patch_no == 257: - from patches.customer_address import run_old_data_sync_patch + from patches.old_patches.customer_address import run_old_data_sync_patch run_old_data_sync_patch() elif patch_no == 258: sql("update tabDocField set `default`=NULL where fieldname = 'naming_series'") @@ -1045,7 +1045,7 @@ def execute(patch_no): elif patch_no == 261: sql("update `tabPrint Format` set html = replace(html, 'customer_address', 'address_display')") elif patch_no == 262: - from patches.customer_address import sync_lead_phone + from patches.old_patches.customer_address import sync_lead_phone sync_lead_phone() elif patch_no == 263: ol = ['','Open','To Reply','Waiting for Customer','Hold','Closed'] @@ -1074,8 +1074,8 @@ def execute(patch_no): except: pass elif patch_no == 271: # tags patch - reload_doc('crm','doctype','sales_order') - reload_doc('material_management','doctype','delivery_note') + reload_doc('selling','doctype','sales_order') + reload_doc('stock','doctype','delivery_note') sql("delete from tabDocField where fieldname='per_amt_billed' and parent in ('Sales Order', 'Delivery Note')") sql("""update `tabSales Order` set delivery_status = if(ifnull(per_delivered,0) < 0.001, 'Not Delivered', @@ -1096,7 +1096,7 @@ def execute(patch_no): sn = sql("select name from `tabSearch Criteria` where criteria_name = 'Sales Personwise Transaction Summary'") for d in sn: delete_doc('Search Criteria', d[0]) - reload_doc('crm', 'search_criteria', 'sales_personwise_transaction_summary') + reload_doc('selling', 'search_criteria', 'sales_personwise_transaction_summary') elif patch_no == 277: webnotes.model.delete_doc('DocType','HomePage Settings') webnotes.model.delete_doc('DocType','Badge Settings') @@ -1140,7 +1140,7 @@ def execute(patch_no): for d in rec: sql("update `tab%s` set docstatus = %s where name = '%s'" % (d[0], d[2]=='No' and 1 or 2, d[1])) elif patch_no == 284: - reload_doc('maintenance', 'doctype', 'support_ticket') + reload_doc('support', 'doctype', 'support_ticket') sql("update `tabDocField` set in_filter = 1 where fieldname in ('raised_by', 'subject') and parent = 'Support Ticket'") elif patch_no == 286: reload_doc('accounts', 'search_criteria', 'itemwise_sales_register') @@ -1161,7 +1161,7 @@ def execute(patch_no): md.module_label = 'Home' md.save(1) elif patch_no == 291: - reload_doc('tools','doctype','rename_tool') + reload_doc('utilities','doctype','rename_tool') elif patch_no == 292: reload_doc('accounts', 'search_criteria', 'trial_balance') elif patch_no == 293: @@ -1178,14 +1178,14 @@ def execute(patch_no): sql("update `tabDocField` set options = 'Billed\nNot Billed\nPartly Billed\nClosed' where parent = 'Sales Order' and fieldname = 'billing_status'") elif patch_no == 296: sql("delete from tabDocField where parent='Support Ticket' and fieldname='contact_no'") - reload_doc('maintenance', 'doctype', 'support_ticket') + reload_doc('support', 'doctype', 'support_ticket') elif patch_no == 297: - reload_doc('payroll', 'doctype', 'employee') - reload_doc('payroll', 'doctype', 'attendance') - reload_doc('payroll', 'doctype', 'expense_voucher') - reload_doc('payroll', 'doctype', 'appraisal') - reload_doc('payroll', 'doctype', 'salary_structure') - reload_doc('payroll', 'doctype', 'salary_slip') + reload_doc('hr', 'doctype', 'employee') + reload_doc('hr', 'doctype', 'attendance') + reload_doc('hr', 'doctype', 'expense_voucher') + reload_doc('hr', 'doctype', 'appraisal') + reload_doc('hr', 'doctype', 'salary_structure') + reload_doc('hr', 'doctype', 'salary_slip') elif patch_no == 298: sql("update `tabDocField` set options = 'link:Company' where parent = 'Attendance' and fieldname = 'company'") sql("update `tabDocField` set options = 'link:Company' where parent = 'Expense Voucher' and fieldname = 'company'") @@ -1212,7 +1212,7 @@ def execute(patch_no): sql("update `tabDocField` set options = 'link:Item' where parent = 'Raw Materials Supplied' and fieldname = 'po_item'") sql("update `tabDocField` set options = 'Sales Order' where parent = 'Indent Detail' and fieldname = 'sales_order_no'") sql("update `tabDocField` set options = 'link:Company', fieldtype = 'Select' where parent = 'Stock Ledger Entry' and fieldname = 'company'") - reload_doc('tools', 'doctype', 'rename_tool') + reload_doc('utilities', 'doctype', 'rename_tool') elif patch_no == 307: sql("delete from `tabDocField` where parent = 'company' and label = 'Trash Company' and fieldtype = 'Button'") reload_doc('setup', 'doctype', 'company') @@ -1321,4 +1321,4 @@ def execute(patch_no): delete_doc('DocType', 'Support Email Settings') reload_doc('support','doctype','support_ticket') - sql("delete from tabDocField where fieldname='problem_description' and parent='Support Ticket'") \ No newline at end of file + sql("delete from tabDocField where fieldname='problem_description' and parent='Support Ticket'") From f1353e231de51432f7e6bef19c071e7207983ccf Mon Sep 17 00:00:00 2001 From: Brahma K Date: Thu, 28 Jul 2011 12:23:45 +0530 Subject: [PATCH 4/8] Added js,py and txt files related to Lease Agreement and its reports --- accounts/Module Def/Accounts/Accounts.txt | 18 +++++++++--------- .../doctype/lease_agreement/lease_agreement.js | 14 +++++++++++++- .../lease_agreement/lease_agreement.txt | 6 +++--- .../lease_agreement_list.js | 11 +++++++++++ .../lease_agreement_list.py | 13 +++++++++++++ .../lease_agreement_list.sql | 3 +++ .../lease_agreement_list.txt | 2 +- ...lease_monthly_future_installment_inflows.js | 14 ++++++++++++++ ...lease_monthly_future_installment_inflows.py | 13 +++++++++++++ ...ease_monthly_future_installment_inflows.sql | 9 +++++++++ .../lease_over_due_list/lease_over_due_list.js | 14 ++++++++++++++ .../lease_over_due_list/lease_over_due_list.py | 14 ++++++++++++++ .../lease_over_due_list.sql | 7 +++++++ .../lease_overdue_age_wise.js | 14 ++++++++++++++ .../lease_overdue_age_wise.py | 16 ++++++++++++++++ .../lease_overdue_age_wise.sql | 9 +++++++++ .../__init__.py | 0 .../lease_receipt_summary_month_wise.js | 11 +++++++++++ .../lease_receipt_summary_month_wise.py | 13 +++++++++++++ .../lease_receipt_summary_month_wise.sql | 5 +++++ .../lease_receipt_summary_month_wise.txt} | 15 ++++++--------- .../lease_receipts_client_wise.js | 11 +++++++++++ .../lease_receipts_client_wise.py | 12 ++++++++++++ .../lease_receipts_client_wise.sql | 5 +++++ .../lease_receipts_client_wise.txt | 7 ++++--- .../lease_yearly_future_installment_inflows.js | 14 ++++++++++++++ .../lease_yearly_future_installment_inflows.py | 12 ++++++++++++ ...lease_yearly_future_installment_inflows.sql | 9 +++++++++ 28 files changed, 265 insertions(+), 26 deletions(-) create mode 100644 accounts/search_criteria/lease_agreement_list/lease_agreement_list.js create mode 100644 accounts/search_criteria/lease_agreement_list/lease_agreement_list.py create mode 100644 accounts/search_criteria/lease_agreement_list/lease_agreement_list.sql create mode 100644 accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js create mode 100644 accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py create mode 100644 accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.sql create mode 100644 accounts/search_criteria/lease_over_due_list/lease_over_due_list.js create mode 100644 accounts/search_criteria/lease_over_due_list/lease_over_due_list.py create mode 100644 accounts/search_criteria/lease_over_due_list/lease_over_due_list.sql create mode 100644 accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js create mode 100644 accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py create mode 100644 accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.sql rename accounts/search_criteria/{lease_receipt_summary_year_to_date => lease_receipt_summary_month_wise}/__init__.py (100%) create mode 100644 accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js create mode 100644 accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py create mode 100644 accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.sql rename accounts/search_criteria/{lease_receipt_summary_year_to_date/lease_receipt_summary_year_to_date.txt => lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.txt} (69%) create mode 100644 accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js create mode 100644 accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py create mode 100644 accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql create mode 100644 accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js create mode 100644 accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py create mode 100644 accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.sql diff --git a/accounts/Module Def/Accounts/Accounts.txt b/accounts/Module Def/Accounts/Accounts.txt index 35e7e5d38d4..512b460b829 100644 --- a/accounts/Module Def/Accounts/Accounts.txt +++ b/accounts/Module Def/Accounts/Accounts.txt @@ -5,7 +5,7 @@ { 'creation': '2010-09-25 10:50:34', 'docstatus': 0, - 'modified': '2011-07-27 11:43:40', + 'modified': '2011-07-28 12:01:10', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -358,7 +358,7 @@ # Module Def Item { 'display_name': 'Lease Agreement List', - 'doc_name': 'Lease Agreement List', + 'doc_name': 'GL Entry', 'doc_type': 'Reports', 'doctype': 'Module Def Item', 'idx': 33 @@ -367,7 +367,7 @@ # Module Def Item { 'display_name': 'Lease Monthly Future Installment Inflows', - 'doc_name': 'Lease Monthly Future Installment Inflows', + 'doc_name': 'GL Entry', 'doc_type': 'Reports', 'doctype': 'Module Def Item', 'idx': 34 @@ -376,7 +376,7 @@ # Module Def Item { 'display_name': 'Lease Overdue Age Wise', - 'doc_name': 'Lease Overdue Age Wise', + 'doc_name': 'GL Entry', 'doc_type': 'Reports', 'doctype': 'Module Def Item', 'idx': 35 @@ -385,7 +385,7 @@ # Module Def Item { 'display_name': 'Lease Overdue List', - 'doc_name': 'Lease Overdue List', + 'doc_name': 'GL Entry', 'doc_type': 'Reports', 'doctype': 'Module Def Item', 'idx': 36 @@ -394,7 +394,7 @@ # Module Def Item { 'display_name': 'Lease Receipts Client Wise', - 'doc_name': 'Lease Receipts Client Wise', + 'doc_name': 'GL Entry', 'doc_type': 'Reports', 'doctype': 'Module Def Item', 'idx': 37 @@ -402,8 +402,8 @@ # Module Def Item { - 'display_name': 'Lease Receipt Summary Year to Date', - 'doc_name': 'Lease Receipt Summary Year to Date', + 'display_name': 'Lease Receipt Summary Month Wise', + 'doc_name': 'GL Entry', 'doc_type': 'Reports', 'doctype': 'Module Def Item', 'idx': 38 @@ -412,7 +412,7 @@ # Module Def Item { 'display_name': 'Lease Yearly Future Installment Inflows', - 'doc_name': 'Lease Yearly Future Installment Inflows', + 'doc_name': 'GL Entry', 'doc_type': 'Reports', 'doctype': 'Module Def Item', 'idx': 39 diff --git a/accounts/doctype/lease_agreement/lease_agreement.js b/accounts/doctype/lease_agreement/lease_agreement.js index 8c681a11b26..83e85004834 100644 --- a/accounts/doctype/lease_agreement/lease_agreement.js +++ b/accounts/doctype/lease_agreement/lease_agreement.js @@ -1,5 +1,17 @@ $.extend(cur_frm.cscript, { - Generate: function(doc, dt, dn) { + Generate: function(doc, dt, dn) {msgprint(doc); + if(doc.installment_amount==''){ + msgprint('Set Installment Amount before generating schedule'); + return; + } + if(doc.no_of_installments==''){ + msgprint('Set Number of Installments before generating schedule'); + return; + } + if(doc.start_date==''){ + msgprint('Set Start Date before generating schedule'); + return; + } cur_frm.cscript.clear_installments(doc); tot=0;i=0; while(tot '%(date)s') + +group by date_format(due_date,'%M-%Y') + +order by year(due_date),month(due_date) \ No newline at end of file diff --git a/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js new file mode 100644 index 00000000000..2d89611410e --- /dev/null +++ b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js @@ -0,0 +1,14 @@ +report.customize_filters = function() { + this.hide_all_filters(); + + this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1}); + + this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=dateutil.obj_to_str(new Date()); +// this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date()); + + this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df.filter_hide=1; + +} + +$dh(this.mytabs.tabs['More Filters']); +$dh(this.mytabs.tabs['Select Columns']); diff --git a/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py new file mode 100644 index 00000000000..869d46a55f8 --- /dev/null +++ b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py @@ -0,0 +1,14 @@ +data =[ + ['Agreement No.','Data','100px',''], + ['Lessee Name','Data','300px',''], + ['Amount','Currency','120px',''], + ['Age','Data','100px',''] + ] + +for d in data: + colnames.append(d[0]) + coltypes.append(d[1]) + colwidths.append(d[2]) + coloptions.append(d[3]) + col_idx[d[0]] = len(colnames)-1 + diff --git a/accounts/search_criteria/lease_over_due_list/lease_over_due_list.sql b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.sql new file mode 100644 index 00000000000..1789f7e5434 --- /dev/null +++ b/accounts/search_criteria/lease_over_due_list/lease_over_due_list.sql @@ -0,0 +1,7 @@ +select la.name,la.account,lai.amount,cast('%(date)s' as date)-due_date as age + +from `tabLease Agreement` la,`tabLease Installment` lai + +where la.name=lai.parent and lai.due_date cast('%(date)s' as date)) + +order by cast('%(date)s' as date)-due_date desc \ No newline at end of file diff --git a/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js new file mode 100644 index 00000000000..2d89611410e --- /dev/null +++ b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js @@ -0,0 +1,14 @@ +report.customize_filters = function() { + this.hide_all_filters(); + + this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1}); + + this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=dateutil.obj_to_str(new Date()); +// this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date()); + + this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df.filter_hide=1; + +} + +$dh(this.mytabs.tabs['More Filters']); +$dh(this.mytabs.tabs['Select Columns']); diff --git a/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py new file mode 100644 index 00000000000..5e164898419 --- /dev/null +++ b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py @@ -0,0 +1,16 @@ +data =[ + ['Lessee Name','Data','300px',''], + ['Below 30 Days','Currency','120px',''], + ['Below 90 Days','Currency','120px',''], + ['Below 180 Days','Currency','120px',''], + ['Below 360 Days','Currency','120px',''], + ['Above 360 Days','Currency','120px',''], + ] + +for d in data: + colnames.append(d[0]) + coltypes.append(d[1]) + colwidths.append(d[2]) + coloptions.append(d[3]) + col_idx[d[0]] = len(colnames)-1 + diff --git a/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.sql b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.sql new file mode 100644 index 00000000000..2e6912e23ab --- /dev/null +++ b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.sql @@ -0,0 +1,9 @@ +select account,sum(od_30)as od_30,sum(od_90)as od_90,sum(od_180)as od_180,sum(od_360)as od_360,sum(od_1yr)as od_1yr from +( + select account,case when age<=30 then amount end as od_30,case when age between 31 and 90 then amount end as od_90,case when age between 91 and 180 then amount end as od_180,case when age between 181 and 360 then amount end as od_360,case when age>360 then amount end as od_1yr from + ( + select la.account,lai.amount,cast('%(date)s' as date)-due_date as age + from `tabLease Agreement` la,`tabLease Installment` lai + where la.name=lai.parent and lai.due_date<'%(date)s' and (lai.cheque_date is null or lai.cheque_date > '%(date)s') + )a +)b group by account order by account diff --git a/accounts/search_criteria/lease_receipt_summary_year_to_date/__init__.py b/accounts/search_criteria/lease_receipt_summary_month_wise/__init__.py similarity index 100% rename from accounts/search_criteria/lease_receipt_summary_year_to_date/__init__.py rename to accounts/search_criteria/lease_receipt_summary_month_wise/__init__.py diff --git a/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js new file mode 100644 index 00000000000..4cb3d2b336c --- /dev/null +++ b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js @@ -0,0 +1,11 @@ +report.customize_filters = function() { + this.hide_all_filters(); + + this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1}); + + this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=sys_defaults.year_start_date; + this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date()); +} + +$dh(this.mytabs.tabs['More Filters']); +$dh(this.mytabs.tabs['Select Columns']); diff --git a/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py new file mode 100644 index 00000000000..8e5b8ad00bb --- /dev/null +++ b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py @@ -0,0 +1,13 @@ +data =[ + ['Month','Data','100px',''], + ['Year','Data','100px',''], + ['Amount','Currency','120px',''] + ] + +for d in data: + colnames.append(d[0]) + coltypes.append(d[1]) + colwidths.append(d[2]) + coloptions.append(d[3]) + col_idx[d[0]] = len(colnames)-1 + diff --git a/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.sql b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.sql new file mode 100644 index 00000000000..cdd48b8915e --- /dev/null +++ b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.sql @@ -0,0 +1,5 @@ +SELECT date_format(gl.posting_date,'%M'),year(gl.posting_date),sum(gl.credit) as amount +FROM `tabGL Entry` gl, `tabAccount` a +WHERE gl.account=a.name and a.master_type='Customer' and gl.credit>0 and gl.posting_date between '%(date)s' and '%(date1)s' +GROUP BY month(gl.posting_date),year(gl.posting_date) +ORDER BY year(gl.posting_date),month(gl.posting_date) diff --git a/accounts/search_criteria/lease_receipt_summary_year_to_date/lease_receipt_summary_year_to_date.txt b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.txt similarity index 69% rename from accounts/search_criteria/lease_receipt_summary_year_to_date/lease_receipt_summary_year_to_date.txt rename to accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.txt index 04f16bb0cd2..f63462fa5a3 100644 --- a/accounts/search_criteria/lease_receipt_summary_year_to_date/lease_receipt_summary_year_to_date.txt +++ b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.txt @@ -1,11 +1,11 @@ -# Search Criteria, lease_receipt_summary_year_to_date +# Search Criteria, lease_receipt_summary_month_wise [ # These values are common in all dictionaries { - 'creation': '2011-07-26 18:06:32', + 'creation': '2011-07-27 18:48:29', 'docstatus': 0, - 'modified': '2011-07-26 18:27:43', + 'modified': '2011-07-28 09:59:51', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -13,21 +13,18 @@ # These values are common for all Search Criteria { 'columns': 'GL Entry\x01ID,GL Entry\x01Owner,GL Entry\x01Posting Date,GL Entry\x01Aging Date,GL Entry\x01Account,GL Entry\x01Cost Center,GL Entry\x01Against,GL Entry\x01Against Voucher,GL Entry\x01Voucher Type,GL Entry\x01Voucher No,GL Entry\x01Remarks,GL Entry\x01Is Cancelled,GL Entry\x01Is Opening,GL Entry\x01Fiscal Year,GL Entry\x01Company', - 'criteria_name': 'Lease Receipt Summary (Year to date)', + 'criteria_name': 'Lease Receipt Summary Month Wise', 'doc_type': 'GL Entry', 'doctype': 'Search Criteria', 'filters': "{'GL Entry\x01Voucher Type':'','GL Entry\x01Is Cancelled':'','GL Entry\x01Is Opening':'','GL Entry\x01Fiscal Year':''}", 'module': 'Accounts', 'name': '__common__', - 'page_len': 50, - 'sort_by': '`tabGL Entry`.`company`', - 'sort_order': 'DESC', 'standard': 'Yes' }, - # Search Criteria, lease_receipt_summary_year_to_date + # Search Criteria, lease_receipt_summary_month_wise { 'doctype': 'Search Criteria', - 'name': 'lease_receipt_summary_year_to_date' + 'name': 'lease_receipt_summary_month_wise' } ] \ No newline at end of file diff --git a/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js new file mode 100644 index 00000000000..4cb3d2b336c --- /dev/null +++ b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js @@ -0,0 +1,11 @@ +report.customize_filters = function() { + this.hide_all_filters(); + + this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1}); + + this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=sys_defaults.year_start_date; + this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date()); +} + +$dh(this.mytabs.tabs['More Filters']); +$dh(this.mytabs.tabs['Select Columns']); diff --git a/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py new file mode 100644 index 00000000000..b84ff9fe5a7 --- /dev/null +++ b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py @@ -0,0 +1,12 @@ +data =[ + ['Lessee Name','Data','300px',''], + ['Amount','Currency','120px',''] + ] + +for d in data: + colnames.append(d[0]) + coltypes.append(d[1]) + colwidths.append(d[2]) + coloptions.append(d[3]) + col_idx[d[0]] = len(colnames)-1 + diff --git a/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql new file mode 100644 index 00000000000..f951388aaf8 --- /dev/null +++ b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.sql @@ -0,0 +1,5 @@ +SELECT gl.account,sum(gl.credit) as amount +FROM `tabGL Entry` gl, `tabAccount` a +WHERE gl.account=a.name and a.master_type='Customer' and gl.posting_date between '%(date)s' and '%(date1)s' +GROUP BY gl.account +ORDER BY posting_date diff --git a/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt index 69795df882b..25c15c267b3 100644 --- a/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt +++ b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2011-07-26 18:12:22', + 'creation': '2011-07-28 12:13:41', 'docstatus': 0, - 'modified': '2011-07-26 18:27:18', + 'modified': '2011-07-28 12:16:13', 'modified_by': 'Administrator', 'owner': 'Administrator' }, @@ -13,12 +13,13 @@ # These values are common for all Search Criteria { 'columns': 'GL Entry\x01ID,GL Entry\x01Owner,GL Entry\x01Posting Date,GL Entry\x01Aging Date,GL Entry\x01Account,GL Entry\x01Cost Center,GL Entry\x01Against,GL Entry\x01Against Voucher,GL Entry\x01Voucher Type,GL Entry\x01Voucher No,GL Entry\x01Remarks,GL Entry\x01Is Cancelled,GL Entry\x01Is Opening,GL Entry\x01Fiscal Year,GL Entry\x01Company', - 'criteria_name': 'Lease Receipts Client wise', + 'criteria_name': 'Lease Receipts Client Wise', 'doc_type': 'GL Entry', 'doctype': 'Search Criteria', 'filters': "{'GL Entry\x01Voucher Type':'','GL Entry\x01Is Cancelled':'','GL Entry\x01Is Opening':'','GL Entry\x01Fiscal Year':''}", 'module': 'Accounts', 'name': '__common__', + 'page_len': 50, 'standard': 'Yes' }, diff --git a/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js new file mode 100644 index 00000000000..2d89611410e --- /dev/null +++ b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js @@ -0,0 +1,14 @@ +report.customize_filters = function() { + this.hide_all_filters(); + + this.add_filter({fieldname:'date', label:'Date', fieldtype:'Date', options:'',ignore : 1, parent:'GL Entry', 'in_first_page':1}); + + this.filter_fields_dict['GL Entry'+FILTER_SEP +'From Date'].df['report_default']=dateutil.obj_to_str(new Date()); +// this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df['report_default']=dateutil.obj_to_str(new Date()); + + this.filter_fields_dict['GL Entry'+FILTER_SEP +'To Date'].df.filter_hide=1; + +} + +$dh(this.mytabs.tabs['More Filters']); +$dh(this.mytabs.tabs['Select Columns']); diff --git a/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py new file mode 100644 index 00000000000..0163ba62f25 --- /dev/null +++ b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py @@ -0,0 +1,12 @@ +data =[ + ['Year','Data','100px',''], + ['Amount','Currency','120px',''] + ] + +for d in data: + colnames.append(d[0]) + coltypes.append(d[1]) + colwidths.append(d[2]) + coloptions.append(d[3]) + col_idx[d[0]] = len(colnames)-1 + diff --git a/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.sql b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.sql new file mode 100644 index 00000000000..ec6c8166d01 --- /dev/null +++ b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.sql @@ -0,0 +1,9 @@ +select year(date_sub(due_date,interval 6 MONTH)) as yr,sum(amount) + +from `tabLease Agreement` la,`tabLease Installment` lai + +where la.name=lai.parent and (lai.cheque_date is null or lai.cheque_date > '%(date)s') + +group by year(date_sub(due_date,interval 6 MONTH)) + +order by yr \ No newline at end of file From 67b8da652cad0d43b98ae4af14c9330122721a5b Mon Sep 17 00:00:00 2001 From: Brahma K Date: Thu, 28 Jul 2011 12:58:14 +0530 Subject: [PATCH 5/8] Added Lease Agreement text files --- .../lease_agreement_list.txt | 30 ++++++++++++++++++ .../lease_receipt_summary_month_wise.txt | 30 ++++++++++++++++++ .../lease_receipts_client_wise.txt | 31 +++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt create mode 100644 accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.txt create mode 100644 accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt diff --git a/accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt new file mode 100644 index 00000000000..f7c9f846230 --- /dev/null +++ b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt @@ -0,0 +1,30 @@ +# Search Criteria, lease_agreement_list +[ + + # These values are common in all dictionaries + { + 'creation': '2011-07-26 17:01:34', + 'docstatus': 0, + 'modified': '2011-07-28 12:55:50', + 'modified_by': 'Administrator', + 'owner': 'Administrator' + }, + + # These values are common for all Search Criteria + { + 'columns': 'GL Entry\x01ID,GL Entry\x01Owner,GL Entry\x01Posting Date,GL Entry\x01Aging Date,GL Entry\x01Account,GL Entry\x01Cost Center,GL Entry\x01Against,GL Entry\x01Against Voucher,GL Entry\x01Voucher Type,GL Entry\x01Voucher No,GL Entry\x01Remarks,GL Entry\x01Is Cancelled,GL Entry\x01Is Opening,GL Entry\x01Fiscal Year,GL Entry\x01Company', + 'criteria_name': 'Lease Agreement List', + 'doc_type': 'GL Entry', + 'doctype': 'Search Criteria', + 'filters': "{'GL Entry\x01Voucher Type':'','GL Entry\x01Is Cancelled':'','GL Entry\x01Is Opening':'','GL Entry\x01Fiscal Year':''}", + 'module': 'Accounts', + 'name': '__common__', + 'standard': 'Yes' + }, + + # Search Criteria, lease_agreement_list + { + 'doctype': 'Search Criteria', + 'name': 'lease_agreement_list' + } +] \ No newline at end of file diff --git a/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.txt b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.txt new file mode 100644 index 00000000000..6e1b266ea52 --- /dev/null +++ b/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.txt @@ -0,0 +1,30 @@ +# Search Criteria, lease_receipt_summary_month_wise +[ + + # These values are common in all dictionaries + { + 'creation': '2011-07-27 18:48:29', + 'docstatus': 0, + 'modified': '2011-07-28 12:56:35', + 'modified_by': 'Administrator', + 'owner': 'Administrator' + }, + + # These values are common for all Search Criteria + { + 'columns': 'GL Entry\x01ID,GL Entry\x01Owner,GL Entry\x01Posting Date,GL Entry\x01Aging Date,GL Entry\x01Account,GL Entry\x01Cost Center,GL Entry\x01Against,GL Entry\x01Against Voucher,GL Entry\x01Voucher Type,GL Entry\x01Voucher No,GL Entry\x01Remarks,GL Entry\x01Is Cancelled,GL Entry\x01Is Opening,GL Entry\x01Fiscal Year,GL Entry\x01Company', + 'criteria_name': 'Lease Receipt Summary Month Wise', + 'doc_type': 'GL Entry', + 'doctype': 'Search Criteria', + 'filters': "{'GL Entry\x01Voucher Type':'','GL Entry\x01Is Cancelled':'','GL Entry\x01Is Opening':'','GL Entry\x01Fiscal Year':''}", + 'module': 'Accounts', + 'name': '__common__', + 'standard': 'Yes' + }, + + # Search Criteria, lease_receipt_summary_month_wise + { + 'doctype': 'Search Criteria', + 'name': 'lease_receipt_summary_month_wise' + } +] \ No newline at end of file diff --git a/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt new file mode 100644 index 00000000000..26c0ff7a1c7 --- /dev/null +++ b/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.txt @@ -0,0 +1,31 @@ +# Search Criteria, lease_receipts_client_wise +[ + + # These values are common in all dictionaries + { + 'creation': '2011-07-28 12:13:41', + 'docstatus': 0, + 'modified': '2011-07-28 12:56:47', + 'modified_by': 'Administrator', + 'owner': 'Administrator' + }, + + # These values are common for all Search Criteria + { + 'columns': 'GL Entry\x01ID,GL Entry\x01Owner,GL Entry\x01Posting Date,GL Entry\x01Aging Date,GL Entry\x01Account,GL Entry\x01Cost Center,GL Entry\x01Against,GL Entry\x01Against Voucher,GL Entry\x01Voucher Type,GL Entry\x01Voucher No,GL Entry\x01Remarks,GL Entry\x01Is Cancelled,GL Entry\x01Is Opening,GL Entry\x01Fiscal Year,GL Entry\x01Company', + 'criteria_name': 'Lease Receipts Client Wise', + 'doc_type': 'GL Entry', + 'doctype': 'Search Criteria', + 'filters': "{'GL Entry\x01Voucher Type':'','GL Entry\x01Is Cancelled':'','GL Entry\x01Is Opening':'','GL Entry\x01Fiscal Year':''}", + 'module': 'Accounts', + 'name': '__common__', + 'page_len': 50, + 'standard': 'Yes' + }, + + # Search Criteria, lease_receipts_client_wise + { + 'doctype': 'Search Criteria', + 'name': 'lease_receipts_client_wise' + } +] \ No newline at end of file From 86f3028fc1492c88fd5de4dd310509a1f051d5eb Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 28 Jul 2011 13:13:52 +0530 Subject: [PATCH 6/8] added __init__.py file in old patches dir --- patches/old_patches/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 patches/old_patches/__init__.py diff --git a/patches/old_patches/__init__.py b/patches/old_patches/__init__.py new file mode 100644 index 00000000000..e69de29bb2d From 25ffe5b9a4e411d3eed5a741e422188de902e8b4 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 28 Jul 2011 13:49:03 +0530 Subject: [PATCH 7/8] modules renamed in customer_address and feed patch --- patches/old_patches/customer_address.py | 32 ++++++++++++------------- patches/old_patches/feed_patch.py | 5 ++-- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/patches/old_patches/customer_address.py b/patches/old_patches/customer_address.py index 6a031c4d308..41c97b8e5d8 100644 --- a/patches/old_patches/customer_address.py +++ b/patches/old_patches/customer_address.py @@ -6,7 +6,7 @@ from webnotes import msgprint, errprint def make_address(): from webnotes.modules.module_manager import reload_doc - reload_doc('tools','doctype','address') + reload_doc('utilities','doctype','address') from webnotes.model.db_schema import updatedb updatedb('Address') @@ -113,24 +113,24 @@ def delete_unwanted_fields(): def reload_doc_files(): from webnotes.modules.module_manager import reload_doc - reload_doc('tools', 'doctype', 'contact') - reload_doc('crm', 'doctype', 'customer') - reload_doc('maintenance', 'doctype', 'customer_issue') - reload_doc('material_management', 'doctype', 'delivery_note') - reload_doc('crm', 'doctype', 'enquiry') - reload_doc('crm', 'doctype', 'installation_note') - reload_doc('crm', 'doctype', 'lead') - reload_doc('maintenance', 'doctype', 'maintenance_schedule') - reload_doc('maintenance', 'doctype', 'maintenance_visit') - reload_doc('srm', 'doctype', 'purchase_order') - reload_doc('material_management', 'doctype', 'purchase_receipt') - reload_doc('crm', 'doctype', 'quotation') + reload_doc('utilities', 'doctype', 'contact') + reload_doc('selling', 'doctype', 'customer') + reload_doc('support', 'doctype', 'customer_issue') + reload_doc('stock', 'doctype', 'delivery_note') + reload_doc('selling', 'doctype', 'enquiry') + reload_doc('selling', 'doctype', 'installation_note') + reload_doc('selling', 'doctype', 'lead') + reload_doc('support', 'doctype', 'maintenance_schedule') + reload_doc('support', 'doctype', 'maintenance_visit') + reload_doc('buying', 'doctype', 'purchase_order') + reload_doc('stock', 'doctype', 'purchase_receipt') + reload_doc('selling', 'doctype', 'quotation') reload_doc('accounts', 'doctype', 'receivable_voucher') reload_doc('accounts', 'doctype', 'payable_voucher') - reload_doc('crm', 'doctype', 'sales_order') + reload_doc('selling', 'doctype', 'sales_order') reload_doc('setup', 'doctype', 'sales_partner') - reload_doc('material_management', 'doctype', 'serial_no') - reload_doc('srm', 'doctype', 'supplier') + reload_doc('stock', 'doctype', 'serial_no') + reload_doc('buying', 'doctype', 'supplier') def reload_mapper_files(): from webnotes.modules.module_manager import reload_doc diff --git a/patches/old_patches/feed_patch.py b/patches/old_patches/feed_patch.py index d368aa00c9a..9d8ab0b4dd2 100644 --- a/patches/old_patches/feed_patch.py +++ b/patches/old_patches/feed_patch.py @@ -98,6 +98,5 @@ def support_patch(): webnotes.model.delete_doc('DocType','Support Ticket') reload_doc('setup','doctype','support_email_settings') - reload_doc('maintenance','doctype','support_ticket') - reload_doc('maintenance','doctype','support_ticket_response') - + reload_doc('support','doctype','support_ticket') + reload_doc('support','doctype','support_ticket_response') From 4e5fcf03fc775a5d18d809909d43ffc86f1e2fa4 Mon Sep 17 00:00:00 2001 From: Brahma K Date: Thu, 28 Jul 2011 15:29:12 +0530 Subject: [PATCH 8/8] Journal Voucher .txt file added --- .../journal_voucher/journal_voucher.txt | 802 ++++++++++++++++++ .../lease_agreement/lease_agreement.js | 2 +- 2 files changed, 803 insertions(+), 1 deletion(-) create mode 100644 accounts/doctype/journal_voucher/journal_voucher.txt diff --git a/accounts/doctype/journal_voucher/journal_voucher.txt b/accounts/doctype/journal_voucher/journal_voucher.txt new file mode 100644 index 00000000000..104d3d1c2da --- /dev/null +++ b/accounts/doctype/journal_voucher/journal_voucher.txt @@ -0,0 +1,802 @@ +# DocType, Journal Voucher +[ + + # These values are common in all dictionaries + { + 'creation': '2010-08-08 17:09:06', + 'docstatus': 0, + 'modified': '2011-07-28 15:28:12', + 'modified_by': 'Administrator', + 'owner': 'Administrator' + }, + + # These values are common for all DocType + { + '_last_update': '1311251040', + 'colour': 'White:FFF', + 'doctype': 'DocType', + 'module': 'Accounts', + 'name': '__common__', + 'search_fields': 'voucher_type,posting_date, due_date, cheque_no', + 'section_style': 'Tabbed', + 'server_code_error': ' ', + 'show_in_menu': 0, + 'subject': ' ', + 'tag_fields': 'voucher_type', + 'version': 309 + }, + + # These values are common for all DocField + { + 'doctype': 'DocField', + 'name': '__common__', + 'parent': 'Journal Voucher', + 'parentfield': 'fields', + 'parenttype': 'DocType' + }, + + # These values are common for all DocPerm + { + 'doctype': 'DocPerm', + 'name': '__common__', + 'parent': 'Journal Voucher', + 'parentfield': 'permissions', + 'parenttype': 'DocType', + 'read': 1 + }, + + # DocType, Journal Voucher + { + 'doctype': 'DocType', + 'name': 'Journal Voucher' + }, + + # DocPerm + { + 'amend': 0, + 'cancel': 0, + 'create': 0, + 'doctype': 'DocPerm', + 'idx': 1, + 'permlevel': 1, + 'role': 'Accounts Manager', + 'submit': 0, + 'write': 0 + }, + + # DocPerm + { + 'amend': 1, + 'cancel': 1, + 'create': 1, + 'doctype': 'DocPerm', + 'idx': 2, + 'permlevel': 0, + 'role': 'Accounts Manager', + 'submit': 1, + 'write': 1 + }, + + # DocPerm + { + 'amend': 1, + 'cancel': 1, + 'create': 1, + 'doctype': 'DocPerm', + 'idx': 3, + 'permlevel': 0, + 'role': 'Accounts User', + 'submit': 1, + 'write': 1 + }, + + # DocPerm + { + 'amend': 0, + 'cancel': 0, + 'create': 0, + 'doctype': 'DocPerm', + 'idx': 4, + 'permlevel': 1, + 'role': 'Accounts User', + 'submit': 0, + 'write': 0 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Section Break', + 'idx': 1, + 'label': 'Basic Info', + 'oldfieldtype': 'Section Break', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Section Break', + 'idx': 2, + 'label': '1. Select Series and Dates', + 'oldfieldtype': 'Section Break', + 'options': 'Simple', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Column Break', + 'idx': 3, + 'oldfieldtype': 'Column Break', + 'permlevel': 0, + 'width': '50%' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'voucher_type', + 'fieldtype': 'Select', + 'idx': 4, + 'in_filter': 1, + 'label': 'Voucher Type', + 'oldfieldname': 'voucher_type', + 'oldfieldtype': 'Select', + 'options': '\nJournal Entry\nBank Voucher\nCash Voucher\nCredit Card Voucher\nDebit Note\nCredit Note\nContra Voucher\nExcise Voucher\nWrite Off Voucher\nLoan Receipt', + 'permlevel': 0, + 'print_hide': 0, + 'search_index': 1 + }, + + # DocField + { + 'colour': 'White:FFF', + 'depends_on': "eval:doc.voucher_type == 'Write Off Voucher'", + 'doctype': 'DocField', + 'fieldname': 'write_off_amount', + 'fieldtype': 'Currency', + 'idx': 5, + 'label': 'Write Off Amount <=', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 1 + }, + + # DocField + { + 'colour': 'White:FFF', + 'default': 'Accounts Receivable', + 'depends_on': "eval:doc.voucher_type == 'Write Off Voucher'", + 'doctype': 'DocField', + 'fieldname': 'write_off_based_on', + 'fieldtype': 'Select', + 'idx': 6, + 'label': 'Write Off Based On', + 'options': 'Accounts Receivable\nAccounts Payable', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 1 + }, + + # DocField + { + 'colour': 'White:FFF', + 'description': 'To manage multiple series please go to Setup > Manage Series', + 'doctype': 'DocField', + 'fieldname': 'naming_series', + 'fieldtype': 'Select', + 'idx': 7, + 'label': 'Series', + 'no_copy': 1, + 'oldfieldname': 'naming_series', + 'oldfieldtype': 'Select', + 'options': 'JV', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1 + }, + + # DocField + { + 'colour': 'White:FFF', + 'default': 'Today', + 'doctype': 'DocField', + 'fieldname': 'voucher_date', + 'fieldtype': 'Date', + 'idx': 8, + 'in_filter': 1, + 'label': 'Voucher Date', + 'no_copy': 1, + 'oldfieldname': 'voucher_date', + 'oldfieldtype': 'Date', + 'permlevel': 0, + 'print_hide': 0, + 'reqd': 1, + 'search_index': 1 + }, + + # DocField + { + 'description': 'The date at which current entry will get or has actually executed.', + 'doctype': 'DocField', + 'fieldname': 'posting_date', + 'fieldtype': 'Date', + 'idx': 9, + 'in_filter': 1, + 'label': 'Posting Date', + 'no_copy': 1, + 'oldfieldname': 'posting_date', + 'oldfieldtype': 'Date', + 'permlevel': 0, + 'reqd': 1, + 'search_index': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'due_date', + 'fieldtype': 'Date', + 'idx': 10, + 'label': 'Due Date', + 'oldfieldname': 'due_date', + 'oldfieldtype': 'Date', + 'permlevel': 0, + 'print_hide': 0 + }, + + # DocField + { + 'description': 'The date at which current entry is corrected in the system.', + 'doctype': 'DocField', + 'fieldname': 'amendment_date', + 'fieldtype': 'Date', + 'idx': 11, + 'label': 'Amendment Date', + 'no_copy': 1, + 'oldfieldname': 'amendment_date', + 'oldfieldtype': 'Date', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'amended_from', + 'fieldtype': 'Link', + 'idx': 12, + 'label': 'Amended From', + 'no_copy': 1, + 'oldfieldname': 'amended_from', + 'oldfieldtype': 'Link', + 'options': 'Journal Voucher', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'colour': 'White:FFF', + 'depends_on': "eval:doc.voucher_type == 'Write Off Voucher'", + 'doctype': 'DocField', + 'fieldtype': 'Button', + 'idx': 13, + 'label': 'Get Outstanding Invoices', + 'options': 'get_outstanding_invoices', + 'permlevel': 0, + 'print_hide': 1, + 'trigger': 'Server' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Column Break', + 'idx': 14, + 'oldfieldtype': 'Column Break', + 'permlevel': 0, + 'width': '50%' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'cheque_no', + 'fieldtype': 'Data', + 'idx': 15, + 'in_filter': 1, + 'label': 'Cheque No', + 'no_copy': 1, + 'oldfieldname': 'cheque_no', + 'oldfieldtype': 'Data', + 'permlevel': 0, + 'search_index': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'cheque_date', + 'fieldtype': 'Date', + 'idx': 16, + 'label': 'Cheque Date', + 'no_copy': 1, + 'oldfieldname': 'cheque_date', + 'oldfieldtype': 'Date', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'clearance_date', + 'fieldtype': 'Date', + 'idx': 17, + 'in_filter': 1, + 'label': 'Clearance Date', + 'no_copy': 1, + 'oldfieldname': 'clearance_date', + 'oldfieldtype': 'Date', + 'permlevel': 1, + 'print_hide': 0, + 'search_index': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'user_remark', + 'fieldtype': 'Small Text', + 'idx': 18, + 'in_filter': 1, + 'label': 'User Remark', + 'no_copy': 1, + 'oldfieldname': 'user_remark', + 'oldfieldtype': 'Small Text', + 'permlevel': 0 + }, + + # DocField + { + 'description': 'User Remark will be added to Auto Remark', + 'doctype': 'DocField', + 'fieldname': 'remark', + 'fieldtype': 'Small Text', + 'idx': 19, + 'label': 'Remark', + 'no_copy': 1, + 'oldfieldname': 'remark', + 'oldfieldtype': 'Small Text', + 'permlevel': 1, + 'reqd': 0 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Section Break', + 'idx': 20, + 'label': '2. Add / Edit GL Entries', + 'oldfieldtype': 'Section Break', + 'options': 'Simple', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'entries', + 'fieldtype': 'Table', + 'idx': 21, + 'label': 'Entries', + 'oldfieldname': 'entries', + 'oldfieldtype': 'Table', + 'options': 'Journal Voucher Detail', + 'permlevel': 0, + 'print_hide': 0 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Button', + 'idx': 22, + 'label': 'Get Balance', + 'oldfieldtype': 'Button', + 'permlevel': 0, + 'trigger': 'Client' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'total_debit', + 'fieldtype': 'Currency', + 'idx': 23, + 'in_filter': 1, + 'label': 'Total Debit', + 'no_copy': 1, + 'oldfieldname': 'total_debit', + 'oldfieldtype': 'Currency', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'total_credit', + 'fieldtype': 'Currency', + 'idx': 24, + 'in_filter': 1, + 'label': 'Total Credit', + 'no_copy': 1, + 'oldfieldname': 'total_credit', + 'oldfieldtype': 'Currency', + 'permlevel': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'difference', + 'fieldtype': 'Currency', + 'idx': 25, + 'label': 'Difference', + 'no_copy': 1, + 'oldfieldname': 'difference', + 'oldfieldtype': 'Currency', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Section Break', + 'idx': 26, + 'label': 'Addtional Info', + 'oldfieldtype': 'Section Break', + 'permlevel': 0 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Column Break', + 'idx': 27, + 'oldfieldtype': 'Column Break', + 'permlevel': 0, + 'width': '50%' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'bill_no', + 'fieldtype': 'Data', + 'idx': 28, + 'label': 'Bill No', + 'oldfieldname': 'bill_no', + 'oldfieldtype': 'Data', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'bill_date', + 'fieldtype': 'Date', + 'idx': 29, + 'label': 'Bill Date', + 'oldfieldname': 'bill_date', + 'oldfieldtype': 'Date', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'colour': 'White:FFF', + 'default': 'No', + 'doctype': 'DocField', + 'fieldname': 'is_opening', + 'fieldtype': 'Select', + 'idx': 30, + 'in_filter': 1, + 'label': 'Is Opening', + 'oldfieldname': 'is_opening', + 'oldfieldtype': 'Select', + 'options': 'No\nYes', + 'permlevel': 0, + 'print_hide': 1, + 'search_index': 1, + 'trigger': 'Client' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'aging_date', + 'fieldtype': 'Date', + 'idx': 31, + 'label': 'Aging Date', + 'no_copy': 0, + 'oldfieldname': 'aging_date', + 'oldfieldtype': 'Date', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'cancel_reason', + 'fieldtype': 'Data', + 'idx': 32, + 'label': 'Cancel Reason', + 'no_copy': 1, + 'oldfieldname': 'cancel_reason', + 'oldfieldtype': 'Data', + 'permlevel': 1, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'pay_to_recd_from', + 'fieldtype': 'Data', + 'hidden': 0, + 'idx': 33, + 'label': 'Pay To / Recd From', + 'no_copy': 1, + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'total_amount', + 'fieldtype': 'Data', + 'hidden': 0, + 'idx': 34, + 'label': 'Total Amount', + 'no_copy': 1, + 'permlevel': 1, + 'print_hide': 1, + 'report_hide': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'total_amount_in_words', + 'fieldtype': 'Data', + 'hidden': 0, + 'idx': 35, + 'label': 'Total Amount in Words', + 'no_copy': 1, + 'permlevel': 1, + 'print_hide': 1, + 'report_hide': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Column Break', + 'idx': 36, + 'oldfieldtype': 'Column Break', + 'permlevel': 0, + 'width': '50%' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'fiscal_year', + 'fieldtype': 'Select', + 'idx': 37, + 'in_filter': 1, + 'label': 'Fiscal Year', + 'oldfieldname': 'fiscal_year', + 'oldfieldtype': 'Select', + 'options': 'link:Fiscal Year', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'company', + 'fieldtype': 'Link', + 'idx': 38, + 'in_filter': 1, + 'label': 'Company', + 'oldfieldname': 'company', + 'oldfieldtype': 'Link', + 'options': 'Company', + 'permlevel': 0, + 'print_hide': 1, + 'reqd': 1, + 'search_index': 1 + }, + + # DocField + { + 'allow_on_submit': 1, + 'colour': 'White:FFF', + 'doctype': 'DocField', + 'fieldname': 'select_print_heading', + 'fieldtype': 'Link', + 'idx': 39, + 'label': 'Select Print Heading', + 'no_copy': 1, + 'oldfieldname': 'select_print_heading', + 'oldfieldtype': 'Link', + 'options': 'Print Heading', + 'permlevel': 0, + 'print_hide': 1, + 'report_hide': 1, + 'trigger': 'Client' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Section Break', + 'idx': 40, + 'oldfieldtype': 'Section Break', + 'options': 'Simple', + 'permlevel': 0 + }, + + # DocField + { + 'allow_on_submit': 1, + 'doctype': 'DocField', + 'fieldtype': 'Button', + 'idx': 41, + 'label': 'View Ledger Entry', + 'oldfieldtype': 'Button', + 'permlevel': 0, + 'print_hide': 1, + 'trigger': 'Client' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldtype': 'Section Break', + 'idx': 42, + 'label': 'TDS', + 'oldfieldtype': 'Section Break', + 'permlevel': 0, + 'print_hide': 0 + }, + + # DocField + { + 'default': 'No', + 'doctype': 'DocField', + 'fieldname': 'tds_applicable', + 'fieldtype': 'Select', + 'idx': 43, + 'in_filter': 1, + 'label': 'TDS Applicable', + 'no_copy': 1, + 'oldfieldname': 'tds_applicable', + 'oldfieldtype': 'Select', + 'options': '\nYes\nNo', + 'permlevel': 0, + 'print_hide': 1, + 'search_index': 1 + }, + + # DocField + { + 'colour': 'White:FFF', + 'doctype': 'DocField', + 'fieldname': 'tds_category', + 'fieldtype': 'Select', + 'hidden': 0, + 'idx': 44, + 'in_filter': 1, + 'label': 'TDS Category', + 'no_copy': 1, + 'oldfieldname': 'tds_category', + 'oldfieldtype': 'Select', + 'options': 'link:TDS Category', + 'permlevel': 0, + 'print_hide': 1, + 'search_index': 1, + 'trigger': 'Client' + }, + + # DocField + { + 'colour': 'White:FFF', + 'doctype': 'DocField', + 'fieldname': 'supplier_account', + 'fieldtype': 'Link', + 'hidden': 0, + 'idx': 45, + 'label': 'Supplier Account', + 'no_copy': 1, + 'oldfieldname': 'supplier_account', + 'oldfieldtype': 'Link', + 'options': 'Account', + 'permlevel': 0, + 'print_hide': 1, + 'trigger': 'Client' + }, + + # DocField + { + 'colour': 'White:FFF', + 'doctype': 'DocField', + 'fieldtype': 'Button', + 'idx': 46, + 'label': 'Get TDS', + 'no_copy': 0, + 'oldfieldtype': 'Button', + 'permlevel': 0, + 'trigger': 'Client' + }, + + # DocField + { + 'colour': 'White:FFF', + 'description': 'Tax Code will be populated based on account head mentioned in TDS Category master', + 'doctype': 'DocField', + 'fieldname': 'tax_code', + 'fieldtype': 'Link', + 'idx': 47, + 'label': 'TDS Account Head', + 'no_copy': 1, + 'oldfieldname': 'tax_code', + 'oldfieldtype': 'Link', + 'options': 'Account', + 'permlevel': 0, + 'print_hide': 1 + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'rate', + 'fieldtype': 'Currency', + 'idx': 48, + 'label': 'Rate', + 'no_copy': 1, + 'oldfieldname': 'rate', + 'oldfieldtype': 'Currency', + 'permlevel': 0, + 'print_hide': 1, + 'trigger': 'Client' + }, + + # DocField + { + 'doctype': 'DocField', + 'fieldname': 'ded_amount', + 'fieldtype': 'Currency', + 'idx': 49, + 'label': 'Amount', + 'no_copy': 1, + 'oldfieldname': 'ded_amount', + 'oldfieldtype': 'Currency', + 'permlevel': 0, + 'print_hide': 1, + 'trigger': 'Client' + } +] \ No newline at end of file diff --git a/accounts/doctype/lease_agreement/lease_agreement.js b/accounts/doctype/lease_agreement/lease_agreement.js index 83e85004834..8ffd522c8d0 100644 --- a/accounts/doctype/lease_agreement/lease_agreement.js +++ b/accounts/doctype/lease_agreement/lease_agreement.js @@ -1,5 +1,5 @@ $.extend(cur_frm.cscript, { - Generate: function(doc, dt, dn) {msgprint(doc); + Generate: function(doc, dt, dn) { if(doc.installment_amount==''){ msgprint('Set Installment Amount before generating schedule'); return;