|
@@ -518,6 +518,14 @@ public class dispatch extends Controller {
|
|
+ sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
+ sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
Rows rowsdetail = dbConnect.runSqlQuery("select cast(sa_dispatch_itemsid AS CHAR) as sa_dispatch_itemsid from sa_dispatch_items where sa_dispatchid ='"
|
|
Rows rowsdetail = dbConnect.runSqlQuery("select cast(sa_dispatch_itemsid AS CHAR) as sa_dispatch_itemsid from sa_dispatch_items where sa_dispatchid ='"
|
|
+ sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
+ sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
|
+ Rows rowsdetail_qty = dbConnect.runSqlQuery("select qty,ifnull(outwarehouseqty,0) outwarehouseqty,rowno from sa_dispatch_items where sa_dispatchid ='"
|
|
|
|
+ + sa_dispatchid + "' and siteid='" + siteid + "'");
|
|
|
|
+ for(Row row :rowsdetail_qty){
|
|
|
|
+ if(row.getBigDecimal("outwarehouseqty").compareTo(row.getBigDecimal("qty"))>0){
|
|
|
|
+ return getErrReturnObject().setErrMsg("行号为:【" + row.getString("rowno") + "】的记录已出库数量大于发货数量,无法手工关闭")
|
|
|
|
+ .toString();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (rows.isEmpty()) {
|
|
if (rows.isEmpty()) {
|
|
return getErrReturnObject().setErrMsg("该发货单不存在")
|
|
return getErrReturnObject().setErrMsg("该发货单不存在")
|
|
.toString();
|
|
.toString();
|