|
|
@@ -113,6 +113,14 @@ public class dbstockbill extends Controller {
|
|
|
querySQL.setWhere("t1.siteid", siteid);
|
|
|
querySQL.setWhere("t1.st_dbstockbillid",st_dbstockbillid);
|
|
|
Rows rows = querySQL.query();
|
|
|
+ for(Row row:rows){
|
|
|
+ Rows rowsdetail =dbConnect.runSqlQuery("select sum(qty) sumqty from st_dbstockbilldetail where siteid='"+siteid+"' and st_dbstockbillid="+st_dbstockbillid);
|
|
|
+ if(rowsdetail.isNotEmpty()){
|
|
|
+ row.put("totalqty",rowsdetail.get(0).getBigDecimal("sumqty"));
|
|
|
+ }else {
|
|
|
+ row.put("totalqty",0);
|
|
|
+ }
|
|
|
+ }
|
|
|
Row row = rows.isNotEmpty() ? rows.get(0) : new Row();
|
|
|
return getSucReturnObject().setData(row).toString();
|
|
|
}
|