From d29916b7f5859ba1f5b1378401cdf5fe03333d05 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 27 Jul 2011 14:26:23 +0530 Subject: [PATCH 1/9] file_list field hidden in bulk rename tool --- .../lease_agreement_list/lease_agreement_list.txt | 4 ++-- .../lease_monthly_future_installment_inflows.txt | 4 ++-- .../lease_overdue_age_wise/lease_overdue_age_wise.txt | 4 ++-- .../lease_receipt_summary_year_to_date.txt | 4 ++-- .../lease_receipts_client_wise.txt | 4 ++-- .../lease_yearly_future_installment_inflows.txt | 4 ++-- patches/patch.py | 4 +++- utilities/doctype/bulk_rename_tool/bulk_rename_tool.txt | 8 ++++---- 8 files changed, 19 insertions(+), 17 deletions(-) diff --git a/accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt index 77e46338d5..164da38af2 100644 --- a/accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt +++ b/accounts/search_criteria/lease_agreement_list/lease_agreement_list.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2011-07-26 17:01:34', + 'creation': '2011-07-27 13:14:29', 'docstatus': 0, - 'modified': '2011-07-26 18:25:54', + 'modified': '2011-07-27 13:14:29', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.txt b/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.txt index 3a41f8feee..a531bb9f27 100644 --- a/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.txt +++ b/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2011-07-26 16:45:07', + 'creation': '2011-07-27 13:14:29', 'docstatus': 0, - 'modified': '2011-07-26 18:26:16', + 'modified': '2011-07-27 13:14:29', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.txt b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.txt index d8e935bca1..dcd0f94aaa 100644 --- a/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.txt +++ b/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2011-07-26 18:11:10', + 'creation': '2011-07-27 13:14:29', 'docstatus': 0, - 'modified': '2011-07-26 18:26:40', + 'modified': '2011-07-27 13:14:29', 'modified_by': 'Administrator', 'owner': 'Administrator' }, 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_year_to_date/lease_receipt_summary_year_to_date.txt index 04f16bb0cd..405c8a30c5 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_year_to_date/lease_receipt_summary_year_to_date.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2011-07-26 18:06:32', + 'creation': '2011-07-27 13:14:29', 'docstatus': 0, - 'modified': '2011-07-26 18:27:43', + 'modified': '2011-07-27 13:14:29', 'modified_by': 'Administrator', 'owner': 'Administrator' }, 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 69795df882..eff40878e4 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-27 13:14:29', 'docstatus': 0, - 'modified': '2011-07-26 18:27:18', + 'modified': '2011-07-27 13:14:29', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.txt b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.txt index 6e14165bd4..aa522241b4 100644 --- a/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.txt +++ b/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.txt @@ -3,9 +3,9 @@ # These values are common in all dictionaries { - 'creation': '2011-07-26 16:24:45', + 'creation': '2011-07-27 13:14:29', 'docstatus': 0, - 'modified': '2011-07-26 18:28:03', + 'modified': '2011-07-27 13:14:29', 'modified_by': 'Administrator', 'owner': 'Administrator' }, diff --git a/patches/patch.py b/patches/patch.py index 0ceb2a7b6d..13da883f31 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -1,7 +1,7 @@ # REMEMBER to update this # ======================== -last_patch = 330 +last_patch = 332 #------------------------------------------- @@ -1346,3 +1346,5 @@ def execute(patch_no): # permission p.add_permission('Lease Agreement', 'Accounts Manager', 0, read = 1, write=1,submit=1, cancel=1,amend=1) p.add_permission('Lease Agreement', 'Accounts Manager', 1, read = 1) + elif patch_no == 332: + sql("update `tabDocField` set permlevel=1, hidden = 1 where parent = 'Bulk Rename Tool' and fieldname = 'file_list'") diff --git a/utilities/doctype/bulk_rename_tool/bulk_rename_tool.txt b/utilities/doctype/bulk_rename_tool/bulk_rename_tool.txt index fb998628a2..155d3da2ca 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 11:14:15', + 'creation': '2011-07-07 17:47:52', 'docstatus': 0, - 'modified': '2011-07-26 00:59:27', + '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 From 7081d5e3001923e2783123258b54dfbcce7dd65e Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 27 Jul 2011 15:43:37 +0530 Subject: [PATCH 2/9] Check if any gl entry exists instead of current balance while delete/cancel or conveted from ledger to group or vice versa Excluded trashed account from Balance sheet and P&L statement Added is_cancelled check in mis control --- accounts/doctype/account/account.py | 18 +++++++++--------- analysis/doctype/mis_control/mis_control.py | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py index f5e4a6d6d9..52c66a9adf 100644 --- a/accounts/doctype/account/account.py +++ b/accounts/doctype/account/account.py @@ -94,8 +94,8 @@ class DocType: def convert_group_to_ledger(self): if self.check_if_child_exists(): msgprint("Account: %s has existing child. You can not convert this account to ledger" % (self.doc.name), raise_exception=1) - elif self.check_prev_bal_exists(): - msgprint("Account with balance can not be converted to ledger.", raise_exception=1) + elif self.check_gle_exists(): + msgprint("Account with existing transaction can not be converted to ledger.", raise_exception=1) else: self.doc.group_or_ledger = 'Ledger' self.doc.save() @@ -104,8 +104,8 @@ class DocType: # Convert ledger to group # ================================================================== def convert_ledger_to_group(self): - if self.check_prev_bal_exists(): - msgprint("Account with balance can not be converted to group.", raise_exception=1) + if self.check_gle_exists(): + msgprint("Account with existing transaction can not be converted to group.", raise_exception=1) else: self.doc.group_or_ledger = 'Group' self.doc.save() @@ -113,9 +113,9 @@ class DocType: # Check if any previous balance exists # ================================================================== - def check_prev_bal_exists(self): - bal = sql("select balance from `tabAccount Balance` where parent = '%s' and ifnull(balance, 0) > 0" % (self.doc.name)) - return bal and flt(bal[0][0]) or 0 + def check_gle_exists(self): + exists = sql("select name from `tabGL Entry` where account = '%s' and ifnull(is_cancelled, 'No') = 'No'" % (self.doc.name)) + return exists and exists[0][0] or '' # check if child exists # ================================================================== @@ -231,8 +231,8 @@ class DocType: # Account with balance cannot be inactive # ================================================================== def check_balance_before_trash(self): - if flt(self.get_curr_bal()) != 0: - msgprint("Account with existing balance can not be trashed", raise_exception=1) + if self.check_gle_exists(): + msgprint("Account with existing transaction can not be trashed", raise_exception=1) if self.check_if_child_exists(): msgprint("Child account exists for this account. You can not trash this account.", raise_exception=1) diff --git a/analysis/doctype/mis_control/mis_control.py b/analysis/doctype/mis_control/mis_control.py index 08a71f28e1..5af36e9927 100644 --- a/analysis/doctype/mis_control/mis_control.py +++ b/analysis/doctype/mis_control/mis_control.py @@ -195,7 +195,7 @@ class DocType: # Get Children # ------------ def get_children(self, parent_account, level, pl, company, fy): - cl = sql("select distinct account_name, name, debit_or_credit, lft, rgt from `tabAccount` where ifnull(parent_account, '') = %s and ifnull(is_pl_account, 'No')=%s and company=%s order by name asc", (parent_account, pl, company)) + cl = sql("select distinct account_name, name, debit_or_credit, lft, rgt from `tabAccount` where ifnull(parent_account, '') = %s and ifnull(is_pl_account, 'No')=%s and company=%s and docstatus != 2 order by name asc", (parent_account, pl, company)) level0_diff = [0 for p in self.period_list] if pl=='Yes' and level==0: # switch for income & expenses cl = [c for c in cl] @@ -295,7 +295,7 @@ class DocType: sd = self.ysd.strftime('%Y-%m-%d') cond = "" - bal = sql("select SUM(t1.debit), SUM(t1.credit) from `tabGL Entry` t1, `tabAccount` t2 WHERE t1.posting_date >= '%s' AND t1.posting_date <= '%s' AND t1.company = '%s' AND t1.account = t2.name AND t2.lft >= %s AND t2.rgt <= %s and ifnull(is_opening,'No') = 'No' %s" % (sd,ed,company,lft,rgt, cond)) + bal = sql("select SUM(t1.debit), SUM(t1.credit) from `tabGL Entry` t1, `tabAccount` t2 WHERE t1.posting_date >= '%s' AND t1.posting_date <= '%s' AND t1.company = '%s' AND t1.account = t2.name AND t2.lft >= %s AND t2.rgt <= %s and ifnull(t1.is_opening,'No') = 'No' and ifnull(t1.is_cancelled, 'No') = 'No' %s" % (sd,ed,company,lft,rgt, cond)) bal = bal and (flt(bal[0][0]) - flt(bal[0][1])) or 0 @@ -316,7 +316,7 @@ class DocType: a = sql("select account_name, name, debit_or_credit, lft, rgt, is_pl_account from `tabAccount` where account_name=%s and company=%s", (acc, company), as_dict=1) if a: a = a[0] - bal = sql("select SUM(IFNULL(t1.debit,0)), SUM(IFNULL(t1.credit,0)) from `tabGL Entry` t1, `tabAccount` t2 WHERE t1.posting_date >= %s AND t1.posting_date <= %s AND t1.account = t2.name AND t2.lft >= %s AND t2.rgt <= %s and ifnull(is_opening, 'No') = 'No'", (sd,ed,a['lft'],a['rgt'])) + bal = sql("select SUM(IFNULL(t1.debit,0)), SUM(IFNULL(t1.credit,0)) from `tabGL Entry` t1, `tabAccount` t2 WHERE t1.posting_date >= %s AND t1.posting_date <= %s AND t1.account = t2.name AND t2.lft >= %s AND t2.rgt <= %s and ifnull(is_opening, 'No') = 'No' and ifnull(t1.is_cancelled, 'No') = 'No'", (sd,ed,a['lft'],a['rgt'])) if a['debit_or_credit']=='Debit': bal = flt(flt(bal[0][0]) - flt(bal[0][1])) else: @@ -341,13 +341,13 @@ class DocType: rec_grp = sql("select receivables_group from tabCompany where name=%s", company) if rec_grp: pa_lft_rgt = sql("select lft, rgt from tabAccount where name=%s and company=%s", (rec_grp[0][0], company))[0] - return sql("select t1.account_name, SUM(t2.debit) from tabAccount t1, `tabGL Entry` t2 where t1.lft > %s and t1.rgt < %s and t2.account = t1.name GROUP BY t1.name ORDER BY SUM(t2.debit) desc limit 5", (pa_lft_rgt[0], pa_lft_rgt[1])) + return sql("select t1.account_name, SUM(t2.debit) from tabAccount t1, `tabGL Entry` t2 where t1.lft > %s and t1.rgt < %s and t2.account = t1.name and ifnull(t2.is_cancelled, 'No') = 'No' GROUP BY t1.name ORDER BY SUM(t2.debit) desc limit 5", (pa_lft_rgt[0], pa_lft_rgt[1])) else: return [] def get_top_5_exp(self, company): a = sql("select distinct account_name, name, debit_or_credit, lft, rgt from `tabAccount` where account_name=%s and company=%s", ('Expenses', company), as_dict=1)[0] - return sql("select t1.account_name, SUM(t2.debit) from tabAccount t1, `tabGL Entry` t2 where t1.lft>%s and t1.rgt<%s and t1.group_or_ledger = 'Ledger' and t2.account = t1.name and t2.voucher_type != 'Period Closing Voucher' GROUP BY t1.name ORDER BY SUM(t2.debit) desc limit 5", (a['lft'],a['rgt'])) + return sql("select t1.account_name, SUM(t2.debit) from tabAccount t1, `tabGL Entry` t2 where t1.lft>%s and t1.rgt<%s and t1.group_or_ledger = 'Ledger' and t2.account = t1.name and ifnull(t2.is_cancelled, 'No') = 'No' and t2.voucher_type != 'Period Closing Voucher' GROUP BY t1.name ORDER BY SUM(t2.debit) desc limit 5", (a['lft'],a['rgt'])) def bl(self, acc, company): dt = getdate(nowdate()) From f1353e231de51432f7e6bef19c071e7207983ccf Mon Sep 17 00:00:00 2001 From: Brahma K Date: Thu, 28 Jul 2011 12:23:45 +0530 Subject: [PATCH 3/9] 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 35e7e5d38d..512b460b82 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 8c681a11b2..83e8500483 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 0000000000..2d89611410 --- /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 0000000000..869d46a55f --- /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 0000000000..1789f7e543 --- /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 0000000000..2d89611410 --- /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 0000000000..5e16489841 --- /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 0000000000..2e6912e23a --- /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 0000000000..4cb3d2b336 --- /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 0000000000..8e5b8ad00b --- /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 0000000000..cdd48b8915 --- /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 04f16bb0cd..f63462fa5a 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 0000000000..4cb3d2b336 --- /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 0000000000..b84ff9fe5a --- /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 0000000000..f951388aaf --- /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 69795df882..25c15c267b 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 0000000000..2d89611410 --- /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 0000000000..0163ba62f2 --- /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 0000000000..ec6c8166d0 --- /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 4/9] 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 0000000000..f7c9f84623 --- /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 0000000000..6e1b266ea5 --- /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 0000000000..26c0ff7a1c --- /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 4e5fcf03fc775a5d18d809909d43ffc86f1e2fa4 Mon Sep 17 00:00:00 2001 From: Brahma K Date: Thu, 28 Jul 2011 15:29:12 +0530 Subject: [PATCH 5/9] 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 0000000000..104d3d1c2d --- /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 83e8500483..8ffd522c8d 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; From 43a3a619b378ee386c68d7fb2ffbca913e77be1b Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 28 Jul 2011 15:38:23 +0530 Subject: [PATCH 6/9] clearance date will be copy while amending journal voucher --- accounts/doctype/journal_voucher/journal_voucher.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/accounts/doctype/journal_voucher/journal_voucher.js b/accounts/doctype/journal_voucher/journal_voucher.js index dce570b4d4..f65ee3169d 100644 --- a/accounts/doctype/journal_voucher/journal_voucher.js +++ b/accounts/doctype/journal_voucher/journal_voucher.js @@ -1,9 +1,5 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) { var cp = locals['Control Panel']['Control Panel']; - if(doc.__islocal){ - doc.clearance_date =''; - refresh_field('clearance_date'); - } if (!doc.voucher_date) doc.voucher_date = dateutil.obj_to_str(new Date()); @@ -155,4 +151,4 @@ cur_frm.cscript['View Ledger Entry'] = function(doc,cdt,cdn){ report.dt.run(); } loadreport('GL Entry','General Ledger', callback); -} \ No newline at end of file +} From 3df28592994e7b56d6dc35480c0c42a41793449d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 28 Jul 2011 16:01:16 +0530 Subject: [PATCH 7/9] update modified date of JV through bank reconciliation --- .../bank_reconciliation.py | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/accounts/doctype/bank_reconciliation/bank_reconciliation.py index 8434f628d3..3ba477b319 100644 --- a/accounts/doctype/bank_reconciliation/bank_reconciliation.py +++ b/accounts/doctype/bank_reconciliation/bank_reconciliation.py @@ -18,32 +18,32 @@ convert_to_lists = webnotes.conn.convert_to_lists class DocType: - def __init__(self, d, dl): - self.doc, self.doclist = d, dl + def __init__(self, d, dl): + self.doc, self.doclist = d, dl - def get_details(self): - if not (self.doc.bank_account and self.doc.from_date and self.doc.to_date): - msgprint("Bank Account, From Date and To Date are Mandatory") - return - - dl = sql("select t1.name, t1.cheque_no, t1.cheque_date, t2.debit, t2.credit, t1.posting_date, t2.against_account from `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2 where t2.parent = t1.name and t2.account = %s and (clearance_date is null or clearance_date = '0000-00-00' or clearance_date = '') and (t1.cheque_no is not null or t1.cheque_no != '') and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1", (self.doc.bank_account, self.doc.from_date, self.doc.to_date)) - - self.doc.clear_table(self.doclist, 'entries') - self.doc.total_amount = 0.0 + def get_details(self): + if not (self.doc.bank_account and self.doc.from_date and self.doc.to_date): + msgprint("Bank Account, From Date and To Date are Mandatory") + return + + dl = sql("select t1.name, t1.cheque_no, t1.cheque_date, t2.debit, t2.credit, t1.posting_date, t2.against_account from `tabJournal Voucher` t1, `tabJournal Voucher Detail` t2 where t2.parent = t1.name and t2.account = %s and (clearance_date is null or clearance_date = '0000-00-00' or clearance_date = '') and (t1.cheque_no is not null or t1.cheque_no != '') and t1.posting_date >= %s and t1.posting_date <= %s and t1.docstatus=1", (self.doc.bank_account, self.doc.from_date, self.doc.to_date)) + + self.doc.clear_table(self.doclist, 'entries') + self.doc.total_amount = 0.0 - for d in dl: - nl = addchild(self.doc, 'entries', 'Bank Reconciliation Detail', 1, self.doclist) - nl.posting_date = str(d[5]) - nl.voucher_id = str(d[0]) - nl.cheque_number = str(d[1]) - nl.cheque_date = str(d[2]) - nl.debit = flt(d[3]) - nl.credit = flt(d[4]) - nl.against_account = d[6] - self.doc.total_amount += flt(flt(d[4]) - flt(d[3])) + for d in dl: + nl = addchild(self.doc, 'entries', 'Bank Reconciliation Detail', 1, self.doclist) + nl.posting_date = str(d[5]) + nl.voucher_id = str(d[0]) + nl.cheque_number = str(d[1]) + nl.cheque_date = str(d[2]) + nl.debit = flt(d[3]) + nl.credit = flt(d[4]) + nl.against_account = d[6] + self.doc.total_amount += flt(flt(d[4]) - flt(d[3])) - def update_details(self): - for d in getlist(self.doclist, 'entries'): - if d.clearance_date: - sql("update `tabJournal Voucher` set clearance_date = %s where name=%s", (d.clearance_date, d.voucher_id)) - msgprint("Updated") \ No newline at end of file + def update_details(self): + for d in getlist(self.doclist, 'entries'): + if d.clearance_date: + sql("update `tabJournal Voucher` set clearance_date = %s, modified = %s where name=%s", (d.clearance_date, nowdate(), d.voucher_id)) + msgprint("Updated") From b824cdbbfdedecc9b71ed954409d727fcd062587 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 28 Jul 2011 16:17:32 +0530 Subject: [PATCH 8/9] update modified date of JV through bank reco --- .../doctype/period_closing_voucher/period_closing_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/accounts/doctype/period_closing_voucher/period_closing_voucher.py index ed42459ca5..c7e5db6639 100644 --- a/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -129,7 +129,7 @@ class DocType: # save le.save(1) - le_obj.on_update(adv_adj = '') + le_obj.on_update(adv_adj = '', cancel = '') # Reposting Balances From 7c285712e100a845389af83e8b21e9b419689c60 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 28 Jul 2011 16:17:32 +0530 Subject: [PATCH 9/9] fixed error in period closing voucher --- .../doctype/period_closing_voucher/period_closing_voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/accounts/doctype/period_closing_voucher/period_closing_voucher.py index ed42459ca5..c7e5db6639 100644 --- a/accounts/doctype/period_closing_voucher/period_closing_voucher.py +++ b/accounts/doctype/period_closing_voucher/period_closing_voucher.py @@ -129,7 +129,7 @@ class DocType: # save le.save(1) - le_obj.on_update(adv_adj = '') + le_obj.on_update(adv_adj = '', cancel = '') # Reposting Balances