Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
commit
c5f9990529
@ -22,22 +22,25 @@
|
|||||||
* \brief Page setup for blockedlog module
|
* \brief Page setup for blockedlog module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("admin", "other", "blockedlog"));
|
$langs->loadLangs(array('admin', 'blockedlog', 'other'));
|
||||||
|
|
||||||
|
// Access Control
|
||||||
if (!$user->admin || empty($conf->blockedlog->enabled)) {
|
if (!$user->admin || empty($conf->blockedlog->enabled)) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
// Get Parameters
|
||||||
|
$action = GETPOST('action', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
$withtab = GETPOST('withtab', 'int');
|
||||||
$withtab = GETPOST('withtab', 'int');
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -18,11 +18,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/blockedlog/admin/blockedlog_list.php
|
* \file htdocs/blockedlog/admin/blockedlog_list.php
|
||||||
* \ingroup blockedlog
|
* \ingroup blockedlog
|
||||||
* \brief Page setup for blockedlog module
|
* \brief Page setup for blockedlog module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/blockedlog/lib/blockedlog.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
||||||
@ -31,16 +33,18 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("admin", "other", "blockedlog", "bills"));
|
$langs->loadLangs(array('admin', 'bills', 'blockedlog', 'other'));
|
||||||
|
|
||||||
|
// Access Control
|
||||||
if ((!$user->admin && empty($user->rights->blockedlog->read)) || empty($conf->blockedlog->enabled)) {
|
if ((!$user->admin && empty($user->rights->blockedlog->read)) || empty($conf->blockedlog->enabled)) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
// Get Parameters
|
||||||
|
$action = GETPOST('action', 'aZ09');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'blockedloglist'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'blockedloglist'; // To manage different context of search
|
||||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||||
|
|
||||||
$search_showonlyerrors = GETPOST('search_showonlyerrors', 'int');
|
$search_showonlyerrors = GETPOST('search_showonlyerrors', 'int');
|
||||||
if ($search_showonlyerrors < 0) {
|
if ($search_showonlyerrors < 0) {
|
||||||
@ -95,7 +99,7 @@ $block_static->loadTrackedEvents();
|
|||||||
|
|
||||||
$result = restrictedArea($user, 'blockedlog', 0, '');
|
$result = restrictedArea($user, 'blockedlog', 0, '');
|
||||||
|
|
||||||
|
// Execution Time
|
||||||
$max_execution_time_for_importexport = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME); // 5mn if not defined
|
$max_execution_time_for_importexport = (empty($conf->global->EXPORT_MAX_EXECUTION_TIME) ? 300 : $conf->global->EXPORT_MAX_EXECUTION_TIME); // 5mn if not defined
|
||||||
$max_time = @ini_get("max_execution_time");
|
$max_time = @ini_get("max_execution_time");
|
||||||
if ($max_time && $max_time < $max_execution_time_for_importexport) {
|
if ($max_time && $max_time < $max_execution_time_for_importexport) {
|
||||||
|
|||||||
@ -140,6 +140,7 @@ class BlockedLog
|
|||||||
|
|
||||||
$this->trackedevents = array();
|
$this->trackedevents = array();
|
||||||
|
|
||||||
|
// Customer Invoice/Facture / Payment
|
||||||
if (isModEnabled('facture')) {
|
if (isModEnabled('facture')) {
|
||||||
$this->trackedevents['BILL_VALIDATE'] = 'logBILL_VALIDATE';
|
$this->trackedevents['BILL_VALIDATE'] = 'logBILL_VALIDATE';
|
||||||
$this->trackedevents['BILL_DELETE'] = 'logBILL_DELETE';
|
$this->trackedevents['BILL_DELETE'] = 'logBILL_DELETE';
|
||||||
@ -151,18 +152,19 @@ class BlockedLog
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Supplier
|
/* Supplier
|
||||||
|
// Supplier Invoice / Payment
|
||||||
if (isModEnabled("fournisseur")) {
|
if (isModEnabled("fournisseur")) {
|
||||||
$this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate';
|
$this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate';
|
||||||
$this->trackedevents['BILL_SUPPLIER_DELETE']='BlockedLogSupplierBillDelete';
|
$this->trackedevents['BILL_SUPPLIER_DELETE']='BlockedLogSupplierBillDelete';
|
||||||
$this->trackedevents['BILL_SUPPLIER_SENTBYMAIL']='BlockedLogSupplierBillSentByEmail'; // Trigger key does not exists, we want just into array to list it as done
|
$this->trackedevents['BILL_SUPPLIER_SENTBYMAIL']='BlockedLogSupplierBillSentByEmail'; // Trigger key does not exists, we want just into array to list it as done
|
||||||
$this->trackedevents['SUPPLIER_DOC_DOWNLOAD']='BlockedLogSupplierBillDownload'; // Trigger key does not exists, we want just into array to list it as done
|
$this->trackedevents['SUPPLIER_DOC_DOWNLOAD']='BlockedLogSupplierBillDownload'; // Trigger key does not exists, we want just into array to list it as done
|
||||||
$this->trackedevents['SUPPLIER_DOC_PREVIEW']='BlockedLogSupplierBillPreview'; // Trigger key does not exists, we want just into array to list it as done
|
$this->trackedevents['SUPPLIER_DOC_PREVIEW']='BlockedLogSupplierBillPreview'; // Trigger key does not exists, we want just into array to list it as done
|
||||||
|
$this->trackedevents['PAYMENT_SUPPLIER_CREATE']='BlockedLogSupplierBillPaymentCreate';
|
||||||
$this->trackedevents['PAYMENT_SUPPLIER_CREATE']='BlockedLogSupplierBillPaymentCreate';
|
$this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate';
|
||||||
$this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate';
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Donation
|
||||||
if (!empty($conf->don->enabled)) {
|
if (!empty($conf->don->enabled)) {
|
||||||
$this->trackedevents['DON_VALIDATE'] = 'logDON_VALIDATE';
|
$this->trackedevents['DON_VALIDATE'] = 'logDON_VALIDATE';
|
||||||
$this->trackedevents['DON_DELETE'] = 'logDON_DELETE';
|
$this->trackedevents['DON_DELETE'] = 'logDON_DELETE';
|
||||||
@ -172,23 +174,29 @@ class BlockedLog
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
// Salary
|
||||||
if (!empty($conf->salary->enabled)) {
|
if (!empty($conf->salary->enabled)) {
|
||||||
$this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate';
|
$this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate';
|
||||||
$this->trackedevents['PAYMENT_SALARY_MODIFY']='BlockedLogSalaryPaymentCreate';
|
$this->trackedevents['PAYMENT_SALARY_MODIFY']='BlockedLogSalaryPaymentCreate';
|
||||||
$this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate';
|
$this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate';
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Members
|
||||||
if (!empty($conf->adherent->enabled)) {
|
if (!empty($conf->adherent->enabled)) {
|
||||||
$this->trackedevents['MEMBER_SUBSCRIPTION_CREATE'] = 'logMEMBER_SUBSCRIPTION_CREATE';
|
$this->trackedevents['MEMBER_SUBSCRIPTION_CREATE'] = 'logMEMBER_SUBSCRIPTION_CREATE';
|
||||||
$this->trackedevents['MEMBER_SUBSCRIPTION_MODIFY'] = 'logMEMBER_SUBSCRIPTION_MODIFY';
|
$this->trackedevents['MEMBER_SUBSCRIPTION_MODIFY'] = 'logMEMBER_SUBSCRIPTION_MODIFY';
|
||||||
$this->trackedevents['MEMBER_SUBSCRIPTION_DELETE'] = 'logMEMBER_SUBSCRIPTION_DELETE';
|
$this->trackedevents['MEMBER_SUBSCRIPTION_DELETE'] = 'logMEMBER_SUBSCRIPTION_DELETE';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bank
|
||||||
if (isModEnabled("banque")) {
|
if (isModEnabled("banque")) {
|
||||||
$this->trackedevents['PAYMENT_VARIOUS_CREATE'] = 'logPAYMENT_VARIOUS_CREATE';
|
$this->trackedevents['PAYMENT_VARIOUS_CREATE'] = 'logPAYMENT_VARIOUS_CREATE';
|
||||||
$this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = 'logPAYMENT_VARIOUS_MODIFY';
|
$this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = 'logPAYMENT_VARIOUS_MODIFY';
|
||||||
$this->trackedevents['PAYMENT_VARIOUS_DELETE'] = 'logPAYMENT_VARIOUS_DELETE';
|
$this->trackedevents['PAYMENT_VARIOUS_DELETE'] = 'logPAYMENT_VARIOUS_DELETE';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cashdesk
|
||||||
// $conf->global->BANK_ENABLE_POS_CASHCONTROL must be set to 1 by all external POS modules
|
// $conf->global->BANK_ENABLE_POS_CASHCONTROL must be set to 1 by all external POS modules
|
||||||
$moduleposenabled = (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->BANK_ENABLE_POS_CASHCONTROL));
|
$moduleposenabled = (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->BANK_ENABLE_POS_CASHCONTROL));
|
||||||
if ($moduleposenabled) {
|
if ($moduleposenabled) {
|
||||||
|
|||||||
@ -16,9 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/blockedlog/lib/blockedlog.lib.php
|
* \file htdocs/blockedlog/lib/blockedlog.lib.php
|
||||||
* \ingroup system
|
* \ingroup system
|
||||||
* \brief Library for common blockedlog functions
|
* \brief Library for common blockedlog functions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -33,6 +33,8 @@
|
|||||||
* \brief Page to list orders
|
* \brief Page to list orders
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.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.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
@ -51,6 +53,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('orders', 'sendings', 'deliveries', 'companies', 'compta', 'bills', 'stocks', 'products'));
|
$langs->loadLangs(array('orders', 'sendings', 'deliveries', 'companies', 'compta', 'bills', 'stocks', 'products'));
|
||||||
|
|
||||||
|
// Get Parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$massaction = GETPOST('massaction', 'alpha');
|
$massaction = GETPOST('massaction', 'alpha');
|
||||||
$show_files = GETPOST('show_files', 'int');
|
$show_files = GETPOST('show_files', 'int');
|
||||||
@ -58,6 +61,7 @@ $confirm = GETPOST('confirm', 'alpha');
|
|||||||
$toselect = GETPOST('toselect', 'array');
|
$toselect = GETPOST('toselect', 'array');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'orderlist';
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'orderlist';
|
||||||
|
|
||||||
|
// Search Parameters
|
||||||
$search_datecloture_start = GETPOST('search_datecloture_start', 'int');
|
$search_datecloture_start = GETPOST('search_datecloture_start', 'int');
|
||||||
if (empty($search_datecloture_start)) {
|
if (empty($search_datecloture_start)) {
|
||||||
$search_datecloture_start = dol_mktime(0, 0, 0, GETPOST('search_datecloture_startmonth', 'int'), GETPOST('search_datecloture_startday', 'int'), GETPOST('search_datecloture_startyear', 'int'));
|
$search_datecloture_start = dol_mktime(0, 0, 0, GETPOST('search_datecloture_startmonth', 'int'), GETPOST('search_datecloture_startday', 'int'), GETPOST('search_datecloture_startyear', 'int'));
|
||||||
@ -86,7 +90,7 @@ $socid = GETPOST('socid', 'int');
|
|||||||
$search_user = GETPOST('search_user', 'int');
|
$search_user = GETPOST('search_user', 'int');
|
||||||
$search_sale = GETPOST('search_sale', 'int');
|
$search_sale = GETPOST('search_sale', 'int');
|
||||||
|
|
||||||
$search_total_ht = GETPOST('search_total_ht', 'alpha');
|
$search_total_ht = GETPOST('search_total_ht', 'alpha');
|
||||||
$search_total_vat = GETPOST('search_total_vat', 'alpha');
|
$search_total_vat = GETPOST('search_total_vat', 'alpha');
|
||||||
$search_total_ttc = GETPOST('search_total_ttc', 'alpha');
|
$search_total_ttc = GETPOST('search_total_ttc', 'alpha');
|
||||||
$search_warehouse = GETPOST('search_warehouse', 'int');
|
$search_warehouse = GETPOST('search_warehouse', 'int');
|
||||||
@ -209,6 +213,7 @@ $arrayfields = array(
|
|||||||
'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999),
|
'c.import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>999),
|
||||||
'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000)
|
'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||||
|
|
||||||
@ -724,6 +729,7 @@ if ($action == 'shipped' && $permissiontoadd) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Closed records
|
// Closed records
|
||||||
if (!$error && $massaction === 'setbilled' && $permissiontoclose) {
|
if (!$error && $massaction === 'setbilled' && $permissiontoclose) {
|
||||||
$db->begin();
|
$db->begin();
|
||||||
@ -760,10 +766,12 @@ if (!$error && $massaction === 'setbilled' && $permissiontoclose) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -799,12 +807,14 @@ $sql .= ' c.fk_input_reason, c.import_key';
|
|||||||
if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
if (($search_categ_cus > 0) || ($search_categ_cus == -2)) {
|
||||||
$sql .= ", cc.fk_categorie, cc.fk_soc";
|
$sql .= ", cc.fk_categorie, cc.fk_soc";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add fields from extrafields
|
// Add fields from extrafields
|
||||||
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
|
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
@ -1327,7 +1337,7 @@ if ($resql) {
|
|||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
// If the user can view prospects other than his'
|
// If the user can view prospects? sales other than his own
|
||||||
if ($user->rights->user->user->lire) {
|
if ($user->rights->user->user->lire) {
|
||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
@ -1342,7 +1352,7 @@ if ($resql) {
|
|||||||
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250 widthcentpercentminusx');
|
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250 widthcentpercentminusx');
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
}
|
}
|
||||||
// If the user can view prospects other than his'
|
// If the user can view other products/services than his own
|
||||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
@ -1351,6 +1361,7 @@ if ($resql) {
|
|||||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300 widthcentpercentminusx', 1);
|
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$form->selectarray('search_product_category', $cate_arbo, $search_product_category, $tmptitle, 0, 0, '', 0, 0, 0, 0, 'maxwidth300 widthcentpercentminusx', 1);
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
}
|
}
|
||||||
|
// If Categories are enabled & user has rights to see
|
||||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
$moreforfilter .= '<div class="divsearchfield">';
|
$moreforfilter .= '<div class="divsearchfield">';
|
||||||
@ -1358,6 +1369,7 @@ if ($resql) {
|
|||||||
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle, 'maxwidth300 widthcentpercentminusx');
|
$moreforfilter .= img_picto($tmptitle, 'category', 'class="pictofixedwidth"').$formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1, $tmptitle, 'maxwidth300 widthcentpercentminusx');
|
||||||
$moreforfilter .= '</div>';
|
$moreforfilter .= '</div>';
|
||||||
}
|
}
|
||||||
|
// If Stock is enabled
|
||||||
if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
|
if (!empty($conf->stock->enabled) && !empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) {
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||||
$formproduct = new FormProduct($db);
|
$formproduct = new FormProduct($db);
|
||||||
@ -1509,60 +1521,61 @@ if ($resql) {
|
|||||||
$form->selectInputReason($search_fk_input_reason, 'search_fk_input_reason', '', 1, '', 1);
|
$form->selectInputReason($search_fk_input_reason, 'search_fk_input_reason', '', 1, '', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Amount HT / net
|
||||||
if (!empty($arrayfields['c.total_ht']['checked'])) {
|
if (!empty($arrayfields['c.total_ht']['checked'])) {
|
||||||
// Amount
|
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="4" name="search_total_ht" value="'.dol_escape_htmltag($search_total_ht).'">';
|
print '<input class="flat" type="text" size="4" name="search_total_ht" value="'.dol_escape_htmltag($search_total_ht).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Amount of VAT
|
||||||
if (!empty($arrayfields['c.total_vat']['checked'])) {
|
if (!empty($arrayfields['c.total_vat']['checked'])) {
|
||||||
// Amount
|
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="4" name="search_total_vat" value="'.dol_escape_htmltag($search_total_vat).'">';
|
print '<input class="flat" type="text" size="4" name="search_total_vat" value="'.dol_escape_htmltag($search_total_vat).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Total Amount (TTC / gross)
|
||||||
if (!empty($arrayfields['c.total_ttc']['checked'])) {
|
if (!empty($arrayfields['c.total_ttc']['checked'])) {
|
||||||
// Amount
|
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="5" name="search_total_ttc" value="'.$search_total_ttc.'">';
|
print '<input class="flat" type="text" size="5" name="search_total_ttc" value="'.$search_total_ttc.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Currency
|
||||||
if (!empty($arrayfields['c.multicurrency_code']['checked'])) {
|
if (!empty($arrayfields['c.multicurrency_code']['checked'])) {
|
||||||
// Currency
|
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print $form->selectMultiCurrency($search_multicurrency_code, 'search_multicurrency_code', 1);
|
print $form->selectMultiCurrency($search_multicurrency_code, 'search_multicurrency_code', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Currency rate
|
||||||
if (!empty($arrayfields['c.multicurrency_tx']['checked'])) {
|
if (!empty($arrayfields['c.multicurrency_tx']['checked'])) {
|
||||||
// Currency rate
|
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input class="flat" type="text" size="4" name="search_multicurrency_tx" value="'.dol_escape_htmltag($search_multicurrency_tx).'">';
|
print '<input class="flat" type="text" size="4" name="search_multicurrency_tx" value="'.dol_escape_htmltag($search_multicurrency_tx).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Amount HT/net in foreign currency
|
||||||
if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) {
|
if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) {
|
||||||
// Amount
|
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ht" value="'.dol_escape_htmltag($search_multicurrency_montant_ht).'">';
|
print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ht" value="'.dol_escape_htmltag($search_multicurrency_montant_ht).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// VAT in foreign currency
|
||||||
if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) {
|
if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) {
|
||||||
// Amount VAT
|
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_vat" value="'.dol_escape_htmltag($search_multicurrency_montant_vat).'">';
|
print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_vat" value="'.dol_escape_htmltag($search_multicurrency_montant_vat).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Amount/Total (TTC / gross) in foreign currency
|
||||||
if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) {
|
if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) {
|
||||||
// Amount
|
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ttc" value="'.dol_escape_htmltag($search_multicurrency_montant_ttc).'">';
|
print '<input class="flat" type="text" size="4" name="search_multicurrency_montant_ttc" value="'.dol_escape_htmltag($search_multicurrency_montant_ttc).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Author
|
||||||
if (!empty($arrayfields['u.login']['checked'])) {
|
if (!empty($arrayfields['u.login']['checked'])) {
|
||||||
// Author
|
|
||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
print '<input class="flat" size="4" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'">';
|
print '<input class="flat" size="4" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
// Sales Representative
|
||||||
if (!empty($arrayfields['sale_representative']['checked'])) {
|
if (!empty($arrayfields['sale_representative']['checked'])) {
|
||||||
print '<td class="liste_titre"></td>';
|
print '<td class="liste_titre"></td>';
|
||||||
}
|
}
|
||||||
@ -1582,12 +1595,15 @@ if ($resql) {
|
|||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
||||||
|
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters = array('arrayfields'=>$arrayfields);
|
$parameters = array('arrayfields'=>$arrayfields);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
// Date creation
|
// Date creation
|
||||||
if (!empty($arrayfields['c.datec']['checked'])) {
|
if (!empty($arrayfields['c.datec']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
@ -1775,8 +1791,10 @@ if ($resql) {
|
|||||||
),
|
),
|
||||||
'pos' => array(),
|
'pos' => array(),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
|
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters = array(
|
$parameters = array(
|
||||||
'arrayfields' => $arrayfields,
|
'arrayfields' => $arrayfields,
|
||||||
@ -1976,6 +1994,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Alias name
|
// Alias name
|
||||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||||
print '<td class="nocellnopadd">';
|
print '<td class="nocellnopadd">';
|
||||||
@ -1985,6 +2004,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Town
|
// Town
|
||||||
if (!empty($arrayfields['s.town']['checked'])) {
|
if (!empty($arrayfields['s.town']['checked'])) {
|
||||||
print '<td class="nocellnopadd">';
|
print '<td class="nocellnopadd">';
|
||||||
@ -1994,6 +2014,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Zip
|
// Zip
|
||||||
if (!empty($arrayfields['s.zip']['checked'])) {
|
if (!empty($arrayfields['s.zip']['checked'])) {
|
||||||
print '<td class="nocellnopadd">';
|
print '<td class="nocellnopadd">';
|
||||||
@ -2003,6 +2024,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// State
|
// State
|
||||||
if (!empty($arrayfields['state.nom']['checked'])) {
|
if (!empty($arrayfields['state.nom']['checked'])) {
|
||||||
print "<td>".$obj->state_name."</td>\n";
|
print "<td>".$obj->state_name."</td>\n";
|
||||||
@ -2010,6 +2032,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Country
|
// Country
|
||||||
if (!empty($arrayfields['country.code_iso']['checked'])) {
|
if (!empty($arrayfields['country.code_iso']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
@ -2020,6 +2043,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type ent
|
// Type ent
|
||||||
if (!empty($arrayfields['typent.code']['checked'])) {
|
if (!empty($arrayfields['typent.code']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
@ -2046,6 +2070,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Plannned date of delivery
|
// Plannned date of delivery
|
||||||
if (!empty($arrayfields['c.date_delivery']['checked'])) {
|
if (!empty($arrayfields['c.date_delivery']['checked'])) {
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
@ -2055,6 +2080,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shipping Method
|
// Shipping Method
|
||||||
if (!empty($arrayfields['c.fk_shipping_method']['checked'])) {
|
if (!empty($arrayfields['c.fk_shipping_method']['checked'])) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -2064,6 +2090,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Payment terms
|
// Payment terms
|
||||||
if (!empty($arrayfields['c.fk_cond_reglement']['checked'])) {
|
if (!empty($arrayfields['c.fk_cond_reglement']['checked'])) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -2073,6 +2100,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Payment mode
|
// Payment mode
|
||||||
if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) {
|
if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -2082,6 +2110,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Channel
|
// Channel
|
||||||
if (!empty($arrayfields['c.fk_input_reason']['checked'])) {
|
if (!empty($arrayfields['c.fk_input_reason']['checked'])) {
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -2091,7 +2120,8 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Amount HT
|
|
||||||
|
// Amount HT/net
|
||||||
if (!empty($arrayfields['c.total_ht']['checked'])) {
|
if (!empty($arrayfields['c.total_ht']['checked'])) {
|
||||||
print '<td class="nowrap right"><span class="amount">'.price($obj->total_ht)."</span></td>\n";
|
print '<td class="nowrap right"><span class="amount">'.price($obj->total_ht)."</span></td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
@ -2106,6 +2136,7 @@ if ($resql) {
|
|||||||
$totalarray['val']['c.total_ht'] = $obj->total_ht;
|
$totalarray['val']['c.total_ht'] = $obj->total_ht;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Amount VAT
|
// Amount VAT
|
||||||
if (!empty($arrayfields['c.total_vat']['checked'])) {
|
if (!empty($arrayfields['c.total_vat']['checked'])) {
|
||||||
print '<td class="nowrap right"><span class="amount">'.price($obj->total_tva)."</span></td>\n";
|
print '<td class="nowrap right"><span class="amount">'.price($obj->total_tva)."</span></td>\n";
|
||||||
@ -2117,7 +2148,8 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
$totalarray['val']['c.total_tva'] += $obj->total_tva;
|
$totalarray['val']['c.total_tva'] += $obj->total_tva;
|
||||||
}
|
}
|
||||||
// Amount TTC
|
|
||||||
|
// Amount TTC / gross
|
||||||
if (!empty($arrayfields['c.total_ttc']['checked'])) {
|
if (!empty($arrayfields['c.total_ttc']['checked'])) {
|
||||||
print '<td class="nowrap right"><span class="amount">'.price($obj->total_ttc)."</span></td>\n";
|
print '<td class="nowrap right"><span class="amount">'.price($obj->total_ttc)."</span></td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
@ -2146,21 +2178,22 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Amount HT
|
|
||||||
|
// Amount HT/net in foreign currency
|
||||||
if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) {
|
if (!empty($arrayfields['c.multicurrency_total_ht']['checked'])) {
|
||||||
print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ht)."</span></td>\n";
|
print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ht)."</span></td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Amount VAT
|
// Amount VAT in foreign currency
|
||||||
if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) {
|
if (!empty($arrayfields['c.multicurrency_total_vat']['checked'])) {
|
||||||
print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_vat)."</span></td>\n";
|
print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_vat)."</span></td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Amount TTC
|
// Amount TTC / gross in foreign currency
|
||||||
if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) {
|
if (!empty($arrayfields['c.multicurrency_total_ttc']['checked'])) {
|
||||||
print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ttc)."</span></td>\n";
|
print '<td class="right nowrap"><span class="amount">'.price($obj->multicurrency_total_ttc)."</span></td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
@ -2196,8 +2229,8 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sales representatives
|
||||||
if (!empty($arrayfields['sale_representative']['checked'])) {
|
if (!empty($arrayfields['sale_representative']['checked'])) {
|
||||||
// Sales representatives
|
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($obj->socid > 0) {
|
if ($obj->socid > 0) {
|
||||||
$listsalesrepresentatives = $companystatic->getSalesRepresentatives($user);
|
$listsalesrepresentatives = $companystatic->getSalesRepresentatives($user);
|
||||||
@ -2250,6 +2283,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total margin
|
// Total margin
|
||||||
if (!empty($arrayfields['total_margin']['checked'])) {
|
if (!empty($arrayfields['total_margin']['checked'])) {
|
||||||
print '<td class="right nowrap">'.price($marginInfo['total_margin']).'</td>';
|
print '<td class="right nowrap">'.price($marginInfo['total_margin']).'</td>';
|
||||||
@ -2261,6 +2295,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
$totalarray['val']['total_margin'] += $marginInfo['total_margin'];
|
$totalarray['val']['total_margin'] += $marginInfo['total_margin'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total margin rate
|
// Total margin rate
|
||||||
if (!empty($arrayfields['total_margin_rate']['checked'])) {
|
if (!empty($arrayfields['total_margin_rate']['checked'])) {
|
||||||
print '<td class="right nowrap">'.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], null, null, null, null, 2).'%').'</td>';
|
print '<td class="right nowrap">'.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], null, null, null, null, 2).'%').'</td>';
|
||||||
@ -2268,6 +2303,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total mark rate
|
// Total mark rate
|
||||||
if (!empty($arrayfields['total_mark_rate']['checked'])) {
|
if (!empty($arrayfields['total_mark_rate']['checked'])) {
|
||||||
print '<td class="right nowrap">'.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], null, null, null, null, 2).'%').'</td>';
|
print '<td class="right nowrap">'.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], null, null, null, null, 2).'%').'</td>';
|
||||||
@ -2456,6 +2492,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Import key
|
// Import key
|
||||||
if (!empty($arrayfields['c.import_key']['checked'])) {
|
if (!empty($arrayfields['c.import_key']['checked'])) {
|
||||||
print '<td class="nowrap center">'.$obj->import_key.'</td>';
|
print '<td class="nowrap center">'.$obj->import_key.'</td>';
|
||||||
@ -2463,6 +2500,7 @@ if ($resql) {
|
|||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
if (!empty($arrayfields['c.fk_statut']['checked'])) {
|
if (!empty($arrayfields['c.fk_statut']['checked'])) {
|
||||||
print '<td class="nowrap center">'.$generic_commande->LibStatut($obj->fk_statut, $obj->billed, 5, 1).'</td>';
|
print '<td class="nowrap center">'.$generic_commande->LibStatut($obj->fk_statut, $obj->billed, 5, 1).'</td>';
|
||||||
|
|||||||
@ -16,11 +16,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file target_agenda.php
|
* \file htdocs/webhook/target_agenda.php
|
||||||
* \ingroup webhook
|
* \ingroup webhook
|
||||||
* \brief Tab of events on Target
|
* \brief Tab of events on Target
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
@ -30,7 +32,7 @@ dol_include_once('/webhook/lib/webhook_target.lib.php');
|
|||||||
|
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("webhook@webhook", "other"));
|
$langs->loadLangs(array('webhook', 'other'));
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
@ -47,6 +49,7 @@ if (GETPOST('actioncode', 'array')) {
|
|||||||
} else {
|
} else {
|
||||||
$actioncode = GETPOST("actioncode", "alpha", 3) ? GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
|
$actioncode = GETPOST("actioncode", "alpha", 3) ? GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
|
||||||
}
|
}
|
||||||
|
|
||||||
$search_agenda_label = GETPOST('search_agenda_label');
|
$search_agenda_label = GETPOST('search_agenda_label');
|
||||||
|
|
||||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
@ -71,6 +74,7 @@ $object = new Target($db);
|
|||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id;
|
$diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id;
|
||||||
$hookmanager->initHooks(array('targetagenda', 'globalcard')); // Note that conf->hooks_modules contains array
|
$hookmanager->initHooks(array('targetagenda', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||||
|
|
||||||
// Fetch optionals attributes and labels
|
// Fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
|
|||||||
@ -16,11 +16,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file target_card.php
|
* \file target_card.php
|
||||||
* \ingroup webhook
|
* \ingroup webhook
|
||||||
* \brief Page to create/edit/view target
|
* \brief Page to create/edit/view target
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
@ -29,7 +31,7 @@ dol_include_once('/webhook/class/target.class.php');
|
|||||||
dol_include_once('/webhook/lib/webhook_target.lib.php');
|
dol_include_once('/webhook/lib/webhook_target.lib.php');
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("webhook@webhook", "other"));
|
$langs->loadLangs(array('webhook', 'other'));
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
@ -69,6 +71,7 @@ if (empty($action) && empty($id) && empty($ref)) {
|
|||||||
// Load object
|
// Load object
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
|
||||||
|
|
||||||
|
// Permissions
|
||||||
// There is several ways to check permission.
|
// There is several ways to check permission.
|
||||||
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
||||||
$enablepermissioncheck = 0;
|
$enablepermissioncheck = 0;
|
||||||
|
|||||||
@ -16,11 +16,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file target_contact.php
|
* \file htdocs/webhook/target_contact.php
|
||||||
* \ingroup webhook
|
* \ingroup webhook
|
||||||
* \brief Tab for contacts linked to Target
|
* \brief Tab for contacts linked to Target
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
@ -28,7 +30,7 @@ dol_include_once('/webhook/class/target.class.php');
|
|||||||
dol_include_once('/webhook/lib/webhook_target.lib.php');
|
dol_include_once('/webhook/lib/webhook_target.lib.php');
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("webhook@webhook", "companies", "other", "mails"));
|
$langs->loadLangs(array('webhook', 'companies', 'other', 'mails'));
|
||||||
|
|
||||||
$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
@ -41,12 +43,14 @@ $object = new Target($db);
|
|||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id;
|
$diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id;
|
||||||
$hookmanager->initHooks(array('targetcontact', 'globalcard')); // Note that conf->hooks_modules contains array
|
$hookmanager->initHooks(array('targetcontact', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||||
|
|
||||||
// Fetch optionals attributes and labels
|
// Fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
// Load object
|
// Load object
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
|
||||||
|
|
||||||
|
// Permissions
|
||||||
// There is several ways to check permission.
|
// There is several ways to check permission.
|
||||||
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
||||||
$enablepermissioncheck = 0;
|
$enablepermissioncheck = 0;
|
||||||
|
|||||||
@ -17,11 +17,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file target_list.php
|
* \file htdocs/webhook/target_list.php
|
||||||
* \ingroup webhook
|
* \ingroup webhook
|
||||||
* \brief List page for target
|
* \brief List page for target
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
@ -34,20 +36,21 @@ require_once __DIR__.'/class/target.class.php';
|
|||||||
//dol_include_once('/othermodule/class/otherobject.class.php');
|
//dol_include_once('/othermodule/class/otherobject.class.php');
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("webhook@webhook", "other"));
|
$langs->loadLangs(array('webhook', 'other'));
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
// Get Parameters
|
||||||
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
$id = GETPOST('id', 'int');
|
||||||
$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
|
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||||
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||||
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
|
||||||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'targetlist'; // To manage different context of search
|
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
||||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'targetlist'; // To manage different context of search
|
||||||
$mode = GETPOST('mode', 'aZ');
|
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||||
|
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||||
|
$mode = GETPOST('mode', 'aZ');
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
|
||||||
|
|
||||||
// Load variable for pagination
|
// Load variable for pagination
|
||||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
@ -119,6 +122,7 @@ foreach ($object->fields as $key => $val) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||||
|
|
||||||
@ -126,6 +130,7 @@ $object->fields = dol_sort_array($object->fields, 'position');
|
|||||||
//$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right');
|
//$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right');
|
||||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||||
|
|
||||||
|
// Permissions
|
||||||
// There is several ways to check permission.
|
// There is several ways to check permission.
|
||||||
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
||||||
$enablepermissioncheck = 0;
|
$enablepermissioncheck = 0;
|
||||||
@ -207,6 +212,7 @@ $now = dol_now();
|
|||||||
//$help_url = "EN:Module_Target|FR:Module_Target_FR|ES:Módulo_Target";
|
//$help_url = "EN:Module_Target|FR:Module_Target_FR|ES:Módulo_Target";
|
||||||
$help_url = '';
|
$help_url = '';
|
||||||
$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Targets"));
|
$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Targets"));
|
||||||
|
|
||||||
$morejs = array();
|
$morejs = array();
|
||||||
$morecss = array();
|
$morecss = array();
|
||||||
|
|
||||||
|
|||||||
@ -17,22 +17,24 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file target_note.php
|
* \file htdocs/webhook/target_note.php
|
||||||
* \ingroup webhook
|
* \ingroup webhook
|
||||||
* \brief Tab for notes on Target
|
* \brief Tab for notes on Target
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// Load Dolibarr environment
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
dol_include_once('/webhook/class/target.class.php');
|
dol_include_once('/webhook/class/target.class.php');
|
||||||
dol_include_once('/webhook/lib/webhook_target.lib.php');
|
dol_include_once('/webhook/lib/webhook_target.lib.php');
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("webhook@webhook", "companies"));
|
$langs->loadLangs(array('webhook', 'companies'));
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$cancel = GETPOST('cancel', 'aZ09');
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
@ -41,6 +43,7 @@ $object = new Target($db);
|
|||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id;
|
$diroutputmassaction = $conf->webhook->dir_output.'/temp/massgeneration/'.$user->id;
|
||||||
$hookmanager->initHooks(array('targetnote', 'globalcard')); // Note that conf->hooks_modules contains array
|
$hookmanager->initHooks(array('targetnote', 'globalcard')); // Note that conf->hooks_modules contains array
|
||||||
|
|
||||||
// Fetch optionals attributes and labels
|
// Fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
|
|
||||||
@ -50,7 +53,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
$upload_dir = $conf->webhook->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id;
|
$upload_dir = $conf->webhook->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Permissions
|
||||||
// There is several ways to check permission.
|
// There is several ways to check permission.
|
||||||
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
||||||
$enablepermissioncheck = 0;
|
$enablepermissioncheck = 0;
|
||||||
@ -93,7 +96,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
//$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes';
|
//$help_url='EN:Webhooks|FR:Webhooks_FR|ES:Webhooks_ES';
|
||||||
$help_url = '';
|
$help_url = '';
|
||||||
$title = $langs->trans('Target').' - '.$langs->trans("Notes");
|
$title = $langs->trans('Target').' - '.$langs->trans("Notes");
|
||||||
llxHeader('', $title, $help_url);
|
llxHeader('', $title, $help_url);
|
||||||
|
|||||||
@ -58,15 +58,16 @@ if (!$res) {
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("webhook@webhook"));
|
$langs->loadLangs(array('webhook'));
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
|
||||||
|
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
// if (! $user->rights->webhook->myobject->read) {
|
// if (! $user->rights->webhook->myobject->read) {
|
||||||
// accessforbidden();
|
// accessforbidden();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
$action = GETPOST('action', 'aZ09');
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
if (isset($user->socid) && $user->socid > 0) {
|
if (isset($user->socid) && $user->socid > 0) {
|
||||||
$action = '';
|
$action = '';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user