module CashOutsHelper def cash_move_type(move) case move.concept when "sale" 'VENTA' when "purchase" 'COMPRA CANCELADA' when "expense" 'GASTO CANCELADO' when "credit_payment" 'ABONO A CRÉDITO' when "reserved_payment" 'ABONO A APARTADO' when "reserved_first_payment" 'ANTICIPO DE APARTADO' when "reserved_last_payment" 'LIQUIDACIÓN DE APARTADO' when "products_return" 'DIFERENCIA POR DEVOLUCIÓN' end end def move_concept_folio(move) case move.concept when "sale" then content_tag(:span, move.sale.sale_code) when "purchase" then content_tag(:span, move.purchase.purchase_code) when "expense" then content_tag(:span, move.expense.expense_code) # when "credit_payment" then # cp = CreditPayment.find_by(cash_registers_move_id: move.id) # unless cp.nil? # content_tag(:span, cp.id) # end when "returned_money" then content_tag(:span, ProductsReturn.find(move.products_return_id).return_code) when "paid_product_change" then content_tag(:span, ProductsReturn.find(move.products_return_id).return_code) end end end