Explorar el Código

[FIX] amount paid check in cash payment

Gogs hace 7 años
padre
commit
7591c5ce05
Se han modificado 1 ficheros con 7 adiciones y 3 borrados
  1. 7 3
      src/store/modules/account.js

+ 7 - 3
src/store/modules/account.js

@@ -105,11 +105,15 @@ const actions = {
         commit('togglePayment', payload)
     },
     changeAmountPaid({ commit, getters, dispatch }, payload) {
-        if (payload <= getters.total) {
+        if (getters.payment === 'cash') {
             commit('setAmountPaid', payload)
         } else {
-            commit('setAmountPaid', getters.total)
-            dispatch('notify', 'El monto entregado no puede mayor al total')
+            if (payload <= getters.total) {
+                commit('setAmountPaid', payload)
+            } else {
+                commit('setAmountPaid', getters.total)
+                dispatch('notify', 'El monto entregado no puede mayor al total')
+            }
         }
     }
 }