Merge branch 'hotfix'
This commit is contained in:
commit
eeb66dfc8e
@ -5,7 +5,7 @@ import frappe
|
|||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
from frappe.utils import getdate
|
from frappe.utils import getdate
|
||||||
|
|
||||||
__version__ = '10.1.66'
|
__version__ = '10.1.67'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -791,15 +791,25 @@ frappe.ui.form.on('Payment Entry', {
|
|||||||
var write_off_row = $.map(frm.doc["deductions"] || [], function(t) {
|
var write_off_row = $.map(frm.doc["deductions"] || [], function(t) {
|
||||||
return t.account==r.message[account] ? t : null; });
|
return t.account==r.message[account] ? t : null; });
|
||||||
|
|
||||||
if (!write_off_row.length) {
|
var row = [];
|
||||||
var row = frm.add_child("deductions");
|
|
||||||
|
var difference_amount = flt(frm.doc.difference_amount,
|
||||||
|
precision("difference_amount"));
|
||||||
|
|
||||||
|
if (!write_off_row.length && difference_amount) {
|
||||||
|
row = frm.add_child("deductions");
|
||||||
row.account = r.message[account];
|
row.account = r.message[account];
|
||||||
row.cost_center = r.message["cost_center"];
|
row.cost_center = r.message["cost_center"];
|
||||||
} else {
|
} else {
|
||||||
var row = write_off_row[0];
|
row = write_off_row[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (row) {
|
||||||
|
row.amount = flt(row.amount) + difference_amount;
|
||||||
|
} else {
|
||||||
|
frappe.msgprint(__("No gain or loss in the exchange rate"))
|
||||||
}
|
}
|
||||||
|
|
||||||
row.amount = flt(row.amount) + flt(frm.doc.difference_amount);
|
|
||||||
refresh_field("deductions");
|
refresh_field("deductions");
|
||||||
|
|
||||||
frm.events.set_unallocated_amount(frm);
|
frm.events.set_unallocated_amount(frm);
|
||||||
|
@ -54,7 +54,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
|
|||||||
]
|
]
|
||||||
|
|
||||||
row += [(d.base_net_rate * d.qty)/d.stock_qty, d.base_net_amount] \
|
row += [(d.base_net_rate * d.qty)/d.stock_qty, d.base_net_amount] \
|
||||||
if d.stock_uom != d.uom else [d.base_net_rate, d.base_net_amount]
|
if d.stock_uom != d.uom and d.stock_qty != 0 else [d.base_net_rate, d.base_net_amount]
|
||||||
|
|
||||||
total_tax = 0
|
total_tax = 0
|
||||||
for tax in tax_columns:
|
for tax in tax_columns:
|
||||||
|
@ -60,7 +60,8 @@ class EmployeeAdvance(Document):
|
|||||||
where employee_advance = %s and docstatus=1 and allocated_amount > 0
|
where employee_advance = %s and docstatus=1 and allocated_amount > 0
|
||||||
""", self.name)[0][0]
|
""", self.name)[0][0]
|
||||||
|
|
||||||
frappe.db.set_value("Employee Advance", self.name, "claimed_amount", claimed_amount)
|
if claimed_amount:
|
||||||
|
frappe.db.set_value("Employee Advance", self.name, "claimed_amount", claimed_amount)
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def make_bank_entry(dt, dn):
|
def make_bank_entry(dt, dn):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user