Merge pull request #21951 from dolibit-ut/patch-462
Update consumption.php
This commit is contained in:
commit
950742414e
@ -26,12 +26,18 @@
|
|||||||
* \brief Add a tab on thirdparty view to list all products/services bought or sells by thirdparty
|
* \brief Add a tab on thirdparty view to list all products/services bought or sells by thirdparty
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require "../main.inc.php";
|
require "../main.inc.php";
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||||
|
|
||||||
|
|
||||||
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array("companies", "bills", "orders", "suppliers", "propal", "interventions", "contracts", "products"));
|
||||||
|
|
||||||
|
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thirdpartylist';
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'thirdpartylist';
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
@ -46,11 +52,11 @@ if ($socid > 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Sort & Order fields
|
// Sort & Order fields
|
||||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
$optioncss = GETPOST('optioncss', 'alpha');
|
$optioncss = GETPOST('optioncss', 'alpha');
|
||||||
|
|
||||||
if (empty($page) || $page == -1) {
|
if (empty($page) || $page == -1) {
|
||||||
$page = 0;
|
$page = 0;
|
||||||
@ -78,12 +84,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||||||
$year = '';
|
$year = '';
|
||||||
$month = '';
|
$month = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Customer or supplier selected in drop box
|
// Customer or supplier selected in drop box
|
||||||
$thirdTypeSelect = GETPOST("third_select_id", 'az09');
|
$thirdTypeSelect = GETPOST("third_select_id", 'az09');
|
||||||
$type_element = GETPOST('type_element') ? GETPOST('type_element') : '';
|
$type_element = GETPOST('type_element') ? GETPOST('type_element') : '';
|
||||||
|
|
||||||
// Load translation files required by the page
|
|
||||||
$langs->loadLangs(array("companies", "bills", "orders", "suppliers", "propal", "interventions", "contracts", "products"));
|
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$hookmanager->initHooks(array('consumptionthirdparty', 'globalcard'));
|
$hookmanager->initHooks(array('consumptionthirdparty', 'globalcard'));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user