mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 14:39:19 +00:00
Merge branch 'develop' into stock-analytics
This commit is contained in:
@@ -679,17 +679,13 @@ class calculate_taxes_and_totals(object):
|
|||||||
default_mode_of_payment = frappe.db.get_value('POS Payment Method',
|
default_mode_of_payment = frappe.db.get_value('POS Payment Method',
|
||||||
{'parent': self.doc.pos_profile, 'default': 1}, ['mode_of_payment'], as_dict=1)
|
{'parent': self.doc.pos_profile, 'default': 1}, ['mode_of_payment'], as_dict=1)
|
||||||
|
|
||||||
self.doc.payments = []
|
|
||||||
|
|
||||||
if default_mode_of_payment:
|
if default_mode_of_payment:
|
||||||
|
self.doc.payments = []
|
||||||
self.doc.append('payments', {
|
self.doc.append('payments', {
|
||||||
'mode_of_payment': default_mode_of_payment.mode_of_payment,
|
'mode_of_payment': default_mode_of_payment.mode_of_payment,
|
||||||
'amount': total_amount_to_pay,
|
'amount': total_amount_to_pay,
|
||||||
'default': 1
|
'default': 1
|
||||||
})
|
})
|
||||||
else:
|
|
||||||
self.doc.is_pos = 0
|
|
||||||
self.doc.pos_profile = ''
|
|
||||||
|
|
||||||
self.calculate_paid_amount()
|
self.calculate_paid_amount()
|
||||||
|
|
||||||
|
|||||||
@@ -751,8 +751,6 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
|
|||||||
this.frm.doc.payments.find(pay => {
|
this.frm.doc.payments.find(pay => {
|
||||||
if (pay.default) {
|
if (pay.default) {
|
||||||
pay.amount = total_amount_to_pay;
|
pay.amount = total_amount_to_pay;
|
||||||
} else {
|
|
||||||
pay.amount = 0.0
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.frm.refresh_fields();
|
this.frm.refresh_fields();
|
||||||
|
|||||||
Reference in New Issue
Block a user