bugfix asap

This commit is contained in:
Barnabé 2021-09-06 12:55:26 +02:00
parent 0d1c7d1b3f
commit 4b1ee6972d

View File

@ -604,7 +604,7 @@ class PriceLine < ApplicationRecord
def self.asap_triage(limit) def self.asap_triage(limit)
total = self.sum(:qte).to_i 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 non_asap = total - asap
return [asap, non_asap] return [asap, non_asap]
end end