[script report] bank clearance summary
diff --git a/accounts/page/accounts_home/accounts_home.js b/accounts/page/accounts_home/accounts_home.js
index 5779307..99d92b5 100644
--- a/accounts/page/accounts_home/accounts_home.js
+++ b/accounts/page/accounts_home/accounts_home.js
@@ -202,6 +202,11 @@
route: "query-report/Ordered Items To Be Billed",
doctype: "Sales Invoice"
},
+ {
+ "label":wn._("Bank Clearance Summary"),
+ route: "query-report/Bank Clearance Summary",
+ doctype: "Journal Voucher"
+ },
]
}
]
diff --git a/accounts/report/bank_clearance_summary/__init__.py b/accounts/report/bank_clearance_summary/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/accounts/report/bank_clearance_summary/__init__.py
diff --git a/accounts/report/bank_clearance_summary/bank_clearance_summary.js b/accounts/report/bank_clearance_summary/bank_clearance_summary.js
new file mode 100644
index 0000000..76adfd3
--- /dev/null
+++ b/accounts/report/bank_clearance_summary/bank_clearance_summary.js
@@ -0,0 +1,32 @@
+wn.query_reports["Bank Clearance Summary"] = {
+ "filters": [
+ {
+ "fieldname":"from_date",
+ "label": "From Date",
+ "fieldtype": "Date",
+ "default": wn.defaults.get_user_default("year_start_date"),
+ "width": "80"
+ },
+ {
+ "fieldname":"to_date",
+ "label": "To Date",
+ "fieldtype": "Date",
+ "default": get_today()
+ },
+ {
+ "fieldname":"account",
+ "label": "Bank Account",
+ "fieldtype": "Link",
+ "options": "Account",
+ "get_query": function() {
+ return {
+ "query": "accounts.utils.get_account_list",
+ "filters": {
+ "is_pl_account": "No",
+ "account_type": "Bank or Cash"
+ }
+ }
+ }
+ },
+ ]
+}
\ No newline at end of file
diff --git a/accounts/report/bank_clearance_summary/bank_clearance_summary.py b/accounts/report/bank_clearance_summary/bank_clearance_summary.py
new file mode 100644
index 0000000..49ac1a4
--- /dev/null
+++ b/accounts/report/bank_clearance_summary/bank_clearance_summary.py
@@ -0,0 +1,54 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import unicode_literals
+import webnotes
+from webnotes import _, msgprint
+
+def execute(filters=None):
+ if not filters: filters = {}
+
+ columns = get_columns()
+ data = get_entries(filters)
+
+ return columns, data
+
+def get_columns():
+ return ["Journal Voucher:Link/Journal Voucher:140", "Account:Link/Account:140",
+ "Posting Date:Date:100", "Clearance Date:Date:110", "Against Account:Link/Account:200",
+ "Debit:Currency:120", "Credit:Currency:120"
+ ]
+
+def get_conditions(filters):
+ conditions = ""
+ if not filters.get("account"):
+ msgprint(_("Please select Bank Account"), raise_exception=1)
+ else:
+ conditions += " and jvd.account = %(account)s"
+
+ if filters.get("from_date"): conditions += " and jv.posting_date>=%(from_date)s"
+ if filters.get("to_date"): conditions += " and jv.posting_date<=%(to_date)s"
+
+ return conditions
+
+def get_entries(filters):
+ conditions = get_conditions(filters)
+ entries = webnotes.conn.sql("""select jv.name, jvd.account, jv.posting_date,
+ jv.clearance_date, jvd.against_account, jvd.debit, jvd.credit
+ from `tabJournal Voucher Detail` jvd, `tabJournal Voucher` jv
+ where jvd.parent = jv.name and jv.docstatus=1 %s
+ order by jv.name DESC""" % conditions, filters, as_list=1)
+ return entries
\ No newline at end of file
diff --git a/accounts/report/bank_clearance_summary/bank_clearance_summary.txt b/accounts/report/bank_clearance_summary/bank_clearance_summary.txt
new file mode 100644
index 0000000..3dd2079
--- /dev/null
+++ b/accounts/report/bank_clearance_summary/bank_clearance_summary.txt
@@ -0,0 +1,21 @@
+[
+ {
+ "creation": "2013-05-01 12:13:25",
+ "docstatus": 0,
+ "modified": "2013-05-01 12:13:25",
+ "modified_by": "Administrator",
+ "owner": "Administrator"
+ },
+ {
+ "doctype": "Report",
+ "is_standard": "Yes",
+ "name": "__common__",
+ "ref_doctype": "Journal Voucher",
+ "report_name": "Bank Clearance Summary",
+ "report_type": "Script Report"
+ },
+ {
+ "doctype": "Report",
+ "name": "Bank Clearance Summary"
+ }
+]
\ No newline at end of file
diff --git a/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py b/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
index 4275958..1345cd8 100644
--- a/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
+++ b/accounts/report/bank_reconciliation_statement/bank_reconciliation_statement.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
from __future__ import unicode_literals
import webnotes
from webnotes import _, msgprint
diff --git a/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.txt b/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.txt
index c84854f..e84c597 100644
--- a/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.txt
+++ b/accounts/report/delivered_items_to_be_billed/delivered_items_to_be_billed.txt
@@ -1,8 +1,8 @@
[
{
- "creation": "2013-02-22 17:55:23",
+ "creation": "2013-02-25 10:38:57",
"docstatus": 0,
- "modified": "2013-02-23 14:35:28",
+ "modified": "2013-05-01 11:56:43",
"modified_by": "Administrator",
"owner": "Administrator"
},