mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-12 10:52:37 +01:00
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
@@ -203,7 +203,7 @@ if (empty($reshook))
|
||||
|
||||
$targetobject = null; // Not defined with mass emailing
|
||||
$parameters=array('mode'=>'emailing');
|
||||
$substitutionarray=getCommonSubstitutionArray($langs, 2, array('object','objectamount'), $targetobject); // Note: On mass emailing, this is null because be don't know object
|
||||
$substitutionarray=getCommonSubstitutionArray($langs, 0, array('object','objectamount'), $targetobject); // Note: On mass emailing, this is null because be don't know object
|
||||
|
||||
// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)
|
||||
$substitutionarray['__ID__'] = $obj->source_id;
|
||||
|
||||
@@ -823,6 +823,30 @@ class FactureRec extends CommonInvoice
|
||||
return dol_time_plus_duree($this->date_when, $this->frequency, $this->unit_frequency);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return if maximum number of generation is reached
|
||||
*
|
||||
* @return boolean False by default, True if maximum number of generation is reached
|
||||
*/
|
||||
function isMaxNbGenReached()
|
||||
{
|
||||
$ret = false;
|
||||
if ($this->nb_gen_max > 0 && ($this->nb_gen_done >= $this->nb_gen_max)) $ret = true;
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format string to output with by striking the string if max number of generation was reached
|
||||
*
|
||||
* @param string $ret Default value to output
|
||||
* @return boolean False by default, True if maximum number of generation is reached
|
||||
*/
|
||||
function strikeIfMaxNbGenReached($ret)
|
||||
{
|
||||
// Special case to strike the date
|
||||
return ($this->isMaxNbGenReached()?'<strike>':'').$ret.($this->isMaxNbGenReached()?'</strike>':'');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create all recurrents invoices (for all entities if multicompany is used).
|
||||
* A result may also be provided into this->output.
|
||||
|
||||
@@ -351,22 +351,19 @@ class Facture extends CommonInvoice
|
||||
}
|
||||
|
||||
// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)
|
||||
$substitutionarray=array(
|
||||
'__TOTAL_HT__' => price($this->total_ht, 0, $outputlangs, 0, 0, -1, $conf->currency_code),
|
||||
'__TOTAL_TTC__' => price($this->total_ttc, 0, $outputlangs, 0, 0, -1, $conf->currency_code),
|
||||
'__INVOICE_PREVIOUS_MONTH__' => dol_print_date(dol_time_plus_duree($this->date, -1, 'm'), '%m'),
|
||||
'__INVOICE_MONTH__' => dol_print_date($this->date, '%m'),
|
||||
'__INVOICE_NEXT_MONTH__' => dol_print_date(dol_time_plus_duree($this->date, 1, 'm'), '%m'),
|
||||
'__INVOICE_PREVIOUS_MONTH_TEXT__' => dol_print_date(dol_time_plus_duree($this->date, -1, 'm'), '%B'),
|
||||
'__INVOICE_MONTH_TEXT__' => dol_print_date($this->date, '%B'),
|
||||
'__INVOICE_NEXT_MONTH_TEXT__' => dol_print_date(dol_time_plus_duree($this->date, 1, 'm'), '%B'),
|
||||
'__INVOICE_PREVIOUS_YEAR__' => dol_print_date(dol_time_plus_duree($this->date, -1, 'y'), '%Y'),
|
||||
'__INVOICE_YEAR__' => dol_print_date($this->date, '%Y'),
|
||||
'__INVOICE_NEXT_YEAR__' => dol_print_date(dol_time_plus_duree($this->date, 1, 'y'), '%Y'),
|
||||
// Only for tempalte invoice
|
||||
'__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__' => dol_print_date($originaldatewhen, 'dayhour'),
|
||||
'__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__' => dol_print_date(dol_time_plus_duree($originaldatewhen, $_facrec->frequency, $_facrec->unit_frequency), 'dayhour')
|
||||
);
|
||||
$substitutionarray=getCommonSubstitutionArray($outputlangs, 0, null, $this);
|
||||
$substitutionarray['__INVOICE_PREVIOUS_MONTH__'] = dol_print_date(dol_time_plus_duree($this->date, -1, 'm'), '%m');
|
||||
$substitutionarray['__INVOICE_MONTH__'] = dol_print_date($this->date, '%m');
|
||||
$substitutionarray['__INVOICE_NEXT_MONTH__'] = dol_print_date(dol_time_plus_duree($this->date, 1, 'm'), '%m');
|
||||
$substitutionarray['__INVOICE_PREVIOUS_MONTH_TEXT__'] = dol_print_date(dol_time_plus_duree($this->date, -1, 'm'), '%B');
|
||||
$substitutionarray['__INVOICE_MONTH_TEXT__'] = dol_print_date($this->date, '%B');
|
||||
$substitutionarray['__INVOICE_NEXT_MONTH_TEXT__'] = dol_print_date(dol_time_plus_duree($this->date, 1, 'm'), '%B');
|
||||
$substitutionarray['__INVOICE_PREVIOUS_YEAR__'] = dol_print_date(dol_time_plus_duree($this->date, -1, 'y'), '%Y');
|
||||
$substitutionarray['__INVOICE_YEAR__'] = dol_print_date($this->date, '%Y');
|
||||
$substitutionarray['__INVOICE_NEXT_YEAR__'] = dol_print_date(dol_time_plus_duree($this->date, 1, 'y'), '%Y');
|
||||
// Only for tempalte invoice
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = dol_print_date($originaldatewhen, 'dayhour');
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = dol_print_date(dol_time_plus_duree($originaldatewhen, $_facrec->frequency, $_facrec->unit_frequency), 'dayhour');
|
||||
|
||||
//var_dump($substitutionarray);exit;
|
||||
|
||||
|
||||
@@ -969,26 +969,20 @@ if ($action == 'create')
|
||||
$note_private=GETPOST('note_private','none')?GETPOST('note_private','none'):$object->note_private;
|
||||
|
||||
// Help of substitution key
|
||||
$substitutionarray=array(
|
||||
//'__TOTAL_HT__' => $langs->trans("AmountHT").' ('.$langs->trans("Example").': '.price($object->total_ht).')',
|
||||
//'__TOTAL_TTC__' => $langs->trans("AmountTTC").' ('.$langs->trans("Example").': '.price($object->total_ttc).')',
|
||||
'__AMOUNT_EXCL_TAX__' => $langs->trans("AmountHT").' ('.$langs->trans("Example").': '.price($object->total_ht).')',
|
||||
'__AMOUNT_VAT__' => $langs->trans("AmountVAT").' ('.$langs->trans("Example").': '.price($object->total_tva).')',
|
||||
'__AMOUNT__' => $langs->trans("AmountTTC").' ('.$langs->trans("Example").': '.price($object->total_ttc).')',
|
||||
'__INVOICE_PREVIOUS_MONTH__' => $langs->trans("PreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'm'),'%m').')',
|
||||
'__INVOICE_MONTH__' => $langs->trans("MonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date,'%m').')',
|
||||
'__INVOICE_NEXT_MONTH__' => $langs->trans("NextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'm'),'%m').')',
|
||||
'__INVOICE_PREVIOUS_MONTH_TEXT__' => $langs->trans("TextPreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'm'),'%B').')',
|
||||
'__INVOICE_MONTH_TEXT__' => $langs->trans("TextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date,'%B').')',
|
||||
'__INVOICE_NEXT_MONTH_TEXT__' => $langs->trans("TextNextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'm'), '%B').')',
|
||||
'__INVOICE_PREVIOUS_YEAR__' => $langs->trans("YearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'y'),'%Y').')',
|
||||
'__INVOICE_YEAR__' => $langs->trans("PreviousYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date,'%Y').')',
|
||||
'__INVOICE_NEXT_YEAR__' => $langs->trans("NextYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'y'),'%Y').')',
|
||||
// Only on template invoices
|
||||
'__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__' => $langs->trans("DateNextInvoiceBeforeGen").' ('.$langs->trans("Example").': '.dol_print_date($object->date_when, 'dayhour').')',
|
||||
'__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__' => $langs->trans("DateNextInvoiceAfterGen").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date_when, $object->frequency, $object->unit_frequency),'dayhour').')',
|
||||
);
|
||||
$substitutionarray['__(TransKey)__']=$langs->trans("TransKey");
|
||||
$substitutionarray = getCommonSubstitutionArray($langs, 2, null, $object);
|
||||
|
||||
$substitutionarray['__INVOICE_PREVIOUS_MONTH__'] = $langs->trans("PreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'm'),'%m').')';
|
||||
$substitutionarray['__INVOICE_MONTH__'] = $langs->trans("MonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date,'%m').')';
|
||||
$substitutionarray['__INVOICE_NEXT_MONTH__'] = $langs->trans("NextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'm'),'%m').')';
|
||||
$substitutionarray['__INVOICE_PREVIOUS_MONTH_TEXT__'] = $langs->trans("TextPreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'm'),'%B').')';
|
||||
$substitutionarray['__INVOICE_MONTH_TEXT__'] = $langs->trans("TextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date,'%B').')';
|
||||
$substitutionarray['__INVOICE_NEXT_MONTH_TEXT__'] = $langs->trans("TextNextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'm'), '%B').')';
|
||||
$substitutionarray['__INVOICE_PREVIOUS_YEAR__'] = $langs->trans("YearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'y'),'%Y').')';
|
||||
$substitutionarray['__INVOICE_YEAR__'] = $langs->trans("PreviousYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date,'%Y').')';
|
||||
$substitutionarray['__INVOICE_NEXT_YEAR__'] = $langs->trans("NextYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'y'),'%Y').')';
|
||||
// Only on template invoices
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen").' ('.$langs->trans("Example").': '.dol_print_date($object->date_when, 'dayhour').')';
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date_when, $object->frequency, $object->unit_frequency),'dayhour').')';
|
||||
|
||||
$htmltext = '<i>'.$langs->trans("FollowingConstantsWillBeSubstituted").':<br>';
|
||||
foreach($substitutionarray as $key => $val)
|
||||
@@ -1294,26 +1288,21 @@ else
|
||||
// Help of substitution key
|
||||
$dateexample=dol_now();
|
||||
if (! empty($object->frequency) && ! empty($object->date_when)) $dateexample=$object->date_when;
|
||||
$substitutionarray=array(
|
||||
//'__TOTAL_HT__' => $langs->trans("AmountHT").' ('.$langs->trans("Example").': '.price($object->total_ht).')',
|
||||
//'__TOTAL_TTC__' => $langs->trans("AmountTTC").' ('.$langs->trans("Example").': '.price($object->total_ttc).')',
|
||||
'__AMOUNT_EXCL_TAX__' => $langs->trans("AmountHT").' ('.$langs->trans("Example").': '.price($object->total_ht).')',
|
||||
'__AMOUNT_VAT__' => $langs->trans("AmountVAT").' ('.$langs->trans("Example").': '.price($object->total_tva).')',
|
||||
'__AMOUNT__' => $langs->trans("AmountTTC").' ('.$langs->trans("Example").': '.price($object->total_ttc).')',
|
||||
'__INVOICE_PREVIOUS_MONTH__' => $langs->trans("PreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'),'%m').')',
|
||||
'__INVOICE_MONTH__' => $langs->trans("MonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%m').')',
|
||||
'__INVOICE_NEXT_MONTH__' => $langs->trans("NextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'),'%m').')',
|
||||
'__INVOICE_PREVIOUS_MONTH_TEXT__' => $langs->trans("TextPreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'),'%B').')',
|
||||
'__INVOICE_MONTH_TEXT__' => $langs->trans("TextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%B').')',
|
||||
'__INVOICE_NEXT_MONTH_TEXT__' => $langs->trans("TextNextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%B').')',
|
||||
'__INVOICE_PREVIOUS_YEAR__' => $langs->trans("YearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'y'),'%Y').')',
|
||||
'__INVOICE_YEAR__' => $langs->trans("PreviousYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%Y').')',
|
||||
'__INVOICE_NEXT_YEAR__' => $langs->trans("NextYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'y'),'%Y').')',
|
||||
// Only on template invoices
|
||||
'__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__' => $langs->trans("DateNextInvoiceBeforeGen").' ('.$langs->trans("Example").': '.dol_print_date($object->date_when, 'dayhour').')',
|
||||
'__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__' => $langs->trans("DateNextInvoiceAfterGen").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date_when, $object->frequency, $object->unit_frequency),'dayhour').')',
|
||||
);
|
||||
$substitutionarray['__(TransKey)__']=$langs->trans("TransKey");
|
||||
|
||||
$substitutionarray = getCommonSubstitutionArray($langs, 2, null, $object);
|
||||
|
||||
$substitutionarray['__INVOICE_PREVIOUS_MONTH__'] = $langs->trans("PreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'),'%m').')';
|
||||
$substitutionarray['__INVOICE_MONTH__'] = $langs->trans("MonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%m').')';
|
||||
$substitutionarray['__INVOICE_NEXT_MONTH__'] = $langs->trans("NextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'),'%m').')';
|
||||
$substitutionarray['__INVOICE_PREVIOUS_MONTH_TEXT__'] = $langs->trans("TextPreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'),'%B').')';
|
||||
$substitutionarray['__INVOICE_MONTH_TEXT__'] = $langs->trans("TextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%B').')';
|
||||
$substitutionarray['__INVOICE_NEXT_MONTH_TEXT__'] = $langs->trans("TextNextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%B').')';
|
||||
$substitutionarray['__INVOICE_PREVIOUS_YEAR__'] = $langs->trans("YearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'y'),'%Y').')';
|
||||
$substitutionarray['__INVOICE_YEAR__'] = $langs->trans("PreviousYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample,'%Y').')';
|
||||
$substitutionarray['__INVOICE_NEXT_YEAR__'] = $langs->trans("NextYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'y'),'%Y').')';
|
||||
// Only on template invoices
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen").' ('.$langs->trans("Example").': '.dol_print_date($object->date_when, 'dayhour').')';
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date_when, $object->frequency, $object->unit_frequency),'dayhour').')';
|
||||
|
||||
$htmltext = '<i>'.$langs->trans("FollowingConstantsWillBeSubstituted").':<br>';
|
||||
foreach($substitutionarray as $key => $val)
|
||||
@@ -1430,7 +1419,7 @@ else
|
||||
print '</td><td>';
|
||||
if ($action == 'date_when' || $object->frequency > 0)
|
||||
{
|
||||
print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day');
|
||||
print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day', $object->date_when, null, '', '', 0, 'strikeIfMaxNbGenReached');
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -520,6 +520,8 @@ if ($resql)
|
||||
$invoicerectmp->frequency=$objp->frequency;
|
||||
$invoicerectmp->suspend=$objp->suspend;
|
||||
$invoicerectmp->unit_frequency=$objp->unit_frequency;
|
||||
$invoicerectmp->nb_gen_max=$objp->nb_gen_max;
|
||||
$invoicerectmp->nb_gen_done=$objp->nb_gen_done;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
@@ -603,7 +605,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['f.date_when']['checked']))
|
||||
{
|
||||
print '<td align="center">';
|
||||
print ($objp->frequency ? dol_print_date($db->jdate($objp->date_when),'day') : '<span class="opacitymedium">'.$langs->trans('NA').'</span>');
|
||||
print ($objp->frequency ? ($invoicerectmp->isMaxNbGenReached()?'<strike>':'').dol_print_date($db->jdate($objp->date_when),'day').($invoicerectmp->isMaxNbGenReached()?'</strike>':'') : '<span class="opacitymedium">'.$langs->trans('NA').'</span>');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
}
|
||||
|
||||
@@ -56,85 +56,85 @@ $arrayresult=array();
|
||||
// Define $searchform
|
||||
if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && empty($conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED) && $user->rights->societe->lire)
|
||||
{
|
||||
$arrayresult['searchintothirdparty']=array('img'=>'object_company', 'label'=>$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'text'=>img_picto('','object_company').' '.$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/societe/list.php?sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintothirdparty']=array('position'=>10, 'img'=>'object_company', 'label'=>$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'text'=>img_picto('','object_company').' '.$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/societe/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
|
||||
if (! empty($conf->societe->enabled) && empty($conf->global->MAIN_SEARCHFORM_CONTACT_DISABLED) && $user->rights->societe->lire)
|
||||
{
|
||||
$arrayresult['searchintocontact']=array('img'=>'object_contact', 'label'=>$langs->trans("SearchIntoContacts", $search_boxvalue), 'text'=>img_picto('','object_contact').' '.$langs->trans("SearchIntoContacts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contact/list.php?sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintocontact']=array('position'=>15, 'img'=>'object_contact', 'label'=>$langs->trans("SearchIntoContacts", $search_boxvalue), 'text'=>img_picto('','object_contact').' '.$langs->trans("SearchIntoContacts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contact/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
|
||||
if (! empty($conf->adherent->enabled) && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire)
|
||||
{
|
||||
$arrayresult['searchintomember']=array('position'=>20, 'img'=>'object_user', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
|
||||
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire))
|
||||
&& empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_DISABLED))
|
||||
{
|
||||
$arrayresult['searchintoproduct']=array('img'=>'object_product', 'label'=>$langs->trans("SearchIntoProductsOrServices", $search_boxvalue),'text'=>img_picto('','object_product').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/list.php?sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintoproduct']=array('position'=>30, 'img'=>'object_product', 'label'=>$langs->trans("SearchIntoProductsOrServices", $search_boxvalue),'text'=>img_picto('','object_product').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
|
||||
if (! empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->rights->projet->lire)
|
||||
{
|
||||
$arrayresult['searchintoprojects']=array('img'=>'object_projectpub', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('','object_projectpub').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php?search_all='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintoprojects']=array('position'=>40, 'img'=>'object_projectpub', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('','object_projectpub').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php?search_all='.urlencode($search_boxvalue));
|
||||
}
|
||||
if (! empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->rights->projet->lire)
|
||||
{
|
||||
$arrayresult['searchintotasks']=array('img'=>'object_task', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('','object_task').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php?search_all='.urlencode($search_boxvalue));
|
||||
}
|
||||
|
||||
if (! empty($conf->adherent->enabled) && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire)
|
||||
{
|
||||
$arrayresult['searchintomember']=array('img'=>'object_user', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
|
||||
if (! empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire)
|
||||
{
|
||||
$arrayresult['searchintouser']=array('img'=>'object_user', 'label'=>$langs->trans("SearchIntoUsers", $search_boxvalue), 'text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/user/index.php?sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintotasks']=array('position'=>45, 'img'=>'object_task', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('','object_task').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php?search_all='.urlencode($search_boxvalue));
|
||||
}
|
||||
|
||||
if (! empty($conf->propal->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_PROPAL_DISABLED) && $user->rights->propal->lire)
|
||||
{
|
||||
$arrayresult['searchintopropal']=array('img'=>'object_propal', 'label'=>$langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'text'=>img_picto('','object_propal').' '.$langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/comm/propal/list.php?sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintopropal']=array('position'=>60, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'text'=>img_picto('','object_propal').' '.$langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/comm/propal/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
if (! empty($conf->commande->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_ORDER_DISABLED) && $user->rights->commande->lire)
|
||||
{
|
||||
$arrayresult['searchintoorder']=array('img'=>'object_order', 'label'=>$langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'text'=>img_picto('','object_order').' '.$langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/commande/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
if (! empty($conf->facture->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_INVOICE_DISABLED) && $user->rights->facture->lire)
|
||||
{
|
||||
$arrayresult['searchintoinvoice']=array('img'=>'object_bill', 'label'=>$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'text'=>img_picto('','object_bill').' '.$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/compta/facture/list.php?sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintoorder']=array('position'=>70, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'text'=>img_picto('','object_order').' '.$langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/commande/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
if (! empty($conf->expedition->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_SHIPMENT_DISABLED) && $user->rights->expedition->lire)
|
||||
{
|
||||
$arrayresult['searchintoshipment']=array('img'=>'object_sending', 'label'=>$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'text'=>img_picto('','object_sending').' '.$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expedition/list.php?sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintoshipment']=array('position'=>80, 'img'=>'object_sending', 'label'=>$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'text'=>img_picto('','object_sending').' '.$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expedition/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
if (! empty($conf->facture->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_INVOICE_DISABLED) && $user->rights->facture->lire)
|
||||
{
|
||||
$arrayresult['searchintoinvoice']=array('position'=>90, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'text'=>img_picto('','object_bill').' '.$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/compta/facture/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
|
||||
if (! empty($conf->supplier_proposal->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->rights->supplier_proposal->lire)
|
||||
{
|
||||
$arrayresult['searchintosupplierpropal']=array('img'=>'object_propal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('','object_propal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php?sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintosupplierpropal']=array('position'=>100, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('','object_propal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
if (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED) && $user->rights->fournisseur->commande->lire)
|
||||
{
|
||||
$arrayresult['searchintosupplierorder']=array('img'=>'object_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('','object_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php?search_all='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintosupplierorder']=array('position'=>110, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('','object_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php?search_all='.urlencode($search_boxvalue));
|
||||
}
|
||||
if (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED) && $user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$arrayresult['searchintosupplierinvoice']=array('img'=>'object_bill', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('','object_bill').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php?sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintosupplierinvoice']=array('position'=>120, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('','object_bill').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
|
||||
if (! empty($conf->contrat->enabled) && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->rights->contrat->lire)
|
||||
{
|
||||
$arrayresult['searchintocontract']=array('img'=>'object_contract', 'label'=>$langs->trans("SearchIntoContracts", $search_boxvalue), 'text'=>img_picto('','object_contract').' '.$langs->trans("SearchIntoContracts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contrat/list.php?sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintocontract']=array('position'=>130, 'img'=>'object_contract', 'label'=>$langs->trans("SearchIntoContracts", $search_boxvalue), 'text'=>img_picto('','object_contract').' '.$langs->trans("SearchIntoContracts", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/contrat/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
if (! empty($conf->ficheinter->enabled) && empty($conf->global->MAIN_SEARCHFORM_FICHINTER_DISABLED) && $user->rights->ficheinter->lire)
|
||||
{
|
||||
$arrayresult['searchintointervention']=array('img'=>'object_intervention', 'label'=>$langs->trans("SearchIntoInterventions", $search_boxvalue), 'text'=>img_picto('','object_intervention').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php?sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintointervention']=array('position'=>140, 'img'=>'object_intervention', 'label'=>$langs->trans("SearchIntoInterventions", $search_boxvalue), 'text'=>img_picto('','object_intervention').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
|
||||
// HR
|
||||
if (! empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire)
|
||||
{
|
||||
$arrayresult['searchintouser']=array('position'=>200, 'img'=>'object_user', 'label'=>$langs->trans("SearchIntoUsers", $search_boxvalue), 'text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/user/index.php?sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
if (! empty($conf->expensereport->enabled) && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->rights->expensereport->lire)
|
||||
{
|
||||
$arrayresult['searchintoexpensereport']=array('img'=>'object_trip', 'label'=>$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'text'=>img_picto('','object_trip').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintoexpensereport']=array('position'=>210, 'img'=>'object_trip', 'label'=>$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'text'=>img_picto('','object_trip').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
if (! empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->rights->holiday->read)
|
||||
{
|
||||
$arrayresult['searchintoleaves']=array('img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('','object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&sall='.urlencode($search_boxvalue));
|
||||
$arrayresult['searchintoleaves']=array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('','object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&sall='.urlencode($search_boxvalue));
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ if (! empty($conf->hrm->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_EMPLO
|
||||
*/
|
||||
|
||||
// Execute hook addSearchEntry
|
||||
$parameters=array('search_boxvalue'=>$search_boxvalue);
|
||||
$parameters=array('search_boxvalue'=>$search_boxvalue, 'arrayresult'=>$arrayresult);
|
||||
$reshook=$hookmanager->executeHooks('addSearchEntry',$parameters);
|
||||
if (empty($reshook))
|
||||
{
|
||||
@@ -155,6 +155,8 @@ if (empty($reshook))
|
||||
}
|
||||
else $arrayresult=$hookmanager->resArray;
|
||||
|
||||
// Sort on position
|
||||
$arrayresult = dol_sort_array($arrayresult, 'position');
|
||||
|
||||
// Print output if called by ajax or do nothing (var $arrayresult will be used) if called by an include
|
||||
if (! isset($usedbyinclude) || empty($usedbyinclude))
|
||||
|
||||
@@ -128,7 +128,7 @@ class Form
|
||||
}
|
||||
|
||||
/**
|
||||
* Output val field for an editable field
|
||||
* Output value of a field for an editable field
|
||||
*
|
||||
* @param string $text Text of label (not used in this function)
|
||||
* @param string $htmlname Name of select field
|
||||
@@ -141,9 +141,10 @@ class Form
|
||||
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
|
||||
* @param string $moreparam More param to add on a href URL
|
||||
* @param int $notabletag Do no output table tags
|
||||
* @param string $formatfunc Call a specific function to output field
|
||||
* @return string HTML edit field
|
||||
*/
|
||||
function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='', $notabletag=0)
|
||||
function editfieldval($text, $htmlname, $value, $object, $perm, $typeofdata='string', $editvalue='', $extObject=null, $custommsg=null, $moreparam='', $notabletag=0, $formatfunc='')
|
||||
{
|
||||
global $conf,$langs,$db;
|
||||
|
||||
@@ -257,6 +258,11 @@ class Form
|
||||
$ret.=$tmpcontent;
|
||||
}
|
||||
else $ret.=$value;
|
||||
|
||||
if ($formatfunc && method_exists($object, $formatfunc))
|
||||
{
|
||||
$ret=$object->$formatfunc($ret);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
|
||||
@@ -5287,13 +5287,15 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
|
||||
$substitutionarray['__THIRDPARTY_ID__'] = '__THIRDPARTY_ID__';
|
||||
$substitutionarray['__THIRDPARTY_NAME__'] = '__THIRDPARTY_NAME__';
|
||||
|
||||
$substitutionarray['__MEMBER_CIVILITY__'] = '__MEMBER_CIVILITY__';
|
||||
$substitutionarray['__MEMBER_FIRSTNAME__'] = '__MEMBER_FIRSTNAME__';
|
||||
$substitutionarray['__MEMBER_LASTNAME__'] = '__MEMBER_LASTNAME__';
|
||||
|
||||
if (is_object($object) && $object->element == 'shipping')
|
||||
{
|
||||
$substitutionarray['__MEMBER_CIVILITY__'] = '__MEMBER_CIVILITY__';
|
||||
$substitutionarray['__MEMBER_FIRSTNAME__'] = '__MEMBER_FIRSTNAME__';
|
||||
$substitutionarray['__MEMBER_LASTNAME__'] = '__MEMBER_LASTNAME__';
|
||||
}
|
||||
$substitutionarray['__PROJECT_ID__'] = '__PROJECT_ID__';
|
||||
$substitutionarray['__PROJECT_REF__'] = '__PROJECT_REF__';
|
||||
$substitutionarray['__PROJECT_NAME__'] = '__PROJECT_REF__';
|
||||
$substitutionarray['__PROJECT_NAME__'] = '__PROJECT_NAME__';
|
||||
|
||||
$substitutionarray['__CONTRACT_HIGHEST_PLANNED_START_DATE__'] = 'Highest date planned for a service start';
|
||||
$substitutionarray['__CONTRACT_HIGHEST_PLANNED_START_DATETIME__'] = 'Highest date and hour planned for service start';
|
||||
@@ -5307,9 +5309,11 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
|
||||
$substitutionarray['__SECUREKEYPAYMENT_INVOICE__'] = 'Security key for payment on an invoice';
|
||||
$substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = 'Security key for payment on a a service';
|
||||
|
||||
$substitutionarray['__SHIPPINGTRACKNUM__']='Shipping tacking number';
|
||||
$substitutionarray['__SHIPPINGTRACKNUMURL__']='Shipping tracking url';
|
||||
|
||||
if (is_object($object) && $object->element == 'shipping')
|
||||
{
|
||||
$substitutionarray['__SHIPPINGTRACKNUM__']='Shipping tacking number';
|
||||
$substitutionarray['__SHIPPINGTRACKNUMURL__']='Shipping tracking url';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5396,6 +5400,11 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob
|
||||
$substitutionarray['__AMOUNT__'] = is_object($object)?$object->total_ttc:'';
|
||||
$substitutionarray['__AMOUNT_EXCL_TAX__'] = is_object($object)?$object->total_ht:'';
|
||||
$substitutionarray['__AMOUNT_VAT__'] = is_object($object)?($object->total_vat?$object->total_vat:$object->total_tva):'';
|
||||
/* TODO Add key for multicurrency
|
||||
$substitutionarray['__AMOUNT_FORMATED__'] = is_object($object)?price($object->total_ttc, 0, $outputlangs, 0, 0, -1, $conf->currency_code):'';
|
||||
$substitutionarray['__AMOUNT_EXCL_TAX_FORMATED__'] = is_object($object)?price($object->total_ht, 0, $outputlangs, 0, 0, -1, $conf->currency_code):'';
|
||||
$substitutionarray['__AMOUNT_VAT_FORMATED__'] = is_object($object)?($object->total_vat?price($object->total_vat, 0, $outputlangs, 0, 0, -1, $conf->currency_code):price($object->total_tva, 0, $outputlangs, 0, 0, -1, $conf->currency_code)):'';
|
||||
*/
|
||||
// For backward compatibility
|
||||
if ($onlykey != 2)
|
||||
{
|
||||
|
||||
@@ -663,15 +663,12 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
|
||||
print "</td>";
|
||||
|
||||
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY))
|
||||
{
|
||||
// Thirdparty
|
||||
print '<td class="tdoverflowmax100">';
|
||||
$thirdpartystatic->id=$lines[$i]->socid;
|
||||
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
|
||||
print $thirdpartystatic->getNomUrl(1, 'project', 10);
|
||||
print '</td>';
|
||||
}
|
||||
// Thirdparty
|
||||
print '<td class="tdoverflowmax100">';
|
||||
$thirdpartystatic->id=$lines[$i]->socid;
|
||||
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
|
||||
print $thirdpartystatic->getNomUrl(1, 'project', 10);
|
||||
print '</td>';
|
||||
|
||||
// Ref
|
||||
print '<td>';
|
||||
@@ -897,15 +894,12 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
print $projectstatic->getNomUrl(1,'',0,$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]);
|
||||
print "</td>";
|
||||
|
||||
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY))
|
||||
{
|
||||
// Thirdparty
|
||||
print '<td class="tdoverflowmax100">';
|
||||
$thirdpartystatic->id=$lines[$i]->thirdparty_id;
|
||||
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
|
||||
print $thirdpartystatic->getNomUrl(1, 'project');
|
||||
print '</td>';
|
||||
}
|
||||
// Thirdparty
|
||||
print '<td class="tdoverflowmax100">';
|
||||
$thirdpartystatic->id=$lines[$i]->thirdparty_id;
|
||||
$thirdpartystatic->name=$lines[$i]->thirdparty_name;
|
||||
print $thirdpartystatic->getNomUrl(1, 'project');
|
||||
print '</td>';
|
||||
|
||||
// Ref
|
||||
print '<td class="nowrap">';
|
||||
|
||||
@@ -25,6 +25,28 @@
|
||||
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
|
||||
|
||||
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_bookkeeping MODIFY numero_compte VARCHAR(20) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_bookkeeping MODIFY numero_compte VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_journal MODIFY code VARCHAR(20) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_journal MODIFY code VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_bank_account MODIFY accountancy_journal VARCHAR(20) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_bank_account MODIFY accountancy_journal VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_c_type_fees MODIFY accountancy_code VARCHAR(32) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_c_type_fees MODIFY accountancy_code VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||
|
||||
|
||||
-- Missing in 5.0
|
||||
ALTER TABLE llx_user MODIFY login varchar(50) NOT NULL;
|
||||
|
||||
@@ -334,23 +356,6 @@ DELETE FROM llx_const WHERE name = __ENCRYPT('ACCOUNTING_EXPORT_DEVISE')__;
|
||||
DELETE FROM llx_const WHERE name = __ENCRYPT('ACCOUNTING_EXPORT_PIECE')__;
|
||||
DELETE FROM llx_const WHERE name = __ENCRYPT('ACCOUNTING_EXPENSEREPORT_JOURNAL')__;
|
||||
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_bookkeeping MODIFY numero_compte VARCHAR(20) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_bookkeeping MODIFY numero_compte VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_batch MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_sell VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product MODIFY accountancy_code_buy VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_c_type_fees MODIFY accountancy_code VARCHAR(32) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_c_type_fees MODIFY accountancy_code VARCHAR(32) COLLATE utf8_unicode_ci;
|
||||
|
||||
ALTER TABLE llx_c_paiement DROP PRIMARY KEY;
|
||||
ALTER TABLE llx_c_paiement ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER id;
|
||||
ALTER TABLE llx_c_paiement DROP INDEX uk_c_paiement;
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_account MODIFY account_number VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_bookkeeping MODIFY numero_compte VARCHAR(20) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_bookkeeping MODIFY numero_compte VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_journal MODIFY code VARCHAR(20) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_accounting_journal MODIFY code VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_bank_account MODIFY accountancy_journal VARCHAR(20) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_bank_account MODIFY accountancy_journal VARCHAR(20) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_stock_mouvement MODIFY batch VARCHAR(30) COLLATE utf8_unicode_ci;
|
||||
-- VMYSQLUTF8UNICODECI ALTER TABLE llx_product_lot MODIFY batch VARCHAR(30) CHARACTER SET utf8;
|
||||
|
||||
@@ -1627,7 +1627,7 @@ ProjectsSetup=Project module setup
|
||||
ProjectsModelModule=Project reports document model
|
||||
TasksNumberingModules=Tasks numbering module
|
||||
TaskModelModule=Tasks reports document model
|
||||
UseSearchToSelectProject=Use autocompletion fields to choose project (instead of using a list box)
|
||||
UseSearchToSelectProject=Wait you press a key before loading content of project combo list (This may increase performance if you have a large number of project, but it is less convenient)
|
||||
##### ECM (GED) #####
|
||||
##### Fiscal Year #####
|
||||
AccountingPeriods=Accounting periods
|
||||
|
||||
@@ -81,8 +81,8 @@ class ActionsMyModule
|
||||
/* print_r($parameters); print_r($object); echo "action: " . $action; */
|
||||
if (in_array($parameters['currentcontext'], array('somecontext1','somecontext2'))) // do something only for the context 'somecontext1' or 'somecontext2'
|
||||
{
|
||||
|
||||
|
||||
// Do what you want here...
|
||||
// You can for example call global vars like $fieldstosearchall to overwrite them, or update database depending on $action and $_POST values.
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
|
||||
@@ -369,7 +369,7 @@ if (! empty($moreforfilter))
|
||||
|
||||
$varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage;
|
||||
$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
$selectedfields.=$form->showCheckAddButtons('checkforselect', 1);
|
||||
$selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"").'">'."\n";
|
||||
@@ -633,7 +633,7 @@ print '</div>'."\n";
|
||||
|
||||
print '</form>'."\n";
|
||||
|
||||
if ($nbtotalofrecords === '' || $nbtotalofrecords)
|
||||
if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
|
||||
{
|
||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
||||
{
|
||||
|
||||
@@ -444,7 +444,7 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
|
||||
|
||||
print '<tr class="liste_titre_filter">';
|
||||
print '<td class="liste_titre"><input type="text" size="4" name="search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>';
|
||||
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY)) print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" size="4" name="search_task_ref" value="'.dol_escape_htmltag($search_task_ref).'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" size="4" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
@@ -463,10 +463,7 @@ print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("ProjectRef").'</td>';
|
||||
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY))
|
||||
{
|
||||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||
}
|
||||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||
print '<td>'.$langs->trans("RefTask").'</td>';
|
||||
print '<td>'.$langs->trans("LabelTask").'</td>';
|
||||
print '<td align="right" class="maxwidth100">'.$langs->trans("PlannedWorkload").'</td>';
|
||||
@@ -498,8 +495,7 @@ if (count($tasksarray) > 0)
|
||||
$j=0;
|
||||
projectLinesPerDay($j, 0, $usertoprocess, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restrictviewformytask, $daytoparse, $isavailable);
|
||||
|
||||
$colspan = 8;
|
||||
if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY)) $colspan++;
|
||||
$colspan = 9;
|
||||
|
||||
print '<tr class="liste_total">
|
||||
<td class="liste_total" colspan="'.$colspan.'">';
|
||||
|
||||
@@ -440,7 +440,7 @@ print '<table class="tagtable liste'.($moreforfilter?" listwithfilterbefore":"")
|
||||
|
||||
print '<tr class="liste_titre_filter">';
|
||||
print '<td class="liste_titre"><input type="text" size="4" name="search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>';
|
||||
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY)) print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" size="4" name="search_thirdparty" value="'.dol_escape_htmltag($search_thirdparty).'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" size="4" name="search_task_ref" value="'.dol_escape_htmltag($search_task_ref).'"></td>';
|
||||
print '<td class="liste_titre"><input type="text" size="4" name="search_task_label" value="'.dol_escape_htmltag($search_task_label).'"></td>';
|
||||
print '<td class="liste_titre"></td>';
|
||||
@@ -460,10 +460,7 @@ print "</tr>\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("ProjectRef").'</td>';
|
||||
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY))
|
||||
{
|
||||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||
}
|
||||
print '<td>'.$langs->trans("ThirdParty").'</td>';
|
||||
print '<td>'.$langs->trans("RefTask").'</td>';
|
||||
print '<td>'.$langs->trans("LabelTask").'</td>';
|
||||
print '<td align="right" class="maxwidth75">'.$langs->trans("PlannedWorkload").'</td>';
|
||||
@@ -511,8 +508,7 @@ if (count($tasksarray) > 0)
|
||||
$level=0;
|
||||
projectLinesPerWeek($j, $firstdaytoshow, $usertoprocess, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restrictviewformytask, $isavailable);
|
||||
|
||||
$colspan=7;
|
||||
if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY)) $colspan++;
|
||||
$colspan=8;
|
||||
|
||||
print '<tr class="liste_total">
|
||||
<td class="liste_total" colspan="'.$colspan.'">';
|
||||
|
||||
@@ -912,10 +912,10 @@ print '</tr>';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("AllowToSelectProjectFromOtherCompany").'</td>';
|
||||
|
||||
print '<td align="center" width="300">';
|
||||
print '<td align="center"> </td>';
|
||||
print '<td align="center">';
|
||||
echo ajax_constantonoff('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY');
|
||||
print '</td>';
|
||||
print '<td align="center" width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
/* Kept as hidden feature because this will be "probaly be supported by standard event feature in a future
|
||||
|
||||
@@ -165,7 +165,7 @@ if ($resql)
|
||||
|
||||
$object = null; // Not defined with mass emailing
|
||||
$parameters=array('mode'=>'emailing');
|
||||
$substitutionarray=getCommonSubstitutionArray($langs, 2, array('object','objectamount'), $object); // Note: On mass emailing, this is null because we don't know object
|
||||
$substitutionarray=getCommonSubstitutionArray($langs, 0, array('object','objectamount'), $object); // Note: On mass emailing, this is null because we don't know object
|
||||
|
||||
// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)
|
||||
$substitutionarray['__ID__'] = $obj->source_id;
|
||||
|
||||
Reference in New Issue
Block a user