fix: Merge conflict

This commit is contained in:
Nabin Hait
2020-04-06 11:16:31 +05:30
4 changed files with 13 additions and 3 deletions

View File

@@ -278,6 +278,7 @@
"label": "More Details"
},
{
"allow_on_submit": 1,
"default": "Draft",
"fieldname": "status",
"fieldtype": "Select",
@@ -366,7 +367,8 @@
"icon": "fa fa-money",
"idx": 1,
"is_submittable": 1,
"modified": "2019-11-08 14:13:08.964547",
"links": [],
"modified": "2020-03-16 18:11:07.861985",
"modified_by": "Administrator",
"module": "HR",
"name": "Expense Claim",

View File

@@ -45,7 +45,7 @@ class ExpenseClaim(AccountsController):
paid_amount = flt(self.total_amount_reimbursed) + flt(self.total_advance_amount)
precision = self.precision("grand_total")
if (self.is_paid or (flt(self.total_sanctioned_amount) > 0
and flt(self.grand_total, precision) == flt(paid_amount, precision))) \
and flt(self.total_sanctioned_amount, precision) == flt(paid_amount, precision))) \
and self.docstatus == 1 and self.approval_status == 'Approved':
self.status = "Paid"
elif flt(self.total_sanctioned_amount) > 0 and self.docstatus == 1 and self.approval_status == 'Approved':

View File

@@ -652,4 +652,5 @@ erpnext.patches.v12_0.add_export_type_field_in_party_master
erpnext.patches.v12_0.rename_bank_reconciliation_fields # 2020-01-22
erpnext.patches.v12_0.create_irs_1099_field_united_states
erpnext.patches.v12_0.set_permission_einvoicing
erpnext.patches.v12_0.set_received_qty_in_material_request_as_per_stock_uom
erpnext.patches.v12_0.set_received_qty_in_material_request_as_per_stock_uom
erpnext.patches.v12_0.set_correct_status_for_expense_claim

View File

@@ -0,0 +1,7 @@
# Copyright (c) 2020, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
def execute():
frappe.db.sql("update `tabExpense Claim` set status = 'Paid' where (total_advance_amount + total_amount_reimbursed ) = total_sanctioned_amount")