Fix CI
This commit is contained in:
parent
e036520cb0
commit
06a5b4947d
5 changed files with 8 additions and 53 deletions
|
|
@ -268,11 +268,11 @@ class Commande extends CommonOrder
|
|||
|
||||
|
||||
/**
|
||||
* @var string key of module source when order generated from a dedicated module ('cashdesk', 'takepos', ...)
|
||||
* @var ?string key of module source when order generated from a dedicated module ('cashdesk', 'takepos', ...)
|
||||
*/
|
||||
public $module_source;
|
||||
/**
|
||||
* @var string key of pos source ('0', '1', ...)
|
||||
* @var ?string key of pos source ('0', '1', ...)
|
||||
*/
|
||||
public $pos_source;
|
||||
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ if (empty($reshook)) {
|
|||
$search_billed = '';
|
||||
$toselect = array();
|
||||
$search_array_options = array();
|
||||
$search_categ_cus = 0;
|
||||
$search_categ_cus = '';
|
||||
$search_datecloture_start = '';
|
||||
$search_datecloture_end = '';
|
||||
$search_fk_cond_reglement = '';
|
||||
|
|
@ -596,7 +596,7 @@ if ($search_sale && $search_sale != '-1') {
|
|||
}
|
||||
// Search for tag/category ($searchCategoryCustomerList is an array of ID)
|
||||
$searchCategoryCustomerOperator = -1;
|
||||
$searchCategoryCustomerList = array($search_categ_cus);
|
||||
$searchCategoryCustomerList = ($search_categ_cus !== '-1' ? explode(',', $search_categ_cus) : array());
|
||||
if (!empty($searchCategoryCustomerList)) {
|
||||
$searchCategoryCustomerSqlList = array();
|
||||
$listofcategoryid = '';
|
||||
|
|
|
|||
|
|
@ -194,51 +194,6 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e
|
|||
$timestamp = GETPOSTINT('timestamp', 2);
|
||||
$format = 'date';
|
||||
$newvalue = ($timestamp / 1000);
|
||||
} elseif ($type == 'select') {
|
||||
$loadmethodname = 'load_cache_'.$loadmethod;
|
||||
$loadcachename = 'cache_'.$loadmethod;
|
||||
$loadviewname = 'view_'.$loadmethod;
|
||||
|
||||
$form = new Form($db);
|
||||
if (method_exists($form, $loadmethodname)) {
|
||||
$ret = $form->$loadmethodname();
|
||||
if ($ret > 0) {
|
||||
$loadcache = $form->$loadcachename;
|
||||
$value = $loadcache[$newvalue];
|
||||
|
||||
if (!empty($form->$loadviewname)) {
|
||||
$loadview = $form->$loadviewname;
|
||||
$view = $loadview[$newvalue];
|
||||
}
|
||||
} else {
|
||||
$error++;
|
||||
$return['error'] = $form->error;
|
||||
}
|
||||
} else {
|
||||
$module = $subelement = $ext_element;
|
||||
if (preg_match('/^([^_]+)_([^_]+)/i', $ext_element, $regs)) {
|
||||
$module = $regs[1];
|
||||
$subelement = $regs[2];
|
||||
}
|
||||
|
||||
dol_include_once('/'.$module.'/class/actions_'.$subelement.'.class.php');
|
||||
$classname = 'Actions'.ucfirst($subelement);
|
||||
$object = new $classname($db);
|
||||
'@phan-var-force CommonHookActions $object';
|
||||
$ret = $object->$loadmethodname();
|
||||
if ($ret > 0) {
|
||||
$loadcache = $object->$loadcachename;
|
||||
$value = $loadcache[$newvalue];
|
||||
|
||||
if (!empty($object->$loadviewname)) {
|
||||
$loadview = $object->$loadviewname;
|
||||
$view = $loadview[$newvalue];
|
||||
}
|
||||
} else {
|
||||
$error++;
|
||||
$return['error'] = $object->error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
|
|
|
|||
|
|
@ -3797,7 +3797,7 @@ class Form
|
|||
* Return list of products for customer (in Ajax if Ajax activated or go to select_produits_fournisseurs_list)
|
||||
*
|
||||
* @param int $socid Id third party
|
||||
* @param string $selected Preselected product
|
||||
* @param string|int $selected Preselected product
|
||||
* @param string $htmlname Name of HTML Select
|
||||
* @param string $filtertype Filter on product type (''=nofilter, 0=product, 1=service)
|
||||
* @param string $filtre For a SQL filter
|
||||
|
|
@ -3807,7 +3807,7 @@ class Form
|
|||
* @param string $morecss More CSS
|
||||
* @param string $placeholder Placeholder
|
||||
* @param int $nooutput 1=do not output but return string instead
|
||||
* @return void
|
||||
* @return string|void HTML select or nothing
|
||||
*/
|
||||
public function select_produits_fournisseurs($socid, $selected = '', $htmlname = 'productid', $filtertype = '', $filtre = '', $ajaxoptions = array(), $hidelabel = 0, $alsoproductwithnosupplierprice = 0, $morecss = '', $placeholder = '', $nooutput = 0)
|
||||
{
|
||||
|
|
@ -3821,7 +3821,7 @@ class Form
|
|||
|
||||
$selected_input_value = '';
|
||||
if (!empty($conf->use_javascript_ajax) && getDolGlobalString('PRODUIT_USE_SEARCH_TO_SELECT')) {
|
||||
if ($selected > 0) {
|
||||
if ((int) $selected > 0) {
|
||||
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
$producttmpselect = new Product($this->db);
|
||||
$producttmpselect->fetch((int) $selected);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
* The HTML field must be an input text with id=search_$htmlname.
|
||||
* This use the jQuery "autocomplete" function. If we want to use the select2, we must instead use input select into functions that call this method.
|
||||
*
|
||||
* @param string $selected Preselected value
|
||||
* @param string|int $selected Preselected value
|
||||
* @param string|int $htmlname HTML name of input field
|
||||
* @param string $url Ajax Url to call for request: /path/page.php. Must return a json array ('key'=>id, 'value'=>String shown into input field once selected, 'label'=>String shown into combo list)
|
||||
* @param string $urloption More parameters on URL request
|
||||
|
|
|
|||
Loading…
Reference in a new issue