function inventory_edit(req) {

  app.preloader.show();

  $.ajax({

    type: "POST",

    url: base_url + 'inventory_edit',

    data: req,

    success: (res) => {

      if (res.success) {

        localStorage.removeItem('t05_inventory');  

        app.preloader.hide();

        localStorage.setItem('t05_inventory', JSON.stringify({

          data: res.results

        }))

        showToast('Update Inventory Successfully');

        //app.views.main.router.navigate('/inventory/');

      } else {

        app.preloader.hide();

        app.dialog.alert(res.message, 'Edit inventory Error');

      }

    }

  })

}