收款单价税合计优化提示
This commit is contained in:
		
							parent
							
								
									8f069cf389
								
							
						
					
					
						commit
						1492a58adb
					
				|  | @ -71,23 +71,25 @@ public class GatheringbillEditSaveBatchBSAction extends BillUpdateBatchBSAction | ||||||
| 			UFDouble changeMoney = money.sub(oriMoney); | 			UFDouble changeMoney = money.sub(oriMoney); | ||||||
| 			// 몽앴饋簡땐데id혼꿴璂饋簡땐데 | 			// 몽앴饋簡땐데id혼꿴璂饋簡땐데 | ||||||
| 			BaseDAO dao = new BaseDAO(); | 			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()); | 			Map saleMap = (Map) dao.executeQuery(sql, new MapProcessor()); | ||||||
| 			// 饋簡땐데송江북셕 | 			// 饋簡땐데송江북셕 | ||||||
| 			UFDouble ntotalorigmny = UFDouble.ZERO_DBL; | 			UFDouble ntotalorigmny = UFDouble.ZERO_DBL; | ||||||
| 			// 饋簡땐데茄셥澗운쏜띨 | 			// 饋簡땐데茄셥澗운쏜띨 | ||||||
| 			UFDouble nreceivedmny = UFDouble.ZERO_DBL; | 			UFDouble nreceivedmny = UFDouble.ZERO_DBL; | ||||||
| 			if (saleMap != null) { | 			String vbillcode = ""; | ||||||
|  | 			if(saleMap != null) { | ||||||
| 				nreceivedmny = new UFDouble( | 				nreceivedmny = new UFDouble( | ||||||
| 						saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString()); | 						saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString()); | ||||||
| 				ntotalorigmny = new UFDouble( | 				ntotalorigmny = new UFDouble( | ||||||
| 						saleMap.get("ntotalorigmny") == null ? "0" : saleMap.get("ntotalorigmny").toString()); | 						saleMap.get("ntotalorigmny") == null ? "0" : saleMap.get("ntotalorigmny").toString()); | ||||||
|  | 				vbillcode = saleMap.get("vbillcode") == null ? "" : saleMap.get("vbillcode").toString(); | ||||||
| 			} | 			} | ||||||
| 
 |  | ||||||
| 			if (money.compareTo(ntotalorigmny) > 0) { | 			if (money.compareTo(ntotalorigmny) > 0) { | ||||||
| 				UFDouble moreMoney = money.sub(ntotalorigmny); | 				UFDouble moreMoney = money.sub(ntotalorigmny); | ||||||
| 				throw new BusinessException("【该笔收款已超销售订单" + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); | 				throw new BusinessException("【该笔收款税收合计" + money + "已超销售订单 [" + vbillcode + "] " + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -82,20 +82,22 @@ public class GatheringbillSaveBatchBSAction extends BillInsertBatchBSAction { | ||||||
| 
 | 
 | ||||||
|             //몽앴饋簡땐데id혼꿴璂饋簡땐데 |             //몽앴饋簡땐데id혼꿴璂饋簡땐데 | ||||||
|             BaseDAO dao = new BaseDAO(); |             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()); |             Map saleMap = (Map)dao.executeQuery(sql, new MapProcessor()); | ||||||
|             //饋簡땐데송江북셕 |             //饋簡땐데송江북셕 | ||||||
|             UFDouble ntotalorigmny = UFDouble.ZERO_DBL; |             UFDouble ntotalorigmny = UFDouble.ZERO_DBL; | ||||||
|             //饋簡땐데茄셥澗운쏜띨 |             //饋簡땐데茄셥澗운쏜띨 | ||||||
|             UFDouble nreceivedmny = UFDouble.ZERO_DBL; |             UFDouble nreceivedmny = UFDouble.ZERO_DBL; | ||||||
|  |             String vbillcode = ""; | ||||||
|             if(saleMap != null) { |             if(saleMap != null) { | ||||||
|                 nreceivedmny = new UFDouble(saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString()); |                 nreceivedmny = new UFDouble(saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString()); | ||||||
|                 ntotalorigmny = new UFDouble(saleMap.get("ntotalorigmny") == null ? "0" : saleMap.get("ntotalorigmny").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) { |             if (money.compareTo(ntotalorigmny) > 0) { | ||||||
|                 UFDouble moreMoney = money.sub(ntotalorigmny); |                 UFDouble moreMoney = money.sub(ntotalorigmny); | ||||||
|                 throw new BusinessException("【该笔收款已超销售订单" + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); |                 throw new BusinessException("【该笔收款税收合计" + money + "已超销售订单 [" + vbillcode + "] " + moreMoney + "元,无法传输!请检查订单累计收款金额!】"); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue