fix: payment reconciliation against expense claim (#17728)

* feat: Added dashboard in expense claim

* fix: payment reconciliation against expense claim
This commit is contained in:
Nabin Hait
2019-05-27 11:41:05 +05:30
committed by GitHub
parent 9c42124fbc
commit 7a6b88c791
4 changed files with 15 additions and 5 deletions

View File

@@ -333,7 +333,7 @@ def reconcile_against_document(args):
doc = frappe.get_doc(d.voucher_type, d.voucher_no) doc = frappe.get_doc(d.voucher_type, d.voucher_no)
doc.make_gl_entries(cancel = 0, adv_adj =1) doc.make_gl_entries(cancel = 0, adv_adj =1)
if d.voucher_type == 'Payment Entry': if d.voucher_type in ('Payment Entry', 'Journal Entry'):
doc.update_expense_claim() doc.update_expense_claim()
def check_if_advance_entry_modified(args): def check_if_advance_entry_modified(args):

View File

@@ -344,7 +344,7 @@ class AccountsController(TransactionBase):
'fiscal_year': fiscal_year, 'fiscal_year': fiscal_year,
'voucher_type': self.doctype, 'voucher_type': self.doctype,
'voucher_no': self.name, 'voucher_no': self.name,
'remarks': self.get("remarks"), 'remarks': self.get("remarks") or self.get("remark"),
'debit': 0, 'debit': 0,
'credit': 0, 'credit': 0,
'debit_in_account_currency': 0, 'debit_in_account_currency': 0,

View File

@@ -219,7 +219,8 @@ frappe.ui.form.on("Expense Claim", {
frm.fields_dict["cost_center"].get_query = function() { frm.fields_dict["cost_center"].get_query = function() {
return { return {
filters: { filters: {
"company": frm.doc.company "company": frm.doc.company,
"is_group": 0
} }
}; };
}; };
@@ -230,7 +231,9 @@ frappe.ui.form.on("Expense Claim", {
return { return {
filters: { filters: {
"report_type": "Balance Sheet", "report_type": "Balance Sheet",
"account_type": "Payable" "account_type": "Payable",
"company": frm.doc.company,
"is_group": 0
} }
}; };
}; };

View File

@@ -4,10 +4,17 @@ from frappe import _
def get_data(): def get_data():
return { return {
'fieldname': 'reference_name', 'fieldname': 'reference_name',
'internal_links': {
'Employee Advance': ['advances', 'employee_advance']
},
'transactions': [ 'transactions': [
{ {
'label': _('Payment'), 'label': _('Payment'),
'items': ['Payment Entry'] 'items': ['Payment Entry', 'Journal Entry']
},
{
'label': _('Reference'),
'items': ['Employee Advance']
}, },
] ]
} }