Sfoglia il codice sorgente

Merge branch 'chemi_branch' of SML/pos-boutique into master

Jose Miguel Ledon 6 anni fa
parent
commit
cd151dfef4
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      app/controllers/cash_outs_controller.rb

+ 1 - 1
app/controllers/cash_outs_controller.rb

@@ -122,7 +122,7 @@ class CashOutsController < ApplicationController
       all_sales = Sale.where("open_cash_register_id = (?) and status != 1", @cash_out.open_cash_register_id)
       @cash_sales = CashRegistersMove.where("open_cash_register_id = (?) and move_type = '1' and status = 1 and sale_id IN (?)", @cash_out.open_cash_register_id, all_sales.where(saletype: 1).pluck(:id)).sum(:quantity)
       @credit_sales = CashRegistersMove.where("open_cash_register_id = (?) and move_type = '1' and status = 1 and concept = 3", @cash_out.open_cash_register_id).sum(:quantity)
-      @reserved_sales = CashRegistersMove.where("open_cash_register_id = (?) and move_type = '1' and status = 1 and sale_id IN (?)", @cash_out.open_cash_register_id, all_sales.where(saletype: 2).pluck(:id)).sum(:quantity)
+      @reserved_sales = CashRegistersMove.where("open_cash_register_id = (?) and move_type = '1' and status = 1 and concept IN (4, 6, 7)", @cash_out.open_cash_register_id).sum(:quantity)
       @details.each do |detail|
         detail["price_sale"] = Product.find(detail['product_id']).get_price_sale(@pointsale.id)