Skip to content

Instantly share code, notes, and snippets.

@kalvian1060
Created May 22, 2017 02:57
Show Gist options
  • Save kalvian1060/2e801e383e93f00d400f467848881522 to your computer and use it in GitHub Desktop.
Save kalvian1060/2e801e383e93f00d400f467848881522 to your computer and use it in GitHub Desktop.
for (int i = 0; i < data.length(); i++) {
JSONObject getData = data.getJSONObject(i);
int location_id = getData.getInt("location_id");
int product_id = getData.getInt("product_id");
int qty = getData.getInt("sum");
stock_quant dataStok = new stock_quant(qty, product_id, location_id);
dataStok.save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment