Browse Source

[ADD] payment residual calculation

Gogs 7 năm trước cách đây
mục cha
commit
fc64d38633
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      src/components/steps/PaymentAmount.vue

+ 3 - 3
src/components/steps/PaymentAmount.vue

@@ -45,12 +45,12 @@
         ]),
         watch: {
             amountReceived(value) {
-                console.log(value)
+                this.computeAmountResidual(value)
             }
         },
         methods: {
-            computeAmountResidual() {
-
+            computeAmountResidual(value) {
+                this.amountResidual = this.cartTotal - parseFloat(value)
             }
         },
         data() {