Add Payment Reconciliation Feature/Tool

This commit is contained in:
webnotes 2014-07-11 11:20:44 +05:30
parent cf6d31cefc
commit 059922cef1
10 changed files with 339 additions and 0 deletions

View File

@ -0,0 +1,25 @@
// Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
// For license information, please see license.txt
frappe.provide("erpnext.accounts");
erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.extend({
onload: function() {
var me = this
this.frm.set_query ("party_account", function() {
return{
filters:[
["Account", "company", "=", me.frm.doc.company],
["Account", "group_or_ledger", "=", "Ledger"],
["Account", "master_type", "in", ["Customer", "Supplier"]]
]
};
});
}
});
$.extend(cur_frm.cscript, new erpnext.accounts.PaymentReconciliationController({frm: cur_frm}));
cur_frm.add_fetch("party_account", "master_type", "party_type")

View File

@ -0,0 +1,152 @@
{
"creation": "2014-07-09 12:04:51.681583",
"custom": 0,
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"fieldname": "company",
"fieldtype": "Link",
"label": "Company",
"options": "Company",
"permlevel": 0,
"reqd": 1
},
{
"depends_on": "",
"fieldname": "party_account",
"fieldtype": "Link",
"in_list_view": 0,
"label": "Party Account",
"options": "Account",
"permlevel": 0,
"reqd": 1,
"search_index": 0
},
{
"fieldname": "party_type",
"fieldtype": "Select",
"hidden": 0,
"in_list_view": 1,
"label": "Party Type",
"options": "Customer\nSupplier",
"permlevel": 0,
"reqd": 0
},
{
"fieldname": "bank_cash_account",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Bank / Cash Account",
"options": "Account",
"permlevel": 0,
"reqd": 0,
"search_index": 0
},
{
"fieldname": "col_break1",
"fieldtype": "Column Break",
"label": "Column Break",
"permlevel": 0
},
{
"fieldname": "from_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "From Date",
"permlevel": 0,
"search_index": 1
},
{
"fieldname": "to_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "To Date",
"permlevel": 0,
"search_index": 1
},
{
"fieldname": "minimum_amount",
"fieldtype": "Currency",
"label": "Minimum Amount",
"permlevel": 0
},
{
"fieldname": "maximum_amount",
"fieldtype": "Currency",
"label": "Maximum Amount",
"permlevel": 0
},
{
"fieldname": "get_unreconciled_entries_btn",
"fieldtype": "Button",
"label": "Get Unreconciled Entries",
"permlevel": 0
},
{
"fieldname": "sec_break1",
"fieldtype": "Section Break",
"label": "Unreconciled Payment Details",
"permlevel": 0
},
{
"fieldname": "payment_reconciliation_payments",
"fieldtype": "Table",
"label": "Payment Reconciliation Payments",
"options": "Payment Reconciliation Payment",
"permlevel": 0
},
{
"fieldname": "reconcile_btn",
"fieldtype": "Button",
"label": "Reconcile",
"permlevel": 0
},
{
"fieldname": "sec_break2",
"fieldtype": "Section Break",
"label": "Invoice/JV Details",
"permlevel": 0
},
{
"fieldname": "payment_reconciliation_invoices",
"fieldtype": "Table",
"label": "Payment Reconciliation Invoices",
"options": "Payment Reconciliation Invoice",
"permlevel": 0,
"read_only": 1
}
],
"issingle": 1,
"modified": "2014-07-10 18:04:50.893833",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation",
"name_case": "",
"owner": "Administrator",
"permissions": [
{
"cancel": 0,
"create": 1,
"delete": 1,
"permlevel": 0,
"read": 1,
"role": "Accounts Manager",
"submit": 0,
"write": 1
},
{
"cancel": 0,
"create": 1,
"delete": 1,
"permlevel": 0,
"read": 1,
"role": "Accounts User",
"submit": 0,
"write": 1
}
],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@ -0,0 +1,14 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt
from frappe import msgprint, _
from frappe.model.document import Document
class PaymentReconciliation(Document):
pass

View File

@ -0,0 +1,59 @@
{
"creation": "2014-07-09 16:14:23.672922",
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"fieldname": "invoice_type",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Invoice Type",
"options": "Sales Invoice\nPurchase Invoice\nJournal Voucher",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "invoice_number",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Invoice Number",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "invoice_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Invoice Date",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Amount",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "outstanding_amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Outstanding Amount",
"permlevel": 0,
"read_only": 1
}
],
"istable": 1,
"modified": "2014-07-09 17:15:00.069551",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Invoice",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class PaymentReconciliationInvoice(Document):
pass

View File

@ -0,0 +1,71 @@
{
"creation": "2014-07-09 16:13:35.452759",
"docstatus": 0,
"doctype": "DocType",
"document_type": "",
"fields": [
{
"fieldname": "journal_voucher",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Journal Voucher",
"options": "Journal Voucher",
"permlevel": 0,
"read_only": 1,
"reqd": 0
},
{
"fieldname": "posting_date",
"fieldtype": "Date",
"in_list_view": 1,
"label": "Posting Date",
"permlevel": 0,
"read_only": 1
},
{
"fieldname": "amount",
"fieldtype": "Currency",
"in_list_view": 1,
"label": "Amount",
"permlevel": 0,
"read_only": 1
},
{
"default": "Sales Invoice",
"fieldname": "invoice_type",
"fieldtype": "Select",
"in_list_view": 1,
"label": "Invoice Type",
"options": "Sales Invoice\nPurchase Invoice\nJournal Voucher",
"permlevel": 0,
"read_only": 0,
"reqd": 1
},
{
"fieldname": "invoice_number",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Invoice Number",
"permlevel": 0,
"reqd": 1
},
{
"fieldname": "remark",
"fieldtype": "Text",
"in_list_view": 1,
"label": "Remark",
"permlevel": 0,
"read_only": 1
}
],
"istable": 1,
"modified": "2014-07-09 17:00:18.705385",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Payment",
"name_case": "",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}

View File

@ -0,0 +1,9 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class PaymentReconciliationPayment(Document):
pass