mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-20 03:47:11 +00:00
[enhance] Provision to set default mode of payment for the POS in POS profile
This commit is contained in:
@@ -584,7 +584,7 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
|
||||
var payment_status = true;
|
||||
if(this.frm.doc.is_pos && (update_paid_amount===undefined || update_paid_amount)){
|
||||
$.each(this.frm.doc['payments'] || [], function(index, data){
|
||||
if(data.type == "Cash" && payment_status && total_amount_to_pay > 0) {
|
||||
if(data.default && payment_status && total_amount_to_pay > 0) {
|
||||
data.base_amount = flt(total_amount_to_pay, precision("base_amount"));
|
||||
data.amount = flt(total_amount_to_pay / me.frm.doc.conversion_rate, precision("amount"));
|
||||
payment_status = false;
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
</div>
|
||||
<div class="pos-list-row">
|
||||
<div class="cell">{{ __("Amount") }}:</div>
|
||||
<input type="tel" class="form-control cell pos-amount" value="{%= amount %}"/>
|
||||
<input type="tel" class="form-control cell pos-amount" disabled value="{%= amount %}"/>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user