|
@@ -3944,6 +3944,20 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
|
|
|
}
|
|
|
//校验计费日期是等于库存总帐计费日,如果不相等则报错
|
|
|
checkWhgenleg(wbItem, tWhgenle);
|
|
|
+ // 出库减件数数据
|
|
|
+ Long fQty = wbItem.getfQty();
|
|
|
+ if (fQty==0) {
|
|
|
+ // 出库毛重数据
|
|
|
+ BigDecimal fGrossweight = wbItem.getfGrossweight();
|
|
|
+ // 出库净重数据
|
|
|
+ BigDecimal fNetweight = wbItem.getfNetweight();
|
|
|
+ // 上期件数减去出库件数
|
|
|
+ tWhgenle.setfPreqty(tWhgenle.getfPreqty()-fQty);
|
|
|
+ // 上期毛重减去当前出库毛重数据
|
|
|
+ tWhgenle.setfPregrossweight(tWhgenle.getfPregrossweight().subtract(fGrossweight));
|
|
|
+ // 上期净重减去当前出库净重数据
|
|
|
+ tWhgenle.setfPrenetweight(tWhgenle.getfPrenetweight().subtract(fNetweight));
|
|
|
+ }
|
|
|
// 1、 库存 < 调拨件数 提示库存不足
|
|
|
judgeItemQty(tWhgenle, wbItem, i);
|
|
|
// 更新库存总账
|