|
|
@@ -211,8 +211,8 @@ public class InboundItemService extends BaseService<InboundItem> {
|
|
|
//修改存货批次明细
|
|
|
InventoryBatchQuery inventoryBatchQuery = new InventoryBatchQuery()
|
|
|
.setBatchId(inventoryBatchResponse.getBatchId())
|
|
|
- .setCostPrice(inboundItem.getCostPrice())
|
|
|
- .setCostAmt(inboundItem.getCostPrice().multiply(inventoryBatchResponse.getInvQty()));
|
|
|
+ .setCostPrice(inboundItem.getCostPrice().abs())
|
|
|
+ .setCostAmt((inboundItem.getCostPrice().multiply(inventoryBatchResponse.getInvQty())).abs());
|
|
|
inventoryBatchMapper.updateInventoryBatchCost(inventoryBatchQuery);
|
|
|
//修改总单
|
|
|
this.updateInventory(new InventoryBatchQuery().setInvId(inventoryBatchResponse.getInvId()));
|
|
|
@@ -221,8 +221,8 @@ public class InboundItemService extends BaseService<InboundItem> {
|
|
|
else if(outboundItemCostResponse.getOutQty().compareTo(BigDecimal.ZERO) == 0){
|
|
|
InventoryBatchQuery inventoryBatchQuery = new InventoryBatchQuery()
|
|
|
.setBatchId(inventoryBatchResponse.getBatchId())
|
|
|
- .setCostPrice(inboundItem.getCostPrice())
|
|
|
- .setCostAmt(inboundItem.getCostAmt());
|
|
|
+ .setCostPrice(inboundItem.getCostPrice().abs())
|
|
|
+ .setCostAmt(inboundItem.getCostAmt().abs());
|
|
|
inventoryBatchMapper.updateInventoryBatchCost(inventoryBatchQuery);
|
|
|
//修改总单
|
|
|
this.updateInventory(new InventoryBatchQuery().setInvId(inventoryBatchResponse.getInvId()));
|
|
|
@@ -259,8 +259,8 @@ public class InboundItemService extends BaseService<InboundItem> {
|
|
|
else{
|
|
|
InventoryBatchQuery inventoryBatchQuery = new InventoryBatchQuery()
|
|
|
.setBatchId(inventoryBatchResponse.getBatchId())
|
|
|
- .setCostPrice(inboundItem.getCostPrice())
|
|
|
- .setCostAmt(inboundItem.getCostAmt());
|
|
|
+ .setCostPrice(inboundItem.getCostPrice().abs())
|
|
|
+ .setCostAmt(inboundItem.getCostAmt().abs());
|
|
|
inventoryBatchMapper.updateInventoryBatchCost(inventoryBatchQuery);
|
|
|
//修改总单
|
|
|
this.updateInventory(new InventoryBatchQuery().setInvId(inventoryBatchResponse.getInvId()));
|