国产日韩亚洲精品_日韩av综合在线|HD中文字幕在线播放,av老女人,国产精品69av,强势粗暴h疼哭np

易寶電子貿(mào)易管理軟件論壇

首頁 » 客戶交流區(qū) » 常見問題 » 備貨的數(shù)量字段定義及計算
huangyf - 2014/2/27 18:34:43

備貨的數(shù)量字段定義及計算 如下:
1)sbiQty 備貨數(shù)量


2)sbiOutQty 已出庫數(shù)量:已被訂單鎖定且訂單已經(jīng)出庫的數(shù)量


3)sbiNoHoldQty 非鎖定數(shù)量:生成了采購申請未下采購訂單的數(shù)量+備貨被解鎖出來的數(shù)量  

   select sum(preqty) from purchaserequisition  where presellbufferitemid = sbiItemID and prepurchaseorderitemid is null

4)sbiNoorderHoldQty 未有銷售訂單鎖定數(shù)量:

   在途鎖定和在庫鎖定中沒有同時被銷售訂單鎖定的數(shù)量和,另外一種描述是:在途和在庫的鎖定表中僅僅只是備貨本身的鎖定,沒有被訂單鎖住的數(shù)量之和

   (ISNULL((select sum(phiHoldQty) from ProductHoldInventory where phiSellBufferItemID = sbiItemid and phiSellOrderItemID is null),0)+ISNULL((select sum(phooHoldQty) from ProductHoldOnOrder where phooSellBufferItemID = sbiItemid and phooSellOrderItemID is null),0))


5)sbiOrderHoldQty 已有銷售訂單鎖定數(shù)量:

   在途鎖定和在庫鎖定中同時被銷售訂單鎖定的數(shù)量和

   ISNULL((select sum(phiHoldQty) from ProductHoldInventory where phiSellBufferItemID = sbiItemid and phiSellOrderItemID is not null),0) +ISNULL((select sum(phooHoldQty) from ProductHoldOnOrder where phooSellBufferItemID = sbiItemid and phooSellOrderItemID is not null),0))


6)sbiCancelQty 取消數(shù)量:

   當(dāng)備貨在狀態(tài)維護(hù)頁面進(jìn)行取消時,系統(tǒng)會根據(jù)備貨數(shù)量-備貨已有訂單鎖定數(shù)量-備貨未有訂單鎖定數(shù)量-備貨已出庫數(shù)量-備貨非鎖定數(shù)量,計算出備貨取消鎖定數(shù)量,同時標(biāo)記備貨的狀態(tài)為取消狀態(tài)


7)sbiOrderQty 已開銷售訂單數(shù)量:目前這個字段沒有用過,系統(tǒng)中所有的該字段的值都為0


以上數(shù)量字段的綜合計算公式:

sbiOutQty =sbiQty - sbiOrderHoldQty  - sbiNoorderHoldQty -sbiNoHoldQty

1
查看完整版本: 備貨的數(shù)量字段定義及計算