金额负数修改

jg-waiwang-pro
vayne 3 months ago
parent dbfacb048b
commit bd5c79e34a

@ -742,9 +742,11 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
//发货关系表,最后一次相减得出含税小计
int size = 0;
BigDecimal SaleAmountCount = BigDecimal.ZERO;
BigDecimal SaleTaxCount = BigDecimal.ZERO;
// List<WarehousingStorageProductEntity> tableField119 = JsonUtil.getJsonToList(receiptOrderForm.getDeliveryProductRelationList(),WarehousingStorageProductEntity.class);
for(DeliveryProductRelationModel entitys : deliveryOrderForm.getDeliveryProductRelationList()){
countNum = countNum.add(entitys.getDeliveryNum());
SaleTaxCount = SaleTaxCount.add(entitys.getTaxCount());
WarehousingOutboundProductEntity warehousingOutboundProductEntity = new WarehousingOutboundProductEntity();
warehousingOutboundProductEntity.setId(RandomUtil.uuId());
warehousingOutboundProductEntity.setWarehousingOutboundId(entity.getId());
@ -789,7 +791,7 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
deliveryRelationEntity.setDeliveryNum(entitys.getDeliveryNum()); //数量
deliveryRelationEntity.setSalePrice(entitys.getReturnUnit());//采购单价
if (size == deliveryOrderForm.getDeliveryProductRelationList().size()-1){
deliveryRelationEntity.setSaleCount(countNum.subtract(SaleAmountCount));
deliveryRelationEntity.setSaleCount(SaleTaxCount.subtract(SaleAmountCount));
}else {
deliveryRelationEntity.setSaleCount(entitys.getReturnUnit().multiply(entitys.getDeliveryNum()).setScale(2, RoundingMode.HALF_UP)); //金额
SaleAmountCount = SaleAmountCount.add(deliveryRelationEntity.getSaleCount());

Loading…
Cancel
Save