|
@@ -386,6 +386,24 @@ public class Item extends Controller {
|
|
|
// row.put("invbal_qty",0);
|
|
|
// }
|
|
|
// }
|
|
|
+ ERPDocking erpDocking = new ERPDocking();
|
|
|
+ JSONArray jsonArray = new JSONArray();
|
|
|
+ if (Parameter.get("system.ccerp_dockswitch").equalsIgnoreCase("true") && siteid.equalsIgnoreCase("ccyosg")) {
|
|
|
+ if (!rows.toJsonArray("itemno").isEmpty()) {
|
|
|
+ jsonArray = erpDocking.getErpIcinvbalRows(200000, 1, rows.toJsonArray("itemno"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!jsonArray.isEmpty()) {
|
|
|
+ for (Object object : jsonArray) {
|
|
|
+ JSONObject jsonObject = (JSONObject) object;
|
|
|
+ if (!rows.isEmpty()) {
|
|
|
+ if (rows.get(0).getString("itemno").equals(jsonObject.getString("fitemno"))) {
|
|
|
+ rows.get(0).put("invbal_qty", jsonObject.getBigDecimalValue("fqty"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
return getSucReturnObject().setData(rows.isNotEmpty() ? rows.get(0) : new Row()).toString();
|
|
|
}
|
|
|
|