Merge branch 'master' into staging-fixes
This commit is contained in:
commit
98b4a1bc81
@ -5,7 +5,7 @@ import frappe
|
||||
from erpnext.hooks import regional_overrides
|
||||
from frappe.utils import getdate
|
||||
|
||||
__version__ = '10.1.71'
|
||||
__version__ = '10.1.72'
|
||||
|
||||
def get_default_company(user=None):
|
||||
'''Get default company for user'''
|
||||
|
@ -13,7 +13,7 @@ class EmployeeAdvanceOverPayment(frappe.ValidationError):
|
||||
|
||||
class EmployeeAdvance(Document):
|
||||
def onload(self):
|
||||
self.get("__onload").make_payment_via_journal_entry = frappe.db.get_single_value('Accounts Settings',
|
||||
self.get("__onload").make_payment_via_journal_entry = frappe.db.get_single_value('Accounts Settings',
|
||||
'make_payment_via_journal_entry')
|
||||
|
||||
def validate(self):
|
||||
@ -47,7 +47,7 @@ class EmployeeAdvance(Document):
|
||||
paid_amount = frappe.db.sql("""
|
||||
select ifnull(sum(debit_in_account_currency), 0) as paid_amount
|
||||
from `tabGL Entry`
|
||||
where against_voucher_type = 'Employee Advance'
|
||||
where against_voucher_type = 'Employee Advance'
|
||||
and against_voucher = %s
|
||||
and party_type = 'Employee'
|
||||
and party = %s
|
||||
@ -67,7 +67,7 @@ class EmployeeAdvance(Document):
|
||||
select sum(ifnull(allocated_amount, 0))
|
||||
from `tabExpense Claim Advance`
|
||||
where employee_advance = %s and docstatus=1 and allocated_amount > 0
|
||||
""", self.name)[0][0]
|
||||
""", self.name)[0][0] or 0
|
||||
|
||||
if claimed_amount:
|
||||
frappe.db.set_value("Employee Advance", self.name, "claimed_amount", flt(claimed_amount))
|
||||
|
Loading…
x
Reference in New Issue
Block a user