Stickler corrections

This commit is contained in:
Thomas Negre 2022-02-08 15:23:56 +01:00
parent f92154d057
commit c745237ee9
3 changed files with 6 additions and 7 deletions

View File

@ -568,10 +568,10 @@ if ($conf->use_javascript_ajax) {
print '<tr class="oddeven"><td>'.$langs->trans("TicketChooseProductCategory").'</td>';
print '<td class="left">';
$form->selectProductCategory($conf->global->TICKET_PRODUCT_CATEGORY, 'product_category_id');
if ($conf->use_javascript_ajax) {
print ajax_combobox('select_'.$htmlname);
}
$form->selectProductCategory($conf->global->TICKET_PRODUCT_CATEGORY, 'product_category_id');
if ($conf->use_javascript_ajax) {
print ajax_combobox('select_'.$htmlname);
}
print '</td>';
print '<td class="center">';
print $form->textwithpicto('', $langs->trans("TicketChooseProductCategoryHelp"), 1, 'help');

View File

@ -2136,7 +2136,7 @@ class Contrat extends CommonObject
* @param array $line_status sort contracts where lines have these status
* @return array|int Array of contracts id or <0 if error
*/
public function getListOfContracts($option = 'all', $status = [], $product_categories = [], $line_status = [] )
public function getListOfContracts($option = 'all', $status = [], $product_categories = [], $line_status = [])
{
$tab = array();

View File

@ -428,7 +428,6 @@ class InterfaceWorkflowManager extends DolibarrTriggers
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
// Auto link contract
if (!empty($conf->contract->enabled) && !empty($conf->ticket->enabled) && !empty($conf->ficheinter->enabled) && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_TICKET_LINK_CONTRACT) && !empty($conf->global->TICKET_PRODUCT_CATEGORY) && !empty($object->fk_soc)) {
$societe = new Societe($this->db);
$company_ids = (empty($conf->global->WORKFLOW_TICKET_USE_PARENT_COMPANY_CONTRACTS)) ? [$object->fk_soc] : $societe->getParentsForCompany($object->fk_soc, [$object->fk_soc]);
@ -445,7 +444,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
$object->setContract($contractid);
break;
} elseif ($number_contracts_found > 1) {
foreach($list as $linked_contract) {
foreach ($list as $linked_contract) {
$object->setContract($linked_contract->id);
// don't set '$contractid' so it is not used when creating an intervention.
}