Long & Short
This commit is contained in:
@@ -419,7 +419,7 @@ class CTRMLongShortMixin:
|
||||
def _physical_quantity_query(cls, lot, line_field):
|
||||
return lot.select(
|
||||
getattr(lot, line_field).as_('line'),
|
||||
Sum(Coalesce(lot.lot_quantity, 0)).as_('quantity'),
|
||||
Sum(Coalesce(lot.lot_qt, 0)).as_('quantity'),
|
||||
where=((lot.lot_type == 'physic')
|
||||
& (getattr(lot, line_field) != Null)),
|
||||
group_by=[getattr(lot, line_field)])
|
||||
|
||||
Reference in New Issue
Block a user