From 4b1ee6972daf746a0e63ae8ebf4cacae30187074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A9?= Date: Mon, 6 Sep 2021 12:55:26 +0200 Subject: [PATCH] bugfix asap --- app/models/price_line.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/price_line.rb b/app/models/price_line.rb index 1d56221..1dabff0 100644 --- a/app/models/price_line.rb +++ b/app/models/price_line.rb @@ -604,7 +604,7 @@ class PriceLine < ApplicationRecord def self.asap_triage(limit) total = self.sum(:qte).to_i - asap = self.where('cc_wish_date > ?', Date.today + limit).sum(:qte).to_i + asap = self.where('cc_wish_date < ?', Date.today + limit).sum(:qte).to_i non_asap = total - asap return [asap, non_asap] end