|
@@ -687,9 +687,12 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
|
|
}
|
|
}
|
|
//总金额,不含税
|
|
//总金额,不含税
|
|
if (StringUtil.isExist(rowObj.get("allPrice"))) {
|
|
if (StringUtil.isExist(rowObj.get("allPrice"))) {
|
|
- //基本单位数量*单价
|
|
|
|
- depotItem.setAllPrice(depotItem.getBasicNumber().multiply(depotItem.getUnitPrice()));
|
|
|
|
- //depotItem.setAllPrice(rowObj.getBigDecimal("allPrice"));
|
|
|
|
|
|
+ if (depotItem.getActualQuantityInStorage() == null || depotItem.getActualQuantityInStorage().equals(BigDecimal.ZERO)){
|
|
|
|
+ depotItem.setAllPrice(rowObj.getBigDecimal("allPrice"));
|
|
|
|
+ }else {
|
|
|
|
+ //基本单位数量*单价
|
|
|
|
+ depotItem.setAllPrice(depotItem.getBasicNumber().multiply(depotItem.getUnitPrice()));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (StringUtil.isExist(rowObj.get("depotId"))) {
|
|
if (StringUtil.isExist(rowObj.get("depotId"))) {
|
|
depotItem.setDepotId(rowObj.getLong("depotId"));
|
|
depotItem.setDepotId(rowObj.getLong("depotId"));
|
|
@@ -720,9 +723,12 @@ public class DepotItemServiceImpl extends ServiceImpl<DepotItemMapper, DepotItem
|
|
}
|
|
}
|
|
//税额
|
|
//税额
|
|
if (StringUtil.isExist(rowObj.get("taxMoney"))) {
|
|
if (StringUtil.isExist(rowObj.get("taxMoney"))) {
|
|
- //单价总金额*税率
|
|
|
|
- depotItem.setTaxMoney(depotItem.getAllPrice().multiply(depotItem.getTaxRate()));
|
|
|
|
- //depotItem.setTaxMoney(rowObj.getBigDecimal("taxMoney"));
|
|
|
|
|
|
+ if (depotItem.getActualQuantityInStorage() == null || depotItem.getActualQuantityInStorage().equals(BigDecimal.ZERO)){
|
|
|
|
+ depotItem.setTaxMoney(rowObj.getBigDecimal("taxMoney"));
|
|
|
|
+ }else {
|
|
|
|
+ //单价总金额*税率
|
|
|
|
+ depotItem.setTaxMoney(depotItem.getAllPrice().multiply(depotItem.getTaxRate()));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//价税合计
|
|
//价税合计
|
|
if (StringUtil.isExist(rowObj.get("taxLastMoney"))) {
|
|
if (StringUtil.isExist(rowObj.get("taxLastMoney"))) {
|