GR
This commit is contained in:
@@ -1237,9 +1237,9 @@ class CTRMContractPerformance(ModelSQL, ModelView):
|
||||
purchase_line.tol_max, purchase.tol_max, 0)
|
||||
purchase_actual_quantity = Sum(Coalesce(lot.lot_qt, 0))
|
||||
purchase_min_quantity = purchase_contract_quantity * (
|
||||
1 - (purchase_tolerance_min / 100))
|
||||
Literal(1) - (purchase_tolerance_min / Literal(100)))
|
||||
purchase_max_quantity = purchase_contract_quantity * (
|
||||
1 + (purchase_tolerance_max / 100))
|
||||
Literal(1) + (purchase_tolerance_max / Literal(100)))
|
||||
purchase_status = Case(
|
||||
(purchase_actual_quantity < purchase_min_quantity, 'under'),
|
||||
(purchase_actual_quantity > purchase_max_quantity, 'over'),
|
||||
@@ -1251,9 +1251,9 @@ class CTRMContractPerformance(ModelSQL, ModelView):
|
||||
sale_tolerance_max = Coalesce(sale_line.tol_max, sale.tol_max, 0)
|
||||
sale_actual_quantity = Sum(Coalesce(lot.lot_qt, 0))
|
||||
sale_min_quantity = sale_contract_quantity * (
|
||||
1 - (sale_tolerance_min / 100))
|
||||
Literal(1) - (sale_tolerance_min / Literal(100)))
|
||||
sale_max_quantity = sale_contract_quantity * (
|
||||
1 + (sale_tolerance_max / 100))
|
||||
Literal(1) + (sale_tolerance_max / Literal(100)))
|
||||
sale_status = Case(
|
||||
(sale_actual_quantity < sale_min_quantity, 'under'),
|
||||
(sale_actual_quantity > sale_max_quantity, 'over'),
|
||||
|
||||
Reference in New Issue
Block a user