mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 18:59:08 +00:00
Merge pull request #31813 from ruchamahabal/fix-claim
This commit is contained in:
@@ -254,9 +254,11 @@ frappe.ui.form.on("Expense Claim", {
|
|||||||
}, __("View"));
|
}, __("View"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frm.doc.docstatus===1 && !cint(frm.doc.is_paid) && cint(frm.doc.grand_total) > 0
|
if (
|
||||||
&& (cint(frm.doc.total_amount_reimbursed) < cint(frm.doc.total_sanctioned_amount))
|
frm.doc.docstatus === 1
|
||||||
&& frappe.model.can_create("Payment Entry")) {
|
&& frm.doc.status !== "Paid"
|
||||||
|
&& frappe.model.can_create("Payment Entry")
|
||||||
|
) {
|
||||||
frm.add_custom_button(__('Payment'),
|
frm.add_custom_button(__('Payment'),
|
||||||
function() { frm.events.make_payment_entry(frm); }, __('Create'));
|
function() { frm.events.make_payment_entry(frm); }, __('Create'));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -305,8 +305,9 @@ class ExpenseClaim(AccountsController):
|
|||||||
|
|
||||||
if self.total_advance_amount:
|
if self.total_advance_amount:
|
||||||
precision = self.precision("total_advance_amount")
|
precision = self.precision("total_advance_amount")
|
||||||
amount_with_taxes = flt(self.total_sanctioned_amount, precision) + flt(
|
amount_with_taxes = flt(
|
||||||
self.total_taxes_and_charges, precision
|
(flt(self.total_sanctioned_amount, precision) + flt(self.total_taxes_and_charges, precision)),
|
||||||
|
precision,
|
||||||
)
|
)
|
||||||
|
|
||||||
if flt(self.total_advance_amount, precision) > amount_with_taxes:
|
if flt(self.total_advance_amount, precision) > amount_with_taxes:
|
||||||
|
|||||||
Reference in New Issue
Block a user