Qual: Ignore/workaround SuspiciousParamOrder detection (#28688)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)

* Qual: Ignore/workaround SuspiciousParamOrder detction

# Qual: Ignore/workaround SuspiciousParamOrder detction

Ignore the false positive SuspiciousParamOrder or workaround (rename vars)
This commit is contained in:
MDW 2024-03-08 12:34:25 +01:00 committed by GitHub
parent 6cce456b8c
commit 7fd606b336
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
100 changed files with 1141 additions and 1007 deletions

View File

@ -289,7 +289,7 @@ class Lettering extends BookKeeping
{
$error = 0;
// Generate a string with n char A where n is ACCOUNTING_LETTERING_NBLETTERS (So 'AA', 'AAA', ...)
// Generate a string with n char A where n is ACCOUNTING_LETTERING_NBLETTERS (So 'AA', 'AAA', ...) @phan-suppress-next-line PhanParamSuspiciousOrder
$lettre = str_pad("", getDolGlobalInt('ACCOUNTING_LETTERING_NBLETTERS', 3), "A");
$sql = "SELECT DISTINCT ab2.lettering_code";

View File

@ -175,7 +175,7 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, fd.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched"), $help_url);
@ -386,6 +386,7 @@ if ($result) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneCustomer").'</span><br>';

View File

@ -230,7 +230,7 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, l.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("CustomersVentilation"), $help_url);
@ -445,8 +445,8 @@ if ($result) {
}
$arrayofmassactions = array(
'ventil'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Ventilate")
,'set_default_account'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ConfirmPreselectAccount")
'ventil' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Ventilate")
,'set_default_account' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ConfirmPreselectAccount")
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
);
@ -467,10 +467,11 @@ if ($result) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
if ($massaction == 'set_default_account') {
$formquestion[]=array('type' => 'other',
$formquestion[] = array('type' => 'other',
'name' => 'set_default_account',
'label' => $langs->trans("AccountancyCode"),
'value' => $formaccounting->select_account('', 'default_account', 1, array(), 0, 0, 'maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'));
@ -599,26 +600,26 @@ if ($result) {
$facture_static_det->desc = $objp->description;
$accountingAccountArray = array(
'dom'=>$objp->aarowid,
'intra'=>$objp->aarowid_intra,
'export'=>$objp->aarowid_export,
'thirdparty' =>$objp->aarowid_thirdparty);
'dom' => $objp->aarowid,
'intra' => $objp->aarowid_intra,
'export' => $objp->aarowid_export,
'thirdparty' => $objp->aarowid_thirdparty);
$code_sell_p_notset = '';
$code_sell_t_notset = '';
$suggestedid = 0;
$return=$accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'customer');
if (!is_array($return) && $return<0) {
$return = $accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'customer');
if (!is_array($return) && $return < 0) {
setEventMessage($accountingAccount->error, 'errors');
} else {
$suggestedid=$return['suggestedid'];
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
$suggestedaccountingaccountbydefaultfor=$return['suggestedaccountingaccountbydefaultfor'];
$code_sell_l=$return['code_l'];
$code_sell_p=$return['code_p'];
$code_sell_t=$return['code_t'];
$suggestedid = $return['suggestedid'];
$suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor'];
$suggestedaccountingaccountbydefaultfor = $return['suggestedaccountingaccountbydefaultfor'];
$code_sell_l = $return['code_l'];
$code_sell_p = $return['code_p'];
$code_sell_t = $return['code_t'];
}
//var_dump($return);
@ -780,7 +781,7 @@ if ($result) {
if (!empty($toselect)) {
$ischecked = 0;
if (in_array($objp->rowid."_".$i, $toselect)) {
$ischecked=1;
$ischecked = 1;
}
}

View File

@ -165,7 +165,7 @@ if (GETPOST('sortfield') == 'erd.date, erd.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("ExpenseReportsVentilation").' - '.$langs->trans("Dispatched"), $help_url);
@ -308,6 +308,7 @@ if ($result) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("ExpenseReportLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneExpenseReport").'</span><br>';
@ -438,7 +439,7 @@ if ($result) {
$i++;
}
if ($num_lines == 0) {
$colspan=10;
$colspan = 10;
if (getDolGlobalString('ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE')) {
$colspan++;
}

View File

@ -221,7 +221,7 @@ if (GETPOST('sortfield') == 'erd.date, erd.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url);
@ -376,6 +376,7 @@ if ($result) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("ExpenseReportLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
print '<span class="opacitymedium">'.$langs->trans("DescVentilTodoExpenseReport").'</span></br><br>';

View File

@ -180,7 +180,7 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, l.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("SuppliersVentilation").' - '.$langs->trans("Dispatched"), $help_url);
@ -394,6 +394,7 @@ if ($result) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("InvoiceLinesDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
print '<span class="opacitymedium">'.$langs->trans("DescVentilDoneSupplier").'</span><br>';

View File

@ -232,7 +232,7 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, l.rowid') {
$form = new Form($db);
$formother = new FormOther($db);
$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilit&eacute;_en_Partie_Double#Liaisons_comptables';
llxHeader('', $langs->trans("SuppliersVentilation"), $help_url);
@ -452,8 +452,8 @@ if ($result) {
}
$arrayofmassactions = array(
'ventil'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Ventilate")
,'set_default_account'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ConfirmPreselectAccount")
'ventil' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Ventilate")
,'set_default_account' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("ConfirmPreselectAccount")
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
);
@ -474,10 +474,11 @@ if ($result) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
if ($massaction == 'set_default_account') {
$formquestion[]=array('type' => 'other',
$formquestion[] = array('type' => 'other',
'name' => 'set_default_account',
'label' => $langs->trans("AccountancyCode"),
'value' => $formaccounting->select_account('', 'default_account', 1, array(), 0, 0, 'maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'));
@ -611,26 +612,26 @@ if ($result) {
$facturefourn_static_det->desc = $objp->description;
$accountingAccountArray = array(
'dom'=>$objp->aarowid,
'intra'=>$objp->aarowid_intra,
'export'=>$objp->aarowid_export,
'thirdparty' =>$objp->aarowid_thirdparty);
'dom' => $objp->aarowid,
'intra' => $objp->aarowid_intra,
'export' => $objp->aarowid_export,
'thirdparty' => $objp->aarowid_thirdparty);
$code_buy_p_notset = '';
$code_buy_t_notset = '';
$suggestedid = 0;
$return=$accountingAccount->getAccountingCodeToBind($mysoc, $thirdpartystatic, $product_static, $facturefourn_static, $facturefourn_static_det, $accountingAccountArray, 'supplier');
if (!is_array($return) && $return<0) {
$return = $accountingAccount->getAccountingCodeToBind($mysoc, $thirdpartystatic, $product_static, $facturefourn_static, $facturefourn_static_det, $accountingAccountArray, 'supplier');
if (!is_array($return) && $return < 0) {
setEventMessage($accountingAccount->error, 'errors');
} else {
$suggestedid=$return['suggestedid'];
$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
$suggestedaccountingaccountbydefaultfor=$return['suggestedaccountingaccountbydefaultfor'];
$code_buy_l=$return['code_l'];
$code_buy_p=$return['code_p'];
$code_buy_t=$return['code_t'];
$suggestedid = $return['suggestedid'];
$suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor'];
$suggestedaccountingaccountbydefaultfor = $return['suggestedaccountingaccountbydefaultfor'];
$code_buy_l = $return['code_l'];
$code_buy_p = $return['code_p'];
$code_buy_t = $return['code_t'];
}
//var_dump($return);
@ -783,7 +784,7 @@ if ($result) {
if (!empty($toselect)) {
$ischecked = 0;
if (in_array($objp->rowid."_".$i, $toselect)) {
$ischecked=1;
$ischecked = 1;
}
}

View File

@ -130,7 +130,7 @@ $linkofpubliclist = DOL_MAIN_URL_ROOT.'/public/members/public_list.php'.((isModE
* Actions
*/
$parameters = array('id'=>$id, 'rowid'=>$id, 'objcanvas'=>$objcanvas, 'confirm'=>$confirm);
$parameters = array('id' => $id, 'rowid' => $id, 'objcanvas' => $objcanvas, 'confirm' => $confirm);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -1044,7 +1044,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Gender
print '<tr><td>'.$langs->trans("Gender").'</td>';
print '<td>';
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother"));
$arraygender = array('man' => $langs->trans("Genderman"), 'woman' => $langs->trans("Genderwoman"), 'other' => $langs->trans("Genderother"));
print $form->selectarray('gender', $arraygender, GETPOST('gender', 'alphanohtml'), 1, 0, 0, '', 0, 0, 0, '', '', 1);
print '</td></tr>';
@ -1275,7 +1275,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
// Gender
print '<tr><td>'.$langs->trans("Gender").'</td>';
print '<td>';
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother"));
$arraygender = array('man' => $langs->trans("Genderman"), 'woman' => $langs->trans("Genderwoman"), 'other' => $langs->trans("Genderother"));
print $form->selectarray('gender', $arraygender, GETPOSTISSET('gender') ? GETPOST('gender', 'alphanohtml') : $object->gender, 1, 0, 0, '', 0, 0, 0, '', '', 1);
print '</td></tr>';
@ -1480,7 +1480,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
);
if (isModEnabled('societe') && $object->socid > 0) {
$object->fetch_thirdparty();
$formquestion[] = array('label' => $langs->trans("UserWillBe"), 'type' => 'radio', 'name' => 'internalorexternal', 'default'=>'external', 'values' => array('external'=>$langs->trans("External").' - '.$langs->trans("LinkedToDolibarrThirdParty").' '.$object->thirdparty->getNomUrl(1, '', 0, 1), 'internal'=>$langs->trans("Internal")));
$formquestion[] = array('label' => $langs->trans("UserWillBe"), 'type' => 'radio', 'name' => 'internalorexternal', 'default' => 'external', 'values' => array('external' => $langs->trans("External").' - '.$langs->trans("LinkedToDolibarrThirdParty").' '.$object->thirdparty->getNomUrl(1, '', 0, 1), 'internal' => $langs->trans("Internal")));
}
$text = '';
if (isModEnabled('societe') && $object->socid <= 0) {
@ -1563,6 +1563,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$helpcontent .= "<br>";
$helpcontent .= '<b>'.$langs->trans("Content").'</b>:<br>';
$helpcontent .= dol_htmlentitiesbr($texttosend)."\n";
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$label = $form->textwithpicto($tmp, $helpcontent, 1, 'help');
// Create form popup
@ -1571,10 +1572,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$formquestion[] = array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => (getDolGlobalString('ADHERENT_DEFAULT_SENDINFOBYMAIL') ? true : false));
}
if (isModEnabled('mailman') && getDolGlobalString('ADHERENT_USE_MAILMAN')) {
$formquestion[] = array('type'=>'other', 'label'=>$langs->transnoentitiesnoconv("SynchroMailManEnabled"), 'value'=>'');
$formquestion[] = array('type' => 'other', 'label' => $langs->transnoentitiesnoconv("SynchroMailManEnabled"), 'value' => '');
}
if (isModEnabled('mailman') && getDolGlobalString('ADHERENT_USE_SPIP')) {
$formquestion[] = array('type'=>'other', 'label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"), 'value'=>'');
$formquestion[] = array('type' => 'other', 'label' => $langs->transnoentitiesnoconv("SynchroSpipEnabled"), 'value' => '');
}
print $form->formconfirm("card.php?rowid=".$id, $langs->trans("ValidateMember"), $langs->trans("ConfirmValidateMember"), "confirm_valid", $formquestion, 'yes', 1, 220);
}
@ -1626,6 +1627,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$helpcontent .= "<br>";
$helpcontent .= '<b>'.$langs->trans("Content").'</b>:<br>';
$helpcontent .= dol_htmlentitiesbr($texttosend)."\n";
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$label = $form->textwithpicto($tmp, $helpcontent, 1, 'help');
// Create an array
@ -1686,6 +1688,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
$helpcontent .= "<br>";
$helpcontent .= '<b>'.$langs->trans("Content").'</b>:<br>';
$helpcontent .= dol_htmlentitiesbr($texttosend)."\n";
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$label = $form->textwithpicto($tmp, $helpcontent, 1, 'help');
// Create an array

View File

@ -132,49 +132,49 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'd.ref'=>'Ref',
'd.login'=>'Login',
'd.lastname'=>'Lastname',
'd.firstname'=>'Firstname',
'd.societe'=>"Company",
'd.email'=>'EMail',
'd.address'=>'Address',
'd.zip'=>'Zip',
'd.town'=>'Town',
'd.phone'=>"Phone",
'd.phone_perso'=>"PhonePerso",
'd.phone_mobile'=>"PhoneMobile",
'd.note_public'=>'NotePublic',
'd.note_private'=>'NotePrivate',
'd.ref' => 'Ref',
'd.login' => 'Login',
'd.lastname' => 'Lastname',
'd.firstname' => 'Firstname',
'd.societe' => "Company",
'd.email' => 'EMail',
'd.address' => 'Address',
'd.zip' => 'Zip',
'd.town' => 'Town',
'd.phone' => "Phone",
'd.phone_perso' => "PhonePerso",
'd.phone_mobile' => "PhoneMobile",
'd.note_public' => 'NotePublic',
'd.note_private' => 'NotePrivate',
);
$arrayfields = array(
'd.ref'=>array('label'=>"Ref", 'checked'=>1),
'd.civility'=>array('label'=>"Civility", 'checked'=>0),
'd.lastname'=>array('label'=>"Lastname", 'checked'=>1),
'd.firstname'=>array('label'=>"Firstname", 'checked'=>1),
'd.gender'=>array('label'=>"Gender", 'checked'=>0),
'd.company'=>array('label'=>"Company", 'checked'=>1, 'position'=>70),
'd.login'=>array('label'=>"Login", 'checked'=>1),
'd.morphy'=>array('label'=>"MemberNature", 'checked'=>1),
't.libelle'=>array('label'=>"Type", 'checked'=>1, 'position'=>55),
'd.address'=>array('label'=>"Address", 'checked'=>0),
'd.zip'=>array('label'=>"Zip", 'checked'=>0),
'd.town'=>array('label'=>"Town", 'checked'=>0),
'd.phone'=>array('label'=>"Phone", 'checked'=>0),
'd.phone_perso'=>array('label'=>"PhonePerso", 'checked'=>0),
'd.phone_mobile'=>array('label'=>"PhoneMobile", 'checked'=>0),
'd.email'=>array('label'=>"Email", 'checked'=>1),
'state.nom'=>array('label'=>"State", 'checked'=>0, 'position'=>90),
'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>95),
'd.ref' => array('label' => "Ref", 'checked' => 1),
'd.civility' => array('label' => "Civility", 'checked' => 0),
'd.lastname' => array('label' => "Lastname", 'checked' => 1),
'd.firstname' => array('label' => "Firstname", 'checked' => 1),
'd.gender' => array('label' => "Gender", 'checked' => 0),
'd.company' => array('label' => "Company", 'checked' => 1, 'position' => 70),
'd.login' => array('label' => "Login", 'checked' => 1),
'd.morphy' => array('label' => "MemberNature", 'checked' => 1),
't.libelle' => array('label' => "Type", 'checked' => 1, 'position' => 55),
'd.address' => array('label' => "Address", 'checked' => 0),
'd.zip' => array('label' => "Zip", 'checked' => 0),
'd.town' => array('label' => "Town", 'checked' => 0),
'd.phone' => array('label' => "Phone", 'checked' => 0),
'd.phone_perso' => array('label' => "PhonePerso", 'checked' => 0),
'd.phone_mobile' => array('label' => "PhoneMobile", 'checked' => 0),
'd.email' => array('label' => "Email", 'checked' => 1),
'state.nom' => array('label' => "State", 'checked' => 0, 'position' => 90),
'country.code_iso' => array('label' => "Country", 'checked' => 0, 'position' => 95),
/*'d.note_public'=>array('label'=>"NotePublic", 'checked'=>0),
'd.note_private'=>array('label'=>"NotePrivate", 'checked'=>0),*/
'd.datefin'=>array('label'=>"EndSubscription"),
'd.datec'=>array('label'=>"DateCreation"),
'd.birth'=>array('label'=>"Birthday"),
'd.tms'=>array('label'=>"DateModificationShort"),
'd.statut'=>array('label'=>"Status"),
'd.import_key'=>array('label'=>"ImportId"),
'd.datefin' => array('label' => "EndSubscription"),
'd.datec' => array('label' => "DateCreation"),
'd.birth' => array('label' => "Birthday"),
'd.tms' => array('label' => "DateModificationShort"),
'd.statut' => array('label' => "Status"),
'd.import_key' => array('label' => "ImportId"),
);
// Extra fields
@ -195,8 +195,8 @@ foreach ($object->fields as $key => $val) {
$visible = (int) dol_eval($val['visible'], 1);
$arrayfields[$tableprefix.'.'.$key] = array(
'label' => $val['label'],
'checked' =>(($visible < 0) ? 0 : 1),
'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)),
'checked' => (($visible < 0) ? 0 : 1),
'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)),
'position' => $val['position'],
'help' => isset($val['help']) ? $val['help'] : ''
);
@ -221,7 +221,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
$massaction = '';
}
$parameters = array('socid'=>isset($socid) ? $socid : null);
$parameters = array('socid' => isset($socid) ? $socid : null);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -762,8 +762,8 @@ print '<input type="hidden" name="mode" value="'.$mode.'">';
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
if ($user->hasRight('adherent', 'creer')) {
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create');
@ -893,7 +893,7 @@ if (!empty($arrayfields['d.lastname']['checked'])) {
// Gender
if (!empty($arrayfields['d.gender']['checked'])) {
print '<td class="liste_titre">';
$arraygender = array('man'=>$langs->trans("Genderman"), 'woman'=>$langs->trans("Genderwoman"), 'other'=>$langs->trans("Genderother"));
$arraygender = array('man' => $langs->trans("Genderman"), 'woman' => $langs->trans("Genderwoman"), 'other' => $langs->trans("Genderother"));
print $form->selectarray('search_gender', $arraygender, $search_gender, 1);
print '</td>';
}
@ -913,7 +913,7 @@ if (!empty($arrayfields['d.login']['checked'])) {
// Nature
if (!empty($arrayfields['d.morphy']['checked'])) {
print '<td class="liste_titre center">';
$arraymorphy = array('mor'=>$langs->trans("Moral"), 'phy'=>$langs->trans("Physical"));
$arraymorphy = array('mor' => $langs->trans("Moral"), 'phy' => $langs->trans("Physical"));
print $form->selectarray('search_morphy', $arraymorphy, $search_morphy, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
print '</td>';
}
@ -925,6 +925,7 @@ if (!empty($arrayfields['t.libelle']['checked'])) {
if (!empty($arrayfields['t.libelle']['checked'])) {
print '<td class="liste_titre">';
$listetype = $membertypestatic->liste_array();
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray("search_type", $listetype, $search_type, 1, 0, 0, '', 0, 32);
print '</td>';
}
@ -989,7 +990,7 @@ if (!empty($arrayfields['d.email']['checked'])) {
if (!empty($arrayfields['d.datefin']['checked'])) {
print '<td class="liste_titre center">';
//$selectarray = array('-1'=>'', 'withoutsubscription'=>$langs->trans("WithoutSubscription"), 'uptodate'=>$langs->trans("UpToDate"), 'outofdate'=>$langs->trans("OutOfDate"));
$selectarray = array('-1'=>'', 'waitingsubscription'=>$langs->trans("WaitingSubscription"), 'uptodate'=>$langs->trans("UpToDate"), 'outofdate'=>$langs->trans("OutOfDate"));
$selectarray = array('-1' => '', 'waitingsubscription' => $langs->trans("WaitingSubscription"), 'uptodate' => $langs->trans("UpToDate"), 'outofdate' => $langs->trans("OutOfDate"));
print $form->selectarray('search_filter', $selectarray, $search_filter);
print '</td>';
}
@ -998,7 +999,7 @@ if (!empty($arrayfields['d.datefin']['checked'])) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// 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
print $hookmanager->resPrint;
@ -1046,8 +1047,9 @@ if (!empty($arrayfields['d.statut']['checked'])) {
Adherent::STATUS_DRAFT => $langs->trans("Draft"),
Adherent::STATUS_VALIDATED => $langs->trans("Validated"),
Adherent::STATUS_RESILIATED => $langs->trans("MemberStatusResiliatedShort"),
Adherent::STATUS_EXCLUDED =>$langs->trans("MemberStatusExcludedShort")
Adherent::STATUS_EXCLUDED => $langs->trans("MemberStatusExcludedShort")
);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, -3, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage');
print '</td>';
}
@ -1156,7 +1158,7 @@ if (!empty($arrayfields['d.datefin']['checked'])) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'totalarray'=>&$totalarray, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$parameters = array('arrayfields' => $arrayfields, 'totalarray' => &$totalarray, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
@ -1465,7 +1467,7 @@ while ($i < $imaxinloop) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
@ -1551,7 +1553,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql' => $sql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -1097,7 +1097,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
if (!getDolGlobalString('ADHERENT_VAT_FOR_SUBSCRIPTIONS') || getDolGlobalString('ADHERENT_VAT_FOR_SUBSCRIPTIONS') != 'defaultforfoundationcountry') {
print '. <span class="opacitymedium">'.$langs->trans("NoVatOnSubscription", 0).'</span>';
}
if (getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && (isModEnabled('product')|| isModEnabled('service'))) {
if (getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && (isModEnabled('product') || isModEnabled('service'))) {
$prodtmp = new Product($db);
$result = $prodtmp->fetch(getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS'));
if ($result < 0) {
@ -1201,6 +1201,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
$langs->load("errors");
$helpcontent .= '<span class="error">'.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Module310Name")).'</span>'."\n";
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->textwithpicto($tmp, $helpcontent, 1, 'help', '', 0, 2, 'helpemailtosend');
}
print '</td></tr>';

View File

@ -948,6 +948,7 @@ foreach ($fieldlist as $field => $value) {
print '<td class="liste_titre"><input type="text" name="search_topic" value="'.dol_escape_htmltag($search_topic).'"></td>';
} elseif ($value == 'type_template') {
print '<td class="liste_titre center">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'minwidth100 maxwidth125', 1, '', 0, 1);
print '</td>';
} elseif (!in_array($value, array('content', 'content_lines'))) {

View File

@ -123,10 +123,10 @@ if ($date_end !== '') {
// Add prefix session
$arrayfields = array(
'e.prefix_session' => array(
'label'=>'UserAgent',
'checked'=>(!getDolGlobalString('AUDIT_ENABLE_PREFIX_SESSION') ? 0 : 1),
'enabled'=>(!getDolGlobalString('AUDIT_ENABLE_PREFIX_SESSION') ? 0 : 1),
'position'=>110
'label' => 'UserAgent',
'checked' => (!getDolGlobalString('AUDIT_ENABLE_PREFIX_SESSION') ? 0 : 1),
'enabled' => (!getDolGlobalString('AUDIT_ENABLE_PREFIX_SESSION') ? 0 : 1),
'position' => 110
)
);
@ -325,6 +325,7 @@ if ($result) {
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $nbtotalofrecords, 'setup', 0, '', '', $limit);
if ($action == 'purge') {

View File

@ -409,7 +409,7 @@ if ($cats < 0) {
// Define data (format for treeview)
$data = array();
$data[] = array('rowid'=>0, 'fk_menu'=>-1, 'title'=>"racine", 'mainmenu'=>'', 'leftmenu'=>'', 'fk_mainmenu'=>'', 'fk_leftmenu'=>'');
$data[] = array('rowid' => 0, 'fk_menu' => -1, 'title' => "racine", 'mainmenu' => '', 'leftmenu' => '', 'fk_mainmenu' => '', 'fk_leftmenu' => '');
foreach ($fulltree as $key => $val) {
$categstatic->id = $val['id'];
$categstatic->ref = $val['label'];
@ -539,6 +539,7 @@ if ($type == Categorie::TYPE_PRODUCT) {
$nbtotalofrecords = '';
$newcardbutton = dolGetButtonTitle($langs->trans("AddProduct"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&categories[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("ProductsAndServices"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'products', 0, $newcardbutton, '', $limit);
@ -626,6 +627,7 @@ if ($type == Categorie::TYPE_CUSTOMER) {
$nbtotalofrecords = '';
$newcardbutton = dolGetButtonTitle($langs->trans("AddThirdParty"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create&client=3&custcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Customers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit);
print '<table class="noborder centpercent">'."\n";
@ -690,7 +692,7 @@ if ($type == Categorie::TYPE_SUPPLIER) {
print '<table class="noborder centpercent">';
print '<tr class="liste_titre"><td>';
print $langs->trans("AddSupplierIntoCategory").' &nbsp;';
$filter ='(s.fournisseur:=:1)';
$filter = '(s.fournisseur:=:1)';
print $form->select_company('', 'elemid', $filter);
print '<input type="submit" class="button buttongen" value="'.$langs->trans("ClassifyInCategory").'"></td>';
print '</tr>';
@ -711,6 +713,7 @@ if ($type == Categorie::TYPE_SUPPLIER) {
$nbtotalofrecords = '';
$newcardbutton = dolGetButtonTitle($langs->trans("AddSupplier"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create&fournisseur=1&suppcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Suppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit);
print '<table class="noborder centpercent">'."\n";
@ -798,6 +801,7 @@ if ($type == Categorie::TYPE_MEMBER) {
$nbtotalofrecords = '';
$newcardbutton = dolGetButtonTitle($langs->trans("AddMember"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create&memcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->hasRight('adherent', 'creer'));
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Member"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit);
print '<table class="noborder centpecent">'."\n";
@ -884,6 +888,7 @@ if ($type == Categorie::TYPE_CONTACT) {
$nbtotalofrecords = '';
$newcardbutton = dolGetButtonTitle($langs->trans("AddContact"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create&contcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Contact"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contact', 0, $newcardbutton, '', $limit);
$objsoc = new Societe($db);
@ -977,6 +982,7 @@ if ($type == Categorie::TYPE_ACCOUNT) {
$nbtotalofrecords = '';
$newcardbutton = '';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Account"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit);
print '<table class="noborder centpecent">'."\n";
@ -1065,6 +1071,7 @@ if ($type == Categorie::TYPE_PROJECT) {
$nbtotalofrecords = '';
$newcardbutton = '';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Project"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'project', 0, $newcardbutton, '', $limit);
print '<table class="noborder centpecent">'."\n";
@ -1152,6 +1159,7 @@ if ($type == Categorie::TYPE_USER) {
$nbtotalofrecords = '';
$newcardbutton = '';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Users"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'user', 0, '', '', $limit);
print '<table class="noborder centpecent">'."\n";
@ -1216,6 +1224,7 @@ if ($type == Categorie::TYPE_WAREHOUSE) {
$nbtotalofrecords = '';
$newcardbutton = '';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Warehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'stock', 0, $newcardbutton, '', $limit);
print '<table class="noborder centpecent">'."\n";
@ -1302,6 +1311,7 @@ if ($type == Categorie::TYPE_TICKET) {
$nbtotalofrecords = '';
$newcardbutton = '';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Ticket"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'ticket', 0, $newcardbutton, '', $limit);

View File

@ -629,6 +629,7 @@ if (empty($reshook) && $action == 'add') {
$repeateventlimitdate = dol_mktime(23, 59, 59, GETPOSTISSET("limitmonth") ? GETPOSTINT("limitmonth") : 1, GETPOSTISSET("limitday") ? GETPOSTINT("limitday") : 1, GETPOSTISSET("limityear") && GETPOSTINT("limityear") < 2100 ? GETPOSTINT("limityear") : 2100, $tzforfullday ? $tzforfullday : 'tzuserrel');
// Set date of end of event
$deltatime = num_between_day($object->datep, $datep);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$datef = dol_time_plus_duree($datef, $deltatime, 'd');
while ($datep <= $repeateventlimitdate && !$error) {

View File

@ -130,6 +130,7 @@ if ($resql) {
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("EventReports"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_agenda', 0, '', '', $limit, 0, 0, 1);
$moreforfilter = '';
@ -177,7 +178,7 @@ if ($resql) {
print '<td class="tdoverflowmax300">';
//print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?page='.$page.'&amp;file='.urlencode($relativepath).'&amp;modulepart=actionsreport">'.img_pdf().'</a>';
$filearray = array('name'=>basename($file), 'fullname'=>$file, 'type'=>'file');
$filearray = array('name' => basename($file), 'fullname' => $file, 'type' => 'file');
$out = '';
// Show file name with link to download

View File

@ -677,6 +677,7 @@ if ($object->fetch($id) >= 0) {
$massactionbutton = '';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $morehtmlcenter, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
print '</form>';

View File

@ -154,14 +154,14 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'c.ref'=>'Ref',
'c.ref_client'=>'RefCustomerOrder',
'pd.description'=>'Description',
's.nom'=>"ThirdParty",
's.name_alias'=>"AliasNameShort",
's.zip'=>"Zip",
's.town'=>"Town",
'c.note_public'=>'NotePublic',
'c.ref' => 'Ref',
'c.ref_client' => 'RefCustomerOrder',
'pd.description' => 'Description',
's.nom' => "ThirdParty",
's.name_alias' => "AliasNameShort",
's.zip' => "Zip",
's.town' => "Town",
'c.note_public' => 'NotePublic',
);
if (empty($user->socid)) {
$fieldstosearchall["c.note_private"] = "NotePrivate";
@ -169,50 +169,50 @@ if (empty($user->socid)) {
$checkedtypetiers = 0;
$arrayfields = array(
'c.ref'=>array('label'=>"Ref", 'checked'=>1, 'position'=>5, 'searchall'=>1),
'c.ref_client'=>array('label'=>"RefCustomerOrder", 'checked'=>-1, 'position'=>10, 'searchall'=>1),
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>-1, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>20),
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>25),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30, 'searchall'=>1),
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1, 'position'=>31, 'searchall'=>1),
's2.nom'=>array('label'=>'ParentCompany', 'position'=>32, 'checked'=>0),
's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>35, 'searchall'=>1),
's.zip'=>array('label'=>"Zip", 'checked'=>-1, 'position'=>40, 'searchall'=>1),
'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>45),
'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>50),
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55),
'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60, 'csslist'=>'nowraponall'),
'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>!getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position'=>65, 'csslist'=>'nowraponall'),
'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>isModEnabled("delivery_note")),
'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67),
'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68),
'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69),
'c.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>75),
'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>80),
'c.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>85),
'c.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>90),
'c.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>95),
'c.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>100),
'c.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>105),
'c.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1), 'position'=>110),
'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>115),
'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>0, 'position'=>116),
'c.ref' => array('label' => "Ref", 'checked' => 1, 'position' => 5, 'searchall' => 1),
'c.ref_client' => array('label' => "RefCustomerOrder", 'checked' => -1, 'position' => 10, 'searchall' => 1),
'p.ref' => array('label' => "ProjectRef", 'checked' => -1, 'enabled' => (!isModEnabled('project') ? 0 : 1), 'position' => 20),
'p.title' => array('label' => "ProjectLabel", 'checked' => 0, 'enabled' => (!isModEnabled('project') ? 0 : 1), 'position' => 25),
's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 30, 'searchall' => 1),
's.name_alias' => array('label' => "AliasNameShort", 'checked' => -1, 'position' => 31, 'searchall' => 1),
's2.nom' => array('label' => 'ParentCompany', 'position' => 32, 'checked' => 0),
's.town' => array('label' => "Town", 'checked' => -1, 'position' => 35, 'searchall' => 1),
's.zip' => array('label' => "Zip", 'checked' => -1, 'position' => 40, 'searchall' => 1),
'state.nom' => array('label' => "StateShort", 'checked' => 0, 'position' => 45),
'country.code_iso' => array('label' => "Country", 'checked' => 0, 'position' => 50),
'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 55),
'c.date_commande' => array('label' => "OrderDateShort", 'checked' => 1, 'position' => 60, 'csslist' => 'nowraponall'),
'c.date_delivery' => array('label' => "DateDeliveryPlanned", 'checked' => 1, 'enabled' => !getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position' => 65, 'csslist' => 'nowraponall'),
'c.fk_shipping_method' => array('label' => "SendingMethod", 'checked' => -1, 'position' => 66 , 'enabled' => isModEnabled("delivery_note")),
'c.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => -1, 'position' => 67),
'c.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => -1, 'position' => 68),
'c.fk_input_reason' => array('label' => "Channel", 'checked' => -1, 'position' => 69),
'c.total_ht' => array('label' => "AmountHT", 'checked' => 1, 'position' => 75),
'c.total_vat' => array('label' => "AmountVAT", 'checked' => 0, 'position' => 80),
'c.total_ttc' => array('label' => "AmountTTC", 'checked' => 0, 'position' => 85),
'c.multicurrency_code' => array('label' => 'Currency', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 90),
'c.multicurrency_tx' => array('label' => 'CurrencyRate', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 95),
'c.multicurrency_total_ht' => array('label' => 'MulticurrencyAmountHT', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 100),
'c.multicurrency_total_vat' => array('label' => 'MulticurrencyAmountVAT', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 105),
'c.multicurrency_total_ttc' => array('label' => 'MulticurrencyAmountTTC', 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1), 'position' => 110),
'u.login' => array('label' => "Author", 'checked' => 1, 'position' => 115),
'sale_representative' => array('label' => "SaleRepresentativesOfThirdParty", 'checked' => 0, 'position' => 116),
'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") ? 0 : 1)),
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") ? 0 : 1)),
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") || !getDolGlobalString('DISPLAY_MARGIN_RATES') ? 0 : 1)),
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->hasRight("margins", "liretous") || !getDolGlobalString('DISPLAY_MARK_RATES') ? 0 : 1)),
'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120),
'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125),
'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130),
'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position'=>135, 'searchall'=>1),
'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position'=>140),
'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled("delivery_note")), 'position'=>990),
'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position'=>995),
'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.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 120),
'c.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 125),
'c.date_cloture' => array('label' => "DateClosing", 'checked' => 0, 'position' => 130),
'c.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES')), 'position' => 135, 'searchall' => 1),
'c.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES')), 'position' => 140),
'shippable' => array('label' => "Shippable", 'checked' => 1,'enabled' => (isModEnabled("delivery_note")), 'position' => 990),
'c.facture' => array('label' => "Billed", 'checked' => 1, 'enabled' => (!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position' => 995),
'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)
);
$parameters = array('fieldstosearchall'=>$fieldstosearchall);
$parameters = array('fieldstosearchall' => $fieldstosearchall);
$reshook = $hookmanager->executeHooks('completeFieldsToSearchAll', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$fieldstosearchall = empty($hookmanager->resArray['fieldstosearchall']) ? array() : $hookmanager->resArray['fieldstosearchall'];
@ -254,7 +254,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
$massaction = '';
}
$parameters = array('socid'=>$socid, 'arrayfields'=>&$arrayfields);
$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -332,8 +332,8 @@ if (empty($reshook)) {
}
$uploaddir = $conf->commande->multidir_output[$conf->entity];
$triggersendname = 'ORDER_SENTBYMAIL';
$year="";
$month="";
$year = "";
$month = "";
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
if ($massaction == 'confirm_createbills') { // Create bills from orders.
@ -348,7 +348,7 @@ if (empty($reshook)) {
$TFactThirdNbLines = array();
$nb_bills_created = 0;
$lastid= 0;
$lastid = 0;
$lastref = '';
$db->begin();
@ -1333,8 +1333,8 @@ $param .= $hookmanager->resPrint;
// List of mass actions available
$arrayofmassactions = array(
'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
'builddoc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
);
if ($permissiontovalidate) {
$arrayofmassactions['prevalidate'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate");
@ -1367,8 +1367,8 @@ if (!empty($socid)) {
$url .= '&socid='.$socid;
}
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', ($contextpage == 'orderlist' || $contextpage == 'billableorders') && $permissiontoadd);
@ -1739,7 +1739,7 @@ if (!empty($arrayfields['total_mark_rate']['checked'])) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
@ -1809,6 +1809,7 @@ if (!empty($arrayfields['c.fk_statut']['checked'])) {
Commande::STATUS_CLOSED => $langs->trans("StatusOrderDelivered"),
Commande::STATUS_CANCELED => $langs->trans("StatusOrderCanceledShort")
);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, -5, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage', 1);
print '</td>';
}
@ -1974,7 +1975,7 @@ if (!empty($arrayfields['total_mark_rate']['checked'])) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (!empty($arrayfields['c.datec']['checked'])) {
@ -2037,20 +2038,20 @@ if (isModEnabled('margin') && (
|| !empty($arrayfields['total_margin_rate']['checked'])
|| !empty($arrayfields['total_mark_rate']['checked'])
)
) {
) {
$with_margin_info = true;
}
$total_ht = 0;
$total_margin = 0;
$total_ht = 0;
$total_margin = 0;
// Loop on record
// --------------------------------------------------------------------
$i = 0;
$savnbfield = $totalarray['nbfield'];
$totalarray = array();
$totalarray['nbfield'] = 0;
$imaxinloop = ($limit ? min($num, $limit) : $num);
// Loop on record
// --------------------------------------------------------------------
$i = 0;
$savnbfield = $totalarray['nbfield'];
$totalarray = array();
$totalarray['nbfield'] = 0;
$imaxinloop = ($limit ? min($num, $limit) : $num);
while ($i < $imaxinloop) {
$obj = $db->fetch_object($resql);
if (empty($obj)) {
@ -2580,7 +2581,7 @@ while ($i < $imaxinloop) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
@ -2804,7 +2805,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -162,14 +162,14 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'c.ref'=>'Ref',
'c.ref_client'=>'RefCustomerOrder',
'cdet.description'=>'Description',
's.nom'=>"ThirdParty",
's.name_alias'=>"AliasNameShort",
's.zip'=>"Zip",
's.town'=>"Town",
'c.note_public'=>'NotePublic',
'c.ref' => 'Ref',
'c.ref_client' => 'RefCustomerOrder',
'cdet.description' => 'Description',
's.nom' => "ThirdParty",
's.name_alias' => "AliasNameShort",
's.zip' => "Zip",
's.town' => "Town",
'c.note_public' => 'NotePublic',
);
if (empty($user->socid)) {
$fieldstosearchall["c.note_private"] = "NotePrivate";
@ -178,51 +178,51 @@ if (empty($user->socid)) {
$checkedtypetiers = 0;
$arrayfields = array(
// Détail commande
'rowid'=> array('label'=>'TechnicalID', 'checked'=>1, 'position'=>1, 'enabled'=>(getDolGlobalInt('MAIN_SHOW_TECHNICAL_ID') ? 1 : 0)),
'pr.ref'=> array('label'=>'ProductRef', 'checked'=>1, 'position'=>1),
'pr.desc'=> array('label'=>'ProductDescription', 'checked'=>-1, 'position'=>1),
'cdet.qty'=> array('label'=>'QtyOrdered', 'checked'=>1, 'position'=>1),
'c.ref'=>array('label'=>"Ref", 'checked'=>1, 'position'=>5),
'c.ref_client'=>array('label'=>"RefCustomerOrder", 'checked'=>-1, 'position'=>10),
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>-1, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1), 'position'=>20),
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->project->enabled) ? 0 : 1), 'position'=>25),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30),
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1, 'position'=>31),
's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>35),
's.zip'=>array('label'=>"Zip", 'checked'=>-1, 'position'=>40),
'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>45),
'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>50),
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>55),
'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1, 'position'=>60),
'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>!getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position'=>65),
'c.fk_shipping_method'=>array('label'=>"SendingMethod", 'checked'=>-1, 'position'=>66 , 'enabled'=>isModEnabled('delivery_note')),
'c.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>-1, 'position'=>67),
'c.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>-1, 'position'=>68),
'c.fk_input_reason'=>array('label'=>"Channel", 'checked'=>-1, 'position'=>69),
'cdet.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>75),
'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>80),
'cdet.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>85),
'c.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>90),
'c.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>95),
'c.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>100),
'c.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>105),
'c.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>110),
'c.fk_warehouse'=>array('label'=>'Warehouse', 'checked'=>0, 'enabled'=>(!isModEnabled('stock') && !getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER') ? 0 : 1), 'position'=>110),
'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>115),
'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>0, 'position'=>116),
'rowid' => array('label' => 'TechnicalID', 'checked' => 1, 'position' => 1, 'enabled' => (getDolGlobalInt('MAIN_SHOW_TECHNICAL_ID') ? 1 : 0)),
'pr.ref' => array('label' => 'ProductRef', 'checked' => 1, 'position' => 1),
'pr.desc' => array('label' => 'ProductDescription', 'checked' => -1, 'position' => 1),
'cdet.qty' => array('label' => 'QtyOrdered', 'checked' => 1, 'position' => 1),
'c.ref' => array('label' => "Ref", 'checked' => 1, 'position' => 5),
'c.ref_client' => array('label' => "RefCustomerOrder", 'checked' => -1, 'position' => 10),
'p.ref' => array('label' => "ProjectRef", 'checked' => -1, 'enabled' => (empty($conf->project->enabled) ? 0 : 1), 'position' => 20),
'p.title' => array('label' => "ProjectLabel", 'checked' => 0, 'enabled' => (empty($conf->project->enabled) ? 0 : 1), 'position' => 25),
's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 30),
's.name_alias' => array('label' => "AliasNameShort", 'checked' => -1, 'position' => 31),
's.town' => array('label' => "Town", 'checked' => -1, 'position' => 35),
's.zip' => array('label' => "Zip", 'checked' => -1, 'position' => 40),
'state.nom' => array('label' => "StateShort", 'checked' => 0, 'position' => 45),
'country.code_iso' => array('label' => "Country", 'checked' => 0, 'position' => 50),
'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 55),
'c.date_commande' => array('label' => "OrderDateShort", 'checked' => 1, 'position' => 60),
'c.date_delivery' => array('label' => "DateDeliveryPlanned", 'checked' => 1, 'enabled' => !getDolGlobalString('ORDER_DISABLE_DELIVERY_DATE'), 'position' => 65),
'c.fk_shipping_method' => array('label' => "SendingMethod", 'checked' => -1, 'position' => 66 , 'enabled' => isModEnabled('delivery_note')),
'c.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => -1, 'position' => 67),
'c.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => -1, 'position' => 68),
'c.fk_input_reason' => array('label' => "Channel", 'checked' => -1, 'position' => 69),
'cdet.total_ht' => array('label' => "AmountHT", 'checked' => 1, 'position' => 75),
'c.total_vat' => array('label' => "AmountVAT", 'checked' => 0, 'position' => 80),
'cdet.total_ttc' => array('label' => "AmountTTC", 'checked' => 0, 'position' => 85),
'c.multicurrency_code' => array('label' => 'Currency', 'checked' => 0, 'enabled' => (empty($conf->multicurrency->enabled) ? 0 : 1), 'position' => 90),
'c.multicurrency_tx' => array('label' => 'CurrencyRate', 'checked' => 0, 'enabled' => (empty($conf->multicurrency->enabled) ? 0 : 1), 'position' => 95),
'c.multicurrency_total_ht' => array('label' => 'MulticurrencyAmountHT', 'checked' => 0, 'enabled' => (empty($conf->multicurrency->enabled) ? 0 : 1), 'position' => 100),
'c.multicurrency_total_vat' => array('label' => 'MulticurrencyAmountVAT', 'checked' => 0, 'enabled' => (empty($conf->multicurrency->enabled) ? 0 : 1), 'position' => 105),
'c.multicurrency_total_ttc' => array('label' => 'MulticurrencyAmountTTC', 'checked' => 0, 'enabled' => (empty($conf->multicurrency->enabled) ? 0 : 1), 'position' => 110),
'c.fk_warehouse' => array('label' => 'Warehouse', 'checked' => 0, 'enabled' => (!isModEnabled('stock') && !getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER') ? 0 : 1), 'position' => 110),
'u.login' => array('label' => "Author", 'checked' => 1, 'position' => 115),
'sale_representative' => array('label' => "SaleRepresentativesOfThirdParty", 'checked' => 0, 'position' => 116),
'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)),
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)),
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || !getDolGlobalString('DISPLAY_MARGIN_RATES') ? 0 : 1)),
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || !getDolGlobalString('DISPLAY_MARK_RATES') ? 0 : 1)),
'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>120),
'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>125),
'c.date_cloture'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>130),
'c.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(!getDolGlobalString('MAIN_LIST_ALLOW_PUBLIC_NOTES')), 'position'=>135),
'c.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(!getDolGlobalString('MAIN_LIST_ALLOW_PRIVATE_NOTES')), 'position'=>140),
'shippable'=>array('label'=>"Shippable", 'checked'=>1,'enabled'=>(isModEnabled('delivery_note')), 'position'=>990),
'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'enabled'=>(!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position'=>995),
'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.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 120),
'c.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 125),
'c.date_cloture' => array('label' => "DateClosing", 'checked' => 0, 'position' => 130),
'c.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'enabled' => (!getDolGlobalString('MAIN_LIST_ALLOW_PUBLIC_NOTES')), 'position' => 135),
'c.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'enabled' => (!getDolGlobalString('MAIN_LIST_ALLOW_PRIVATE_NOTES')), 'position' => 140),
'shippable' => array('label' => "Shippable", 'checked' => 1,'enabled' => (isModEnabled('delivery_note')), 'position' => 990),
'c.facture' => array('label' => "Billed", 'checked' => 1, 'enabled' => (!getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')), 'position' => 995),
'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)
);
// Extra fields
@ -255,7 +255,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
$massaction = '';
}
$parameters = array('socid'=>$socid);
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -1202,7 +1202,7 @@ if ($resql) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// 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
print $hookmanager->resPrint;
// Date creation
@ -1271,6 +1271,7 @@ if ($resql) {
Commande::STATUS_CLOSED => $langs->trans("StatusOrderDelivered"),
Commande::STATUS_CANCELED => $langs->trans("StatusOrderCanceledShort")
);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, -5, 0, 0, '', 0, 0, 0, '', 'maxwidth125', 1);
print '</td>';
}
@ -2025,7 +2026,7 @@ if ($resql) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
@ -2244,7 +2245,7 @@ if ($resql) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -150,21 +150,21 @@ $extrafields->fetch_name_optionals_label('banktransaction');
$search_array_options = $extrafields->getOptionalsFromPost('banktransaction', '', 'search_');
$arrayfields = array(
'b.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1,'position'=>10),
'b.label'=>array('label'=>$langs->trans("Description"), 'checked'=>1,'position'=>20),
'b.dateo'=>array('label'=>$langs->trans("DateOperationShort"), 'checked'=>1,'position'=>30),
'b.datev'=>array('label'=>$langs->trans("DateValueShort"), 'checked'=>1,'position'=>40),
'type'=>array('label'=>$langs->trans("Type"), 'checked'=>1,'position'=>50),
'b.num_chq'=>array('label'=>$langs->trans("Numero"), 'checked'=>1,'position'=>60),
'bu.label'=>array('label'=>$langs->trans("ThirdParty").'/'.$langs->trans("User"), 'checked'=>1, 'position'=>70),
'ba.ref'=>array('label'=>$langs->trans("BankAccount"), 'checked'=>(($id > 0 || !empty($ref)) ? 0 : 1), 'position'=>80),
'b.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1, 'position'=>90),
'b.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1, 'position'=>100),
'balancebefore'=>array('label'=>$langs->trans("BalanceBefore"), 'checked'=>0, 'position'=>110),
'balance'=>array('label'=>$langs->trans("Balance"), 'checked'=>1, 'position'=>120),
'b.num_releve'=>array('label'=>$langs->trans("AccountStatement"), 'checked'=>1, 'position'=>130),
'b.conciliated'=>array('label'=>$langs->trans("BankLineReconciled"), 'enabled'=> $object->rappro, 'checked'=>($action == 'reconcile' ? 1 : 0), 'position'=>140),
'b.fk_bordereau'=>array('label'=>$langs->trans("ChequeNumber"), 'checked'=>0, 'position'=>150),
'b.rowid' => array('label' => $langs->trans("Ref"), 'checked' => 1,'position' => 10),
'b.label' => array('label' => $langs->trans("Description"), 'checked' => 1,'position' => 20),
'b.dateo' => array('label' => $langs->trans("DateOperationShort"), 'checked' => 1,'position' => 30),
'b.datev' => array('label' => $langs->trans("DateValueShort"), 'checked' => 1,'position' => 40),
'type' => array('label' => $langs->trans("Type"), 'checked' => 1,'position' => 50),
'b.num_chq' => array('label' => $langs->trans("Numero"), 'checked' => 1,'position' => 60),
'bu.label' => array('label' => $langs->trans("ThirdParty").'/'.$langs->trans("User"), 'checked' => 1, 'position' => 70),
'ba.ref' => array('label' => $langs->trans("BankAccount"), 'checked' => (($id > 0 || !empty($ref)) ? 0 : 1), 'position' => 80),
'b.debit' => array('label' => $langs->trans("Debit"), 'checked' => 1, 'position' => 90),
'b.credit' => array('label' => $langs->trans("Credit"), 'checked' => 1, 'position' => 100),
'balancebefore' => array('label' => $langs->trans("BalanceBefore"), 'checked' => 0, 'position' => 110),
'balance' => array('label' => $langs->trans("Balance"), 'checked' => 1, 'position' => 120),
'b.num_releve' => array('label' => $langs->trans("AccountStatement"), 'checked' => 1, 'position' => 130),
'b.conciliated' => array('label' => $langs->trans("BankLineReconciled"), 'enabled' => $object->rappro, 'checked' => ($action == 'reconcile' ? 1 : 0), 'position' => 140),
'b.fk_bordereau' => array('label' => $langs->trans("ChequeNumber"), 'checked' => 0, 'position' => 150),
);
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
@ -417,7 +417,7 @@ $formaccounting = new FormAccounting($db);
$companystatic = new Societe($db);
$bankaccountstatic = new Account($db);
$userstatic= new User($db);
$userstatic = new User($db);
$banktransferstatic = new BonPrelevement($db);
$societestatic = new Societe($db);
@ -655,18 +655,18 @@ if ($search_fk_bordereau > 0) {
$sql .= " AND b.fk_bordereau = " . ((int) $search_fk_bordereau);
}
if ($search_thirdparty_user) {
$sql.= " AND (b.rowid IN ";
$sql.= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
$sql.= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
$sql.= " JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)";
$sql.= " WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1).")";
$sql .= " AND (b.rowid IN ";
$sql .= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
$sql .= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
$sql .= " JOIN ".MAIN_DB_PREFIX."user AS subUser ON (bu.type = 'user' AND bu.url_id = subUser.rowid)";
$sql .= " WHERE ". natural_search(array("subUser.firstname", "subUser.lastname"), $search_thirdparty_user, '', 1).")";
$sql.= " OR b.rowid IN ";
$sql.= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
$sql.= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
$sql.= " JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)";
$sql.= " WHERE ". natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1);
$sql.= "))";
$sql .= " OR b.rowid IN ";
$sql .= " ( SELECT bu.fk_bank FROM ".MAIN_DB_PREFIX."bank_url AS bu";
$sql .= " JOIN ".MAIN_DB_PREFIX."bank AS b2 ON b2.rowid = bu.fk_bank";
$sql .= " JOIN ".MAIN_DB_PREFIX."societe AS subSoc ON (bu.type = 'company' AND bu.url_id = subSoc.rowid)";
$sql .= " WHERE ". natural_search(array("subSoc.nom"), $search_thirdparty_user, '', 1);
$sql .= "))";
}
if ($search_description) {
$search_description_to_use = $search_description;
@ -1017,6 +1017,7 @@ if ($resql) {
$picto = '';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("BankTransactions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $morehtml, '', $limit, 0, 0, 1);
// We can add page now to param
@ -1263,7 +1264,7 @@ if ($resql) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action edit/delete and select
@ -1827,8 +1828,8 @@ if ($resql) {
}
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook
$parameters = array('arrayfields' => $arrayfields, 'obj' => $objp, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook
print $hookmanager->resPrint;
// Action edit/delete and select

View File

@ -3477,6 +3477,7 @@ if ($action == 'create') {
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input type="radio" id="radio_standard" name="type" value="0"'.(GETPOSTINT('type') ? '' : ' checked').'> ';
$tmp = $tmp.'<label for="radio_standard" >'.$langs->trans("InvoiceStandardAsk").'</label>';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceStandardDesc"), 1, 'help', '', 0, 3, 'standardonsmartphone');
print '<table class="nobordernopadding"><tr>';
print '<td>';
@ -3535,6 +3536,7 @@ if ($action == 'create') {
print '<table class="nobordernopadding"><tr>';
print '<td>';
$tmp = $tmp.'<label for="radio_deposit">'.$langs->trans("InvoiceDeposit").'</label>';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3, 'depositonsmartphone');
print $desc;
print '</td>';
@ -3574,6 +3576,7 @@ if ($action == 'create') {
print '<div class="tagtr listofinvoicetype"><div class="tagtd listofinvoicetype">';
$tmp = '<input id="radio_situation" type="radio" name="type" value="5"'.(GETPOST('type') == 5 ? ' checked' : '').'> ';
$tmp = $tmp.'<label for="radio_situation" >'.$langs->trans("InvoiceFirstSituationAsk").'</label>';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceFirstSituationDesc"), 1, 'help', '', 0, 3, 'firstsituationonsmartphone');
print $desc;
print '</div></div>';
@ -3937,13 +3940,13 @@ if ($action == 'create') {
print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), !empty($objectsrc->label_incoterms) ? $objectsrc->label_incoterms : '', 1).'</label></td>';
print '<td colspan="2" class="maxwidthonsmartphone">';
$incoterm_id = GETPOST('incoterm_id');
$incoterm_location = GETPOST('location_incoterms');
$location_incoterms = GETPOST('location_incoterms');
if (empty($incoterm_id)) {
$incoterm_id = (!empty($objectsrc->fk_incoterms) ? $objectsrc->fk_incoterms : $soc->fk_incoterms);
$incoterm_location = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms);
$location_incoterms = (!empty($objectsrc->location_incoterms) ? $objectsrc->location_incoterms : $soc->location_incoterms);
}
print img_picto('', 'incoterm', 'class="pictofixedwidth"');
print $form->select_incoterms($incoterm_id, $incoterm_location);
print $form->select_incoterms($incoterm_id, $location_incoterms);
print '</td></tr>';
}

View File

@ -137,24 +137,24 @@ if (!$sortfield) {
}
$arrayfields = array(
'f.titre'=>array('label'=>"Ref", 'checked'=>1),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
'f.total_ht'=>array('label'=>"AmountHT", 'checked'=>1),
'f.total_tva'=>array('label'=>"AmountVAT", 'checked'=>-1),
'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>1),
'f.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>0),
'f.fk_cond_reglement'=>array('label'=>"PaymentTerm", 'checked'=>0),
'recurring'=>array('label'=>"RecurringInvoice", 'checked'=>1),
'f.frequency'=>array('label'=>"Frequency", 'checked'=>1),
'f.unit_frequency'=>array('label'=>"FrequencyUnit", 'checked'=>1),
'f.nb_gen_done'=>array('label'=>"NbOfGenerationDoneShort", 'checked'=>1),
'f.date_last_gen'=>array('label'=>"DateLastGenerationShort", 'checked'=>1),
'f.date_when'=>array('label'=>"NextDateToExecutionShort", 'checked'=>1),
'f.fk_user_author'=>array('label'=>"UserCreation", 'checked'=>0, 'position'=>500),
'f.fk_user_modif'=>array('label'=>"UserModification", 'checked'=>0, 'position'=>505),
'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>520),
'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>525),
'status'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
'f.titre' => array('label' => "Ref", 'checked' => 1),
's.nom' => array('label' => "ThirdParty", 'checked' => 1),
'f.total_ht' => array('label' => "AmountHT", 'checked' => 1),
'f.total_tva' => array('label' => "AmountVAT", 'checked' => -1),
'f.total_ttc' => array('label' => "AmountTTC", 'checked' => 1),
'f.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => 0),
'f.fk_cond_reglement' => array('label' => "PaymentTerm", 'checked' => 0),
'recurring' => array('label' => "RecurringInvoice", 'checked' => 1),
'f.frequency' => array('label' => "Frequency", 'checked' => 1),
'f.unit_frequency' => array('label' => "FrequencyUnit", 'checked' => 1),
'f.nb_gen_done' => array('label' => "NbOfGenerationDoneShort", 'checked' => 1),
'f.date_last_gen' => array('label' => "DateLastGenerationShort", 'checked' => 1),
'f.date_when' => array('label' => "NextDateToExecutionShort", 'checked' => 1),
'f.fk_user_author' => array('label' => "UserCreation", 'checked' => 0, 'position' => 500),
'f.fk_user_modif' => array('label' => "UserModification", 'checked' => 0, 'position' => 505),
'f.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 520),
'f.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 525),
'status' => array('label' => "Status", 'checked' => 1, 'position' => 1000),
);
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
@ -530,7 +530,7 @@ $arrayofmassactions = array(
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
);
$massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge")));
$massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend' => $langs->trans("SendByMail"), 'builddoc' => $langs->trans("PDFMerge")));
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) : ''); // This also change content of $arrayfields
@ -681,7 +681,7 @@ if (!empty($arrayfields['f.date_when']['checked'])) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// User creation
@ -708,10 +708,11 @@ if (!empty($arrayfields['f.tms']['checked'])) {
if (!empty($arrayfields['status']['checked'])) {
print '<td class="liste_titre center minwidth75imp parentonrightofpage">';
$liststatus = array(
0=>$langs->trans("Draft"),
1=>$langs->trans("Active"),
-1=>$langs->trans("Disabled"),
0 => $langs->trans("Draft"),
1 => $langs->trans("Active"),
-1 => $langs->trans("Disabled"),
);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, -2, 0, 0, '', 0, 0, 0, '', 'width100 onrightofpage');
print '</td>';
}
@ -946,9 +947,9 @@ while ($i < $imaxinloop) {
if (!empty($arrayfields['f.unit_frequency']['checked'])) {
print '<td class="center">';
if ($objp->frequency > 1) {
$dur = array("i"=>$langs->trans("Minutes"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years"));
$dur = array("i" => $langs->trans("Minutes"), "h" => $langs->trans("Hours"), "d" => $langs->trans("Days"), "w" => $langs->trans("Weeks"), "m" => $langs->trans("Months"), "y" => $langs->trans("Years"));
} else {
$dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year"));
$dur = array("i" => $langs->trans("Minute"), "h" => $langs->trans("Hour"), "d" => $langs->trans("Day"), "w" => $langs->trans("Week"), "m" => $langs->trans("Month"), "y" => $langs->trans("Year"));
}
print($objp->frequency > 0 ? $dur[$objp->unit_frequency] : '');
print '</td>';
@ -1034,7 +1035,7 @@ while ($i < $imaxinloop) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Status
@ -1088,7 +1089,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -188,15 +188,15 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'f.ref'=>'Ref',
'f.ref_client'=>'RefCustomer',
'f.note_public'=>'NotePublic',
's.nom'=>"ThirdParty",
's.code_client'=>"CustomerCodeShort",
's.name_alias'=>"AliasNameShort",
's.zip'=>"Zip",
's.town'=>"Town",
'pd.description'=>'Description',
'f.ref' => 'Ref',
'f.ref_client' => 'RefCustomer',
'f.note_public' => 'NotePublic',
's.nom' => "ThirdParty",
's.code_client' => "CustomerCodeShort",
's.name_alias' => "AliasNameShort",
's.zip' => "Zip",
's.town' => "Town",
'pd.description' => 'Description',
);
if (empty($user->socid)) {
$fieldstosearchall["f.note_private"] = "NotePrivate";
@ -204,63 +204,63 @@ if (empty($user->socid)) {
$checkedtypetiers = 0;
$arrayfields = array(
'f.ref'=>array('label'=>"Ref", 'checked'=>1, 'position'=>5),
'f.ref_client'=>array('label'=>"RefCustomer", 'checked'=>-1, 'position'=>10),
'f.type'=>array('label'=>"Type", 'checked'=>0, 'position'=>15),
'f.datef'=>array('label'=>"DateInvoice", 'checked'=>1, 'position'=>20),
'f.date_valid'=>array('label'=>"DateValidation", 'checked'=>0, 'position'=>22),
'f.subtype'=>array('label'=>"InvoiceSubtype", 'checked'=>0, 'position'=>17),
'f.date_lim_reglement'=>array('label'=>"DateDue", 'checked'=>1, 'position'=>25),
'f.date_closing'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>30),
'p.ref'=>array('label'=>"ProjectRef", 'langs'=>'projects', 'checked'=>1, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>40),
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>41),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>50),
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1, 'position'=>51),
's.code_client'=>array('label'=>"CustomerCodeShort", 'checked'=>-1, 'position'=>52),
's2.nom'=>array('label'=>'ParentCompany', 'position'=>32, 'checked'=>0),
's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>55),
's.zip'=>array('label'=>"Zip", 'checked'=>1, 'position'=>60),
'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>65),
'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>70),
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>75),
'f.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>1, 'position'=>80),
'f.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>1, 'position'=>85),
'f.module_source'=>array('label'=>"POSModule", 'langs'=>'cashdesk', 'checked'=>($contextpage == 'poslist' ? 1 : 0), 'enabled'=>"(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('INVOICE_SHOW_POS'))", 'position'=>90),
'f.pos_source'=>array('label'=>"POSTerminal", 'langs'=>'cashdesk', 'checked'=>($contextpage == 'poslist' ? 1 : 0), 'enabled'=>"(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('INVOICE_SHOW_POS'))", 'position'=>91),
'f.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>95),
'f.total_tva'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>100),
'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>($mysoc->localtax1_assuj == "1"), 'position'=>110),
'f.total_localtax2'=>array('label'=>$langs->transcountry("AmountLT2", $mysoc->country_code), 'checked'=>0, 'enabled'=>($mysoc->localtax2_assuj == "1"), 'position'=>120),
'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>130),
'dynamount_payed'=>array('label'=>"Received", 'checked'=>0, 'position'=>140),
'rtp'=>array('label'=>"Rest", 'checked'=>0, 'position'=>150), // Not enabled by default because slow
'f.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>280),
'f.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>285),
'f.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>290),
'f.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>291),
'f.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>292),
'multicurrency_dynamount_payed'=>array('label'=>'MulticurrencyAlreadyPaid', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>295),
'multicurrency_rtp'=>array('label'=>'MulticurrencyRemainderToPay', 'checked'=>0, 'enabled'=>(!isModEnabled('multicurrency') ? 0 : 1), 'position'=>296), // Not enabled by default because slow
'f.ref' => array('label' => "Ref", 'checked' => 1, 'position' => 5),
'f.ref_client' => array('label' => "RefCustomer", 'checked' => -1, 'position' => 10),
'f.type' => array('label' => "Type", 'checked' => 0, 'position' => 15),
'f.datef' => array('label' => "DateInvoice", 'checked' => 1, 'position' => 20),
'f.date_valid' => array('label' => "DateValidation", 'checked' => 0, 'position' => 22),
'f.subtype' => array('label' => "InvoiceSubtype", 'checked' => 0, 'position' => 17),
'f.date_lim_reglement' => array('label' => "DateDue", 'checked' => 1, 'position' => 25),
'f.date_closing' => array('label' => "DateClosing", 'checked' => 0, 'position' => 30),
'p.ref' => array('label' => "ProjectRef", 'langs' => 'projects', 'checked' => 1, 'enabled' => (!isModEnabled('project') ? 0 : 1), 'position' => 40),
'p.title' => array('label' => "ProjectLabel", 'checked' => 0, 'enabled' => (!isModEnabled('project') ? 0 : 1), 'position' => 41),
's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 50),
's.name_alias' => array('label' => "AliasNameShort", 'checked' => 1, 'position' => 51),
's.code_client' => array('label' => "CustomerCodeShort", 'checked' => -1, 'position' => 52),
's2.nom' => array('label' => 'ParentCompany', 'position' => 32, 'checked' => 0),
's.town' => array('label' => "Town", 'checked' => -1, 'position' => 55),
's.zip' => array('label' => "Zip", 'checked' => 1, 'position' => 60),
'state.nom' => array('label' => "StateShort", 'checked' => 0, 'position' => 65),
'country.code_iso' => array('label' => "Country", 'checked' => 0, 'position' => 70),
'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 75),
'f.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => 1, 'position' => 80),
'f.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => 1, 'position' => 85),
'f.module_source' => array('label' => "POSModule", 'langs' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? 1 : 0), 'enabled' => "(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('INVOICE_SHOW_POS'))", 'position' => 90),
'f.pos_source' => array('label' => "POSTerminal", 'langs' => 'cashdesk', 'checked' => ($contextpage == 'poslist' ? 1 : 0), 'enabled' => "(isModEnabled('cashdesk') || isModEnabled('takepos') || getDolGlobalInt('INVOICE_SHOW_POS'))", 'position' => 91),
'f.total_ht' => array('label' => "AmountHT", 'checked' => 1, 'position' => 95),
'f.total_tva' => array('label' => "AmountVAT", 'checked' => 0, 'position' => 100),
'f.total_localtax1' => array('label' => $langs->transcountry("AmountLT1", $mysoc->country_code), 'checked' => 0, 'enabled' => ($mysoc->localtax1_assuj == "1"), 'position' => 110),
'f.total_localtax2' => array('label' => $langs->transcountry("AmountLT2", $mysoc->country_code), 'checked' => 0, 'enabled' => ($mysoc->localtax2_assuj == "1"), 'position' => 120),
'f.total_ttc' => array('label' => "AmountTTC", 'checked' => 0, 'position' => 130),
'dynamount_payed' => array('label' => "Received", 'checked' => 0, 'position' => 140),
'rtp' => array('label' => "Rest", 'checked' => 0, 'position' => 150), // Not enabled by default because slow
'f.multicurrency_code' => array('label' => 'Currency', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 280),
'f.multicurrency_tx' => array('label' => 'CurrencyRate', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 285),
'f.multicurrency_total_ht' => array('label' => 'MulticurrencyAmountHT', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 290),
'f.multicurrency_total_vat' => array('label' => 'MulticurrencyAmountVAT', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 291),
'f.multicurrency_total_ttc' => array('label' => 'MulticurrencyAmountTTC', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 292),
'multicurrency_dynamount_payed' => array('label' => 'MulticurrencyAlreadyPaid', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 295),
'multicurrency_rtp' => array('label' => 'MulticurrencyRemainderToPay', 'checked' => 0, 'enabled' => (!isModEnabled('multicurrency') ? 0 : 1), 'position' => 296), // Not enabled by default because slow
'total_pa' => array('label' => ((getDolGlobalString('MARGIN_TYPE') == '1') ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') ? 0 : 1)),
'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') ? 0 : 1)),
'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') || !getDolGlobalString('DISPLAY_MARGIN_RATES') ? 0 : 1)),
'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') || !getDolGlobalString('DISPLAY_MARK_RATES') ? 0 : 1)),
'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
'f.tms' =>array('type'=>'timestamp', 'label'=>'DateModificationShort', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>502),
'u.login'=>array('label'=>"UserAuthor", 'checked'=>1, 'position'=>504),
'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>0, 'position'=>506),
'f.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 500),
'f.tms' => array('type' => 'timestamp', 'label' => 'DateModificationShort', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 502),
'u.login' => array('label' => "UserAuthor", 'checked' => 1, 'position' => 504),
'sale_representative' => array('label' => "SaleRepresentativesOfThirdParty", 'checked' => 0, 'position' => 506),
//'f.fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-1, 'position'=>506),
//'f.fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-1, 'notnull'=>-1, 'position'=>508),
//'f.fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>510),
//'f.fk_user_closing' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserClosing', 'enabled'=>1, 'visible'=>-1, 'position'=>512),
'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>520, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>521, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
'f.fk_fac_rec_source'=>array('label'=>'GeneratedFromTemplate', 'checked'=>0, 'position'=>530, 'enabled'=>'1'),
'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
'f.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'position' => 520, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
'f.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'position' => 521, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
'f.fk_fac_rec_source' => array('label' => 'GeneratedFromTemplate', 'checked' => 0, 'position' => 530, 'enabled' => '1'),
'f.fk_statut' => array('label' => "Status", 'checked' => 1, 'position' => 1000),
);
if (getDolGlobalString("INVOICE_USE_SITUATION") && getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY')) {
$arrayfields['f.retained_warranty'] = array('label'=>$langs->trans("RetainedWarranty"), 'checked'=>0, 'position'=>86);
$arrayfields['f.retained_warranty'] = array('label' => $langs->trans("RetainedWarranty"), 'checked' => 0, 'position' => 86);
}
// Overwrite $arrayfields from columns into ->fields (transition before removal of $arrayoffields)
foreach ($object->fields as $key => $val) {
@ -280,10 +280,10 @@ foreach ($object->fields as $key => $val) {
}
if ($newkey) {
$arrayfields[$newkey] = array(
'label'=>$val['label'],
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')),
'position'=>$val['position'],
'label' => $val['label'],
'checked' => (($visible < 0) ? 0 : 1),
'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')),
'position' => $val['position'],
'help' => empty($val['help']) ? '' : $val['help'],
);
}
@ -319,7 +319,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
$massaction = '';
}
$parameters = array('socid'=>$socid, 'arrayfields'=>&$arrayfields);
$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -438,7 +438,7 @@ if ($action == 'makepayment_confirm' && $user->hasRight('facture', 'paiement'))
$remaintopay = price2num($facture->total_ttc - $totalpay);
// hook to finalize the remaining amount, considering e.g. cash discount agreements
$parameters = array('remaintopay'=>$remaintopay);
$parameters = array('remaintopay' => $remaintopay);
$reshook = $hookmanager->executeHooks('finalizeAmountOfInvoice', $parameters, $facture, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
if (!empty($remain = $hookmanager->resArray['remaintopay'])) {
@ -515,7 +515,7 @@ if ($action == 'makepayment_confirm' && $user->hasRight('facture', 'paiement'))
$objecttmp->resteapayer = price2num($objecttmp->total_ttc - $totalpaid - $totalcreditnotes - $totaldeposits, 'MT');
// hook to finalize the remaining amount, considering e.g. cash discount agreements
$parameters = array('remaintopay'=>$objecttmp->resteapayer);
$parameters = array('remaintopay' => $objecttmp->resteapayer);
$reshook = $hookmanager->executeHooks('finalizeAmountOfInvoice', $parameters, $objecttmp, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
if (!empty($remaintopay = $hookmanager->resArray['remaintopay'])) {
@ -1194,10 +1194,10 @@ $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters,
$param .= $hookmanager->resPrint;
$arrayofmassactions = array(
'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
'validate' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
'builddoc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
'presend' => img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
);
if ($user->hasRight('facture', 'paiement')) {
@ -1227,8 +1227,8 @@ if ($contextpage != 'poslist') {
$url .= '&socid='.$socid;
}
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->hasRight("facture", "creer"));
}
@ -1266,7 +1266,7 @@ if ($massaction == 'makepayment') {
// array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1),
array('type' => 'date', 'name' => 'datepaiment', 'label' => $langs->trans("Date"), 'datenow' => 1),
array('type' => 'other', 'name' => 'paiementid', 'label' => $langs->trans("PaymentMode"), 'value' => $form->select_types_paiements(GETPOST('search_paymentmode'), 'paiementid', '', 0, 0, 1, 0, 1, '', 1)),
array('type' => 'other', 'name' => 'bankid', 'label' => $langs->trans("BankAccount"), 'value'=>$form->select_comptes('', 'bankid', 0, '', 0, '', 0, '', 1)),
array('type' => 'other', 'name' => 'bankid', 'label' => $langs->trans("BankAccount"), 'value' => $form->select_comptes('', 'bankid', 0, '', 0, '', 0, '', 1)),
//array('type' => 'other', 'name' => 'invoicesid', 'label' => '', 'value'=>'<input type="hidden" id="invoicesid" name="invoicesid" value="'.implode('#',GETPOST('toselect','array')).'">'),
);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('MakePaymentAndClassifyPayed'), $langs->trans('EnterPaymentReceivedFromCustomer'), 'makepayment_confirm', $formquestion, 1, 0, 200, 500, 1);
@ -1374,15 +1374,16 @@ if (!empty($arrayfields['f.ref_client']['checked'])) {
if (!empty($arrayfields['f.type']['checked'])) {
print '<td class="liste_titre maxwidthonsmartphone">';
$listtype = array(
Facture::TYPE_STANDARD=>$langs->trans("InvoiceStandard"),
Facture::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"),
Facture::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"),
Facture::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"),
Facture::TYPE_STANDARD => $langs->trans("InvoiceStandard"),
Facture::TYPE_DEPOSIT => $langs->trans("InvoiceDeposit"),
Facture::TYPE_CREDIT_NOTE => $langs->trans("InvoiceAvoir"),
Facture::TYPE_REPLACEMENT => $langs->trans("InvoiceReplacement"),
);
if (getDolGlobalString('INVOICE_USE_SITUATION')) {
$listtype[Facture::TYPE_SITUATION] = $langs->trans("InvoiceSituation");
}
//$listtype[Facture::TYPE_PROFORMA]=$langs->trans("InvoiceProForma"); // A proformat invoice is not an invoice but must be an order.
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
print '</td>';
}
@ -1611,7 +1612,7 @@ if (!empty($arrayfields['total_mark_rate']['checked'])) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
@ -1648,7 +1649,8 @@ if (!empty($arrayfields['f.fk_fac_rec_source']['checked'])) {
// Status
if (!empty($arrayfields['f.fk_statut']['checked'])) {
print '<td class="liste_titre right parentonrightofpage">';
$liststatus = array('0'=>$langs->trans("BillShortStatusDraft"), '0,1'=>$langs->trans("BillShortStatusDraft").'+'.$langs->trans("BillShortStatusNotPaid"), '1'=>$langs->trans("BillShortStatusNotPaid"), '1,2'=>$langs->trans("BillShortStatusNotPaid").'+'.$langs->trans("BillShortStatusPaid"), '2'=>$langs->trans("BillShortStatusPaid"), '3'=>$langs->trans("BillShortStatusCanceled"));
$liststatus = array('0' => $langs->trans("BillShortStatusDraft"), '0,1' => $langs->trans("BillShortStatusDraft").'+'.$langs->trans("BillShortStatusNotPaid"), '1' => $langs->trans("BillShortStatusNotPaid"), '1,2' => $langs->trans("BillShortStatusNotPaid").'+'.$langs->trans("BillShortStatusPaid"), '2' => $langs->trans("BillShortStatusPaid"), '3' => $langs->trans("BillShortStatusCanceled"));
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage', 1);
print '</td>';
}
@ -1850,7 +1852,7 @@ if (!empty($arrayfields['total_mark_rate']['checked'])) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => $totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (!empty($arrayfields['f.datec']['checked'])) {
@ -1902,8 +1904,8 @@ if ($num > 0) {
$totalarray['val'] = array();
$totalarray['val']['f.total_ht'] = 0;
$totalarray['val']['f.total_tva'] = 0;
$totalarray['val']['f.total_localtax1']=0;
$totalarray['val']['f.total_localtax1']=0;
$totalarray['val']['f.total_localtax1'] = 0;
$totalarray['val']['f.total_localtax1'] = 0;
$totalarray['val']['f.total_ttc'] = 0;
$totalarray['val']['totalam'] = 0;
$totalarray['val']['rtp'] = 0;
@ -2041,7 +2043,7 @@ if ($num > 0) {
}
}
$arraydata = array('alreadypaid' => $paiement, 'thirdparty' => $companystatic->getNomUrl(1, '', 12), 'userauthor'=>$userstatic->getNomUrl(1), 'selected' => in_array($object->id, $arrayofselected));
$arraydata = array('alreadypaid' => $paiement, 'thirdparty' => $companystatic->getNomUrl(1, '', 12), 'userauthor' => $userstatic->getNomUrl(1), 'selected' => in_array($object->id, $arrayofselected));
print $facturestatic->getKanbanView('', $arraydata);
if ($i == ($imaxinloop - 1)) {
print '</div>';
@ -2636,7 +2638,7 @@ if ($num > 0) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
@ -2755,7 +2757,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -90,13 +90,13 @@ foreach ($arrayofpaymentmodetomanage as $key => $val) {
}
$arrayfields = array(
'bc.ref' => array('label'=>"Ref", 'checked'=>1, 'position'=>10),
'bc.type' => array('label'=>"Type", 'checked'=>1, 'position'=>20),
'bc.date_bordereau' => array('label'=>"DateCreation", 'checked'=>1, 'position'=>30),
'ba.label' => array('label'=>"BankAccount", 'checked'=>1, 'position'=>40),
'bc.nbcheque' => array('label'=>"NbOfCheques", 'checked'=>1, 'position'=>50),
'bc.amount' => array('label'=>"Amount", 'checked'=>1, 'position'=>60),
'bc.statut' => array('label'=>"Status", 'checked'=>1, 'position'=>70)
'bc.ref' => array('label' => "Ref", 'checked' => 1, 'position' => 10),
'bc.type' => array('label' => "Type", 'checked' => 1, 'position' => 20),
'bc.date_bordereau' => array('label' => "DateCreation", 'checked' => 1, 'position' => 30),
'ba.label' => array('label' => "BankAccount", 'checked' => 1, 'position' => 40),
'bc.nbcheque' => array('label' => "NbOfCheques", 'checked' => 1, 'position' => 50),
'bc.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 60),
'bc.statut' => array('label' => "Status", 'checked' => 1, 'position' => 70)
);
$arrayfields = dol_sort_array($arrayfields, 'position');
@ -108,7 +108,7 @@ $object = new RemiseCheque($db);
* Actions
*/
$parameters = array('socid'=>$socid);
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -253,8 +253,8 @@ if ($resql) {
$url .= '&socid='.$socid;
}
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewCheckDeposit'), '', 'fa fa-plus-circle', $url, '', $user->hasRight('banque', 'cheque'));
@ -271,6 +271,7 @@ if ($resql) {
print '<input type="hidden" name="mode" value="'.$mode.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("MenuChequeDeposits"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit);
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
@ -346,7 +347,7 @@ if ($resql) {
}
// 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
print $hookmanager->resPrint;
@ -400,7 +401,7 @@ if ($resql) {
}
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -92,22 +92,22 @@ $search_all = trim(GETPOSTISSET("search_all") ? GETPOST("search_all", 'alpha') :
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'p.ref'=>"RefPayment",
's.nom'=>"ThirdParty",
'p.num_paiement'=>"Numero",
'p.amount'=>"Amount",
'p.ref' => "RefPayment",
's.nom' => "ThirdParty",
'p.num_paiement' => "Numero",
'p.amount' => "Amount",
);
$arrayfields = array(
'p.ref' => array('label'=>"RefPayment", 'checked'=>1, 'position'=>10),
'p.datep' => array('label'=>"Date", 'checked'=>1, 'position'=>20),
's.nom' => array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30),
'c.libelle' => array('label'=>"Type", 'checked'=>1, 'position'=>40),
'transaction' => array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>50, 'enabled'=>(isModEnabled("bank"))),
'ba.label' => array('label'=>"BankAccount", 'checked'=>1, 'position'=>60, 'enabled'=>(isModEnabled("bank"))),
'p.num_paiement' => array('label'=>"Numero", 'checked'=>1, 'position'=>70, 'tooltip'=>"ChequeOrTransferNumber"),
'p.amount' => array('label'=>"Amount", 'checked'=>1, 'position'=>80),
'p.statut' => array('label'=>"Status", 'checked'=>1, 'position'=>90, 'enabled'=>(getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION'))),
'p.ref' => array('label' => "RefPayment", 'checked' => 1, 'position' => 10),
'p.datep' => array('label' => "Date", 'checked' => 1, 'position' => 20),
's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 30),
'c.libelle' => array('label' => "Type", 'checked' => 1, 'position' => 40),
'transaction' => array('label' => "BankTransactionLine", 'checked' => 1, 'position' => 50, 'enabled' => (isModEnabled("bank"))),
'ba.label' => array('label' => "BankAccount", 'checked' => 1, 'position' => 60, 'enabled' => (isModEnabled("bank"))),
'p.num_paiement' => array('label' => "Numero", 'checked' => 1, 'position' => 70, 'tooltip' => "ChequeOrTransferNumber"),
'p.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 80),
'p.statut' => array('label' => "Status", 'checked' => 1, 'position' => 90, 'enabled' => (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION'))),
);
$arrayfields = dol_sort_array($arrayfields, 'position');
@ -130,7 +130,7 @@ $result = restrictedArea($user, 'facture', $facid, '');
* Actions
*/
$parameters = array('socid'=>$socid);
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -386,6 +386,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit, 0, 0, 1);
if ($search_all) {
@ -491,7 +492,7 @@ if (!empty($arrayfields['p.statut']['checked'])) {
}
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
@ -559,7 +560,7 @@ if (!empty($arrayfields['p.statut']['checked'])) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column

View File

@ -460,7 +460,7 @@ if ($id > 0 || $ref) {
if ($salaryBonPl) {
$sql = "SELECT pl.rowid, pl.statut, pl.amount, pl.fk_user,";
$sql .= " u.rowid as socid, u.login as name";
$sql .=" FROM llx_prelevement_lignes as pl";
$sql .= " FROM llx_prelevement_lignes as pl";
$sql .= ", ".MAIN_DB_PREFIX."prelevement_bons as pb";
$sql .= ", ".MAIN_DB_PREFIX."user as u";
$sql .= " WHERE pl.fk_prelevement_bons = ".((int) $id);
@ -527,6 +527,7 @@ if ($id > 0 || $ref) {
if (!empty($sortorder)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Lines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);
print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table

View File

@ -240,6 +240,7 @@ $resql = $db->query($sql);
if ($resql) {
$num = $db->num_rows($resql);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Rejects"), $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, $nbtotalofrecords, '');
print"\n<!-- debut table -->\n";

View File

@ -97,20 +97,20 @@ if (!$sortorder) {
$filtre = GETPOSTINT("filtre");
$arrayfields = array(
'cs.rowid' =>array('label'=>"Ref", 'checked'=>1, 'position'=>10),
'cs.libelle' =>array('label'=>"Label", 'checked'=>1, 'position'=>20),
'cs.fk_type' =>array('label'=>"Type", 'checked'=>1, 'position'=>30),
'cs.date_ech' =>array('label'=>"Date", 'checked'=>1, 'position'=>40),
'cs.periode' =>array('label'=>"PeriodEndDate", 'checked'=>1, 'position'=>50),
'p.ref' =>array('label'=>"ProjectRef", 'checked'=>1, 'position'=>60, 'enabled'=>(isModEnabled('project'))),
'cs.fk_user' =>array('label'=>"Employee", 'checked'=>1, 'position'=>70),
'cs.fk_mode_reglement' =>array('checked'=>-1, 'position'=>80, 'label'=>"DefaultPaymentMode"),
'cs.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>100),
'cs.paye' =>array('label'=>"Status", 'checked'=>1, 'position'=>110),
'cs.rowid' => array('label' => "Ref", 'checked' => 1, 'position' => 10),
'cs.libelle' => array('label' => "Label", 'checked' => 1, 'position' => 20),
'cs.fk_type' => array('label' => "Type", 'checked' => 1, 'position' => 30),
'cs.date_ech' => array('label' => "Date", 'checked' => 1, 'position' => 40),
'cs.periode' => array('label' => "PeriodEndDate", 'checked' => 1, 'position' => 50),
'p.ref' => array('label' => "ProjectRef", 'checked' => 1, 'position' => 60, 'enabled' => (isModEnabled('project'))),
'cs.fk_user' => array('label' => "Employee", 'checked' => 1, 'position' => 70),
'cs.fk_mode_reglement' => array('checked' => -1, 'position' => 80, 'label' => "DefaultPaymentMode"),
'cs.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 100),
'cs.paye' => array('label' => "Status", 'checked' => 1, 'position' => 110),
);
if (isModEnabled("bank")) {
$arrayfields['cs.fk_account'] = array('checked'=>-1, 'position'=>90, 'label'=>"DefaultBankAccount");
$arrayfields['cs.fk_account'] = array('checked' => -1, 'position' => 90, 'label' => "DefaultBankAccount");
}
$arrayfields = dol_sort_array($arrayfields, 'position');
@ -134,7 +134,7 @@ $result = restrictedArea($user, 'tax', '', 'chargesociales', 'charges');
* Actions
*/
$parameters = array('socid'=>$socid);
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -384,8 +384,8 @@ if ($search_date_limit_endyear) {
$url = DOL_URL_ROOT.'/compta/sociales/card.php?action=create';
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('MenuNewSocialContribution'), '', 'fa fa-plus-circle', $url, '', $permissiontoadd);
@ -411,6 +411,7 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("SocialContributions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, $newcardbutton, '', $limit, 0, 0, 1);
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
@ -537,13 +538,14 @@ if (!empty($arrayfields['cs.amount']['checked'])) {
// Filter: Status
if (!empty($arrayfields['cs.paye']['checked'])) {
print '<td class="liste_titre right parentonrightofpage">';
$liststatus = array('0'=>$langs->trans("Unpaid"), '1'=>$langs->trans("Paid"));
$liststatus = array('0' => $langs->trans("Unpaid"), '1' => $langs->trans("Paid"));
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage', 1);
print '</td>';
}
// 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
print $hookmanager->resPrint;
@ -618,7 +620,7 @@ if (!empty($arrayfields['cs.paye']['checked'])) {
}
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
@ -634,7 +636,7 @@ $i = 0;
$savnbfield = $totalarray['nbfield'];
$totalarray = array();
$totalarray['nbfield'] = 0;
$totalarray['val'] = array('totalttcfield'=>0);
$totalarray['val'] = array('totalttcfield' => 0);
$imaxinloop = ($limit ? min($num, $limit) : $num);
while ($i < $imaxinloop) {
$obj = $db->fetch_object($resql);
@ -659,7 +661,7 @@ while ($i < $imaxinloop) {
print '<div class="box-flex-container kanban">';
}
// Output Kanban
print $chargesociale_static->getKanbanView('', array('project'=> $projectstatic, 'selected' => in_array($chargesociale_static->id, $arrayofselected)));
print $chargesociale_static->getKanbanView('', array('project' => $projectstatic, 'selected' => in_array($chargesociale_static->id, $arrayofselected)));
if ($i == ($imaxinloop - 1)) {
print '</div>';
print '</td></tr>';
@ -860,7 +862,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -82,16 +82,16 @@ if (!$sortorder) {
}
$arrayfields = array(
't.rowid' =>array('checked'=>1, 'position'=>10, 'label'=>"Ref",),
't.label' =>array('checked'=>1, 'position'=>20, 'label'=>"Label"),
't.datev' =>array('checked'=>1, 'position'=>30, 'label'=>"PeriodEndDate"),
't.fk_typepayment' =>array('checked'=>1, 'position'=>50, 'label'=>"DefaultPaymentMode"),
't.amount' =>array('checked'=>1, 'position'=>90, 'label'=>"Amount"),
't.status' =>array('checked'=>1, 'position'=>90, 'label'=>"Status"),
't.rowid' => array('checked' => 1, 'position' => 10, 'label' => "Ref",),
't.label' => array('checked' => 1, 'position' => 20, 'label' => "Label"),
't.datev' => array('checked' => 1, 'position' => 30, 'label' => "PeriodEndDate"),
't.fk_typepayment' => array('checked' => 1, 'position' => 50, 'label' => "DefaultPaymentMode"),
't.amount' => array('checked' => 1, 'position' => 90, 'label' => "Amount"),
't.status' => array('checked' => 1, 'position' => 90, 'label' => "Status"),
);
if (isModEnabled("bank")) {
$arrayfields['t.fk_account'] = array('checked'=>1, 'position'=>60, 'label'=>"DefaultBankAccount");
$arrayfields['t.fk_account'] = array('checked' => 1, 'position' => 60, 'label' => "DefaultBankAccount");
}
$arrayfields = dol_sort_array($arrayfields, 'position');
@ -115,7 +115,7 @@ $result = restrictedArea($user, 'tax', '', 'tva', 'charges');
* Actions
*/
$parameters = array('socid'=>$socid);
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -171,8 +171,8 @@ $help_url = '';
// Build and execute select
// --------------------------------------------------------------------
$sql = 'SELECT t.rowid, t.amount, t.label, t.datev, t.datep, t.paye as status, t.fk_typepayment as type, t.fk_account,';
$sql.= ' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,';
$sql.= ' t.num_payment, pst.code as payment_code,';
$sql .= ' ba.label as blabel, ba.ref as bref, ba.number as bnumber, ba.account_number, ba.iban_prefix as iban, ba.bic, ba.currency_code, ba.clos,';
$sql .= ' t.num_payment, pst.code as payment_code,';
$sql .= ' SUM(ptva.amount) as alreadypayed';
$sqlfields = $sql; // $sql fields to remove for count total
@ -360,8 +360,8 @@ if (!empty($socid)) {
$url .= '&socid='.$socid;
}
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewVATPayment'), '', 'fa fa-plus-circle', $url, '', $permissiontoadd);
@ -486,6 +486,7 @@ if (!empty($arrayfields['t.amount']['checked'])) {
if (!empty($arrayfields['t.status']['checked'])) {
print '<td class="liste_titre right parentonrightofpage">';
$liststatus = array('0' => $langs->trans("Unpaid"), '1' => $langs->trans("Paid"));
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage');
print '</td>';
}
@ -494,7 +495,7 @@ if (!empty($arrayfields['t.status']['checked'])) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
@ -552,7 +553,7 @@ if (!empty($arrayfields['t.status']['checked'])) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
@ -770,7 +771,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -146,7 +146,7 @@ if ($resql) {
setEventMessages($db->lasterror, null, 'errors');
}
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $num, 'title_accountancy', 0, '', '', $limit);
if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {

View File

@ -106,6 +106,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
if (empty($dolibarr_main_auth_ldap_filter)) {
$userSearchFilter = "(".$ldapuserattr."=".$usertotest.")";
} else {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$userSearchFilter = str_replace('%1%', $usertotest, $dolibarr_main_auth_ldap_filter);
}

View File

@ -180,6 +180,7 @@ class pdf_ban extends ModeleBankAccountDoc
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page

View File

@ -100,11 +100,11 @@ class pdf_sepamandate extends ModeleBankAccountDoc
// Define column position
$this->posxref = $this->marge_gauche;
$this->update_main_doc_field=1;
$this->update_main_doc_field = 1;
$this->heightforinfotot=50;
$this->heightforinfotot = 50;
$this->xPosSignArea=120;
$this->xPosSignArea = 120;
$this->heightforfreetext = (getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT') > 0 ? getDolGlobalInt('MAIN_PDF_FREETEXT_HEIGHT') : 5);
@ -175,7 +175,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -206,6 +206,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@ -443,7 +444,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -453,7 +454,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {

View File

@ -157,7 +157,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -190,6 +190,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
$nboflines = count($this->lines);
@ -226,7 +227,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -236,7 +237,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
$outputlangs->charset_output = $sav_charset_output;
return 1; // No error

View File

@ -240,7 +240,7 @@ class pdf_einstein extends ModelePDFCommandes
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -552,15 +552,15 @@ class pdf_einstein extends ModelePDFCommandes
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
}
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -637,7 +637,7 @@ class pdf_einstein extends ModelePDFCommandes
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -647,7 +647,7 @@ class pdf_einstein extends ModelePDFCommandes
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -1483,6 +1483,7 @@ class pdf_einstein extends ModelePDFCommandes
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, $ltrdirection);
$posy = $pdf->getY();

View File

@ -280,7 +280,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -699,9 +699,9 @@ class pdf_eratosthene extends ModelePDFCommandes
$parameters = array(
'object' => $object,
'i' => $i,
'pdf' =>& $pdf,
'curY' =>& $curY,
'nexY' =>& $nexY,
'pdf' => & $pdf,
'curY' => & $curY,
'nexY' => & $nexY,
'outputlangs' => $outputlangs,
'hidedetails' => $hidedetails
);
@ -761,15 +761,15 @@ class pdf_eratosthene extends ModelePDFCommandes
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
}
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
// Add line
if (getDolGlobalInt('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
@ -845,7 +845,7 @@ class pdf_eratosthene extends ModelePDFCommandes
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -855,7 +855,7 @@ class pdf_eratosthene extends ModelePDFCommandes
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -1672,6 +1672,7 @@ class pdf_eratosthene extends ModelePDFCommandes
// Show recipient information
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->SetXY($posx + 2, $posy);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
}
@ -1898,6 +1899,7 @@ class pdf_eratosthene extends ModelePDFCommandes
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys
} else {
$this->cols = $hookmanager->resArray;

View File

@ -1383,7 +1383,7 @@ class pdf_espadon extends ModelePdfExpedition
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys
} else {
$this->cols = $hookmanager->resArray;

View File

@ -183,7 +183,7 @@ class pdf_merou extends ModelePdfExpedition
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -227,6 +227,7 @@ class pdf_merou extends ModelePdfExpedition
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@ -315,10 +316,10 @@ class pdf_merou extends ModelePdfExpedition
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -374,7 +375,7 @@ class pdf_merou extends ModelePdfExpedition
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -384,7 +385,7 @@ class pdf_merou extends ModelePdfExpedition
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1;
} else {

View File

@ -253,7 +253,7 @@ class pdf_rouget extends ModelePdfExpedition
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -298,6 +298,7 @@ class pdf_rouget extends ModelePdfExpedition
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@ -549,10 +550,10 @@ class pdf_rouget extends ModelePdfExpedition
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY - 1, $this->page_largeur - $this->marge_droite, $nexY - 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
// Detect if some page were added automatically and output _tableau for past pages
@ -617,7 +618,7 @@ class pdf_rouget extends ModelePdfExpedition
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -627,7 +628,7 @@ class pdf_rouget extends ModelePdfExpedition
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {

View File

@ -227,7 +227,7 @@ class pdf_standard extends ModeleExpenseReport
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -267,6 +267,7 @@ class pdf_standard extends ModeleExpenseReport
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@ -522,7 +523,7 @@ class pdf_standard extends ModeleExpenseReport
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -532,7 +533,7 @@ class pdf_standard extends ModeleExpenseReport
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {

View File

@ -367,6 +367,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->setSignature($cert, $certprivate, $this->emetteur->name, '', 2, $info);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Set $this->atleastonediscount if you have at least one discount
@ -2123,6 +2124,7 @@ class pdf_crabe extends ModelePDFFactures
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox - 2, 2, $carac_client_name, 0, $ltrdirection);
$posy = $pdf->getY();
@ -2130,6 +2132,7 @@ class pdf_crabe extends ModelePDFFactures
// Show recipient information
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->SetXY($posx + 2, $posy);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox - 2, 4, $carac_client, 0, $ltrdirection);
// Show shipping address

View File

@ -392,6 +392,7 @@ class pdf_sponge extends ModelePDFFactures
$pdf->setSignature($cert, $certprivate, $this->emetteur->name, '', 2, $info);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Set $this->atleastonediscount if you have at least one discount
@ -2374,6 +2375,7 @@ class pdf_sponge extends ModelePDFFactures
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox - 2, 2, $carac_client_name, 0, $ltrdirection);
$posy = $pdf->getY();
@ -2381,6 +2383,7 @@ class pdf_sponge extends ModelePDFFactures
// Show recipient information
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->SetXY($posx + 2, $posy);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox - 2, 4, $carac_client, 0, $ltrdirection);
// Show shipping address
@ -2660,6 +2663,7 @@ class pdf_sponge extends ModelePDFFactures
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys
} else {
$this->cols = $hookmanager->resArray;

View File

@ -175,7 +175,7 @@ class pdf_soleil extends ModelePDFFicheinter
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -216,6 +216,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@ -414,7 +415,7 @@ class pdf_soleil extends ModelePDFFicheinter
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -424,7 +425,7 @@ class pdf_soleil extends ModelePDFFicheinter
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1;
} else {

View File

@ -185,7 +185,7 @@ class pdf_standard extends ModelePDFEvaluation
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
// Set nblines with the new command lines content after hook
@ -227,6 +227,7 @@ class pdf_standard extends ModelePDFEvaluation
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@ -251,7 +252,7 @@ class pdf_standard extends ModelePDFEvaluation
$pdf->SetFont('', 'B', $default_font_size);
$pdf->MultiCell(190, 4, $outputlangs->transnoentities("Notes") . ":", 0, 'L', 0, '', 12, $tab_top);
$tab_top +=4;
$tab_top += 4;
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxnotes + 1, $tab_top + 1, dol_htmlentitiesbr($object->note_public), 0, 1);
$nexY = $pdf->GetY();
@ -425,7 +426,7 @@ class pdf_standard extends ModelePDFEvaluation
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -435,7 +436,7 @@ class pdf_standard extends ModelePDFEvaluation
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {

View File

@ -374,7 +374,7 @@ class pdf_standard extends ModelePDFMovement
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -411,6 +411,7 @@ class pdf_standard extends ModelePDFMovement
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
@ -611,10 +612,10 @@ class pdf_standard extends ModelePDFMovement
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -666,9 +667,9 @@ class pdf_standard extends ModelePDFMovement
$nexY += 5;
$curY = $nexY;
$pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(220, 26, 26)));
$pdf->SetLineStyle(array('dash' => '0', 'color' => array(220, 26, 26)));
$pdf->line($this->marge_gauche, $curY - 1, $this->page_largeur - $this->marge_droite, $curY - 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
$pdf->SetFont('', 'B', $default_font_size - 1);
$pdf->SetTextColor(0, 0, 120);
@ -750,7 +751,7 @@ class pdf_standard extends ModelePDFMovement
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -760,7 +761,7 @@ class pdf_standard extends ModelePDFMovement
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -821,10 +822,10 @@ class pdf_standard extends ModelePDFMovement
// Output Rect
//$this->printRect($pdf,$this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(220, 26, 26)));
$pdf->SetLineStyle(array('dash' => '0', 'color' => array(220, 26, 26)));
$pdf->SetDrawColor(220, 26, 26);
$pdf->line($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite, $tab_top);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
$pdf->SetDrawColor(128, 128, 128);
$pdf->SetTextColor(0, 0, 120);
@ -892,9 +893,9 @@ class pdf_standard extends ModelePDFMovement
}
$pdf->SetDrawColor(220, 26, 26);
$pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(220, 26, 26)));
$pdf->SetLineStyle(array('dash' => '0', 'color' => array(220, 26, 26)));
$pdf->line($this->marge_gauche, $tab_top + 11, $this->page_largeur - $this->marge_droite, $tab_top + 11);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore

View File

@ -203,7 +203,7 @@ class pdf_vinci extends ModelePDFMo
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -243,6 +243,7 @@ class pdf_vinci extends ModelePDFMo
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Does we have at least one line with discount $this->atleastonediscount
@ -627,7 +628,7 @@ class pdf_vinci extends ModelePDFMo
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -637,7 +638,7 @@ class pdf_vinci extends ModelePDFMo
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -1466,6 +1467,7 @@ class pdf_vinci extends ModelePDFMo
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys
} else {
$this->cols = $hookmanager->resArray;

View File

@ -166,7 +166,7 @@ class pdf_standard extends ModelePDFProduct
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -206,6 +206,7 @@ class pdf_standard extends ModelePDFProduct
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
@ -571,7 +572,7 @@ class pdf_standard extends ModelePDFProduct
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -581,7 +582,7 @@ class pdf_standard extends ModelePDFProduct
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {

View File

@ -183,7 +183,7 @@ class pdf_baleine extends ModelePDFProjects
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -234,6 +234,7 @@ class pdf_baleine extends ModelePDFProjects
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@ -410,10 +411,10 @@ class pdf_baleine extends ModelePDFProjects
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -476,7 +477,7 @@ class pdf_baleine extends ModelePDFProjects
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -486,7 +487,7 @@ class pdf_baleine extends ModelePDFProjects
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {

View File

@ -214,7 +214,7 @@ class pdf_beluga extends ModelePDFProjects
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -267,6 +267,7 @@ class pdf_beluga extends ModelePDFProjects
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@ -316,106 +317,106 @@ class pdf_beluga extends ModelePDFProjects
$nexY = $tab_top + $heightoftitleline + 1;
$listofreferent = array(
'propal'=>array(
'name'=>"Proposals",
'title'=>"ListProposalsAssociatedProject",
'class'=>'Propal',
'table'=>'propal',
'datefieldname'=>'datep',
'test'=> isModEnabled('propal') && $user->hasRight('propal', 'lire'),
'lang'=>'propal'),
'order'=>array(
'name'=>"CustomersOrders",
'title'=>"ListOrdersAssociatedProject",
'class'=>'Commande',
'table'=>'commande',
'datefieldname'=>'date_commande',
'test'=> isModEnabled('order') && $user->hasRight('commande', 'lire'),
'lang'=>'orders'),
'invoice'=>array(
'name'=>"CustomersInvoices",
'title'=>"ListInvoicesAssociatedProject",
'class'=>'Facture',
'margin'=>'add',
'table'=>'facture',
'datefieldname'=>'datef',
'test'=> isModEnabled('invoice') && $user->hasRight('facture', 'lire'),
'lang'=>'bills'),
'invoice_predefined'=>array(
'name'=>"PredefinedInvoices",
'title'=>"ListPredefinedInvoicesAssociatedProject",
'class'=>'FactureRec',
'table'=>'facture_rec',
'datefieldname'=>'datec',
'test'=> isModEnabled('invoice') && $user->hasRight('facture', 'lire'),
'lang'=>'bills'),
'order_supplier'=>array(
'name'=>"SuppliersOrders",
'title'=>"ListSupplierOrdersAssociatedProject",
'class'=>'CommandeFournisseur',
'table'=>'commande_fournisseur',
'datefieldname'=>'date_commande',
'test'=>(isModEnabled("fournisseur") && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled("supplier_order") && $user->hasRight('supplier_order', 'lire')),
'lang'=>'orders'),
'invoice_supplier'=>array(
'name'=>"BillsSuppliers",
'title'=>"ListSupplierInvoicesAssociatedProject",
'class'=>'FactureFournisseur',
'margin'=>'minus',
'table'=>'facture_fourn',
'datefieldname'=>'datef',
'test'=>(isModEnabled("fournisseur") && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled("supplier_invoice") && $user->hasRight('supplier_invoice', 'lire')),
'lang'=>'bills'),
'contract'=>array(
'name'=>"Contracts",
'title'=>"ListContractAssociatedProject",
'class'=>'Contrat',
'table'=>'contrat',
'datefieldname'=>'date_contrat',
'test'=> isModEnabled('contract') && $user->hasRight('contrat', 'lire'),
'lang'=>'contract'),
'intervention'=>array(
'name'=>"Interventions",
'title'=>"ListFichinterAssociatedProject",
'class'=>'Fichinter',
'table'=>'fichinter',
'datefieldname'=>'date_valid',
'disableamount'=>1,
'test'=>isModEnabled('intervention') && $user->hasRight('ficheinter', 'lire'),
'lang'=>'interventions'),
'trip'=>array(
'name'=>"TripsAndExpenses",
'title'=>"ListExpenseReportsAssociatedProject",
'class'=>'Deplacement',
'table'=>'deplacement',
'datefieldname'=>'dated',
'margin'=>'minus',
'disableamount'=>1,
'test'=>isModEnabled('deplacement') && $user->hasRight('deplacement', 'lire'),
'lang'=>'trip'),
'expensereport'=>array(
'name'=>"ExpensesReports",
'title'=>"ListExpenseReportsAssociatedProject",
'class'=>'ExpenseReport',
'table'=>'expensereport',
'datefieldname'=>'dated',
'margin'=>'minus',
'disableamount'=>1,
'test'=>isModEnabled('expensereport') && $user->hasRight('expensereport', 'lire'),
'lang'=>'trip'),
'agenda'=>array(
'name'=>"Agenda",
'title'=>"ListActionsAssociatedProject",
'class'=>'ActionComm',
'table'=>'actioncomm',
'datefieldname'=>'datep',
'disableamount'=>1,
'test'=> isModEnabled('agenda') && $user->hasRight('agenda', 'allactions', 'read'),
'lang'=>'agenda')
'propal' => array(
'name' => "Proposals",
'title' => "ListProposalsAssociatedProject",
'class' => 'Propal',
'table' => 'propal',
'datefieldname' => 'datep',
'test' => isModEnabled('propal') && $user->hasRight('propal', 'lire'),
'lang' => 'propal'),
'order' => array(
'name' => "CustomersOrders",
'title' => "ListOrdersAssociatedProject",
'class' => 'Commande',
'table' => 'commande',
'datefieldname' => 'date_commande',
'test' => isModEnabled('order') && $user->hasRight('commande', 'lire'),
'lang' => 'orders'),
'invoice' => array(
'name' => "CustomersInvoices",
'title' => "ListInvoicesAssociatedProject",
'class' => 'Facture',
'margin' => 'add',
'table' => 'facture',
'datefieldname' => 'datef',
'test' => isModEnabled('invoice') && $user->hasRight('facture', 'lire'),
'lang' => 'bills'),
'invoice_predefined' => array(
'name' => "PredefinedInvoices",
'title' => "ListPredefinedInvoicesAssociatedProject",
'class' => 'FactureRec',
'table' => 'facture_rec',
'datefieldname' => 'datec',
'test' => isModEnabled('invoice') && $user->hasRight('facture', 'lire'),
'lang' => 'bills'),
'order_supplier' => array(
'name' => "SuppliersOrders",
'title' => "ListSupplierOrdersAssociatedProject",
'class' => 'CommandeFournisseur',
'table' => 'commande_fournisseur',
'datefieldname' => 'date_commande',
'test' => (isModEnabled("fournisseur") && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled("supplier_order") && $user->hasRight('supplier_order', 'lire')),
'lang' => 'orders'),
'invoice_supplier' => array(
'name' => "BillsSuppliers",
'title' => "ListSupplierInvoicesAssociatedProject",
'class' => 'FactureFournisseur',
'margin' => 'minus',
'table' => 'facture_fourn',
'datefieldname' => 'datef',
'test' => (isModEnabled("fournisseur") && !getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled("supplier_invoice") && $user->hasRight('supplier_invoice', 'lire')),
'lang' => 'bills'),
'contract' => array(
'name' => "Contracts",
'title' => "ListContractAssociatedProject",
'class' => 'Contrat',
'table' => 'contrat',
'datefieldname' => 'date_contrat',
'test' => isModEnabled('contract') && $user->hasRight('contrat', 'lire'),
'lang' => 'contract'),
'intervention' => array(
'name' => "Interventions",
'title' => "ListFichinterAssociatedProject",
'class' => 'Fichinter',
'table' => 'fichinter',
'datefieldname' => 'date_valid',
'disableamount' => 1,
'test' => isModEnabled('intervention') && $user->hasRight('ficheinter', 'lire'),
'lang' => 'interventions'),
'trip' => array(
'name' => "TripsAndExpenses",
'title' => "ListExpenseReportsAssociatedProject",
'class' => 'Deplacement',
'table' => 'deplacement',
'datefieldname' => 'dated',
'margin' => 'minus',
'disableamount' => 1,
'test' => isModEnabled('deplacement') && $user->hasRight('deplacement', 'lire'),
'lang' => 'trip'),
'expensereport' => array(
'name' => "ExpensesReports",
'title' => "ListExpenseReportsAssociatedProject",
'class' => 'ExpenseReport',
'table' => 'expensereport',
'datefieldname' => 'dated',
'margin' => 'minus',
'disableamount' => 1,
'test' => isModEnabled('expensereport') && $user->hasRight('expensereport', 'lire'),
'lang' => 'trip'),
'agenda' => array(
'name' => "Agenda",
'title' => "ListActionsAssociatedProject",
'class' => 'ActionComm',
'table' => 'actioncomm',
'datefieldname' => 'datep',
'disableamount' => 1,
'test' => isModEnabled('agenda') && $user->hasRight('agenda', 'allactions', 'read'),
'lang' => 'agenda')
);
$hookmanager->initHooks(array('completeListOfReferent'));
$hookmanager->executeHooks('completeListOfReferent', ['listofreferent'=>$listofreferent], $object, $action);
$hookmanager->executeHooks('completeListOfReferent', ['listofreferent' => $listofreferent], $object, $action);
if (!empty($hookmanager->resArray)) {
$listofreferent = array_merge($listofreferent, $hookmanager->resArray);
}
@ -708,7 +709,7 @@ class pdf_beluga extends ModelePDFProjects
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -718,7 +719,7 @@ class pdf_beluga extends ModelePDFProjects
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {

View File

@ -178,7 +178,7 @@ class pdf_timespent extends ModelePDFProjects
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -229,6 +229,7 @@ class pdf_timespent extends ModelePDFProjects
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@ -408,10 +409,10 @@ class pdf_timespent extends ModelePDFProjects
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -474,7 +475,7 @@ class pdf_timespent extends ModelePDFProjects
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -484,7 +485,7 @@ class pdf_timespent extends ModelePDFProjects
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {

View File

@ -294,7 +294,7 @@ class pdf_azur extends ModelePDFPropales
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -335,6 +335,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Set $this->atleastonediscount if you have at least one discount
@ -664,7 +665,7 @@ class pdf_azur extends ModelePDFPropales
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
}
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
if ($posYAfterImage > $posYAfterDescription) {
$nexY = $posYAfterImage;
@ -673,10 +674,10 @@ class pdf_azur extends ModelePDFPropales
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -827,7 +828,7 @@ class pdf_azur extends ModelePDFPropales
//Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -837,7 +838,7 @@ class pdf_azur extends ModelePDFPropales
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -911,7 +912,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetXY($this->marge_gauche, $posy);
$titre = $outputlangs->transnoentities("DateDeliveryPlanned").':';
$pdf->MultiCell(80, 4, $titre, 0, 'L');
$pdf->SetFont('', '', $default_font_size -$diffsizetitle);
$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
$pdf->SetXY($posxval, $posy);
$dlp = dol_print_date($object->delivery_date, $displaydate, false, $outputlangs, true);
$pdf->MultiCell(80, 4, $dlp, 0, 'L');
@ -1694,6 +1695,7 @@ class pdf_azur extends ModelePDFPropales
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, $ltrdirection);
$posy = $pdf->getY();
@ -1701,6 +1703,7 @@ class pdf_azur extends ModelePDFPropales
// Show recipient information
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->SetXY($posx + 2, $posy);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
}

View File

@ -276,7 +276,7 @@ class pdf_cyan extends ModelePDFPropales
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -317,6 +317,7 @@ class pdf_cyan extends ModelePDFPropales
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Set $this->atleastonediscount if you have at least one discount
@ -711,9 +712,9 @@ class pdf_cyan extends ModelePDFPropales
$parameters = array(
'object' => $object,
'i' => $i,
'pdf' =>& $pdf,
'curY' =>& $curY,
'nexY' =>& $nexY,
'pdf' => & $pdf,
'curY' => & $curY,
'nexY' => & $nexY,
'outputlangs' => $outputlangs,
'hidedetails' => $hidedetails
);
@ -784,7 +785,7 @@ class pdf_cyan extends ModelePDFPropales
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
}
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
if ($posYAfterImage > $posYAfterDescription) {
$nexY = max($nexY, $posYAfterImage);
@ -793,10 +794,10 @@ class pdf_cyan extends ModelePDFPropales
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -940,7 +941,7 @@ class pdf_cyan extends ModelePDFPropales
//Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -950,7 +951,7 @@ class pdf_cyan extends ModelePDFPropales
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -1771,6 +1772,7 @@ class pdf_cyan extends ModelePDFPropales
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 2, $carac_client_name, 0, $ltrdirection);
$posy = $pdf->getY();
@ -1778,6 +1780,7 @@ class pdf_cyan extends ModelePDFPropales
// Show recipient information
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->SetXY($posx + 2, $posy);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
}
@ -2036,6 +2039,7 @@ class pdf_cyan extends ModelePDFPropales
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys
} else {
$this->cols = $hookmanager->resArray;

View File

@ -175,7 +175,7 @@ class pdf_paiement extends CommonDocGenerator
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$this, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $this, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $this, $action); // Note that $action and $this may have been modified by some hooks
@ -337,6 +337,7 @@ class pdf_paiement extends CommonDocGenerator
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
$pdf->SetAutoPageBreak(1, 0);
@ -365,7 +366,7 @@ class pdf_paiement extends CommonDocGenerator
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$this, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $this, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -375,7 +376,7 @@ class pdf_paiement extends CommonDocGenerator
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1;
}
@ -495,7 +496,7 @@ class pdf_paiement extends CommonDocGenerator
if ($yp > $this->tab_height - 15) {
$pdf->SetFillColor(255, 255, 255);
$pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array());
$pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1));
$pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash' => 1));
$pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp);
$pdf->SetFont('', 'B', $default_font_size - 1);
$pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp);
@ -556,7 +557,7 @@ class pdf_paiement extends CommonDocGenerator
if ((($this->doc_type == 'client' && getDolGlobalString('PAYMENTS_REPORT_GROUP_BY_MOD')) || ($this->doc_type == 'fourn' && getDolGlobalString('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD'))) && ($mod != $lines[$j + 1][2])) {
$pdf->SetFillColor(245, 245, 245);
$pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array());
$pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1));
$pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash' => 1));
$pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp);
$pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp);
$pdf->SetFont('', 'I', $default_font_size - 1);
@ -580,7 +581,7 @@ class pdf_paiement extends CommonDocGenerator
$total += $total_page;
$pdf->SetFillColor(255, 255, 255);
$pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array());
$pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1));
$pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash' => 1));
$pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp);
$pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp);
$pdf->SetFont('', 'B');

View File

@ -233,7 +233,7 @@ class pdf_squille extends ModelePdfReception
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -275,6 +275,7 @@ class pdf_squille extends ModelePdfReception
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@ -548,10 +549,10 @@ class pdf_squille extends ModelePdfReception
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY - 1, $this->page_largeur - $this->marge_droite, $nexY - 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
// Detect if some page were added automatically and output _tableau for past pages
@ -610,7 +611,7 @@ class pdf_squille extends ModelePdfReception
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {

View File

@ -176,7 +176,7 @@ class pdf_standard extends ModelePDFStock
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -216,6 +216,7 @@ class pdf_standard extends ModelePDFStock
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
@ -397,10 +398,10 @@ class pdf_standard extends ModelePDFStock
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -453,9 +454,9 @@ class pdf_standard extends ModelePDFStock
$curY = $nexY;
if ($nblines > 0) {
$pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(200, 200, 200)));
$pdf->SetLineStyle(array('dash' => '0', 'color' => array(200, 200, 200)));
$pdf->line($this->marge_gauche, $curY - 1, $this->page_largeur - $this->marge_droite, $curY - 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
$pdf->SetFont('', 'B', $default_font_size - 1);
$pdf->SetTextColor(0, 0, 0);
@ -547,7 +548,7 @@ class pdf_standard extends ModelePDFStock
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -557,7 +558,7 @@ class pdf_standard extends ModelePDFStock
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -617,35 +618,35 @@ class pdf_standard extends ModelePDFStock
$pdf->SetFont('', 'B', $default_font_size - 3);
// Output Rect
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
$pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(200, 200, 200)));
$pdf->SetLineStyle(array('dash' => '0', 'color' => array(200, 200, 200)));
$pdf->SetDrawColor(200, 200, 200);
$pdf->line($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite, $tab_top);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
$pdf->SetDrawColor(128, 128, 128);
$pdf->SetTextColor(0, 0, 0);
if (empty($hidetop)) {
$pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11); // line takes a position y in 2nd parameter and 4th parameter
$pdf->line($this->marge_gauche, $tab_top + 11, $this->page_largeur - $this->marge_droite, $tab_top + 11); // line takes a position y in 2nd parameter and 4th parameter
$pdf->SetXY($this->posxdesc - 1, $tab_top + 1);
$pdf->MultiCell($this->wref, 3, $outputlangs->transnoentities("Ref"), '', 'L');
}
$pdf->line($this->posxlabel-1, $tab_top, $this->posxlabel-1, $tab_top + $tab_height);
$pdf->line($this->posxlabel - 1, $tab_top, $this->posxlabel - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxlabel - 1, $tab_top + 1);
$pdf->MultiCell($this->posxqty - $this->posxlabel - 1, 2, $outputlangs->transnoentities("Label"), '', 'C');
}
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
$pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxqty - 1, $tab_top + 1);
$pdf->MultiCell($this->posxup - $this->posxqty - 1, 2, $outputlangs->transnoentities("Units"), '', 'C');
}
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
$pdf->line($this->posxup - 1, $tab_top, $this->posxup - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxup - 1, $tab_top + 1);
$pdf->MultiCell($this->posxunit - $this->posxup - 1, 2, $outputlangs->transnoentities("AverageUnitPricePMPShort"), '', 'C');
@ -657,7 +658,7 @@ class pdf_standard extends ModelePDFStock
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '', 'C');
}
$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
$pdf->line($this->posxdiscount - 1, $tab_top, $this->posxdiscount - 1, $tab_top + $tab_height);
if (empty($hidetop)) {
$pdf->SetXY($this->posxdiscount - 1, $tab_top + 1);
$pdf->MultiCell($this->postotalht - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("SellPriceMin"), '', 'C');

View File

@ -323,6 +323,7 @@ class pdf_eagle extends ModelePDFStockTransfer
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page

View File

@ -255,7 +255,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -292,6 +292,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
/// Does we have at least one line with discount $this->atleastonediscount
@ -662,9 +663,9 @@ class pdf_eagle_proforma extends ModelePDFCommandes
$parameters = array(
'object' => $object,
'i' => $i,
'pdf' =>& $pdf,
'curY' =>& $curY,
'nexY' =>& $nexY,
'pdf' => & $pdf,
'curY' => & $curY,
'nexY' => & $nexY,
'outputlangs' => $outputlangs,
'hidedetails' => $hidedetails
);
@ -727,10 +728,10 @@ class pdf_eagle_proforma extends ModelePDFCommandes
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
@ -796,7 +797,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -806,7 +807,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -1650,6 +1651,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys
} else {
$this->cols = $hookmanager->resArray;

View File

@ -220,7 +220,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -267,6 +267,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Set $this->atleastonediscount if you have at least one discount
@ -503,10 +504,10 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -578,7 +579,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -588,7 +589,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {

View File

@ -255,7 +255,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -295,6 +295,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Does we have at least one line with discount $this->atleastonediscount
@ -638,9 +639,9 @@ class pdf_cornas extends ModelePDFSuppliersOrders
$parameters = array(
'object' => $object,
'i' => $i,
'pdf' =>& $pdf,
'curY' =>& $curY,
'nexY' =>& $nexY,
'pdf' => & $pdf,
'curY' => & $curY,
'nexY' => & $nexY,
'outputlangs' => $outputlangs,
'hidedetails' => $hidedetails
);
@ -711,7 +712,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
}
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
if ($posYAfterImage > $posYAfterDescription) {
$nexY = $posYAfterImage;
@ -720,10 +721,10 @@ class pdf_cornas extends ModelePDFSuppliersOrders
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
// Detect if some page were added automatically and output _tableau for past pages
@ -796,7 +797,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -806,7 +807,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -1424,6 +1425,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, $ltrdirection);
$posy = $pdf->getY();
@ -1431,6 +1433,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
// Show recipient information
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->SetXY($posx + 2, $posy);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
}
@ -1639,6 +1642,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys
} else {
$this->cols = $hookmanager->resArray;

View File

@ -266,7 +266,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -307,6 +307,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Positionne $this->atleastonediscount si on a au moins une remise
@ -588,7 +589,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
}
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
if ($posYAfterImage > $posYAfterDescription) {
$nexY = $posYAfterImage;
@ -597,10 +598,10 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -675,7 +676,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -685,7 +686,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -1338,6 +1339,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, $ltrdirection);
$posy = $pdf->getY();
@ -1345,6 +1347,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// Show recipient information
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->SetXY($posx + 2, $posy);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
}

View File

@ -223,7 +223,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -263,6 +263,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
@ -383,10 +384,10 @@ class pdf_standard extends ModelePDFSuppliersPayments
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -456,7 +457,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -466,7 +467,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {

View File

@ -258,7 +258,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -297,6 +297,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Positionne $this->atleastonediscount si on a au moins une remise
@ -575,7 +576,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
}
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
if ($posYAfterImage > $posYAfterDescription) {
$nexY = $posYAfterImage;
@ -584,10 +585,10 @@ class pdf_aurore extends ModelePDFSupplierProposal
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
$nexY += 2; // Add space between lines
@ -665,7 +666,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
//Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -675,7 +676,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {

View File

@ -254,7 +254,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
$hookmanager = new HookManager($this->db);
}
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
@ -294,6 +294,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
$pdf->SetCompression(false);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// Does we have at least one line with discount $this->atleastonediscount
@ -637,9 +638,9 @@ class pdf_zenith extends ModelePDFSupplierProposal
$parameters = array(
'object' => $object,
'i' => $i,
'pdf' =>& $pdf,
'curY' =>& $curY,
'nexY' =>& $nexY,
'pdf' => & $pdf,
'curY' => & $curY,
'nexY' => & $nexY,
'outputlangs' => $outputlangs,
'hidedetails' => $hidedetails
);
@ -710,7 +711,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
}
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate'=>$vatrate, 'vatcode'=>$vatcode, 'amount'=> $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')] = array('vatrate' => $vatrate, 'vatcode' => $vatcode, 'amount' => $this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] + $tvaligne);
if ($posYAfterImage > $posYAfterDescription) {
$nexY = $posYAfterImage;
@ -719,10 +720,10 @@ class pdf_zenith extends ModelePDFSupplierProposal
// Add line
if (getDolGlobalString('MAIN_PDF_DASH_BETWEEN_LINES') && $i < ($nblines - 1)) {
$pdf->setPage($pageposafter);
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
$pdf->SetLineStyle(array('dash' => '1,1', 'color' => array(80, 80, 80)));
//$pdf->SetDrawColor(190,190,200);
$pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
$pdf->SetLineStyle(array('dash'=>0));
$pdf->SetLineStyle(array('dash' => 0));
}
// Detect if some page were added automatically and output _tableau for past pages
@ -795,7 +796,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -805,7 +806,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -1413,6 +1414,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
// Show recipient name
$pdf->SetXY($posx + 2, $posy + 3);
$pdf->SetFont('', 'B', $default_font_size);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client_name, 0, $ltrdirection);
$posy = $pdf->getY();
@ -1420,6 +1422,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
// Show recipient information
$pdf->SetFont('', '', $default_font_size - 1);
$pdf->SetXY($posx + 2, $posy);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, $ltrdirection);
}
@ -1610,6 +1613,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys
} else {
$this->cols = $hookmanager->resArray;

View File

@ -290,7 +290,7 @@ if ($nolinesbefore) {
// $senderissupplier=2 is the same as 1 but disables test on minimum qty, disable autofill qty with minimum and autofill unit price
if ($senderissupplier != 2) {
$ajaxoptions = array(
'update' => array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key
'update' => array('qty' => 'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key
'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done
'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo)
);
@ -344,6 +344,7 @@ if ($nolinesbefore) {
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
// @FIXME Not working yet
$tmpbacktopagejsfields = 'addproduct:id,search_id';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print dolButtonToOpenUrlInDialogPopup('addproduct', $langs->transnoentitiesnoconv('AddProduct'), $newbutton, $url, '', '', $tmpbacktopagejsfields);
} else {
print '<a href="'.DOL_URL_ROOT.'/product/card.php?action=create&type=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'" title="'.dol_escape_htmltag($langs->trans("NewProduct")).'"><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
@ -355,6 +356,7 @@ if ($nolinesbefore) {
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
// @FIXME Not working yet
$tmpbacktopagejsfields = 'addproduct:id,search_id';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print dolButtonToOpenUrlInDialogPopup('addproduct', $langs->transnoentitiesnoconv('AddService'), $newbutton, $url, '', '', $tmpbacktopagejsfields);
} else {
print '<a href="'.DOL_URL_ROOT.'/product/card.php?action=create&type=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id).'" title="'.dol_escape_htmltag($langs->trans("NewService")).'"><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
@ -382,14 +384,14 @@ if ($nolinesbefore) {
}
if (is_object($hookmanager) && empty($senderissupplier)) {
$parameters = array('fk_parent_line'=>GETPOSTINT('fk_parent_line'));
$parameters = array('fk_parent_line' => GETPOSTINT('fk_parent_line'));
$reshook = $hookmanager->executeHooks('formCreateProductOptions', $parameters, $object, $action);
if (!empty($hookmanager->resPrint)) {
print $hookmanager->resPrint;
}
}
if (is_object($hookmanager) && !empty($senderissupplier)) {
$parameters = array('htmlname'=>'addproduct');
$parameters = array('htmlname' => 'addproduct');
$reshook = $hookmanager->executeHooks('formCreateProductSupplierOptions', $parameters, $object, $action);
if (!empty($hookmanager->resPrint)) {
print $hookmanager->resPrint;
@ -441,7 +443,7 @@ if ($nolinesbefore) {
if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier' || $object->element == 'invoice_supplier_rec') { // We must have same test in printObjectLines
$coldisplay++; ?>
<td class="nobottom linecolrefsupplier"><input id="fourn_ref" name="fourn_ref" class="flat minwidth50 maxwidth100 maxwidth125onsmartphone" value="<?php echo(GETPOSTISSET("fourn_ref") ? GETPOST("fourn_ref", 'alpha', 2) : ''); ?>"></td>
<?php
<?php
}
print '<td class="nobottom linecolvat right">';
$coldisplay++;
@ -475,7 +477,7 @@ if ($nolinesbefore) {
<td class="nobottom linecoluttc right">
<input type="text" size="5" name="price_ttc" id="price_ttc" class="flat right" value="<?php echo(GETPOSTISSET("price_ttc") ? GETPOST("price_ttc", 'alpha', 2) : ''); ?>">
</td>
<?php
<?php
}
$coldisplay++;
?>
@ -510,21 +512,21 @@ if ($nolinesbefore) {
$coldisplay++; ?>
<td class="nobottom margininfos linecolmargin right">
<!-- For predef product -->
<?php if (isModEnabled("product") || isModEnabled("service")) { ?>
<?php if (isModEnabled("product") || isModEnabled("service")) { ?>
<select id="fournprice_predef" name="fournprice_predef" class="flat minwidth75imp maxwidth150" style="display: none;"></select>
<?php } ?>
<?php } ?>
<!-- For free product -->
<input type="text" id="buying_price" name="buying_price" class="flat maxwidth75 right" value="<?php echo(GETPOSTISSET("buying_price") ? GETPOST("buying_price", 'alpha', 2) : ''); ?>">
</td>
<?php
if (getDolGlobalString('DISPLAY_MARGIN_RATES')) {
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right width40" type="text" id="np_marginRate" name="np_marginRate" value="'.(GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", 'alpha', 2) : '').'"><span class="np_marginRate opacitymedium hideonsmartphone">%</span></td>';
$coldisplay++;
}
if (getDolGlobalString('DISPLAY_MARK_RATES')) {
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right width40" type="text" id="np_markRate" name="np_markRate" value="'.(GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : '').'"><span class="np_markRate opacitymedium hideonsmartphone">%</span></td>';
$coldisplay++;
}
<?php
if (getDolGlobalString('DISPLAY_MARGIN_RATES')) {
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right width40" type="text" id="np_marginRate" name="np_marginRate" value="'.(GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", 'alpha', 2) : '').'"><span class="np_marginRate opacitymedium hideonsmartphone">%</span></td>';
$coldisplay++;
}
if (getDolGlobalString('DISPLAY_MARK_RATES')) {
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right width40" type="text" id="np_markRate" name="np_markRate" value="'.(GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : '').'"><span class="np_markRate opacitymedium hideonsmartphone">%</span></td>';
$coldisplay++;
}
}
}
$coldisplay += $colspan;
@ -536,15 +538,15 @@ if ($nolinesbefore) {
<?php
if ((isModEnabled("service") || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') { // We show date field if required
print '<tr id="trlinefordates" class="oddeven">'."\n";
print '<tr id="trlinefordates" class="oddeven">'."\n";
if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) {
print '<td></td>';
}
print '<td colspan="'.($coldisplay - (!getDolGlobalString('MAIN_VIEW_LINE_NUMBER') ? 0 : 1)).'">';
$date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
$date_end = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
print '<td colspan="'.($coldisplay - (!getDolGlobalString('MAIN_VIEW_LINE_NUMBER') ? 0 : 1)).'">';
$date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear'));
$date_end = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), 0, GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
$prefillDates = false;
$prefillDates = false;
if (getDolGlobalString('MAIN_FILL_SERVICE_DATES_FROM_LAST_SERVICE_LINE') && !empty($object->lines)) {
for ($i = count($object->lines) - 1; $i >= 0; $i--) {
@ -576,7 +578,7 @@ if ((isModEnabled("service") || ($object->element == 'contrat')) && $dateSelecto
echo ' <span class="small"><a href="#" id="prefill_service_dates">'.$langs->trans('FillWithLastServiceDates').'</a></span>';
}
print '<script>';
print '<script>';
if ($prefillDates) {
?>
@ -612,9 +614,9 @@ if ((isModEnabled("service") || ($object->element == 'contrat')) && $dateSelecto
print 'jQuery("#date_endmin").val("' . getDolGlobalString('MAIN_DEFAULT_DATE_END_MIN').'");';
}
}
print '</script>';
print '</td>';
print '</tr>'."\n";
print '</script>';
print '</td>';
print '</tr>'."\n";
}
@ -778,7 +780,7 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) {
}
}
});
<?php
<?php
} ?>
/* When changing predefined product, we reload list of supplier prices required for margin combo */
$("#idprod, #idprodfournprice").change(function()
@ -890,18 +892,18 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) {
console.log("stringforvatrateselection="+stringforvatrateselection+" -> value of option label for this key="+$('#tva_tx option[value="'+stringforvatrateselection+'"]').val());
$('#tva_tx option[value="'+stringforvatrateselection+'"]').prop('selected', true);
<?php
if (getDolGlobalInt('PRODUIT_AUTOFILL_DESC') == 1) {
if (getDolGlobalInt('MAIN_MULTILANGS') && getDolGlobalString('PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE')) { ?>
var proddesc = data.desc_trans;
<?php
} else { ?>
var proddesc = data.desc;
<?php
} ?>
console.log("objectline_create.tpl Load description into text area : "+proddesc);
<?php
if (getDolGlobalString('FCKEDITOR_ENABLE_DETAILS')) { ?>
if (getDolGlobalInt('PRODUIT_AUTOFILL_DESC') == 1) {
if (getDolGlobalInt('MAIN_MULTILANGS') && getDolGlobalString('PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE')) { ?>
var proddesc = data.desc_trans;
<?php
} else { ?>
var proddesc = data.desc;
<?php
} ?>
console.log("objectline_create.tpl Load description into text area : "+proddesc);
<?php
if (getDolGlobalString('FCKEDITOR_ENABLE_DETAILS')) { ?>
if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined")
{
var editor = CKEDITOR.instances['dp_desc'];
@ -909,25 +911,25 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) {
editor.setData(proddesc);
}
}
<?php
} else { ?>
<?php
} else { ?>
jQuery('#dp_desc').text(proddesc);
<?php
} ?>
<?php
} ?>
<?php
} ?>
<?php
if (getDolGlobalString('PRODUCT_LOAD_EXTRAFIELD_INTO_OBJECTLINES')) { ?>
if (getDolGlobalString('PRODUCT_LOAD_EXTRAFIELD_INTO_OBJECTLINES')) { ?>
jQuery.each(data.array_options, function( key, value ) {
jQuery('div[class*="det'+key.replace('options_','_extras_')+'"] > #'+key).val(value);
});
<?php
} ?>
<?php
} ?>
},
'json'
);
}
<?php
<?php
}
if (!empty($usemargins) && $user->hasRight('margins', 'creer')) {
@ -1036,7 +1038,7 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) {
},
'json');
<?php
<?php
}
?>

View File

@ -84,10 +84,10 @@ $hookmanager->initHooks(array('donationlist'));
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'd.rowid'=>'Id',
'd.ref'=>'Ref',
'd.lastname'=>'Lastname',
'd.firstname'=>'Firstname',
'd.rowid' => 'Id',
'd.ref' => 'Ref',
'd.lastname' => 'Lastname',
'd.firstname' => 'Firstname',
);
// Security check
@ -288,13 +288,14 @@ print '<input type="hidden" name="mode" value="'.$mode.'">';
print '<input type="hidden" name="type" value="'.$type.'">';
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
if ($user->hasRight('don', 'creer')) {
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewDonation'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/don/card.php?action=create');
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_donation', 0, $newcardbutton, '', $limit, 0, 0, 1);
if ($search_all) {
@ -350,11 +351,12 @@ if (isModEnabled('project')) {
print '<td class="liste_titre right"><input name="search_amount" class="flat" type="text" size="8" value="'.$search_amount.'"></td>';
print '<td class="liste_titre center parentonrightofpage">';
$liststatus = array(
Don::STATUS_DRAFT=>$langs->trans("DonationStatusPromiseNotValidated"),
Don::STATUS_VALIDATED=>$langs->trans("DonationStatusPromiseValidated"),
Don::STATUS_PAID=>$langs->trans("DonationStatusPaid"),
Don::STATUS_CANCELED=>$langs->trans("Canceled")
Don::STATUS_DRAFT => $langs->trans("DonationStatusPromiseNotValidated"),
Don::STATUS_VALIDATED => $langs->trans("DonationStatusPromiseValidated"),
Don::STATUS_PAID => $langs->trans("DonationStatusPaid"),
Don::STATUS_CANCELED => $langs->trans("Canceled")
);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, -4, 0, 0, '', 0, 0, 0, '', 'search_status maxwidth100 onrightofpage');
print '</td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {

View File

@ -81,21 +81,21 @@ $search_all = trim(GETPOSTISSET("search_all") ? GETPOST("search_all", 'alpha') :
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'pd.rowid'=>"RefPayment",
's.nom'=>"ThirdParty",
'pd.num_paiement'=>"Numero",
'pd.amount'=>"Amount",
'pd.rowid' => "RefPayment",
's.nom' => "ThirdParty",
'pd.num_paiement' => "Numero",
'pd.amount' => "Amount",
);
$arrayfields = array(
'pd.rowid' => array('label'=>"RefPayment", 'checked'=>1, 'position'=>10),
'pd.datep' => array('label'=>"Date", 'checked'=>1, 'position'=>20),
's.nom' => array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30),
'c.code' => array('label'=>"Type", 'checked'=>1, 'position'=>40),
'pd.num_paiement' => array('label'=>"Numero", 'checked'=>1, 'position'=>50, 'tooltip'=>"ChequeOrTransferNumber"),
'transaction' => array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>60, 'enabled'=>(isModEnabled("bank"))),
'ba.label' => array('label'=>"BankAccount", 'checked'=>1, 'position'=>70, 'enabled'=>(isModEnabled("bank"))),
'pd.amount' => array('label'=>"Amount", 'checked'=>1, 'position'=>80),
'pd.rowid' => array('label' => "RefPayment", 'checked' => 1, 'position' => 10),
'pd.datep' => array('label' => "Date", 'checked' => 1, 'position' => 20),
's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 30),
'c.code' => array('label' => "Type", 'checked' => 1, 'position' => 40),
'pd.num_paiement' => array('label' => "Numero", 'checked' => 1, 'position' => 50, 'tooltip' => "ChequeOrTransferNumber"),
'transaction' => array('label' => "BankTransactionLine", 'checked' => 1, 'position' => 60, 'enabled' => (isModEnabled("bank"))),
'ba.label' => array('label' => "BankAccount", 'checked' => 1, 'position' => 70, 'enabled' => (isModEnabled("bank"))),
'pd.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 80),
);
$arrayfields = dol_sort_array($arrayfields, 'position');
@ -116,7 +116,7 @@ $permissiontodelete = $user->hasRight('don', 'delete');
* Actions
*/
$parameters = array('socid'=>$paiementid);
$parameters = array('socid' => $paiementid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -316,6 +316,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("DonationPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit, 0, 0, 1);
if ($search_all) {
@ -412,7 +413,7 @@ if (!empty($arrayfields['pd.amount']['checked'])) {
}
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
@ -477,7 +478,7 @@ if (!empty($arrayfields['pd.amount']['checked'])) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column

View File

@ -108,11 +108,11 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'e.ref'=>"Ref",
's.nom'=>"ThirdParty",
'e.note_public'=>'NotePublic',
'e.ref' => "Ref",
's.nom' => "ThirdParty",
'e.note_public' => 'NotePublic',
//'e.fk_shipping_method'=>'SendingMethod', // TODO fix this, does not work
'e.tracking_number'=>"TrackingNumber",
'e.tracking_number' => "TrackingNumber",
);
if (empty($user->socid)) {
$fieldstosearchall["e.note_private"] = "NotePrivate";
@ -120,24 +120,24 @@ if (empty($user->socid)) {
$checkedtypetiers = 0;
$arrayfields = array(
'e.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1, 'position'=>1),
'e.ref_customer'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1, 'position'=>2),
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>3),
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1, 'position'=>4),
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1, 'position'=>5),
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0, 'position'=>6),
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0, 'position'=>7),
'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers, 'position'=>8),
'e.date_delivery'=>array('label'=>$langs->trans("DateDeliveryPlanned"), 'checked'=>1, 'position'=>9),
'e.fk_shipping_method'=>array('label'=>$langs->trans('SendingMethod'), 'checked'=>1, 'position'=>10),
'e.tracking_number'=>array('label'=>$langs->trans("TrackingNumber"), 'checked'=>1, 'position'=>11),
'e.weight'=>array('label'=>$langs->trans("Weight"), 'checked'=>0, 'position'=>12),
'e.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
'e.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
'e.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
'l.ref'=>array('label'=>$langs->trans("DeliveryRef"), 'checked'=>1, 'position'=>1010, 'enabled'=>(getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') ? 1 : 0)),
'l.date_delivery'=>array('label'=>$langs->trans("DateReceived"), 'position'=>1020, 'checked'=>1, 'enabled'=>(getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') ? 1 : 0)),
'e.billed'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1100, 'enabled'=>'getDolGlobalString("WORKFLOW_BILL_ON_SHIPMENT") !== "0"')
'e.ref' => array('label' => $langs->trans("Ref"), 'checked' => 1, 'position' => 1),
'e.ref_customer' => array('label' => $langs->trans("RefCustomer"), 'checked' => 1, 'position' => 2),
's.nom' => array('label' => $langs->trans("ThirdParty"), 'checked' => 1, 'position' => 3),
's.town' => array('label' => $langs->trans("Town"), 'checked' => 1, 'position' => 4),
's.zip' => array('label' => $langs->trans("Zip"), 'checked' => 1, 'position' => 5),
'state.nom' => array('label' => $langs->trans("StateShort"), 'checked' => 0, 'position' => 6),
'country.code_iso' => array('label' => $langs->trans("Country"), 'checked' => 0, 'position' => 7),
'typent.code' => array('label' => $langs->trans("ThirdPartyType"), 'checked' => $checkedtypetiers, 'position' => 8),
'e.date_delivery' => array('label' => $langs->trans("DateDeliveryPlanned"), 'checked' => 1, 'position' => 9),
'e.fk_shipping_method' => array('label' => $langs->trans('SendingMethod'), 'checked' => 1, 'position' => 10),
'e.tracking_number' => array('label' => $langs->trans("TrackingNumber"), 'checked' => 1, 'position' => 11),
'e.weight' => array('label' => $langs->trans("Weight"), 'checked' => 0, 'position' => 12),
'e.datec' => array('label' => $langs->trans("DateCreation"), 'checked' => 0, 'position' => 500),
'e.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => 0, 'position' => 500),
'e.fk_statut' => array('label' => $langs->trans("Status"), 'checked' => 1, 'position' => 1000),
'l.ref' => array('label' => $langs->trans("DeliveryRef"), 'checked' => 1, 'position' => 1010, 'enabled' => (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') ? 1 : 0)),
'l.date_delivery' => array('label' => $langs->trans("DateReceived"), 'position' => 1020, 'checked' => 1, 'enabled' => (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') ? 1 : 0)),
'e.billed' => array('label' => $langs->trans("Billed"), 'checked' => 1, 'position' => 1100, 'enabled' => 'getDolGlobalString("WORKFLOW_BILL_ON_SHIPMENT") !== "0"')
);
// Extra fields
@ -168,7 +168,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
$massaction = '';
}
$parameters = array('socid'=>$socid);
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -215,7 +215,7 @@ if (empty($reshook)) {
// If massaction is close
if ($massaction == 'classifyclose') {
$error=0;
$error = 0;
$selectids = GETPOST('toselect', 'array');
foreach ($selectids as $selectid) {
// $object->fetch($selectid);
@ -600,8 +600,8 @@ $massactionbutton = $form->selectMassAction('', $arrayofmassactions);
// if (!empty($socid)) $url .= '&socid='.$socid;
// $newcardbutton = dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', $url, '', $user->rights->expedition->creer);
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewSending'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expedition/card.php?action=create2', '', $user->hasRight('expedition', 'creer'));
@ -617,6 +617,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans('ListOfSendings'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dolly', 0, $newcardbutton, '', $limit, 0, 0, 1);
$topicmail = "SendShippingRef";
@ -799,7 +800,7 @@ if (!empty($arrayfields['l.date_delivery']['checked'])) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// 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
print $hookmanager->resPrint;
// Date creation
@ -815,7 +816,7 @@ if (!empty($arrayfields['e.tms']['checked'])) {
// Status
if (!empty($arrayfields['e.fk_statut']['checked'])) {
print '<td class="liste_titre right parentonrightofpage">';
print $form->selectarray('search_status', array('0'=>$langs->trans('StatusSendingDraftShort'), '1'=>$langs->trans('StatusSendingValidatedShort'), '2'=>$langs->trans('StatusSendingProcessedShort')), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage');
print $form->selectarray('search_status', array('0' => $langs->trans('StatusSendingDraftShort'), '1' => $langs->trans('StatusSendingValidatedShort'), '2' => $langs->trans('StatusSendingProcessedShort')), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage');
print '</td>';
}
// Status billed
@ -903,7 +904,7 @@ if (!empty($arrayfields['l.date_delivery']['checked'])) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, '$totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, '$totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (!empty($arrayfields['e.datec']['checked'])) {
@ -946,7 +947,7 @@ while ($i < $imaxinloop) {
$shipment->id = $obj->rowid;
$shipment->ref = $obj->ref;
$shipment->shipping_method_id=$obj->fk_shipping_method;
$shipment->shipping_method_id = $obj->fk_shipping_method;
$companystatic->id = $obj->socid;
$companystatic->ref = $obj->name;
@ -1093,7 +1094,7 @@ while ($i < $imaxinloop) {
}
if (!empty($arrayfields['e.fk_shipping_method']['checked'])) {
// Get code using getLabelFromKey
$code=$langs->getLabelFromKey($db, $shipment->shipping_method_id, 'c_shipment_mode', 'rowid', 'code');
$code = $langs->getLabelFromKey($db, $shipment->shipping_method_id, 'c_shipment_mode', 'rowid', 'code');
print '<td class="center tdoverflowmax150" title="'.dol_escape_htmltag($langs->trans("SendingMethod".strtoupper($code))).'">';
if ($shipment->shipping_method_id > 0) {
print $langs->trans("SendingMethod".strtoupper($code));
@ -1138,7 +1139,7 @@ while ($i < $imaxinloop) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
@ -1208,7 +1209,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'totalarray' => $totalarray, 'sql'=>$sql);
$parameters = array('arrayfields' => $arrayfields, 'totalarray' => $totalarray, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -95,20 +95,20 @@ $search_all = trim(GETPOSTISSET("search_all") ? GETPOST("search_all", 'alpha') :
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'pndf.rowid'=>"RefPayment",
'u.login'=>"User",
'pndf.num_payment'=>"Numero",
'pndf.amount'=>"Amount",
'pndf.rowid' => "RefPayment",
'u.login' => "User",
'pndf.num_payment' => "Numero",
'pndf.amount' => "Amount",
);
$arrayfields = array(
'pndf.rowid' =>array('label'=>"RefPayment", 'checked'=>1, 'position'=>10),
'pndf.datep' =>array('label'=>"Date", 'checked'=>1, 'position'=>20),
'u.login' =>array('label'=>"User", 'checked'=>1, 'position'=>30),
'c.libelle' =>array('label'=>"Type", 'checked'=>1, 'position'=>40),
'pndf.num_payment' =>array('label'=>"Numero", 'checked'=>1, 'position'=>50, 'tooltip'=>"ChequeOrTransferNumber"),
'ba.label' =>array('label'=>"BankAccount", 'checked'=>1, 'position'=>60, 'enable'=>(isModEnabled("bank"))),
'pndf.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>70),
'pndf.rowid' => array('label' => "RefPayment", 'checked' => 1, 'position' => 10),
'pndf.datep' => array('label' => "Date", 'checked' => 1, 'position' => 20),
'u.login' => array('label' => "User", 'checked' => 1, 'position' => 30),
'c.libelle' => array('label' => "Type", 'checked' => 1, 'position' => 40),
'pndf.num_payment' => array('label' => "Numero", 'checked' => 1, 'position' => 50, 'tooltip' => "ChequeOrTransferNumber"),
'ba.label' => array('label' => "BankAccount", 'checked' => 1, 'position' => 60, 'enable' => (isModEnabled("bank"))),
'pndf.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 70),
);
$arrayfields = dol_sort_array($arrayfields, 'position');
@ -138,7 +138,7 @@ if (!$user->hasRight('expensereport', 'lire')) {
$childids = $user->getAllChildIds(1);
$parameters = array('socid'=>$socid);
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -203,7 +203,7 @@ if ($search_date_start) {
$sql .= " AND pndf.datep >= '" . $db->idate($search_date_start) . "'";
}
if ($search_date_end) {
$sql .=" AND pndf.datep <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND pndf.datep <= '" . $db->idate($search_date_end) . "'";
}
if ($search_user) {
@ -324,9 +324,10 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans('ExpenseReportPayments'), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'expensereport', 0, $newcardbutton, '', $limit, 0, 0, 1);
if ($search_all) {
@ -425,7 +426,7 @@ if (!empty($arrayfields['pndf.amount']['checked'])) {
}
// 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
print $hookmanager->resPrint;
@ -481,7 +482,7 @@ if (!empty($arrayfields['pndf.amount']['checked'])) {
}
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column

View File

@ -113,11 +113,11 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'f.ref'=>'Ref',
's.nom'=>"ThirdParty",
'f.description'=>'Description',
'f.note_public'=>'NotePublic',
'fd.description'=>'DescriptionOfLine',
'f.ref' => 'Ref',
's.nom' => "ThirdParty",
'f.description' => 'Description',
'f.note_public' => 'NotePublic',
'fd.description' => 'DescriptionOfLine',
);
if (empty($user->socid)) {
$fieldstosearchall["f.note_private"] = "NotePrivate";
@ -128,20 +128,20 @@ if (getDolGlobalString('FICHINTER_DISABLE_DETAILS')) {
// Definition of fields for list
$arrayfields = array(
'f.ref'=>array('label'=>'Ref', 'checked'=>1),
'f.ref_client'=>array('label'=>'RefCustomer', 'checked'=>1),
's.nom'=>array('label'=>'ThirdParty', 'checked'=>1),
'pr.ref'=>array('label'=>'Project', 'checked'=>1, 'enabled'=>(!isModEnabled('project') ? 0 : 1)),
'c.ref'=>array('label'=>'Contract', 'checked'=>1, 'enabled'=>(empty($conf->contrat->enabled) ? 0 : 1)),
'f.description'=>array('label'=>'Description', 'checked'=>1),
'f.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>500),
'f.tms'=>array('label'=>'DateModificationShort', 'checked'=>0, 'position'=>500),
'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
'f.fk_statut'=>array('label'=>'Status', 'checked'=>1, 'position'=>1000),
'fd.description'=>array('label'=>"DescriptionOfLine", 'checked'=>1, 'enabled'=>!getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0),
'fd.date'=>array('label'=>'DateOfLine', 'checked'=>1, 'enabled'=>!getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0),
'fd.duree'=>array('label'=>'DurationOfLine', 'type'=> 'duration', 'checked'=>1, 'enabled'=>!getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0), //type duration is here because in database, column 'duree' is double
'f.ref' => array('label' => 'Ref', 'checked' => 1),
'f.ref_client' => array('label' => 'RefCustomer', 'checked' => 1),
's.nom' => array('label' => 'ThirdParty', 'checked' => 1),
'pr.ref' => array('label' => 'Project', 'checked' => 1, 'enabled' => (!isModEnabled('project') ? 0 : 1)),
'c.ref' => array('label' => 'Contract', 'checked' => 1, 'enabled' => (empty($conf->contrat->enabled) ? 0 : 1)),
'f.description' => array('label' => 'Description', 'checked' => 1),
'f.datec' => array('label' => 'DateCreation', 'checked' => 0, 'position' => 500),
'f.tms' => array('label' => 'DateModificationShort', 'checked' => 0, 'position' => 500),
'f.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'position' => 510, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))),
'f.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'position' => 511, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))),
'f.fk_statut' => array('label' => 'Status', 'checked' => 1, 'position' => 1000),
'fd.description' => array('label' => "DescriptionOfLine", 'checked' => 1, 'enabled' => !getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0),
'fd.date' => array('label' => 'DateOfLine', 'checked' => 1, 'enabled' => !getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0),
'fd.duree' => array('label' => 'DurationOfLine', 'type' => 'duration', 'checked' => 1, 'enabled' => !getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0), //type duration is here because in database, column 'duree' is double
);
'@phan-var-force array{label:string,type?:string,checked:int,position?:int,enabled?:int,langfile?:string,help:string} $arrayfields';
// Extra fields
@ -174,7 +174,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
$massaction = '';
}
$parameters = array('socid'=>$socid);
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -486,8 +486,8 @@ $param .= $hookmanager->resPrint;
// List of mass actions available
$arrayofmassactions = array(
'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
'builddoc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
//'presend'=>$langs->trans("SendByMail"),
);
if (!empty($permissiontodelete)) {
@ -519,8 +519,8 @@ if (!empty($socid)) {
$url .= '&socid='.$socid;
}
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', $url, '', $user->hasRight('ficheinter', 'creer'));
@ -612,7 +612,7 @@ if (!empty($arrayfields['f.description']['checked'])) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (!empty($arrayfields['f.datec']['checked'])) {
@ -647,6 +647,7 @@ if (!empty($arrayfields['f.fk_statut']['checked'])) {
if (!getDolGlobalString('FICHINTER_CLASSIFY_BILLED')) {
unset($liststatus[2]); // Option deprecated. In a future, billed must be managed with a dedicated field to 0 or 1
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 1, 0, 0, '', 'search_status width100 onrightofpage');
print '</td>';
}
@ -714,7 +715,7 @@ if (!empty($arrayfields['f.description']['checked'])) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (!empty($arrayfields['f.datec']['checked'])) {
@ -921,7 +922,7 @@ while ($i < $imaxinloop) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
@ -1033,7 +1034,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -2434,6 +2434,7 @@ if ($action == 'create') {
</script>';
$tmp = $tmp.'<label for="radio_deposit" >'.$langs->trans("InvoiceDeposit").'</label>';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$desc = $form->textwithpicto($tmp, $langs->transnoentities("InvoiceDepositDesc"), 1, 'help', '', 0, 3);
print '<table class="nobordernopadding"><tr>';
print '<td>';

View File

@ -135,24 +135,24 @@ if (!$sortfield) {
$sortfield = 'f.titre';
}
$arrayfields = array(
'f.titre'=>array('label'=>'Ref', 'checked'=>1),
's.nom'=>array('label'=>'ThirdParty', 'checked'=>1),
'f.total_ht'=>array('label'=>'AmountHT', 'checked'=>1),
'f.total_tva'=>array('label'=>'AmountVAT', 'checked'=>1),
'f.total_ttc'=>array('label'=>'AmountTTC', 'checked'=>1),
'f.fk_mode_reglement'=>array('label'=>'PaymentMode', 'checked'=>0),
'f.fk_cond_reglement'=>array('label'=>'PaymentTerm', 'checked'=>0),
'recurring'=>array('label'=>'RecurringInvoice', 'checked'=>1),
'f.frequency'=>array('label'=>'Frequency', 'checked'=>1),
'f.unit_frequency'=>array('label'=>'FrequencyUnit', 'checked'=>1),
'f.nb_gen_done'=>array('label'=>'NbOfGenerationDoneShort', 'checked'=>1),
'f.date_last_gen'=>array('label'=>'DateLastGenerationShort', 'checked'=>1),
'f.date_when'=>array('label'=>'NextDateToExecutionShort', 'checked'=>1),
'f.fk_user_author'=>array('label'=>'UserCreation', 'checked'=>0, 'position'=>500),
'f.fk_user_modif'=>array('label'=>'UserModification', 'checked'=>0, 'position'=>505),
'f.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>520),
'f.tms'=>array('label'=>'DateModificationShort', 'checked'=>0, 'position'=>525),
'status'=>array('label'=>'Status', 'checked'=>1, 'position'=>1000),
'f.titre' => array('label' => 'Ref', 'checked' => 1),
's.nom' => array('label' => 'ThirdParty', 'checked' => 1),
'f.total_ht' => array('label' => 'AmountHT', 'checked' => 1),
'f.total_tva' => array('label' => 'AmountVAT', 'checked' => 1),
'f.total_ttc' => array('label' => 'AmountTTC', 'checked' => 1),
'f.fk_mode_reglement' => array('label' => 'PaymentMode', 'checked' => 0),
'f.fk_cond_reglement' => array('label' => 'PaymentTerm', 'checked' => 0),
'recurring' => array('label' => 'RecurringInvoice', 'checked' => 1),
'f.frequency' => array('label' => 'Frequency', 'checked' => 1),
'f.unit_frequency' => array('label' => 'FrequencyUnit', 'checked' => 1),
'f.nb_gen_done' => array('label' => 'NbOfGenerationDoneShort', 'checked' => 1),
'f.date_last_gen' => array('label' => 'DateLastGenerationShort', 'checked' => 1),
'f.date_when' => array('label' => 'NextDateToExecutionShort', 'checked' => 1),
'f.fk_user_author' => array('label' => 'UserCreation', 'checked' => 0, 'position' => 500),
'f.fk_user_modif' => array('label' => 'UserModification', 'checked' => 0, 'position' => 505),
'f.datec' => array('label' => 'DateCreation', 'checked' => 0, 'position' => 520),
'f.tms' => array('label' => 'DateModificationShort', 'checked' => 0, 'position' => 525),
'status' => array('label' => 'Status', 'checked' => 1, 'position' => 1000),
);
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
@ -524,7 +524,7 @@ $arrayofmassactions = array(
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
);
$massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge")));
$massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend' => $langs->trans("SendByMail"), 'builddoc' => $langs->trans("PDFMerge")));
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) : ''); // This also change content of $arrayfields
@ -675,7 +675,7 @@ if (!empty($arrayfields['f.date_when']['checked'])) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// User creation
@ -702,10 +702,11 @@ if (!empty($arrayfields['f.tms']['checked'])) {
if (!empty($arrayfields['status']['checked'])) {
print '<td class="liste_titre center minwidth75imp parentonrightofpage">';
$liststatus = array(
0=>$langs->trans("Draft"),
1=>$langs->trans("Active"),
-1=>$langs->trans("Disabled"),
0 => $langs->trans("Draft"),
1 => $langs->trans("Active"),
-1 => $langs->trans("Disabled"),
);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, -2, 0, 0, '', 0, 0, 0, '', 'width100 onrightofpage');
print '</td>';
}
@ -942,9 +943,9 @@ while ($i < $imaxinloop) {
if (!empty($arrayfields['f.unit_frequency']['checked'])) {
print '<td class="center">';
if ($objp->frequency > 1) {
$dur = array("i"=>$langs->trans("Minutes"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years"));
$dur = array("i" => $langs->trans("Minutes"), "h" => $langs->trans("Hours"), "d" => $langs->trans("Days"), "w" => $langs->trans("Weeks"), "m" => $langs->trans("Months"), "y" => $langs->trans("Years"));
} else {
$dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year"));
$dur = array("i" => $langs->trans("Minute"), "h" => $langs->trans("Hour"), "d" => $langs->trans("Day"), "w" => $langs->trans("Week"), "m" => $langs->trans("Month"), "y" => $langs->trans("Year"));
}
print($objp->frequency > 0 ? $dur[$objp->unit_frequency] : '');
print '</td>';
@ -1030,7 +1031,7 @@ while ($i < $imaxinloop) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Status
@ -1085,7 +1086,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -156,12 +156,12 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'f.ref'=>'Ref',
'f.ref_supplier'=>'RefSupplier',
'f.note_public'=>'NotePublic',
's.nom'=>"ThirdParty",
's.code_fournisseur'=>"SupplierCodeShort",
'pd.description'=>'Description',
'f.ref' => 'Ref',
'f.ref_supplier' => 'RefSupplier',
'f.note_public' => 'NotePublic',
's.nom' => "ThirdParty",
's.code_fournisseur' => "SupplierCodeShort",
'pd.description' => 'Description',
);
if (empty($user->socid)) {
$fieldstosearchall["f.note_private"] = "NotePrivate";
@ -169,42 +169,42 @@ if (empty($user->socid)) {
$checkedtypetiers = 0;
$arrayfields = array(
'f.ref'=>array('label'=>"Ref", 'checked'=>1),
'f.ref_supplier'=>array('label'=>"RefSupplier", 'checked'=>1),
'f.type'=>array('label'=>"Type", 'checked'=>0),
'f.subtype'=>array('label'=>"InvoiceSubtype", 'checked'=>0,),
'f.label'=>array('label'=>"Label", 'checked'=>0),
'f.datef'=>array('label'=>"DateInvoice", 'checked'=>1),
'f.date_lim_reglement'=>array('label'=>"DateDue", 'checked'=>1),
'p.ref'=>array('label'=>"ProjectRef", 'checked'=>0),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>41),
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>0, 'position'=>42),
's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>43),
's.zip'=>array('label'=>"Zip", 'checked'=>1, 'position'=>44),
'state.nom'=>array('label'=>"StateShort", 'checked'=>0, 'position'=>45),
'country.code_iso'=>array('label'=>"Country", 'checked'=>0, 'position'=>46),
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers, 'position'=>49),
'f.fk_mode_reglement'=>array('label'=>"PaymentMode", 'checked'=>1, 'position'=>52),
'f.fk_cond_reglement'=>array('label'=>"PaymentConditionsShort", 'checked'=>1, 'position'=>50),
'f.total_ht'=>array('label'=>"AmountHT", 'checked'=>1, 'position'=>105),
'f.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0, 'position'=>110),
'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax1_assuj == "1", 'position'=>95),
'f.total_localtax2'=>array('label'=>$langs->transcountry("AmountLT2", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax2_assuj == "1", 'position'=>100),
'f.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0, 'position'=>115),
'dynamount_payed'=>array('label'=>"Paid", 'checked'=>0, 'position'=>116),
'rtp'=>array('label'=>"Rest", 'checked'=>0, 'position'=>117),
'f.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'position'=>205, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)),
'f.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'position'=>206, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)),
'f.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'position'=>207, 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)),
'f.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'position'=>208, 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)),
'f.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'position'=>209, 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)),
'multicurrency_dynamount_payed'=>array('label'=>'MulticurrencyAlreadyPaid', 'position'=>210, 'checked'=>0, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)),
'multicurrency_rtp'=>array('label'=>'MulticurrencyRemainderToPay', 'checked'=>0, 'position'=>211, 'enabled'=>(!isModEnabled("multicurrency") ? 0 : 1)), // Not enabled by default because slow
'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>500),
'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>501),
'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>502),
'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
'f.nb_docs'=>array('label'=>"Documents", 'checked'=>1, 'position'=>510),
'f.ref' => array('label' => "Ref", 'checked' => 1),
'f.ref_supplier' => array('label' => "RefSupplier", 'checked' => 1),
'f.type' => array('label' => "Type", 'checked' => 0),
'f.subtype' => array('label' => "InvoiceSubtype", 'checked' => 0,),
'f.label' => array('label' => "Label", 'checked' => 0),
'f.datef' => array('label' => "DateInvoice", 'checked' => 1),
'f.date_lim_reglement' => array('label' => "DateDue", 'checked' => 1),
'p.ref' => array('label' => "ProjectRef", 'checked' => 0),
's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 41),
's.name_alias' => array('label' => "AliasNameShort", 'checked' => 0, 'position' => 42),
's.town' => array('label' => "Town", 'checked' => -1, 'position' => 43),
's.zip' => array('label' => "Zip", 'checked' => 1, 'position' => 44),
'state.nom' => array('label' => "StateShort", 'checked' => 0, 'position' => 45),
'country.code_iso' => array('label' => "Country", 'checked' => 0, 'position' => 46),
'typent.code' => array('label' => "ThirdPartyType", 'checked' => $checkedtypetiers, 'position' => 49),
'f.fk_mode_reglement' => array('label' => "PaymentMode", 'checked' => 1, 'position' => 52),
'f.fk_cond_reglement' => array('label' => "PaymentConditionsShort", 'checked' => 1, 'position' => 50),
'f.total_ht' => array('label' => "AmountHT", 'checked' => 1, 'position' => 105),
'f.total_vat' => array('label' => "AmountVAT", 'checked' => 0, 'position' => 110),
'f.total_localtax1' => array('label' => $langs->transcountry("AmountLT1", $mysoc->country_code), 'checked' => 0, 'enabled' => $mysoc->localtax1_assuj == "1", 'position' => 95),
'f.total_localtax2' => array('label' => $langs->transcountry("AmountLT2", $mysoc->country_code), 'checked' => 0, 'enabled' => $mysoc->localtax2_assuj == "1", 'position' => 100),
'f.total_ttc' => array('label' => "AmountTTC", 'checked' => 0, 'position' => 115),
'dynamount_payed' => array('label' => "Paid", 'checked' => 0, 'position' => 116),
'rtp' => array('label' => "Rest", 'checked' => 0, 'position' => 117),
'f.multicurrency_code' => array('label' => 'Currency', 'checked' => 0, 'position' => 205, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)),
'f.multicurrency_tx' => array('label' => 'CurrencyRate', 'checked' => 0, 'position' => 206, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)),
'f.multicurrency_total_ht' => array('label' => 'MulticurrencyAmountHT', 'position' => 207, 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)),
'f.multicurrency_total_vat' => array('label' => 'MulticurrencyAmountVAT', 'position' => 208, 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)),
'f.multicurrency_total_ttc' => array('label' => 'MulticurrencyAmountTTC', 'position' => 209, 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)),
'multicurrency_dynamount_payed' => array('label' => 'MulticurrencyAlreadyPaid', 'position' => 210, 'checked' => 0, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)),
'multicurrency_rtp' => array('label' => 'MulticurrencyRemainderToPay', 'checked' => 0, 'position' => 211, 'enabled' => (!isModEnabled("multicurrency") ? 0 : 1)), // Not enabled by default because slow
'u.login' => array('label' => "Author", 'checked' => 1, 'position' => 500),
'f.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 501),
'f.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 502),
'f.fk_statut' => array('label' => "Status", 'checked' => 1, 'position' => 1000),
'f.nb_docs' => array('label' => "Documents", 'checked' => 1, 'position' => 510),
);
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
@ -241,7 +241,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa
$massaction = '';
}
$parameters = array('socid'=>$socid, 'arrayfields'=>&$arrayfields);
$parameters = array('socid' => $socid, 'arrayfields' => &$arrayfields);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -332,7 +332,7 @@ if (empty($reshook)) {
$objecttmp->resteapayer = price2num($objecttmp->total_ttc - $totalpaid - $totalcreditnotes - $totaldeposits, 'MT');
// hook to finalize the remaining amount, considering e.g. cash discount agreements
$parameters = array('remaintopay'=>$objecttmp->resteapayer);
$parameters = array('remaintopay' => $objecttmp->resteapayer);
$reshook = $hookmanager->executeHooks('finalizeAmountOfInvoice', $parameters, $objecttmp, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
// print $hookmanager->resPrint;
@ -947,8 +947,8 @@ $param .= $hookmanager->resPrint;
// List of mass actions available
$arrayofmassactions = array(
'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
'validate' => img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"),
'generate_doc' => img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"),
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
);
@ -987,8 +987,8 @@ print '<input type="hidden" name="page_y" value="">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer")));
@ -1094,10 +1094,10 @@ if (!empty($arrayfields['f.ref_supplier']['checked'])) {
if (!empty($arrayfields['f.type']['checked'])) {
print '<td class="liste_titre maxwidthonsmartphone">';
$listtype = array(
FactureFournisseur::TYPE_STANDARD=>$langs->trans("InvoiceStandard"),
FactureFournisseur::TYPE_REPLACEMENT=>$langs->trans("InvoiceReplacement"),
FactureFournisseur::TYPE_CREDIT_NOTE=>$langs->trans("InvoiceAvoir"),
FactureFournisseur::TYPE_DEPOSIT=>$langs->trans("InvoiceDeposit"),
FactureFournisseur::TYPE_STANDARD => $langs->trans("InvoiceStandard"),
FactureFournisseur::TYPE_REPLACEMENT => $langs->trans("InvoiceReplacement"),
FactureFournisseur::TYPE_CREDIT_NOTE => $langs->trans("InvoiceAvoir"),
FactureFournisseur::TYPE_DEPOSIT => $langs->trans("InvoiceDeposit"),
);
/*
if (!empty($conf->global->INVOICE_USE_SITUATION))
@ -1109,7 +1109,7 @@ if (!empty($arrayfields['f.type']['checked'])) {
print $form->selectarray('search_type', $listtype, $search_type, 1, 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth100');
print '</td>';
}
// Invoice Subtype
// Invoice Subtype
if (!empty($arrayfields['f.subtype']['checked'])) {
print '<td class="liste_titre maxwidthonsmartphone" align="center">';
print $form->selectarray('search_subtype', $subtypearray, $search_subtype, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100');
@ -1289,7 +1289,7 @@ if (!empty($arrayfields['multicurrency_rtp']['checked'])) {
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Date creation
@ -1305,7 +1305,8 @@ if (!empty($arrayfields['f.tms']['checked'])) {
// Status
if (!empty($arrayfields['f.fk_statut']['checked'])) {
print '<td class="liste_titre center parentonrightofpage">';
$liststatus = array('0'=>$langs->trans("Draft"), '1'=>$langs->trans("Unpaid"), '2'=>$langs->trans("Paid"));
$liststatus = array('0' => $langs->trans("Draft"), '1' => $langs->trans("Unpaid"), '2' => $langs->trans("Paid"));
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'center search_status width100 onrightofpage', 1);
print '</td>';
}
@ -1468,7 +1469,7 @@ if (!empty($arrayfields['multicurrency_rtp']['checked'])) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (!empty($arrayfields['f.datec']['checked'])) {
@ -1503,11 +1504,11 @@ $savnbfield = $totalarray['nbfield'];
$totalarray = array();
$totalarray['nbfield'] = 0;
$totalarray['val'] = array();
$totalarray['val']['f.total_ht']=0;
$totalarray['val']['f.total_vat']=0;
$totalarray['val']['f.total_localtax1']=0;
$totalarray['val']['f.total_localtax1']=0;
$totalarray['val']['f.total_ttc']=0;
$totalarray['val']['f.total_ht'] = 0;
$totalarray['val']['f.total_vat'] = 0;
$totalarray['val']['f.total_localtax1'] = 0;
$totalarray['val']['f.total_localtax1'] = 0;
$totalarray['val']['f.total_ttc'] = 0;
$imaxinloop = ($limit ? min($num, $limit) : $num);
while ($i < $imaxinloop) {
$obj = $db->fetch_object($resql);
@ -1987,7 +1988,7 @@ while ($i < $imaxinloop) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -90,20 +90,20 @@ $search_all = trim(GETPOSTISSET("search_all") ? GETPOST("search_all", 'alpha') :
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array(
'p.ref'=>"RefPayment",
's.nom'=>"ThirdParty",
'p.num_paiement'=>"Numero",
'p.amount'=>"Amount",
'p.ref' => "RefPayment",
's.nom' => "ThirdParty",
'p.num_paiement' => "Numero",
'p.amount' => "Amount",
);
$arrayfields = array(
'p.ref' =>array('label'=>"RefPayment", 'checked'=>1, 'position'=>10),
'p.datep' =>array('label'=>"Date", 'checked'=>1, 'position'=>20),
's.nom' =>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30),
'c.libelle' =>array('label'=>"Type", 'checked'=>1, 'position'=>40),
'p.num_paiement' =>array('label'=>"Numero", 'checked'=>1, 'position'=>50, 'tooltip'=>"ChequeOrTransferNumber"),
'ba.label' =>array('label'=>"BankAccount", 'checked'=>1, 'position'=>60, 'enable'=>(isModEnabled("bank"))),
'p.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>70),
'p.ref' => array('label' => "RefPayment", 'checked' => 1, 'position' => 10),
'p.datep' => array('label' => "Date", 'checked' => 1, 'position' => 20),
's.nom' => array('label' => "ThirdParty", 'checked' => 1, 'position' => 30),
'c.libelle' => array('label' => "Type", 'checked' => 1, 'position' => 40),
'p.num_paiement' => array('label' => "Numero", 'checked' => 1, 'position' => 50, 'tooltip' => "ChequeOrTransferNumber"),
'ba.label' => array('label' => "BankAccount", 'checked' => 1, 'position' => 60, 'enable' => (isModEnabled("bank"))),
'p.amount' => array('label' => "Amount", 'checked' => 1, 'position' => 70),
);
$arrayfields = dol_sort_array($arrayfields, 'position');
@ -139,7 +139,7 @@ if ((!$user->hasRight("fournisseur", "facture", "lire") && !getDolGlobalString('
* Actions
*/
$parameters = array('socid'=>$socid);
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -214,7 +214,7 @@ if ($search_date_start) {
$sql .= " AND p.datep >= '" . $db->idate($search_date_start) . "'";
}
if ($search_date_end) {
$sql .=" AND p.datep <= '" . $db->idate($search_date_end) . "'";
$sql .= " AND p.datep <= '" . $db->idate($search_date_end) . "'";
}
if ($search_company) {
@ -351,6 +351,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans('SupplierPayments'), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'supplier_invoice', 0, '', '', $limit, 0, 0, 1);
if ($search_all) {
@ -458,7 +459,7 @@ if (!empty($arrayfields['p.amount']['checked'])) {
}
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
@ -517,7 +518,7 @@ if (!empty($arrayfields['p.amount']['checked'])) {
}
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -157,15 +157,15 @@ if (empty($reshook)) {
// Definition of fields for lists
$arrayfields = array(
'cpl.rowid'=>array('label'=>"ID", 'checked'=>1),
'cpl.date_action'=>array('label'=>"Date", 'checked'=>1),
'cpl.fk_user_action'=>array('label'=>"ActionByCP", 'checked'=>1),
'cpl.fk_user_update'=>array('label'=>"UserUpdateCP", 'checked'=>1),
'cpl.type_action'=>array('label'=>"Description", 'checked'=>1),
'cpl.fk_type'=>array('label'=>"Type", 'checked'=>1),
'cpl.prev_solde'=>array('label'=>"PrevSoldeCP", 'checked'=>1),
'variation'=>array('label'=>"Variation", 'checked'=>1),
'cpl.new_solde'=>array('label'=>"NewSoldeCP", 'checked'=>1),
'cpl.rowid' => array('label' => "ID", 'checked' => 1),
'cpl.date_action' => array('label' => "Date", 'checked' => 1),
'cpl.fk_user_action' => array('label' => "ActionByCP", 'checked' => 1),
'cpl.fk_user_update' => array('label' => "UserUpdateCP", 'checked' => 1),
'cpl.type_action' => array('label' => "Description", 'checked' => 1),
'cpl.fk_type' => array('label' => "Type", 'checked' => 1),
'cpl.prev_solde' => array('label' => "PrevSoldeCP", 'checked' => 1),
'variation' => array('label' => "Variation", 'checked' => 1),
'cpl.new_solde' => array('label' => "NewSoldeCP", 'checked' => 1),
);
@ -286,6 +286,7 @@ print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$newcardbutton = dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=create', '', $user->rights->holiday->write);
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans('LogCP'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_hrm', 0, $newcardbutton, '', $limit, 0, 0, 1);
print '<div class="info">'.$langs->trans('LastUpdateCP').': ';

View File

@ -233,7 +233,7 @@ if ($result) {
$num = $db->num_rows($result);
print '<br>';
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1);
if (getDolGlobalString('MARGIN_TYPE') == "1") {

View File

@ -248,6 +248,7 @@ if ($result) {
$num = $db->num_rows($result);
print '<br>';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);
if (getDolGlobalString('MARGIN_TYPE') == "1") {

View File

@ -303,7 +303,7 @@ if ($result) {
$num = $db->num_rows($result);
print '<br>';
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1);
if (getDolGlobalString('MARGIN_TYPE') == "1") {

View File

@ -253,7 +253,7 @@ if ($result) {
$num = $db->num_rows($result);
print '<br>';
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, '', 0, '', '', 0, 1);
//var_dump($conf->global->MARGIN_TYPE);

View File

@ -199,7 +199,7 @@ if ($socid > 0) {
if ($result) {
$num = $db->num_rows($result);
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("MarginDetails"), $page, $_SERVER["PHP_SELF"], "&amp;socid=".$object->id, $sortfield, $sortorder, '', $num, $num, '');
$i = 0;

View File

@ -214,7 +214,7 @@ if ($id > 0 || $ref) {
$param .= '&limit='.$limit;
}
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("ActionsOnProduct"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlcenter, '', 0, 1, 1);
// List of all actions

View File

@ -1705,10 +1705,10 @@ if ((!getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || $action == 'showlog_defau
$backbutton = '<a class="justalink" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'.$langs->trans("Back").'</a>';
if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("DefaultPriceLog"), 0, $_SERVER["PHP_SELF"], '', '', '', $backbutton, 0, $num, 'title_accountancy.png');
} else {
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("PriceByCustomerLog"), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, $num, 'title_accountancy.png');
}
@ -2140,6 +2140,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
$backbutton = '<a class="justalink" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'.$langs->trans("Back").'</a>';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $option, $sortfield, $sortorder, $backbutton, count($prodcustprice->lines), $nbtotalofrecords, 'title_accountancy.png');
if (count($prodcustprice->lines) > 0) {
@ -2259,6 +2260,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
$option = '&search_soc='.$search_soc.'&id='.$object->id;
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans('PriceByCustomer'), $page, $_SERVER ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords, 'title_accountancy.png');
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">';

View File

@ -223,6 +223,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("CustomersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {

View File

@ -223,6 +223,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {

View File

@ -81,7 +81,7 @@ if ($id > 0 || !empty($ref)) {
$object = $product;
$parameters = array('id'=>$id);
$parameters = array('id' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -191,6 +191,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Contrats"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {

View File

@ -132,7 +132,7 @@ if ($id > 0 || !empty($ref)) {
$object = $product;
$parameters = array('id'=>$id);
$parameters = array('id' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -297,6 +297,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("CustomersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {
@ -331,7 +332,7 @@ if ($id > 0 || !empty($ref)) {
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder);
// Hook fields
$parameters = array('param'=>$option, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$parameters = array('param' => $option, 'sortfield' => $sortfield, 'sortorder' => $sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print "</tr>\n";

View File

@ -205,6 +205,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {

View File

@ -97,7 +97,7 @@ if ($id > 0 || !empty($ref)) {
$object = $product;
$parameters = array('id'=>$id);
$parameters = array('id' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -223,6 +223,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("CustomersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {

View File

@ -92,7 +92,7 @@ if ($id > 0 || !empty($ref)) {
$object = $product;
$parameters = array('id'=>$id);
$parameters = array('id' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -201,6 +201,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("MOs"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {

View File

@ -207,6 +207,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {

View File

@ -206,6 +206,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {

View File

@ -105,7 +105,7 @@ if ($id > 0 || !empty($ref)) {
}
$result = $object->fetch($id, $objectid, $batch);
$parameters = array('id'=>$id);
$parameters = array('id' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -283,6 +283,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {

View File

@ -105,7 +105,7 @@ if ($id > 0 || !empty($ref)) {
}
$result = $object->fetch($id, $objectid, $batch);
$parameters = array('id'=>$id);
$parameters = array('id' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -282,6 +282,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Shipments"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {

View File

@ -98,7 +98,7 @@ if ($id > 0 || !empty($ref)) {
}
$result = $object->fetch($id, $objectid, $batch);
$parameters = array('id'=>$id);
$parameters = array('id' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -224,6 +224,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("MOs"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {
@ -261,7 +262,7 @@ if ($id > 0 || !empty($ref)) {
$motmp = new Mo($db);
$total_consumed=$total_produced=0;
$total_consumed = $total_produced = 0;
if ($num > 0) {
while ($i < min($num, $limit)) {
@ -271,8 +272,8 @@ if ($id > 0 || !empty($ref)) {
$motmp->ref = $objp->ref;
$motmp->status = $objp->status;
$total_consumed+=$objp->nb_consumed;
$total_produced+=$objp->nb_produced;
$total_consumed += $objp->nb_consumed;
$total_produced += $objp->nb_produced;
print '<tr class="oddeven">';
print '<td>';

View File

@ -105,7 +105,7 @@ if ($id > 0 || !empty($ref)) {
}
$result = $object->fetch($id, $objectid, $batch);
$parameters = array('id'=>$id);
$parameters = array('id' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -281,6 +281,7 @@ if ($id > 0 || !empty($ref)) {
print '<input type="hidden" name="sortorder" value="'.$sortorder.'"/>';
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("Receptions"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1);
if (!empty($page)) {

View File

@ -112,10 +112,13 @@ $parameters = array(
);
$reshook = $hookmanager->executeHooks('PrintTopMenu', $parameters, $context, $context->action); // Note that $action and $object may have been modified by hook
if ($reshook < 0) $context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if ($reshook < 0) {
$context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
if (empty($reshook)) {
if (!empty($hookmanager->resArray)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$navMenu = array_replace($navMenu, $hookmanager->resArray);
}

View File

@ -886,6 +886,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans('ListOfReceptions'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'dollyrevert', 0, $newcardbutton, '', $limit, 0, 0, 1);
if ($massaction == 'createbills') {

View File

@ -297,7 +297,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
if (file_exists($dir)) {
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
$reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
// Set nblines with the new facture lines content after hook
@ -358,6 +358,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
$pdf->setSignature($cert, $cert, $this->emetteur->name, '', 2, $info);
}
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
// New page
@ -627,9 +628,9 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
$parameters = array(
'object' => $object,
'i' => $i,
'pdf' =>& $pdf,
'curY' =>& $curY,
'nexY' =>& $nexY,
'pdf' => & $pdf,
'curY' => & $curY,
'nexY' => & $nexY,
'outputlangs' => $outputlangs,
'hidedetails' => $hidedetails
);
@ -711,7 +712,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
// Add pdfgeneration hook
$hookmanager->initHooks(array('pdfgeneration'));
$parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('file' => $file, 'object' => $object, 'outputlangs' => $outputlangs);
global $action;
$reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
@ -721,7 +722,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
dolChmod($file);
$this->result = array('fullpath'=>$file);
$this->result = array('fullpath' => $file);
return 1; // No error
} else {
@ -1261,6 +1262,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
} elseif (empty($reshook)) {
// @phan-suppress-next-line PhanPluginSuspiciousParamOrderInternal
$this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys
} else {
$this->cols = $hookmanager->resArray;

View File

@ -128,11 +128,11 @@ foreach ($object->fields as $key => $val) {
if (!empty($val['visible'])) {
$visible = (int) dol_eval($val['visible'], 1);
$arrayfields['t.'.$key] = array(
'label'=>$val['label'],
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)),
'position'=>$val['position'],
'help'=> isset($val['help']) ? $val['help'] : ''
'label' => $val['label'],
'checked' => (($visible < 0) ? 0 : 1),
'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)),
'position' => $val['position'],
'help' => isset($val['help']) ? $val['help'] : ''
);
}
}
@ -439,8 +439,8 @@ if (!empty($socid)) {
}
$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('NewSalary'), '', 'fa fa-plus-circle', $url, '', $permissiontoadd);
@ -499,20 +499,20 @@ print '<td class="liste_titre"><input type="text" class="flat width100" name="se
// Date start
print '<td class="liste_titre center">';
print '<div class="nowrapfordate">';
print $form->selectDate($search_date_start_from ? $search_date_start_from : -1, 'search_date_start_from', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
print $form->selectDate($search_date_start_from ? $search_date_start_from : -1, 'search_date_start_from', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
print '</div>';
print '<div class="nowrapfordate">';
print $form->selectDate($search_date_start_to ? $search_date_start_to : -1, 'search_date_start_to', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
print $form->selectDate($search_date_start_to ? $search_date_start_to : -1, 'search_date_start_to', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
print '</div>';
print '</td>';
// Date End
print '<td class="liste_titre center">';
print '<div class="nowrapfordate">';
print $form->selectDate($search_date_end_from ? $search_date_end_from : -1, 'search_date_end_from', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
print $form->selectDate($search_date_end_from ? $search_date_end_from : -1, 'search_date_end_from', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
print '</div>';
print '<div class="nowrapfordate">';
print $form->selectDate($search_date_end_to ? $search_date_end_to : -1, 'search_date_end_to', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
print $form->selectDate($search_date_end_to ? $search_date_end_to : -1, 'search_date_end_to', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
print '</div>';
print '</td>';
@ -539,6 +539,7 @@ print '<td class="liste_titre right"><input name="search_amount" class="flat" ty
// Status
print '<td class="liste_titre right parentonrightofpage">';
$liststatus = array('0' => $langs->trans("Unpaid"), '1' => $langs->trans("Paid"));
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print $form->selectarray('search_status', $liststatus, $search_status, 1, 0, 0, '', 0, 0, 0, '', 'search_status width100 onrightofpage');
print '</td>';
@ -546,7 +547,7 @@ print '</td>';
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
@ -592,7 +593,7 @@ $totalarray['nbfield']++;
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
@ -784,7 +785,7 @@ while ($i < $imaxinloop) {
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
// Fields from hook
$parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
$parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
@ -829,7 +830,7 @@ if ($num == 0) {
$db->free($resql);
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

View File

@ -75,7 +75,7 @@ $hookmanager->initHooks(array('thirdpartynotification', 'globalcard'));
* Actions
*/
$parameters = array('id'=>$socid);
$parameters = array('id' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -286,7 +286,7 @@ if ($result > 0) {
print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1, 0, 0, '', 0, 0, 0, '', 'minwidth100imp maxwidthonsmartphone');
print '</td>';
print '<td>';
$type = array('email'=>$langs->trans("EMail"));
$type = array('email' => $langs->trans("EMail"));
print $form->selectarray("typeid", $type, '', 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp');
print '</td>';
print '<td class="right"><input type="submit" class="button button-add" value="'.$langs->trans("Add").'"></td>';
@ -447,7 +447,7 @@ if ($result > 0) {
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="socid" value="'.$object->id.'">';
// List of active notifications
// List of active notifications @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', 0, '', '', $limit);
// Line with titles

View File

@ -74,7 +74,7 @@ $error = 0;
* Actions
*/
$parameters = array('id'=>$socid);
$parameters = array('id' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -467,6 +467,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
$option = '&socid='.GETPOSTINT('socid').'&prodid='.GETPOSTINT('prodid');
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans('PriceByCustomerLog'), $page, $_SERVER ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords);
if (count($prodcustprice->lines) > 0) {
@ -544,11 +545,11 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
if (!empty($val['visible'])) {
$visible = (int) dol_eval($val['visible'], 1, 1, '1');
$arrayfields['t.'.$key] = array(
'label'=>$val['label'],
'checked'=>(($visible < 0) ? 0 : 1),
'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')),
'position'=>$val['position'],
'help'=> isset($val['help']) ? $val['help'] : ''
'label' => $val['label'],
'checked' => (($visible < 0) ? 0 : 1),
'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')),
'position' => $val['position'],
'help' => isset($val['help']) ? $val['help'] : ''
);
}
}
@ -569,6 +570,7 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
print '<!-- view specific price for each product -->'."\n";
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans('PriceForEachProduct'), $page, $_SERVER['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords, '');
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST">';

View File

@ -273,7 +273,7 @@ if ($result > 0) {
// List of active notifications
//print load_fiche_titre($langs->trans("ListOfActiveNotifications").' ('.$num.')', '', '');
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition, PhanPluginSuspiciousParamOrder
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $num, 'email', 0, $newcardbutton, '', $limit, 0, 0, 1);
// Line with titles
@ -472,7 +472,7 @@ if ($result > 0) {
print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">';
// List of notifications done
// List of notifications done @phan-suppress-next-line PhanPluginSuspiciousParamOrder
print_barre_liste($langs->trans("ListOfNotificationsDone"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'email', 0, '', '', $limit);
// Line with titles