diff --git a/arap/src/private/nc/bs/arap/actions/GatheringbillEditSaveBatchBSAction.java b/arap/src/private/nc/bs/arap/actions/GatheringbillEditSaveBatchBSAction.java index 0d816c3..0f5a5f6 100644 --- a/arap/src/private/nc/bs/arap/actions/GatheringbillEditSaveBatchBSAction.java +++ b/arap/src/private/nc/bs/arap/actions/GatheringbillEditSaveBatchBSAction.java @@ -71,23 +71,25 @@ public class GatheringbillEditSaveBatchBSAction extends BillUpdateBatchBSAction UFDouble changeMoney = money.sub(oriMoney); // 根据销售订单id去查询销售订单 BaseDAO dao = new BaseDAO(); - String sql = "select nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" + def3 + String sql = "select vbillcode,nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" + def3 + "'"; + Map saleMap = (Map) dao.executeQuery(sql, new MapProcessor()); // 销售订单价税合计 UFDouble ntotalorigmny = UFDouble.ZERO_DBL; // 销售订单实际收款金额 UFDouble nreceivedmny = UFDouble.ZERO_DBL; - if (saleMap != null) { + String vbillcode = ""; + if(saleMap != null) { nreceivedmny = new UFDouble( saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString()); ntotalorigmny = new UFDouble( saleMap.get("ntotalorigmny") == null ? "0" : saleMap.get("ntotalorigmny").toString()); + vbillcode = saleMap.get("vbillcode") == null ? "" : saleMap.get("vbillcode").toString(); } - if (money.compareTo(ntotalorigmny) > 0) { UFDouble moreMoney = money.sub(ntotalorigmny); - throw new BusinessException("【该笔收款已超销售订单" + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); + throw new BusinessException("【该笔收款税收合计" + money + "已超销售订单 [" + vbillcode + "] " + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); } } diff --git a/arap/src/private/nc/bs/arap/actions/GatheringbillSaveBatchBSAction.java b/arap/src/private/nc/bs/arap/actions/GatheringbillSaveBatchBSAction.java index 188c52d..7db1f56 100644 --- a/arap/src/private/nc/bs/arap/actions/GatheringbillSaveBatchBSAction.java +++ b/arap/src/private/nc/bs/arap/actions/GatheringbillSaveBatchBSAction.java @@ -82,20 +82,22 @@ public class GatheringbillSaveBatchBSAction extends BillInsertBatchBSAction { //根据销售订单id去查询销售订单 BaseDAO dao = new BaseDAO(); - String sql = "select nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" +def3+"'"; + String sql = "select vbillcode,nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" +def3+"'"; Map saleMap = (Map)dao.executeQuery(sql, new MapProcessor()); //销售订单价税合计 UFDouble ntotalorigmny = UFDouble.ZERO_DBL; //销售订单实际收款金额 UFDouble nreceivedmny = UFDouble.ZERO_DBL; + String vbillcode = ""; if(saleMap != null) { nreceivedmny = new UFDouble(saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString()); ntotalorigmny = new UFDouble(saleMap.get("ntotalorigmny") == null ? "0" : saleMap.get("ntotalorigmny").toString()); + vbillcode = saleMap.get("vbillcode") == null ? "" : saleMap.get("vbillcode").toString(); } if (money.compareTo(ntotalorigmny) > 0) { UFDouble moreMoney = money.sub(ntotalorigmny); - throw new BusinessException("【该笔收款已超销售订单" + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); + throw new BusinessException("【该笔收款税收合计" + money + "已超销售订单 [" + vbillcode + "] " + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); } } }