From e897037a5dba5e68e4938448317f50f9244dc290 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Mon, 24 Jul 2023 18:46:36 +0200 Subject: [PATCH] Update mo_movements.php (#25456) --- htdocs/mrp/mo_movements.php | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php index ea378e30fdb..de925fd743f 100644 --- a/htdocs/mrp/mo_movements.php +++ b/htdocs/mrp/mo_movements.php @@ -17,9 +17,9 @@ */ /** - * \file mo_movements.php - * \ingroup mrp - * \brief Page to show tock movements of a MO + * \file mo_movements.php + * \ingroup mrp + * \brief Page to show stock movements of a MO */ // Load Dolibarr environment @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php'; + dol_include_once('/mrp/class/mo.class.php'); dol_include_once('/mrp/lib/mrp_mo.lib.php'); @@ -39,20 +40,21 @@ dol_include_once('/mrp/lib/mrp_mo.lib.php'); $langs->loadLangs(array("mrp", "stocks", "other")); // Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'mostockmovement'; // To manage different context of search -$backtopage = GETPOST('backtopage', 'alpha'); -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') -$massaction = GETPOST('massaction', 'aZ09'); -$lineid = GETPOST('lineid', 'int'); +$backtopage = GETPOST('backtopage', 'alpha'); +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') +$massaction = GETPOST('massaction', 'aZ09'); +$lineid = GETPOST('lineid', 'int'); -$msid = GETPOST('msid', 'int'); -$year = GETPOST("year", 'int'); +$msid = GETPOST('msid', 'int'); +$year = GETPOST("year", 'int'); $month = GETPOST("month", 'int'); + $search_ref = GETPOST('search_ref', 'alpha'); $search_movement = GETPOST("search_movement", 'alpha'); $search_product_ref = trim(GETPOST("search_product_ref", 'alpha')); @@ -65,7 +67,7 @@ $search_qty = trim(GETPOST("search_qty", 'alpha')); $search_type_mouvement = GETPOST('search_type_mouvement', 'int'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); if (empty($page) || $page == -1) { @@ -144,6 +146,7 @@ if (!empty($conf->global->PRODUCT_DISABLE_EATBY)) { $objectlist->fields = dol_sort_array($objectlist->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +// Permissions $permissionnote = $user->rights->mrp->write; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->mrp->write; // Used by the include of actions_dellink.inc.php $permissiontoadd = $user->rights->mrp->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php