|
|
@@ -630,11 +630,10 @@ public class InventoryService extends BaseService<Inventory> {
|
|
|
if (inOutRecordVO.getSOutItemId() != null) {
|
|
|
List<OutboundItemCostResponse> outboundItemCostResponses = outboundItemCostMapper.selectByCond(new OutboundItemCostQuery().setOutItemId(inOutRecordVO.getSOutItemId()));
|
|
|
if (outboundItemCostResponses.size() > 0) {
|
|
|
- //出库单价
|
|
|
+ //出库单价 反写出库单成本单价、成本金额
|
|
|
inOutRecordVO.setPriceInto(outboundItemCostResponses.get(0).getCostPrice());
|
|
|
//金额
|
|
|
inOutRecordVO.setIntoAmt(outboundItemCostResponses.get(0).getCostPrice().multiply(inOutRecordVO.getIntoQty()).abs());
|
|
|
- //反写出库单成本单价、成本金额
|
|
|
|
|
|
} else {
|
|
|
//当前销售退货单无法获取源出库单数据
|
|
|
@@ -983,8 +982,9 @@ public class InventoryService extends BaseService<Inventory> {
|
|
|
outboundItemCost.setCostAmt(inOutRecordVO.getIntoAmt());
|
|
|
}
|
|
|
}
|
|
|
- Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.OUTBOUNDCOST.getName(), false);
|
|
|
- outboundItemCost.setBatchId(codeMap.get("outId").toString());
|
|
|
+ /*Map<String, Object> codeMap = commonService.getUniqueNoteCode(Constant.docNameConstant.OUTBOUNDCOST.getName(), false);
|
|
|
+ outboundItemCost.setBatchId(codeMap.get("outId").toString());*/
|
|
|
+ outboundItemCost.setBatchId(inOutRecordVO.getBatchId());
|
|
|
//新建
|
|
|
outboundItemCostMapper.insert(outboundItemCost);
|
|
|
}
|
|
|
@@ -1032,7 +1032,7 @@ public class InventoryService extends BaseService<Inventory> {
|
|
|
//主键赋值
|
|
|
inventoryBatchVO.setBatchId(inventoryBatchResponse.getBatchId());
|
|
|
//库存数量
|
|
|
- inventoryBatchVO.setInvQty(inOutRecordVO.getIntoQty());
|
|
|
+ inventoryBatchVO.setInvQty(qty.abs());
|
|
|
//存货资产
|
|
|
inventoryBatchVO.setCostAmt(inventoryBatchVO.getInvQty().multiply(inventoryBatchResponse.getCostPrice()));
|
|
|
//清零标识
|