Explorar o código

[FIX] amount paid check in cash payment

Gogs %!s(int64=7) %!d(string=hai) anos
pai
achega
7591c5ce05
Modificáronse 1 ficheiros con 7 adicións e 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')
+            }
         }
     }
 }