|
@@ -7,14 +7,14 @@
|
|
hr
|
|
hr
|
|
.form-item(v-show="paymentType === 'cash'")
|
|
.form-item(v-show="paymentType === 'cash'")
|
|
label.form-label Monto a Pagar
|
|
label.form-label Monto a Pagar
|
|
- input.form-input(:value='cartTotal' readonly)
|
|
|
|
|
|
+ input.form-input(:value='cartTotal | currency' readonly)
|
|
.form-item
|
|
.form-item
|
|
label.form-label Monto Recibido
|
|
label.form-label Monto Recibido
|
|
- input.form-input(:value='initialPayment' v-model='amountReceived' autofocus)
|
|
|
|
|
|
+ input.form-input(v-model='amountReceived' autofocus)
|
|
.form-item(v-show="paymentType === 'cash'")
|
|
.form-item(v-show="paymentType === 'cash'")
|
|
hr
|
|
hr
|
|
label.form-label Monto a Devolver
|
|
label.form-label Monto a Devolver
|
|
- input.form-input(:value='paymentResidual' readonly)
|
|
|
|
|
|
+ input.form-input(:value='paymentResidual | currency' readonly)
|
|
.form-item-table(v-show="paymentType === 'credit'")
|
|
.form-item-table(v-show="paymentType === 'credit'")
|
|
table
|
|
table
|
|
thead
|
|
thead
|
|
@@ -41,18 +41,17 @@
|
|
computed: {
|
|
computed: {
|
|
amountReceived: {
|
|
amountReceived: {
|
|
get() {
|
|
get() {
|
|
- return this.initialPayment
|
|
|
|
|
|
+ return this.$options.filters.currency(this.initialPayment)
|
|
},
|
|
},
|
|
set(value) {
|
|
set(value) {
|
|
- value = parseFloat(value)
|
|
|
|
- value = Number.isNaN(value) ? 0 : value
|
|
|
|
|
|
+ // value = Number.isNaN(value) ? 0 : value
|
|
|
|
|
|
- this.changeInitialPayment(value)
|
|
|
|
- this.computePaymentResidual(value)
|
|
|
|
|
|
+ // this.changeInitialPayment(value)
|
|
|
|
+ // this.computePaymentResidual(value)
|
|
|
|
|
|
- if (this.paymentType === 'credit') {
|
|
|
|
- this.computePaymentLines()
|
|
|
|
- }
|
|
|
|
|
|
+ // if (this.paymentType === 'credit') {
|
|
|
|
+ // this.computePaymentLines()
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
...mapGetters([
|
|
...mapGetters([
|
|
@@ -79,6 +78,9 @@
|
|
return {
|
|
return {
|
|
paymentResidual: 0
|
|
paymentResidual: 0
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ console.log()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|