Revision history  [back]

المثال الحالي يحتوي مثالاً للاستعلام عن الكميات المتاحة بتخطيط التصنيع

select case when sum(q.inBasePValue-q.outBaseSValue)<0 then 0 else sum(q.inBasePValue-q.outBaseSValue) end from QtyTransLine q left join Warehouse w on w.id = q.warehouseid where q.valueDate <= {valueDate} and q.itemid = {$currentLine.invItem.id} and q.legalEntity_id = {legalEntity.id} and w.code in ('001','002','...')