Explorar o código

fix when cash move is with cards

chemi ledon %!s(int64=6) %!d(string=hai) anos
pai
achega
a8d05d52b0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/models/cash_registers_move.rb

+ 1 - 1
app/models/cash_registers_move.rb

@@ -93,7 +93,7 @@ class CashRegistersMove < ActiveRecord::Base
         self.quantity = received.to_f > total ? total : received.to_f
       end
     else
-      # self.quantity = received.to_f
+      self.quantity = quantity.to_f.zero? ? received.to_f : quantity
       self.received = ""
       self.change = 0
     end