Stickler corrections
This commit is contained in:
parent
f92154d057
commit
c745237ee9
@ -568,10 +568,10 @@ if ($conf->use_javascript_ajax) {
|
|||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketChooseProductCategory").'</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("TicketChooseProductCategory").'</td>';
|
||||||
print '<td class="left">';
|
print '<td class="left">';
|
||||||
$form->selectProductCategory($conf->global->TICKET_PRODUCT_CATEGORY, 'product_category_id');
|
$form->selectProductCategory($conf->global->TICKET_PRODUCT_CATEGORY, 'product_category_id');
|
||||||
if ($conf->use_javascript_ajax) {
|
if ($conf->use_javascript_ajax) {
|
||||||
print ajax_combobox('select_'.$htmlname);
|
print ajax_combobox('select_'.$htmlname);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
print $form->textwithpicto('', $langs->trans("TicketChooseProductCategoryHelp"), 1, 'help');
|
print $form->textwithpicto('', $langs->trans("TicketChooseProductCategoryHelp"), 1, 'help');
|
||||||
|
|||||||
@ -2136,7 +2136,7 @@ class Contrat extends CommonObject
|
|||||||
* @param array $line_status sort contracts where lines have these status
|
* @param array $line_status sort contracts where lines have these status
|
||||||
* @return array|int Array of contracts id or <0 if error
|
* @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();
|
$tab = array();
|
||||||
|
|
||||||
|
|||||||
@ -428,7 +428,6 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
|||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
// Auto link contract
|
// 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)) {
|
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);
|
$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]);
|
$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);
|
$object->setContract($contractid);
|
||||||
break;
|
break;
|
||||||
} elseif ($number_contracts_found > 1) {
|
} elseif ($number_contracts_found > 1) {
|
||||||
foreach($list as $linked_contract) {
|
foreach ($list as $linked_contract) {
|
||||||
$object->setContract($linked_contract->id);
|
$object->setContract($linked_contract->id);
|
||||||
// don't set '$contractid' so it is not used when creating an intervention.
|
// don't set '$contractid' so it is not used when creating an intervention.
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user