@@ -132,13 +132,13 @@ discard block |
||
132 | 132 | if ($invoiceid > 0) { |
133 | 133 | $ret = $invoice->fetch($invoiceid); |
134 | 134 | } else { |
135 | - $ret = $invoice->fetch('', '(PROV-POS'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '') .'-'.$place.')'); |
|
135 | + $ret = $invoice->fetch('', '(PROV-POS'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '').'-'.$place.')'); |
|
136 | 136 | } |
137 | 137 | if ($ret > 0) { |
138 | 138 | $placeid = $invoice->id; |
139 | 139 | } |
140 | 140 | |
141 | -$constforcompanyid = 'CASHDESK_ID_THIRDPARTY'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
141 | +$constforcompanyid = 'CASHDESK_ID_THIRDPARTY'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
142 | 142 | |
143 | 143 | $soc = new Societe($db); |
144 | 144 | if ($invoice->socid > 0) { |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | * Actions |
160 | 160 | */ |
161 | 161 | |
162 | -$parameters=array(); |
|
163 | -$reshook=$hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
162 | +$parameters = array(); |
|
163 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
164 | 164 | if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
165 | 165 | |
166 | 166 | if (empty($reshook)) { |
@@ -173,9 +173,9 @@ discard block |
||
173 | 173 | $bankaccount = GETPOST('accountid', 'int'); |
174 | 174 | } else { |
175 | 175 | if ($pay == 'LIQ') { |
176 | - $bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
176 | + $bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CASH'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
177 | 177 | } elseif ($pay == "CHQ") { |
178 | - $bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
178 | + $bankaccount = getDolGlobalString('CASHDESK_ID_BANKACCOUNT_CHEQUE'.$_SESSION["takeposterminal"]); // For backward compatibility |
|
179 | 179 | } else { |
180 | 180 | $accountname = "CASHDESK_ID_BANKACCOUNT_".$pay.$_SESSION["takeposterminal"]; |
181 | 181 | $bankaccount = getDolGlobalString($accountname); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | if ($res < 0) { |
251 | 251 | $error++; |
252 | 252 | $langs->load("admin"); |
253 | - dol_htmloutput_errors($invoice->error == 'NotConfigured' ? $langs->trans("NotConfigured").' (TakePos numbering module)': $invoice->error, $invoice->errors, 1); |
|
253 | + dol_htmloutput_errors($invoice->error == 'NotConfigured' ? $langs->trans("NotConfigured").' (TakePos numbering module)' : $invoice->error, $invoice->errors, 1); |
|
254 | 254 | } |
255 | 255 | } |
256 | 256 | |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | $creditnote->socid = $invoice->socid; |
312 | 312 | $creditnote->date = dol_now(); |
313 | 313 | $creditnote->module_source = 'takepos'; |
314 | - $creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ; |
|
314 | + $creditnote->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''; |
|
315 | 315 | $creditnote->type = Facture::TYPE_CREDIT_NOTE; |
316 | 316 | $creditnote->fk_facture_source = $placeid; |
317 | 317 | $creditnote->remise_absolue = $invoice->remise_absolue; |
@@ -462,9 +462,9 @@ discard block |
||
462 | 462 | // If we add a line and no invoice yet, we create the invoice |
463 | 463 | if (($action == "addline" || $action == "freezone") && $placeid == 0) { |
464 | 464 | $invoice->socid = getDolGlobalString($constforcompanyid); |
465 | - $invoice->date = dol_now('tzuserrel'); // We use the local date, only the day will be saved. |
|
465 | + $invoice->date = dol_now('tzuserrel'); // We use the local date, only the day will be saved. |
|
466 | 466 | $invoice->module_source = 'takepos'; |
467 | - $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : '' ; |
|
467 | + $invoice->pos_source = isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''; |
|
468 | 468 | $invoice->entity = !empty($_SESSION["takeposinvoiceentity"]) ? $_SESSION["takeposinvoiceentity"] : $conf->entity; |
469 | 469 | |
470 | 470 | if ($invoice->socid <= 0) { |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | if (!empty($conf->global->TAKEPOS_GROUP_SAME_PRODUCT)) { |
525 | 525 | foreach ($invoice->lines as $line) { |
526 | 526 | if ($line->product_ref == $prod->ref) { |
527 | - if ($line->special_code==4) continue; // If this line is sended to printer create new line |
|
527 | + if ($line->special_code == 4) continue; // If this line is sended to printer create new line |
|
528 | 528 | $result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty + $qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
529 | 529 | if ($result < 0) { |
530 | 530 | dol_htmloutput_errors($invoice->error, $invoice->errors, 1); |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | |
565 | 565 | // complete line by hook |
566 | 566 | $parameters = array('prod' => $prod, 'line' => $line); |
567 | - $reshook=$hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks |
|
567 | + $reshook = $hookmanager->executeHooks('completeTakePosAddLine', $parameters, $invoice, $action); // Note that $action and $line may have been modified by some hooks |
|
568 | 568 | if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
569 | 569 | |
570 | 570 | |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | |
609 | 609 | if ($action == "addnote") { |
610 | 610 | $desc = GETPOST('addnote', 'alpha'); |
611 | - if ($idline==0) { |
|
611 | + if ($idline == 0) { |
|
612 | 612 | $invoice->update_note($desc, '_public'); |
613 | 613 | } else foreach ($invoice->lines as $line) { |
614 | 614 | if ($line->id == $idline) { |
@@ -708,7 +708,7 @@ discard block |
||
708 | 708 | } else { |
709 | 709 | if (empty($user->rights->takepos->editlines) || (empty($user->rights->takepos->editorderedlines) && $line->special_code == "4")) { |
710 | 710 | dol_htmloutput_errors($langs->trans("NotEnoughPermissions", "TakePos"), null, 1); |
711 | - } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) { |
|
711 | + } elseif (getDolGlobalInt('TAKEPOS_CHANGE_PRICE_HT') == 1) { |
|
712 | 712 | $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
713 | 713 | } else { |
714 | 714 | $result = $invoice->updateline($line->id, $line->desc, $number, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'TTC', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); |
@@ -903,7 +903,7 @@ discard block |
||
903 | 903 | } |
904 | 904 | $sectionwithinvoicelink .= '</span><br>'; |
905 | 905 | if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) { |
906 | - $sectionwithinvoicelink .= ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . $invoice->ref . '/' . $invoice->ref . '.pdf">Invoice</a>'; |
|
906 | + $sectionwithinvoicelink .= ' <a target="_blank" class="button" href="'.DOL_URL_ROOT.'/document.php?token='.newToken().'&modulepart=facture&file='.$invoice->ref.'/'.$invoice->ref.'.pdf">Invoice</a>'; |
|
907 | 907 | } elseif (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") { |
908 | 908 | if (getDolGlobalString('TAKEPOS_PRINT_SERVER') && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) { |
909 | 909 | $sectionwithinvoicelink .= ' <button id="buttonprint" type="button" onclick="TakeposConnector('.$placeid.')">'.$langs->trans('PrintTicket').'</button>'; |
@@ -965,7 +965,7 @@ discard block |
||
965 | 965 | <script type="text/javascript"> |
966 | 966 | var selectedline=0; |
967 | 967 | var selectedtext=""; |
968 | -<?php if ($action=="valid") echo "var place=0;";?> // Set to default place after close sale |
|
968 | +<?php if ($action == "valid") echo "var place=0;"; ?> // Set to default place after close sale |
|
969 | 969 | var placeid=<?php echo ($placeid > 0 ? $placeid : 0); ?>; |
970 | 970 | $(document).ready(function() { |
971 | 971 | var idoflineadded = <?php echo (empty($idoflineadded) ? 0 : $idoflineadded); ?>; |
@@ -1203,10 +1203,10 @@ discard block |
||
1203 | 1203 | $s = ''; |
1204 | 1204 | |
1205 | 1205 | $idwarehouse = 0; |
1206 | - $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1206 | + $constantforkey = 'CASHDESK_NO_DECREASE_STOCK'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1207 | 1207 | if (isModEnabled('stock')) { |
1208 | 1208 | if (getDolGlobalString("$constantforkey") != "1") { |
1209 | - $constantforkey = 'CASHDESK_ID_WAREHOUSE'. (isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1209 | + $constantforkey = 'CASHDESK_ID_WAREHOUSE'.(isset($_SESSION["takeposterminal"]) ? $_SESSION["takeposterminal"] : ''); |
|
1210 | 1210 | $idwarehouse = getDolGlobalString($constantforkey); |
1211 | 1211 | if ($idwarehouse > 0) { |
1212 | 1212 | $s = '<span class="small">'; |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | $result = $adh->fetch('', '', $invoice->socid); |
1250 | 1250 | if ($result > 0) { |
1251 | 1251 | $adh->ref = $adh->getFullName($langs); |
1252 | - if (empty($adh->statut) || $adh->statut == Adherent::STATUS_EXCLUDED ) { |
|
1252 | + if (empty($adh->statut) || $adh->statut == Adherent::STATUS_EXCLUDED) { |
|
1253 | 1253 | $s .= "<s>"; |
1254 | 1254 | } |
1255 | 1255 | $s .= $adh->getFullName($langs); |
@@ -1305,7 +1305,7 @@ discard block |
||
1305 | 1305 | print '<script src="'.DOL_URL_ROOT.'/core/js/lib_foot.js.php?lang='.$langs->defaultlang.'"></script>'."\n"; |
1306 | 1306 | } |
1307 | 1307 | |
1308 | -print '<!-- invoice.php place='.(int) $place.' invoice='.$invoice->ref.' mobilepage='.(empty($mobilepage) ? '' : $mobilepage).' $_SESSION["basiclayout"]='.(empty($_SESSION["basiclayout"])?'':$_SESSION["basiclayout"]).' conf->global->TAKEPOS_BAR_RESTAURANT='.getDolGlobalString('TAKEPOS_BAR_RESTAURANT').' -->'."\n"; |
|
1308 | +print '<!-- invoice.php place='.(int) $place.' invoice='.$invoice->ref.' mobilepage='.(empty($mobilepage) ? '' : $mobilepage).' $_SESSION["basiclayout"]='.(empty($_SESSION["basiclayout"]) ? '' : $_SESSION["basiclayout"]).' conf->global->TAKEPOS_BAR_RESTAURANT='.getDolGlobalString('TAKEPOS_BAR_RESTAURANT').' -->'."\n"; |
|
1309 | 1309 | print '<div class="div-table-responsive-no-min invoice">'; |
1310 | 1310 | print '<table id="tablelines" class="noborder noshadow postablelines centpercent">'; |
1311 | 1311 | if ($sectionwithinvoicelink && ($mobilepage == "invoice" || $mobilepage == "")) { |
@@ -1347,8 +1347,8 @@ discard block |
||
1347 | 1347 | print '</td>'; |
1348 | 1348 | |
1349 | 1349 | // complete header by hook |
1350 | -$parameters=array(); |
|
1351 | -$reshook=$hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1350 | +$parameters = array(); |
|
1351 | +$reshook = $hookmanager->executeHooks('completeTakePosInvoiceHeader', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1352 | 1352 | if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1353 | 1353 | print $hookmanager->resPrint; |
1354 | 1354 | |
@@ -1357,16 +1357,16 @@ discard block |
||
1357 | 1357 | print '<td class="linecolqty right">'.$langs->trans('Qty').'</td>'; |
1358 | 1358 | if (getDolGlobalString('TAKEPOS_SHOW_HT')) { |
1359 | 1359 | print '<td class="linecolht right nowraponall">'; |
1360 | - print '<span class="opacitymedium small">' . $langs->trans('TotalHTShort') . '</span><br>'; |
|
1360 | + print '<span class="opacitymedium small">'.$langs->trans('TotalHTShort').'</span><br>'; |
|
1361 | 1361 | // In phone version only show when it is invoice page |
1362 | 1362 | if (empty($mobilepage) || $mobilepage == "invoice") { |
1363 | - print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">' . price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency) . '</span>'; |
|
1363 | + print '<span id="linecolht-span-total" style="font-size:1.3em; font-weight: bold;">'.price($invoice->total_ht, 1, '', 1, -1, -1, $conf->currency).'</span>'; |
|
1364 | 1364 | if (isModEnabled('multicurrency') && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) { |
1365 | 1365 | //Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency |
1366 | - include_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php'; |
|
1366 | + include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; |
|
1367 | 1367 | $multicurrency = new MultiCurrency($db); |
1368 | 1368 | $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]); |
1369 | - print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
1369 | + print '<br><span id="linecolht-span-total" style="font-size:0.9em; font-style:italic;">('.price($invoice->total_ht * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
1370 | 1370 | } |
1371 | 1371 | print '</td>'; |
1372 | 1372 | } |
@@ -1511,8 +1511,8 @@ discard block |
||
1511 | 1511 | $htmlsupplements[$line->fk_parent_line] .= '</td>'; |
1512 | 1512 | |
1513 | 1513 | // complete line by hook |
1514 | - $parameters=array('line' => $line); |
|
1515 | - $reshook=$hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1514 | + $parameters = array('line' => $line); |
|
1515 | + $reshook = $hookmanager->executeHooks('completeTakePosInvoiceParentLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1516 | 1516 | if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1517 | 1517 | $htmlsupplements[$line->fk_parent_line] .= $hookmanager->resPrint; |
1518 | 1518 | |
@@ -1559,7 +1559,7 @@ discard block |
||
1559 | 1559 | } |
1560 | 1560 | } |
1561 | 1561 | if (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 1) { |
1562 | - $htmlforlines .= $form->textwithpicto($line->product_label ? '<b>' . $line->product_ref . '</b> - ' . $line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
|
1562 | + $htmlforlines .= $form->textwithpicto($line->product_label ? '<b>'.$line->product_ref.'</b> - '.$line->product_label : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
|
1563 | 1563 | } elseif (getDolGlobalInt('TAKEPOS_SHOW_PRODUCT_REFERENCE') == 2) { |
1564 | 1564 | $htmlforlines .= $form->textwithpicto($line->product_ref ? '<b>'.$line->product_ref.'<b>' : dolGetFirstLineOfText($line->desc, 1), $tooltiptext); |
1565 | 1565 | } else { |
@@ -1605,8 +1605,8 @@ discard block |
||
1605 | 1605 | $htmlforlines .= '</td>'; |
1606 | 1606 | |
1607 | 1607 | // complete line by hook |
1608 | - $parameters=array('line' => $line); |
|
1609 | - $reshook=$hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1608 | + $parameters = array('line' => $line); |
|
1609 | + $reshook = $hookmanager->executeHooks('completeTakePosInvoiceLine', $parameters, $invoice, $action); // Note that $action and $object may have been modified by some hooks |
|
1610 | 1610 | if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
1611 | 1611 | $htmlforlines .= $hookmanager->resPrint; |
1612 | 1612 | |
@@ -1695,7 +1695,7 @@ discard block |
||
1695 | 1695 | if (($action == "valid" || $action == "history") && $invoice->type != Facture::TYPE_CREDIT_NOTE && empty($conf->global->TAKEPOS_NO_CREDITNOTE)) { |
1696 | 1696 | print '<button id="buttonprint" type="button" onclick="ModalBox(\'ModalCreditNote\')">'.$langs->trans('CreateCreditNote').'</button>'; |
1697 | 1697 | if (getDolGlobalInt('TAKEPOS_PRINT_INVOICE_DOC_INSTEAD_OF_RECEIPT')) { |
1698 | - print ' <a target="_blank" class="button" href="' . DOL_URL_ROOT . '/document.php?token=' . newToken() . '&modulepart=facture&file=' . $invoice->ref . '/' . $invoice->ref . '.pdf">Invoice</a>'; |
|
1698 | + print ' <a target="_blank" class="button" href="'.DOL_URL_ROOT.'/document.php?token='.newToken().'&modulepart=facture&file='.$invoice->ref.'/'.$invoice->ref.'.pdf">Invoice</a>'; |
|
1699 | 1699 | } |
1700 | 1700 | } |
1701 | 1701 |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | // Members |
97 | 97 | $tmpentry = array( |
98 | 98 | 'enabled' => isModEnabled('adherent'), |
99 | - 'perms' => $user->hasRight('adherent', 'lire'), |
|
99 | + 'perms' => $user->hasRight('adherent', 'lire'), |
|
100 | 100 | 'module' => 'adherent' |
101 | 101 | ); |
102 | 102 | $menu_arr[] = array( |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | ) |
126 | 126 | || (isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) |
127 | 127 | ), |
128 | - 'perms'=> ($user->hasRight('societe', 'lire') || $user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')), |
|
128 | + 'perms'=> ($user->hasRight('societe', 'lire') || $user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')), |
|
129 | 129 | 'module'=>'societe|fournisseur' |
130 | 130 | ); |
131 | 131 | $menu_arr[] = array( |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | // Products-Services |
151 | 151 | $tmpentry = array( |
152 | 152 | 'enabled'=> (isModEnabled('product') || isModEnabled('service') || isModEnabled('expedition')), |
153 | - 'perms'=> ($user->hasRight('product', 'read') || $user->hasRight('service', 'read') || $user->hasRight('expedition', 'lire')), |
|
153 | + 'perms'=> ($user->hasRight('product', 'read') || $user->hasRight('service', 'read') || $user->hasRight('expedition', 'lire')), |
|
154 | 154 | 'module'=>'product|service' |
155 | 155 | ); |
156 | 156 | $menu_arr[] = array( |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | // MRP - GPAO |
178 | 178 | $tmpentry = array( |
179 | 179 | 'enabled'=>(isModEnabled('bom') || isModEnabled('mrp')), |
180 | - 'perms'=>($user->hasRight('bom', 'read') || $user->hasRight('mrp', 'read')), |
|
180 | + 'perms'=>($user->hasRight('bom', 'read') || $user->hasRight('mrp', 'read')), |
|
181 | 181 | 'module'=>'bom|mrp' |
182 | 182 | ); |
183 | 183 | $menu_arr[] = array( |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | // Projects |
203 | 203 | $tmpentry = array( |
204 | 204 | 'enabled'=> (isModEnabled('projet') ? 1 : 0), |
205 | - 'perms'=> ($user->hasRight('projet', 'lire') ? 1 : 0), |
|
205 | + 'perms'=> ($user->hasRight('projet', 'lire') ? 1 : 0), |
|
206 | 206 | 'module'=>'projet' |
207 | 207 | ); |
208 | 208 | |
@@ -247,25 +247,25 @@ discard block |
||
247 | 247 | || isModEnabled('contrat') |
248 | 248 | || isModEnabled('ficheinter') |
249 | 249 | ) ? 1 : 0, |
250 | - 'perms'=>($user->hasRight('propal', 'read') |
|
251 | - || $user->hasRight('commande', 'lire') |
|
252 | - || $user->hasRight('supplier_proposal', 'lire') |
|
253 | - || $user->hasRight('fournisseur', 'lire') |
|
254 | - || $user->hasRight('fournisseur', 'commande', 'lire') |
|
255 | - || $user->hasRight('supplier_order', 'lire') |
|
256 | - || $user->hasRight('contrat', 'lire') |
|
257 | - || $user->hasRight('ficheinter', 'lire') |
|
250 | + 'perms'=>($user->hasRight('propal', 'read') |
|
251 | + || $user->hasRight('commande', 'lire') |
|
252 | + || $user->hasRight('supplier_proposal', 'lire') |
|
253 | + || $user->hasRight('fournisseur', 'lire') |
|
254 | + || $user->hasRight('fournisseur', 'commande', 'lire') |
|
255 | + || $user->hasRight('supplier_order', 'lire') |
|
256 | + || $user->hasRight('contrat', 'lire') |
|
257 | + || $user->hasRight('ficheinter', 'lire') |
|
258 | 258 | ), |
259 | 259 | 'module'=>'propal|commande|supplier_proposal|supplier_order|contrat|ficheinter' |
260 | 260 | ); |
261 | 261 | |
262 | - $onlysupplierorder = $user->hasRight('fournisseur', 'commande', 'lire') && |
|
263 | - !$user->hasRight('propal', 'lire') && |
|
264 | - !$user->hasRight('commande', 'lire') && |
|
265 | - !$user->hasRight('supplier_order', 'lire') && |
|
266 | - !$user->hasRight('supplier_proposal', 'lire') && |
|
267 | - !$user->hasRight('contrat', 'lire') && |
|
268 | - !$user->hasRight('ficheinter', 'lire'); |
|
262 | + $onlysupplierorder = $user->hasRight('fournisseur', 'commande', 'lire') && |
|
263 | + !$user->hasRight('propal', 'lire') && |
|
264 | + !$user->hasRight('commande', 'lire') && |
|
265 | + !$user->hasRight('supplier_order', 'lire') && |
|
266 | + !$user->hasRight('supplier_proposal', 'lire') && |
|
267 | + !$user->hasRight('contrat', 'lire') && |
|
268 | + !$user->hasRight('ficheinter', 'lire'); |
|
269 | 269 | |
270 | 270 | $menu_arr[] = array( |
271 | 271 | 'name' => 'Commercial', |
@@ -296,9 +296,9 @@ discard block |
||
296 | 296 | isModEnabled('loan') || |
297 | 297 | isModEnabled('margins') |
298 | 298 | ) ? 1 : 0, |
299 | - 'perms'=>($user->hasRight('facture', 'lire') || $user->hasRight('don', 'contact', 'lire') |
|
300 | - || $user->hasRight('tax', 'charges', 'lire') || $user->hasRight('salaries', 'read') |
|
301 | - || $user->hasRight('fournisseur', 'facture', 'lire') || $user->hasRight('loan', 'read') || $user->hasRight('margins', 'liretous')), |
|
299 | + 'perms'=>($user->hasRight('facture', 'lire') || $user->hasRight('don', 'contact', 'lire') |
|
300 | + || $user->hasRight('tax', 'charges', 'lire') || $user->hasRight('salaries', 'read') |
|
301 | + || $user->hasRight('fournisseur', 'facture', 'lire') || $user->hasRight('loan', 'read') || $user->hasRight('margins', 'liretous')), |
|
302 | 302 | 'module'=>'facture|supplier_invoice|don|tax|salaries|loan' |
303 | 303 | ); |
304 | 304 | $menu_arr[] = array( |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | // Bank |
324 | 324 | $tmpentry = array( |
325 | 325 | 'enabled'=>(isModEnabled('banque') || isModEnabled('prelevement')), |
326 | - 'perms'=>($user->hasRight('banque', 'lire') || $user->hasRight('prelevement', 'lire') || $user->hasRight('paymentbybanktransfer', 'read')), |
|
326 | + 'perms'=>($user->hasRight('banque', 'lire') || $user->hasRight('prelevement', 'lire') || $user->hasRight('paymentbybanktransfer', 'read')), |
|
327 | 327 | 'module'=>'banque|prelevement|paymentbybanktransfer' |
328 | 328 | ); |
329 | 329 | $menu_arr[] = array( |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | // Accounting |
349 | 349 | $tmpentry = array( |
350 | 350 | 'enabled'=>(isModEnabled('comptabilite') || isModEnabled('accounting') || isModEnabled('asset') || isModEnabled('intracommreport')), |
351 | - 'perms'=>($user->hasRight('compta', 'resultat', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire') || $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('asset', 'read') || $user->hasRight('intracommreport', 'read')), |
|
351 | + 'perms'=>($user->hasRight('compta', 'resultat', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire') || $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('asset', 'read') || $user->hasRight('intracommreport', 'read')), |
|
352 | 352 | 'module'=>'comptabilite|accounting|asset|intracommreport' |
353 | 353 | ); |
354 | 354 | $menu_arr[] = array( |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | // HRM |
374 | 374 | $tmpentry = array( |
375 | 375 | 'enabled'=>(isModEnabled('hrm') || (isModEnabled('holiday')) || isModEnabled('deplacement') || isModEnabled('expensereport') || isModEnabled('recruitment')), |
376 | - 'perms'=>($user->hasRight('user', 'user', 'lire') || $user->hasRight('holiday', 'read') || $user->hasRight('deplacement', 'lire') || $user->hasRight('expensereport', 'lire') || $user->hasRight('recruitment', 'recruitmentjobposition', 'read')), |
|
376 | + 'perms'=>($user->hasRight('user', 'user', 'lire') || $user->hasRight('holiday', 'read') || $user->hasRight('deplacement', 'lire') || $user->hasRight('expensereport', 'lire') || $user->hasRight('recruitment', 'recruitmentjobposition', 'read')), |
|
377 | 377 | 'module'=>'hrm|holiday|deplacement|expensereport|recruitment' |
378 | 378 | ); |
379 | 379 | |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | // Tickets and Knowledge base |
400 | 400 | $tmpentry = array( |
401 | 401 | 'enabled'=>(isModEnabled('ticket') || isModEnabled('knowledgemanagement')), |
402 | - 'perms'=>($user->hasRight('ticket', 'read') || $user->hasRight('knowledgemanagement', 'knowledgerecord', 'read')), |
|
402 | + 'perms'=>($user->hasRight('ticket', 'read') || $user->hasRight('knowledgemanagement', 'knowledgerecord', 'read')), |
|
403 | 403 | 'module'=>'ticket|knowledgemanagement' |
404 | 404 | ); |
405 | 405 | $link = ''; |
@@ -1182,17 +1182,17 @@ discard block |
||
1182 | 1182 | $newmenu->add("/user/home.php?leftmenu=users", $langs->trans("MenuUsersAndGroups"), 0, $user->hasRight('user', 'user', 'read'), '', $mainmenu, 'users', 0, '', '', '', img_picto('', 'user', 'class="paddingright pictofixedwidth"')); |
1183 | 1183 | if ($user->hasRight('user', 'user', 'read')) { |
1184 | 1184 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "users") { |
1185 | - $newmenu->add("", $langs->trans("Users"), 1, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1185 | + $newmenu->add("", $langs->trans("Users"), 1, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1186 | 1186 | $newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->hasRight("user", "user", "write") || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)), '', 'home'); |
1187 | - $newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1188 | - $newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1187 | + $newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1188 | + $newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1189 | 1189 | if (isModEnabled('categorie')) { |
1190 | 1190 | $langs->load("categories"); |
1191 | - $newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1191 | + $newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1192 | 1192 | } |
1193 | - $newmenu->add("", $langs->trans("Groups"), 1, ($user->hasRight('user', 'user', 'lire') || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
|
1193 | + $newmenu->add("", $langs->trans("Groups"), 1, ($user->hasRight('user', 'user', 'lire') || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
|
1194 | 1194 | $newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight("user", "group_advance", "create") : $user->hasRight("user", "user", "create")) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
1195 | - $newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight('user', 'group_advance', 'read') : $user->hasRight('user', 'user', 'lire')) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
|
1195 | + $newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) ? $user->hasRight('user', 'group_advance', 'read') : $user->hasRight('user', 'user', 'lire')) || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
|
1196 | 1196 | } |
1197 | 1197 | } |
1198 | 1198 | } |
@@ -1216,9 +1216,9 @@ discard block |
||
1216 | 1216 | // Societes |
1217 | 1217 | if (isModEnabled('societe')) { |
1218 | 1218 | $langs->load("companies"); |
1219 | - $newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->hasRight('societe', 'lire'), '', $mainmenu, 'thirdparties', 0, '', '', '', img_picto('', 'company', 'class="paddingright pictofixedwidth"')); |
|
1219 | + $newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->hasRight('societe', 'lire'), '', $mainmenu, 'thirdparties', 0, '', '', '', img_picto('', 'company', 'class="paddingright pictofixedwidth"')); |
|
1220 | 1220 | |
1221 | - if ($user->hasRight('societe', 'creer')) { |
|
1221 | + if ($user->hasRight('societe', 'creer')) { |
|
1222 | 1222 | $newmenu->add("/societe/card.php?action=create", $langs->trans("MenuNewThirdParty"), 1); |
1223 | 1223 | if (!$conf->use_javascript_ajax) { |
1224 | 1224 | $newmenu->add("/societe/card.php?action=create&private=1", $langs->trans("MenuNewPrivateIndividual"), 1); |
@@ -1231,7 +1231,7 @@ discard block |
||
1231 | 1231 | // Prospects |
1232 | 1232 | if (isModEnabled('societe') && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { |
1233 | 1233 | $langs->load("commercial"); |
1234 | - $newmenu->add("/societe/list.php?type=p&leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'prospects'); |
|
1234 | + $newmenu->add("/societe/list.php?type=p&leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'prospects'); |
|
1235 | 1235 | /* no more required, there is a filter that can do more |
1236 | 1236 | if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=-1", $langs->trans("LastProspectDoNotContact"), 2, $user->hasRight('societe', 'lire')); |
1237 | 1237 | if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=0", $langs->trans("LastProspectNeverContacted"), 2, $user->hasRight('societe', 'lire')); |
@@ -1239,22 +1239,22 @@ discard block |
||
1239 | 1239 | if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->hasRight('societe', 'lire')); |
1240 | 1240 | if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->hasRight('societe', 'lire')); |
1241 | 1241 | */ |
1242 | - $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 3, $user->hasRight('societe', 'creer')); |
|
1242 | + $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 3, $user->hasRight('societe', 'creer')); |
|
1243 | 1243 | } |
1244 | 1244 | |
1245 | 1245 | // Customers/Prospects |
1246 | 1246 | if (isModEnabled('societe') && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { |
1247 | 1247 | $langs->load("commercial"); |
1248 | - $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'customers'); |
|
1248 | + $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'customers'); |
|
1249 | 1249 | |
1250 | - $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 3, $user->hasRight('societe', 'creer')); |
|
1250 | + $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 3, $user->hasRight('societe', 'creer')); |
|
1251 | 1251 | } |
1252 | 1252 | |
1253 | 1253 | // Suppliers |
1254 | 1254 | if (isModEnabled('societe') && (isModEnabled('supplier_order') || isModEnabled('supplier_invoice') || isModEnabled('supplier_proposal'))) { |
1255 | 1255 | $langs->load("suppliers"); |
1256 | - $newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')), '', $mainmenu, 'suppliers'); |
|
1257 | - $newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f", $langs->trans("MenuNewSupplier"), 3, $user->hasRight('societe', 'creer') && ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire'))); |
|
1256 | + $newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 2, ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire')), '', $mainmenu, 'suppliers'); |
|
1257 | + $newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f", $langs->trans("MenuNewSupplier"), 3, $user->hasRight('societe', 'creer') && ($user->hasRight('fournisseur', 'lire') || $user->hasRight('supplier_order', 'lire') || $user->hasRight('supplier_invoice', 'lire') || $user->hasRight('supplier_proposal', 'lire'))); |
|
1258 | 1258 | } |
1259 | 1259 | |
1260 | 1260 | // Categories |
@@ -1269,36 +1269,36 @@ discard block |
||
1269 | 1269 | if (!empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { |
1270 | 1270 | $menutoshow = $langs->trans("ProspectsCategoriesShort"); |
1271 | 1271 | } |
1272 | - $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1272 | + $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1273 | 1273 | } |
1274 | 1274 | // Categories suppliers |
1275 | 1275 | if (isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
1276 | - $newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->hasRight('categorie', 'lire')); |
|
1276 | + $newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->hasRight('categorie', 'lire')); |
|
1277 | 1277 | } |
1278 | 1278 | } |
1279 | 1279 | |
1280 | 1280 | // Contacts |
1281 | - $newmenu->add("/societe/index.php?leftmenu=thirdparties", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->hasRight('societe', 'contact', 'lire'), '', $mainmenu, 'contacts', 0, '', '', '', img_picto('', 'contact', 'class="paddingright pictofixedwidth"')); |
|
1281 | + $newmenu->add("/societe/index.php?leftmenu=thirdparties", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")), 0, $user->hasRight('societe', 'contact', 'lire'), '', $mainmenu, 'contacts', 0, '', '', '', img_picto('', 'contact', 'class="paddingright pictofixedwidth"')); |
|
1282 | 1282 | |
1283 | - $newmenu->add("/contact/card.php?leftmenu=contacts&action=create", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->hasRight('societe', 'contact', 'creer')); |
|
1284 | - $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->hasRight('societe', 'contact', 'lire')); |
|
1283 | + $newmenu->add("/contact/card.php?leftmenu=contacts&action=create", (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("NewContact") : $langs->trans("NewContactAddress")), 1, $user->hasRight('societe', 'contact', 'creer')); |
|
1284 | + $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->hasRight('societe', 'contact', 'lire')); |
|
1285 | 1285 | if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { |
1286 | - $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1286 | + $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1287 | 1287 | } |
1288 | 1288 | if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { |
1289 | - $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1289 | + $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1290 | 1290 | } |
1291 | 1291 | if (isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
1292 | - $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->hasRight('fournisseur', 'lire')); |
|
1292 | + $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->hasRight('fournisseur', 'lire')); |
|
1293 | 1293 | } |
1294 | - $newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1294 | + $newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1295 | 1295 | //$newmenu->add("/contact/list.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->hasRight('societe', 'contact', 'lire')); |
1296 | 1296 | |
1297 | 1297 | // Categories |
1298 | 1298 | if (isModEnabled('categorie')) { |
1299 | 1299 | $langs->load("categories"); |
1300 | 1300 | // Categories Contact |
1301 | - $newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1301 | + $newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1302 | 1302 | } |
1303 | 1303 | } |
1304 | 1304 | } |
@@ -1323,101 +1323,101 @@ discard block |
||
1323 | 1323 | // Customer proposal |
1324 | 1324 | if (isModEnabled('propal')) { |
1325 | 1325 | $langs->load("propal"); |
1326 | - $newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Proposals"), 0, $user->hasRight('propal', 'read'), '', $mainmenu, 'propals', 100, '', '', '', img_picto('', 'propal', 'class="paddingright pictofixedwidth"')); |
|
1327 | - $newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", $langs->trans("NewPropal"), 1, $user->hasRight('propal', 'write')); |
|
1328 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->hasRight('propal', 'read')); |
|
1326 | + $newmenu->add("/comm/propal/index.php?leftmenu=propals", $langs->trans("Proposals"), 0, $user->hasRight('propal', 'read'), '', $mainmenu, 'propals', 100, '', '', '', img_picto('', 'propal', 'class="paddingright pictofixedwidth"')); |
|
1327 | + $newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", $langs->trans("NewPropal"), 1, $user->hasRight('propal', 'write')); |
|
1328 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->hasRight('propal', 'read')); |
|
1329 | 1329 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "propals") { |
1330 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=0", $langs->trans("PropalsDraft"), 2, $user->hasRight('propal', 'read')); |
|
1331 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=1", $langs->trans("PropalsOpened"), 2, $user->hasRight('propal', 'read')); |
|
1332 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2", $langs->trans("PropalStatusSigned"), 2, $user->hasRight('propal', 'read')); |
|
1333 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=3", $langs->trans("PropalStatusNotSigned"), 2, $user->hasRight('propal', 'read')); |
|
1334 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=4", $langs->trans("PropalStatusBilled"), 2, $user->hasRight('propal', 'read')); |
|
1330 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=0", $langs->trans("PropalsDraft"), 2, $user->hasRight('propal', 'read')); |
|
1331 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=1", $langs->trans("PropalsOpened"), 2, $user->hasRight('propal', 'read')); |
|
1332 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2", $langs->trans("PropalStatusSigned"), 2, $user->hasRight('propal', 'read')); |
|
1333 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=3", $langs->trans("PropalStatusNotSigned"), 2, $user->hasRight('propal', 'read')); |
|
1334 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=4", $langs->trans("PropalStatusBilled"), 2, $user->hasRight('propal', 'read')); |
|
1335 | 1335 | //$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2,3,4", $langs->trans("PropalStatusClosedShort"), 2, $user->hasRight('propal', 'read')); |
1336 | 1336 | } |
1337 | - $newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", $langs->trans("Statistics"), 1, $user->hasRight('propal', 'read')); |
|
1337 | + $newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", $langs->trans("Statistics"), 1, $user->hasRight('propal', 'read')); |
|
1338 | 1338 | } |
1339 | 1339 | |
1340 | 1340 | // Customers orders |
1341 | 1341 | if (isModEnabled('commande')) { |
1342 | 1342 | $langs->load("orders"); |
1343 | - $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 200, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); |
|
1344 | - $newmenu->add("/commande/card.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->hasRight('commande', 'creer')); |
|
1345 | - $newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->hasRight('commande', 'lire')); |
|
1343 | + $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 200, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); |
|
1344 | + $newmenu->add("/commande/card.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->hasRight('commande', 'creer')); |
|
1345 | + $newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->hasRight('commande', 'lire')); |
|
1346 | 1346 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders") { |
1347 | - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=0", $langs->trans("StatusOrderDraftShort"), 2, $user->hasRight('commande', 'lire')); |
|
1348 | - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=1", $langs->trans("StatusOrderValidated"), 2, $user->hasRight('commande', 'lire')); |
|
1347 | + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=0", $langs->trans("StatusOrderDraftShort"), 2, $user->hasRight('commande', 'lire')); |
|
1348 | + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=1", $langs->trans("StatusOrderValidated"), 2, $user->hasRight('commande', 'lire')); |
|
1349 | 1349 | if (isModEnabled('expedition')) { |
1350 | - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=2", $langs->trans("StatusOrderSentShort"), 2, $user->hasRight('commande', 'lire')); |
|
1350 | + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=2", $langs->trans("StatusOrderSentShort"), 2, $user->hasRight('commande', 'lire')); |
|
1351 | 1351 | } |
1352 | - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=3", $langs->trans("StatusOrderDelivered"), 2, $user->hasRight('commande', 'lire')); |
|
1352 | + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=3", $langs->trans("StatusOrderDelivered"), 2, $user->hasRight('commande', 'lire')); |
|
1353 | 1353 | //$newmenu->add("/commande/list.php?leftmenu=orders&search_status=4", $langs->trans("StatusOrderProcessed"), 2, $user->hasRight('commande', 'lire')); |
1354 | - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->hasRight('commande', 'lire')); |
|
1354 | + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->hasRight('commande', 'lire')); |
|
1355 | 1355 | } |
1356 | 1356 | if ($conf->global->MAIN_FEATURES_LEVEL >= 2 && empty($user->socid)) { |
1357 | - $newmenu->add("/commande/list_det.php?leftmenu=orders", $langs->trans("ListOrderLigne"), 1, $user->hasRight('commande', 'lire')); |
|
1357 | + $newmenu->add("/commande/list_det.php?leftmenu=orders", $langs->trans("ListOrderLigne"), 1, $user->hasRight('commande', 'lire')); |
|
1358 | 1358 | } |
1359 | - $newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->hasRight('commande', 'lire')); |
|
1359 | + $newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->hasRight('commande', 'lire')); |
|
1360 | 1360 | } |
1361 | 1361 | |
1362 | 1362 | // Supplier proposal |
1363 | 1363 | if (isModEnabled('supplier_proposal')) { |
1364 | 1364 | $langs->load("supplier_proposal"); |
1365 | - $newmenu->add("/supplier_proposal/index.php?leftmenu=propals_supplier", $langs->trans("SupplierProposalsShort"), 0, $user->hasRight('supplier_proposal', 'lire'), '', $mainmenu, 'propals_supplier', 300, '', '', '', img_picto('', 'supplier_proposal', 'class="paddingright pictofixedwidth"')); |
|
1366 | - $newmenu->add("/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->hasRight('supplier_proposal', 'creer')); |
|
1367 | - $newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->hasRight('supplier_proposal', 'lire')); |
|
1368 | - $newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('supplier_proposal', 'lire')); |
|
1365 | + $newmenu->add("/supplier_proposal/index.php?leftmenu=propals_supplier", $langs->trans("SupplierProposalsShort"), 0, $user->hasRight('supplier_proposal', 'lire'), '', $mainmenu, 'propals_supplier', 300, '', '', '', img_picto('', 'supplier_proposal', 'class="paddingright pictofixedwidth"')); |
|
1366 | + $newmenu->add("/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->hasRight('supplier_proposal', 'creer')); |
|
1367 | + $newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->hasRight('supplier_proposal', 'lire')); |
|
1368 | + $newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('supplier_proposal', 'lire')); |
|
1369 | 1369 | } |
1370 | 1370 | |
1371 | 1371 | // Suppliers orders |
1372 | 1372 | if (isModEnabled('supplier_order')) { |
1373 | 1373 | $langs->load("orders"); |
1374 | - $newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers", $langs->trans("SuppliersOrders"), 0, $user->hasRight('fournisseur', 'commande', 'lire'), '', $mainmenu, 'orders_suppliers', 400, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); |
|
1375 | - $newmenu->add("/fourn/commande/card.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewSupplierOrderShort"), 1, $user->hasRight('fournisseur', 'commande', 'creer')); |
|
1376 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1374 | + $newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers", $langs->trans("SuppliersOrders"), 0, $user->hasRight('fournisseur', 'commande', 'lire'), '', $mainmenu, 'orders_suppliers', 400, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); |
|
1375 | + $newmenu->add("/fourn/commande/card.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewSupplierOrderShort"), 1, $user->hasRight('fournisseur', 'commande', 'creer')); |
|
1376 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1377 | 1377 | |
1378 | 1378 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders_suppliers") { |
1379 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusSupplierOrderDraftShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1379 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusSupplierOrderDraftShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1380 | 1380 | if (empty($conf->global->SUPPLIER_ORDER_HIDE_VALIDATED)) { |
1381 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusSupplierOrderValidated"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1381 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusSupplierOrderValidated"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1382 | 1382 | } |
1383 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusSupplierOrderApprovedShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1384 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusSupplierOrderOnProcessShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1385 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusSupplierOrderReceivedPartiallyShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1386 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusSupplierOrderReceivedAll"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1387 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusSupplierOrderCanceled"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1388 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusSupplierOrderRefused"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1383 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusSupplierOrderApprovedShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1384 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusSupplierOrderOnProcessShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1385 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusSupplierOrderReceivedPartiallyShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1386 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusSupplierOrderReceivedAll"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1387 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusSupplierOrderCanceled"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1388 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusSupplierOrderRefused"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1389 | 1389 | } |
1390 | 1390 | // Billed is another field. We should add instead a dedicated filter on list. if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&billed=1", $langs->trans("Billed"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
1391 | 1391 | |
1392 | 1392 | |
1393 | - $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1393 | + $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1394 | 1394 | } |
1395 | 1395 | |
1396 | 1396 | // Contrat |
1397 | 1397 | if (isModEnabled('contrat')) { |
1398 | 1398 | $langs->load("contracts"); |
1399 | - $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->hasRight('contrat', 'lire'), '', $mainmenu, 'contracts', 2000, '', '', '', img_picto('', 'contract', 'class="paddingright pictofixedwidth"')); |
|
1400 | - $newmenu->add("/contrat/card.php?action=create&leftmenu=contracts", $langs->trans("NewContractSubscription"), 1, $user->hasRight('contrat', 'creer')); |
|
1401 | - $newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->hasRight('contrat', 'lire')); |
|
1402 | - $newmenu->add("/contrat/services_list.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->hasRight('contrat', 'lire')); |
|
1399 | + $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->hasRight('contrat', 'lire'), '', $mainmenu, 'contracts', 2000, '', '', '', img_picto('', 'contract', 'class="paddingright pictofixedwidth"')); |
|
1400 | + $newmenu->add("/contrat/card.php?action=create&leftmenu=contracts", $langs->trans("NewContractSubscription"), 1, $user->hasRight('contrat', 'creer')); |
|
1401 | + $newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->hasRight('contrat', 'lire')); |
|
1402 | + $newmenu->add("/contrat/services_list.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->hasRight('contrat', 'lire')); |
|
1403 | 1403 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "contracts") { |
1404 | - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=0", $langs->trans("MenuInactiveServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1405 | - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4", $langs->trans("MenuRunningServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1406 | - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4&filter=expired", $langs->trans("MenuExpiredServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1407 | - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=5", $langs->trans("MenuClosedServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1404 | + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=0", $langs->trans("MenuInactiveServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1405 | + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4", $langs->trans("MenuRunningServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1406 | + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4&filter=expired", $langs->trans("MenuExpiredServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1407 | + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=5", $langs->trans("MenuClosedServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1408 | 1408 | } |
1409 | 1409 | } |
1410 | 1410 | |
1411 | 1411 | // Interventions |
1412 | 1412 | if (isModEnabled('ficheinter')) { |
1413 | 1413 | $langs->load("interventions"); |
1414 | - $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->hasRight('ficheinter', 'lire'), '', $mainmenu, 'ficheinter', 2200, '', '', '', img_picto('', 'intervention', 'class="paddingright pictofixedwidth"')); |
|
1415 | - $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->hasRight('ficheinter', 'creer'), '', '', '', 201); |
|
1416 | - $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 202); |
|
1414 | + $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->hasRight('ficheinter', 'lire'), '', $mainmenu, 'ficheinter', 2200, '', '', '', img_picto('', 'intervention', 'class="paddingright pictofixedwidth"')); |
|
1415 | + $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->hasRight('ficheinter', 'creer'), '', '', '', 201); |
|
1416 | + $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 202); |
|
1417 | 1417 | if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { |
1418 | - $newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ListOfTemplates"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 203); |
|
1418 | + $newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ListOfTemplates"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 203); |
|
1419 | 1419 | } |
1420 | - $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->hasRight('ficheinter', 'lire')); |
|
1420 | + $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->hasRight('ficheinter', 'lire')); |
|
1421 | 1421 | } |
1422 | 1422 | } |
1423 | 1423 | } |
@@ -1442,59 +1442,59 @@ discard block |
||
1442 | 1442 | // Customers invoices |
1443 | 1443 | if (isModEnabled('facture')) { |
1444 | 1444 | $langs->load("bills"); |
1445 | - $newmenu->add("/compta/facture/index.php?leftmenu=customers_bills", $langs->trans("BillsCustomers"), 0, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills', 0, '', '', '', img_picto('', 'bill', 'class="paddingright pictofixedwidth"')); |
|
1446 | - $newmenu->add("/compta/facture/card.php?action=create", $langs->trans("NewBill"), 1, $user->hasRight('facture', 'creer')); |
|
1447 | - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", $langs->trans("List"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_list'); |
|
1445 | + $newmenu->add("/compta/facture/index.php?leftmenu=customers_bills", $langs->trans("BillsCustomers"), 0, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills', 0, '', '', '', img_picto('', 'bill', 'class="paddingright pictofixedwidth"')); |
|
1446 | + $newmenu->add("/compta/facture/card.php?action=create", $langs->trans("NewBill"), 1, $user->hasRight('facture', 'creer')); |
|
1447 | + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", $langs->trans("List"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_list'); |
|
1448 | 1448 | |
1449 | 1449 | if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills(|_draft|_notpaid|_paid|_canceled)$/', $leftmenu)) { |
1450 | - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('facture', 'lire')); |
|
1451 | - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('facture', 'lire')); |
|
1452 | - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('facture', 'lire')); |
|
1453 | - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3", $langs->trans("BillShortStatusCanceled"), 2, $user->hasRight('facture', 'lire')); |
|
1450 | + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('facture', 'lire')); |
|
1451 | + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('facture', 'lire')); |
|
1452 | + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('facture', 'lire')); |
|
1453 | + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3", $langs->trans("BillShortStatusCanceled"), 2, $user->hasRight('facture', 'lire')); |
|
1454 | 1454 | } |
1455 | - $newmenu->add("/compta/facture/invoicetemplate_list.php?leftmenu=customers_bills_templates", $langs->trans("ListOfTemplates"), 1, $user->hasRight('facture', 'creer'), '', $mainmenu, 'customers_bills_templates'); // No need to see recurring invoices, if user has no permission to create invoice. |
|
1455 | + $newmenu->add("/compta/facture/invoicetemplate_list.php?leftmenu=customers_bills_templates", $langs->trans("ListOfTemplates"), 1, $user->hasRight('facture', 'creer'), '', $mainmenu, 'customers_bills_templates'); // No need to see recurring invoices, if user has no permission to create invoice. |
|
1456 | 1456 | |
1457 | - $newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment'); |
|
1457 | + $newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment'); |
|
1458 | 1458 | |
1459 | 1459 | if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { |
1460 | - $newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", $langs->trans("MenuToValid"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customer_bills_tovalid'); |
|
1460 | + $newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", $langs->trans("MenuToValid"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customer_bills_tovalid'); |
|
1461 | 1461 | } |
1462 | 1462 | if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills/', $leftmenu)) { |
1463 | - $newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment_report'); |
|
1463 | + $newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment_report'); |
|
1464 | 1464 | } |
1465 | 1465 | |
1466 | - $newmenu->add("/compta/facture/stats/index.php?leftmenu=customers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_stats'); |
|
1466 | + $newmenu->add("/compta/facture/stats/index.php?leftmenu=customers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_stats'); |
|
1467 | 1467 | } |
1468 | 1468 | |
1469 | 1469 | // Suppliers invoices |
1470 | 1470 | if (isModEnabled('societe') && isModEnabled('supplier_invoice')) { |
1471 | 1471 | $langs->load("bills"); |
1472 | - $newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"), 0, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills', 0, '', '', '', img_picto('', 'supplier_invoice', 'class="paddingright pictofixedwidth"')); |
|
1473 | - $newmenu->add("/fourn/facture/card.php?leftmenu=suppliers_bills&action=create", $langs->trans("NewBill"), 1, ($user->hasRight('fournisseur', 'facture', 'creer') || $user->hasRight('supplier_invoice', 'creer')), '', $mainmenu, 'suppliers_bills_create'); |
|
1474 | - $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_list'); |
|
1472 | + $newmenu->add("/fourn/facture/index.php?leftmenu=suppliers_bills", $langs->trans("BillsSuppliers"), 0, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills', 0, '', '', '', img_picto('', 'supplier_invoice', 'class="paddingright pictofixedwidth"')); |
|
1473 | + $newmenu->add("/fourn/facture/card.php?leftmenu=suppliers_bills&action=create", $langs->trans("NewBill"), 1, ($user->hasRight('fournisseur', 'facture', 'creer') || $user->hasRight('supplier_invoice', 'creer')), '', $mainmenu, 'suppliers_bills_create'); |
|
1474 | + $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_list'); |
|
1475 | 1475 | |
1476 | 1476 | if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) { |
1477 | - $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_draft'); |
|
1478 | - $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_notpaid'); |
|
1479 | - $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_paid'); |
|
1477 | + $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_draft'); |
|
1478 | + $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_notpaid'); |
|
1479 | + $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_paid'); |
|
1480 | 1480 | } |
1481 | 1481 | |
1482 | - $newmenu->add("/fourn/facture/list-rec.php?leftmenu=supplierinvoicestemplate_list", $langs->trans("ListOfTemplates"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'supplierinvoicestemplate_list'); |
|
1482 | + $newmenu->add("/fourn/facture/list-rec.php?leftmenu=supplierinvoicestemplate_list", $langs->trans("ListOfTemplates"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'supplierinvoicestemplate_list'); |
|
1483 | 1483 | |
1484 | - $newmenu->add("/fourn/paiement/list.php?leftmenu=suppliers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment'); |
|
1484 | + $newmenu->add("/fourn/paiement/list.php?leftmenu=suppliers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment'); |
|
1485 | 1485 | |
1486 | 1486 | if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) { |
1487 | - $newmenu->add("/fourn/facture/rapport.php?leftmenu=suppliers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment_report'); |
|
1487 | + $newmenu->add("/fourn/facture/rapport.php?leftmenu=suppliers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment_report'); |
|
1488 | 1488 | } |
1489 | 1489 | |
1490 | - $newmenu->add("/compta/facture/stats/index.php?mode=supplier&leftmenu=suppliers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_stats'); |
|
1490 | + $newmenu->add("/compta/facture/stats/index.php?mode=supplier&leftmenu=suppliers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_stats'); |
|
1491 | 1491 | } |
1492 | 1492 | |
1493 | 1493 | // Orders |
1494 | 1494 | if (isModEnabled('commande')) { |
1495 | 1495 | $langs->load("orders"); |
1496 | 1496 | if (isModEnabled('facture')) { |
1497 | - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); |
|
1497 | + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); |
|
1498 | 1498 | } |
1499 | 1499 | //if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->hasRight('commande', 'lire')); |
1500 | 1500 | } |
@@ -1503,7 +1503,7 @@ discard block |
||
1503 | 1503 | if (isModEnabled('supplier_invoice')) { |
1504 | 1504 | if (!empty($conf->global->SUPPLIER_MENU_ORDER_RECEIVED_INTO_INVOICE)) { |
1505 | 1505 | $langs->load("supplier"); |
1506 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders&search_status=5&billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); |
|
1506 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders&search_status=5&billed=0", $langs->trans("MenuOrdersSupplierToBill"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 0, '', '', '', img_picto('', 'supplier_order', 'class="paddingright pictofixedwidth"')); |
|
1507 | 1507 | //if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->hasRight('commande', 'lire')); |
1508 | 1508 | } |
1509 | 1509 | } |
@@ -1512,58 +1512,58 @@ discard block |
||
1512 | 1512 | // Donations |
1513 | 1513 | if (isModEnabled('don')) { |
1514 | 1514 | $langs->load("donations"); |
1515 | - $newmenu->add("/don/index.php?leftmenu=donations&mainmenu=billing", $langs->trans("Donations"), 0, $user->hasRight('don', 'lire'), '', $mainmenu, 'donations', 0, '', '', '', img_picto('', 'donation', 'class="paddingright pictofixedwidth"')); |
|
1515 | + $newmenu->add("/don/index.php?leftmenu=donations&mainmenu=billing", $langs->trans("Donations"), 0, $user->hasRight('don', 'lire'), '', $mainmenu, 'donations', 0, '', '', '', img_picto('', 'donation', 'class="paddingright pictofixedwidth"')); |
|
1516 | 1516 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "donations") { |
1517 | - $newmenu->add("/don/card.php?leftmenu=donations&action=create", $langs->trans("NewDonation"), 1, $user->hasRight('don', 'creer')); |
|
1518 | - $newmenu->add("/don/list.php?leftmenu=donations", $langs->trans("List"), 1, $user->hasRight('don', 'lire')); |
|
1517 | + $newmenu->add("/don/card.php?leftmenu=donations&action=create", $langs->trans("NewDonation"), 1, $user->hasRight('don', 'creer')); |
|
1518 | + $newmenu->add("/don/list.php?leftmenu=donations", $langs->trans("List"), 1, $user->hasRight('don', 'lire')); |
|
1519 | 1519 | } |
1520 | 1520 | // if ($leftmenu=="donations") $newmenu->add("/don/stats/index.php",$langs->trans("Statistics"), 1, $user->hasRight('don', 'lire')); |
1521 | 1521 | } |
1522 | 1522 | |
1523 | 1523 | // Taxes and social contributions |
1524 | 1524 | if (isModEnabled('tax')) { |
1525 | - $newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=billing", $langs->trans("MenuTaxesAndSpecialExpenses"), 0, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1525 | + $newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=billing", $langs->trans("MenuTaxesAndSpecialExpenses"), 0, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1526 | 1526 | |
1527 | - $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("MenuSocialContributions"), 1, $user->hasRight('tax', 'charges', 'lire')); |
|
1527 | + $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("MenuSocialContributions"), 1, $user->hasRight('tax', 'charges', 'lire')); |
|
1528 | 1528 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_social/i', $leftmenu)) { |
1529 | - $newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", $langs->trans("MenuNewSocialContribution"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1530 | - $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1531 | - $newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1529 | + $newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", $langs->trans("MenuNewSocialContribution"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1530 | + $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1531 | + $newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1532 | 1532 | } |
1533 | 1533 | // VAT |
1534 | 1534 | if (empty($conf->global->TAX_DISABLE_VAT_MENUS)) { |
1535 | 1535 | global $mysoc; |
1536 | 1536 | |
1537 | - $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat&mainmenu=billing", $langs->transcountry("VAT", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax_vat'); |
|
1537 | + $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat&mainmenu=billing", $langs->transcountry("VAT", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire'), '', $mainmenu, 'tax_vat'); |
|
1538 | 1538 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i', $leftmenu)) { |
1539 | - $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1540 | - $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1541 | - $newmenu->add("/compta/tva/payments.php?mode=tvaonly&leftmenu=tax_vat", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1542 | - $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1543 | - $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1544 | - $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1539 | + $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1540 | + $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1541 | + $newmenu->add("/compta/tva/payments.php?mode=tvaonly&leftmenu=tax_vat", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1542 | + $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1543 | + $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1544 | + $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1545 | 1545 | } |
1546 | 1546 | |
1547 | 1547 | //Local Taxes 1 |
1548 | 1548 | if ($mysoc->useLocalTax(1) && (isset($mysoc->localtax1_assuj) && $mysoc->localtax1_assuj == "1")) { |
1549 | - $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&mainmenu=billing&localTaxType=1", $langs->transcountry("LT1", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire')); |
|
1549 | + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&mainmenu=billing&localTaxType=1", $langs->transcountry("LT1", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire')); |
|
1550 | 1550 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i', $leftmenu)) { |
1551 | - $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1552 | - $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1553 | - $newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1554 | - $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1555 | - $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1551 | + $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1552 | + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1553 | + $newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1554 | + $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1555 | + $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1556 | 1556 | } |
1557 | 1557 | } |
1558 | 1558 | //Local Taxes 2 |
1559 | 1559 | if ($mysoc->useLocalTax(2) && (isset($mysoc->localtax2_assuj) && $mysoc->localtax2_assuj == "1")) { |
1560 | - $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&mainmenu=billing&localTaxType=2", $langs->transcountry("LT2", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire')); |
|
1560 | + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&mainmenu=billing&localTaxType=2", $langs->transcountry("LT2", $mysoc->country_code), 1, $user->hasRight('tax', 'charges', 'lire')); |
|
1561 | 1561 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i', $leftmenu)) { |
1562 | - $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1563 | - $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1564 | - $newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1565 | - $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1566 | - $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1562 | + $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1563 | + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1564 | + $newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1565 | + $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1566 | + $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1567 | 1567 | } |
1568 | 1568 | } |
1569 | 1569 | } |
@@ -1572,21 +1572,21 @@ discard block |
||
1572 | 1572 | // Salaries |
1573 | 1573 | if (isModEnabled('salaries')) { |
1574 | 1574 | $langs->load("salaries"); |
1575 | - $newmenu->add("/salaries/list.php?leftmenu=tax_salary&mainmenu=billing", $langs->trans("Salaries"), 0, $user->hasRight('salaries', 'read'), '', $mainmenu, 'tax_salary', 0, '', '', '', img_picto('', 'salary', 'class="paddingright pictofixedwidth"')); |
|
1575 | + $newmenu->add("/salaries/list.php?leftmenu=tax_salary&mainmenu=billing", $langs->trans("Salaries"), 0, $user->hasRight('salaries', 'read'), '', $mainmenu, 'tax_salary', 0, '', '', '', img_picto('', 'salary', 'class="paddingright pictofixedwidth"')); |
|
1576 | 1576 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_salary/i', $leftmenu)) { |
1577 | - $newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("New"), 1, $user->hasRight('salaries', 'write')); |
|
1578 | - $newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("List"), 1, $user->hasRight('salaries', 'read')); |
|
1579 | - $newmenu->add("/salaries/payments.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->hasRight('salaries', 'read')); |
|
1580 | - $newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->hasRight('salaries', 'read')); |
|
1577 | + $newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("New"), 1, $user->hasRight('salaries', 'write')); |
|
1578 | + $newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("List"), 1, $user->hasRight('salaries', 'read')); |
|
1579 | + $newmenu->add("/salaries/payments.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->hasRight('salaries', 'read')); |
|
1580 | + $newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->hasRight('salaries', 'read')); |
|
1581 | 1581 | } |
1582 | 1582 | } |
1583 | 1583 | |
1584 | 1584 | // Loan |
1585 | 1585 | if (isModEnabled('loan')) { |
1586 | 1586 | $langs->load("loan"); |
1587 | - $newmenu->add("/loan/list.php?leftmenu=tax_loan&mainmenu=billing", $langs->trans("Loans"), 0, $user->hasRight('loan', 'read'), '', $mainmenu, 'tax_loan', 0, '', '', '', img_picto('', 'loan', 'class="paddingright pictofixedwidth"')); |
|
1587 | + $newmenu->add("/loan/list.php?leftmenu=tax_loan&mainmenu=billing", $langs->trans("Loans"), 0, $user->hasRight('loan', 'read'), '', $mainmenu, 'tax_loan', 0, '', '', '', img_picto('', 'loan', 'class="paddingright pictofixedwidth"')); |
|
1588 | 1588 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_loan/i', $leftmenu)) { |
1589 | - $newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->hasRight('loan', 'write')); |
|
1589 | + $newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->hasRight('loan', 'write')); |
|
1590 | 1590 | //$newmenu->add("/loan/payment/list.php?leftmenu=tax_loan",$langs->trans("Payments"),2,$user->hasRight('loan', 'read')); |
1591 | 1591 | } |
1592 | 1592 | } |
@@ -1594,10 +1594,10 @@ discard block |
||
1594 | 1594 | // Various payment |
1595 | 1595 | if (isModEnabled('banque') && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) { |
1596 | 1596 | $langs->load("banks"); |
1597 | - $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&mainmenu=billing", $langs->trans("MenuVariousPayment"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'tax_various', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1597 | + $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&mainmenu=billing", $langs->trans("MenuVariousPayment"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'tax_various', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1598 | 1598 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_various/i', $leftmenu)) { |
1599 | - $newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->hasRight('banque', 'modifier')); |
|
1600 | - $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->hasRight('banque', 'lire')); |
|
1599 | + $newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->hasRight('banque', 'modifier')); |
|
1600 | + $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->hasRight('banque', 'lire')); |
|
1601 | 1601 | } |
1602 | 1602 | } |
1603 | 1603 | } |
@@ -1627,71 +1627,71 @@ discard block |
||
1627 | 1627 | //$newmenu->add("/accountancy/index.php?leftmenu=accountancy", $langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy'); |
1628 | 1628 | |
1629 | 1629 | // Configuration |
1630 | - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin', 1, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
1630 | + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", $langs->trans("Setup"), 0, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin', 1, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
1631 | 1631 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/', $leftmenu)) { |
1632 | 1632 | global $mysoc; |
1633 | - $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_general', 10); |
|
1633 | + $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_general', 10); |
|
1634 | 1634 | |
1635 | 1635 | // Fiscal year - Not really yet used. In a future will lock some periods. |
1636 | 1636 | if ($conf->global->MAIN_FEATURES_LEVEL > 1) { |
1637 | - $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'fiscalyear', 20); |
|
1637 | + $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'fiscalyear', 20); |
|
1638 | 1638 | } |
1639 | 1639 | |
1640 | - $newmenu->add("/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingJournals"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_journal', 30); |
|
1641 | - $newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chartmodel', 40); |
|
1642 | - $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
|
1643 | - $newmenu->add("/accountancy/admin/subaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ChartOfSubaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
|
1644 | - $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 60); |
|
1640 | + $newmenu->add("/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingJournals"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_journal', 30); |
|
1641 | + $newmenu->add("/accountancy/admin/accountmodel.php?id=31&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Pcg_version"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chartmodel', 40); |
|
1642 | + $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
|
1643 | + $newmenu->add("/accountancy/admin/subaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ChartOfSubaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
|
1644 | + $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 60); |
|
1645 | 1645 | if (isModEnabled('banque')) { |
1646 | - $newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_bank', 70); |
|
1646 | + $newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_bank', 70); |
|
1647 | 1647 | } |
1648 | 1648 | if (isModEnabled('facture') || isModEnabled('supplier_invoice')) { |
1649 | - $newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 80); |
|
1649 | + $newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 80); |
|
1650 | 1650 | } |
1651 | 1651 | if (isModEnabled('tax')) { |
1652 | - $newmenu->add("/admin/dict.php?id=7&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuTaxAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 90); |
|
1652 | + $newmenu->add("/admin/dict.php?id=7&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuTaxAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 90); |
|
1653 | 1653 | } |
1654 | 1654 | if (isModEnabled('expensereport')) { |
1655 | - $newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 100); |
|
1655 | + $newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuExpenseReportAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 100); |
|
1656 | 1656 | } |
1657 | - $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_product', 110); |
|
1657 | + $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_product', 110); |
|
1658 | 1658 | if ($conf->global->MAIN_FEATURES_LEVEL > 1) { |
1659 | - $newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_closure', 120); |
|
1659 | + $newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_closure', 120); |
|
1660 | 1660 | } |
1661 | - $newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 125); |
|
1662 | - $newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_export', 130); |
|
1661 | + $newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 125); |
|
1662 | + $newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_export', 130); |
|
1663 | 1663 | } |
1664 | 1664 | |
1665 | 1665 | // Transfer in accounting |
1666 | - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_transfer", $langs->trans("TransferInAccounting"), 0, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'transfer', 1, '', '', '', img_picto('', 'long-arrow-alt-right', 'class="paddingright pictofixedwidth"')); |
|
1666 | + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_transfer", $langs->trans("TransferInAccounting"), 0, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'transfer', 1, '', '', '', img_picto('', 'long-arrow-alt-right', 'class="paddingright pictofixedwidth"')); |
|
1667 | 1667 | |
1668 | 1668 | // Binding |
1669 | 1669 | // $newmenu->add("", $langs->trans("Binding"), 0, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch'); |
1670 | 1670 | if (isModEnabled('facture') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) { |
1671 | - $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_customer'); |
|
1671 | + $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_customer'); |
|
1672 | 1672 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_customer/', $leftmenu)) { |
1673 | - $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1674 | - $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1673 | + $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1674 | + $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1675 | 1675 | } |
1676 | 1676 | } |
1677 | 1677 | if (isModEnabled('supplier_invoice') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)) { |
1678 | - $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_supplier'); |
|
1678 | + $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_supplier'); |
|
1679 | 1679 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_supplier/', $leftmenu)) { |
1680 | - $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1681 | - $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1680 | + $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1681 | + $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1682 | 1682 | } |
1683 | 1683 | } |
1684 | 1684 | if (isModEnabled('expensereport') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) { |
1685 | - $newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_expensereport'); |
|
1685 | + $newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_expensereport'); |
|
1686 | 1686 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_expensereport/', $leftmenu)) { |
1687 | - $newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1688 | - $newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1687 | + $newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1688 | + $newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1689 | 1689 | } |
1690 | 1690 | } |
1691 | 1691 | |
1692 | 1692 | // Journals |
1693 | - if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1694 | - $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy_journal'); |
|
1693 | + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1694 | + $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy_journal'); |
|
1695 | 1695 | |
1696 | 1696 | // Multi journal |
1697 | 1697 | $sql = "SELECT rowid, code, label, nature"; |
@@ -1727,7 +1727,7 @@ discard block |
||
1727 | 1727 | $nature = "expensereports"; |
1728 | 1728 | } |
1729 | 1729 | if ($objp->nature == 1 && isModEnabled('asset')) { |
1730 | - $nature = "various"; // Warning: The page /accountancy/journal/variousjournal.php is bugged. It read tables that does not exists. |
|
1730 | + $nature = "various"; // Warning: The page /accountancy/journal/variousjournal.php is bugged. It read tables that does not exists. |
|
1731 | 1731 | } |
1732 | 1732 | if ($objp->nature == 8) { |
1733 | 1733 | $nature = "inventory"; |
@@ -1751,16 +1751,16 @@ discard block |
||
1751 | 1751 | $journallabel = '<span class="opacitymedium">('.$langs->trans($objp->label).')</span>'; // Label of bank account in llx_accounting_journal |
1752 | 1752 | } |
1753 | 1753 | |
1754 | - $key = $langs->trans("AccountingJournalType".$objp->nature); // $objp->nature is 1, 2, 3 ... |
|
1755 | - $transferlabel = (($objp->nature && $key != "AccountingJournalType".$objp->nature) ? $key.($journallabelwithoutspan != $key ? ' '.$journallabel : ''): $journallabel); |
|
1754 | + $key = $langs->trans("AccountingJournalType".$objp->nature); // $objp->nature is 1, 2, 3 ... |
|
1755 | + $transferlabel = (($objp->nature && $key != "AccountingJournalType".$objp->nature) ? $key.($journallabelwithoutspan != $key ? ' '.$journallabel : '') : $journallabel); |
|
1756 | 1756 | |
1757 | - $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $transferlabel, 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1757 | + $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $transferlabel, 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1758 | 1758 | } |
1759 | 1759 | $i++; |
1760 | 1760 | } |
1761 | 1761 | } else { |
1762 | 1762 | // Should not happend. Entries are added |
1763 | - $newmenu->add('', $langs->trans("NoJournalDefined"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1763 | + $newmenu->add('', $langs->trans("NoJournalDefined"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1764 | 1764 | } |
1765 | 1765 | } else { |
1766 | 1766 | dol_print_error($db); |
@@ -1770,48 +1770,48 @@ discard block |
||
1770 | 1770 | |
1771 | 1771 | // Files |
1772 | 1772 | if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) { |
1773 | - $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1773 | + $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1774 | 1774 | } |
1775 | 1775 | |
1776 | 1776 | |
1777 | 1777 | // Accounting |
1778 | - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy', 1, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
|
1778 | + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_accountancy", $langs->trans("MenuAccountancy"), 0, $user->hasRight('accounting', 'mouvements', 'lire') || $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy', 1, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
|
1779 | 1779 | |
1780 | 1780 | // General Ledger |
1781 | - $newmenu->add("/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1781 | + $newmenu->add("/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1782 | 1782 | |
1783 | 1783 | // Journals |
1784 | - $newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Journals"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1784 | + $newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Journals"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1785 | 1785 | |
1786 | 1786 | // Account Balance |
1787 | - $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1787 | + $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1788 | 1788 | |
1789 | 1789 | // Export accountancy |
1790 | - $newmenu->add("/accountancy/bookkeeping/export.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("MenuExportAccountancy"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1790 | + $newmenu->add("/accountancy/bookkeeping/export.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("MenuExportAccountancy"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1791 | 1791 | |
1792 | 1792 | // Closure |
1793 | - $newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'closure'); |
|
1793 | + $newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'closure'); |
|
1794 | 1794 | |
1795 | 1795 | // Reports |
1796 | - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'ca'); |
|
1796 | + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'ca'); |
|
1797 | 1797 | |
1798 | 1798 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1799 | - $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1800 | - $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1801 | - $newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", $langs->trans("ByPersonalizedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1799 | + $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1800 | + $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1801 | + $newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", $langs->trans("ByPersonalizedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1802 | 1802 | } |
1803 | 1803 | |
1804 | 1804 | $modecompta = 'CREANCES-DETTES'; |
1805 | - if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1805 | + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1806 | 1806 | $modecompta = 'BOOKKEEPING'; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED |
1807 | 1807 | } |
1808 | 1808 | if ($modecompta) { |
1809 | 1809 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1810 | - $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1811 | - $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1812 | - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1813 | - $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1814 | - $newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1810 | + $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1811 | + $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1812 | + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1813 | + $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1814 | + $newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1815 | 1815 | } |
1816 | 1816 | } |
1817 | 1817 | |
@@ -1819,34 +1819,34 @@ discard block |
||
1819 | 1819 | //if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') $modecompta=''; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED |
1820 | 1820 | if ($modecompta) { |
1821 | 1821 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1822 | - $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1823 | - $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1824 | - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1822 | + $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1823 | + $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1824 | + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1825 | 1825 | //$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"),3,$user->hasRight('accounting', 'comptarapport', 'lire')); |
1826 | 1826 | //$newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"),3,$user->hasRight('accounting', 'comptarapport', 'lire')); |
1827 | 1827 | } |
1828 | 1828 | } |
1829 | 1829 | |
1830 | 1830 | $modecompta = 'CREANCES-DETTES'; |
1831 | - if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1831 | + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1832 | 1832 | $modecompta = 'BOOKKEEPING'; // Not yet implemented. |
1833 | 1833 | } |
1834 | 1834 | if ($modecompta && isModEnabled('supplier_invoice')) { |
1835 | 1835 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1836 | - $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1837 | - $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1838 | - $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1836 | + $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1837 | + $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1838 | + $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1839 | 1839 | } |
1840 | 1840 | } |
1841 | 1841 | |
1842 | 1842 | $modecompta = 'RECETTES-DEPENSES'; |
1843 | - if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1843 | + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1844 | 1844 | $modecompta = 'BOOKKEEPINGCOLLECTED'; // Not yet implemented. |
1845 | 1845 | } |
1846 | 1846 | if ($modecompta && ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_invoice'))) { |
1847 | 1847 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1848 | - $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1849 | - $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1848 | + $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1849 | + $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1850 | 1850 | } |
1851 | 1851 | } |
1852 | 1852 | } |
@@ -1855,15 +1855,15 @@ discard block |
||
1855 | 1855 | if (isModEnabled('comptabilite')) { |
1856 | 1856 | // Files |
1857 | 1857 | if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) { |
1858 | - $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'files', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
|
1858 | + $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'files', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
|
1859 | 1859 | } |
1860 | 1860 | |
1861 | 1861 | // Bilan, resultats |
1862 | - $newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'ca', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
|
1862 | + $newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", $langs->trans("Reportings"), 0, $user->hasRight('compta', 'resultat', 'lire'), '', $mainmenu, 'ca', 0, '', '', '', img_picto('', 'accountancy', 'class="paddingright pictofixedwidth"')); |
|
1863 | 1863 | |
1864 | 1864 | if ($usemenuhider || empty($leftmenu) || preg_match('/report/', $leftmenu)) { |
1865 | - $newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1866 | - $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1865 | + $newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1866 | + $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1867 | 1867 | /* On verra ca avec module compabilite expert |
1868 | 1868 | $newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,$user->hasRight('compta', 'resultat', 'lire')); |
1869 | 1869 | $newmenu->add("/compta/resultat/bilan.php?leftmenu=report","Bilan",2,$user->hasRight('compta', 'resultat', 'lire')); |
@@ -1878,22 +1878,22 @@ discard block |
||
1878 | 1878 | */ |
1879 | 1879 | |
1880 | 1880 | $modecompta = 'CREANCES-DETTES'; |
1881 | - $newmenu->add("/compta/stats/index.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1882 | - $newmenu->add("/compta/stats/casoc.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1883 | - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1884 | - $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1885 | - $newmenu->add("/compta/stats/byratecountry.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1881 | + $newmenu->add("/compta/stats/index.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1882 | + $newmenu->add("/compta/stats/casoc.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1883 | + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1884 | + $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1885 | + $newmenu->add("/compta/stats/byratecountry.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1886 | 1886 | |
1887 | 1887 | $modecompta = 'RECETTES-DEPENSES'; |
1888 | - $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1889 | - $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1890 | - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1888 | + $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1889 | + $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1890 | + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1891 | 1891 | |
1892 | 1892 | //Achats |
1893 | 1893 | $modecompta = 'CREANCES-DETTES'; |
1894 | - $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1895 | - $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1896 | - $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1894 | + $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1895 | + $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1896 | + $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1897 | 1897 | |
1898 | 1898 | /* |
1899 | 1899 | $modecompta = 'RECETTES-DEPENSES'; |
@@ -1903,31 +1903,31 @@ discard block |
||
1903 | 1903 | */ |
1904 | 1904 | |
1905 | 1905 | // Journals |
1906 | - $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 50); |
|
1907 | - $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 51); |
|
1906 | + $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 50); |
|
1907 | + $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 51); |
|
1908 | 1908 | } |
1909 | 1909 | //if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",$langs->trans("Journals"),1,$user->hasRight('compta', 'resultat', 'lire')||$user->hasRight('accounting', 'comptarapport', 'lire')); |
1910 | 1910 | } |
1911 | 1911 | |
1912 | 1912 | // Intracomm report |
1913 | 1913 | if (isModEnabled('intracommreport')) { |
1914 | - $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReport"), 0, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 60, '', '', '', img_picto('', 'intracommreport', 'class="paddingright pictofixedwidth"')); |
|
1914 | + $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReport"), 0, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 60, '', '', '', img_picto('', 'intracommreport', 'class="paddingright pictofixedwidth"')); |
|
1915 | 1915 | if ($usemenuhider || empty($leftmenu) || preg_match('/intracommreport/', $leftmenu)) { |
1916 | 1916 | // DEB / DES |
1917 | - $newmenu->add("/intracommreport/card.php?action=create&leftmenu=intracommreport", $langs->trans("MenuIntracommReportNew"), 1, $user->hasRight('intracommreport', 'write'), '', $mainmenu, 'intracommreport', 1); |
|
1918 | - $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReportList"), 1, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 1); |
|
1917 | + $newmenu->add("/intracommreport/card.php?action=create&leftmenu=intracommreport", $langs->trans("MenuIntracommReportNew"), 1, $user->hasRight('intracommreport', 'write'), '', $mainmenu, 'intracommreport', 1); |
|
1918 | + $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReportList"), 1, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 1); |
|
1919 | 1919 | } |
1920 | 1920 | } |
1921 | 1921 | |
1922 | 1922 | // Assets |
1923 | 1923 | if (isModEnabled('asset')) { |
1924 | - $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuAssets"), 0, $user->hasRight('asset', 'read'), '', $mainmenu, 'asset', 100, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1925 | - $newmenu->add("/asset/card.php?leftmenu=asset&action=create", $langs->trans("MenuNewAsset"), 1, $user->hasRight('asset', 'write')); |
|
1926 | - $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->hasRight('asset', 'read')); |
|
1927 | - $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuAssetModels"), 1, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read')), '', $mainmenu, 'asset_model'); |
|
1924 | + $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuAssets"), 0, $user->hasRight('asset', 'read'), '', $mainmenu, 'asset', 100, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1925 | + $newmenu->add("/asset/card.php?leftmenu=asset&action=create", $langs->trans("MenuNewAsset"), 1, $user->hasRight('asset', 'write')); |
|
1926 | + $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->hasRight('asset', 'read')); |
|
1927 | + $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuAssetModels"), 1, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read')), '', $mainmenu, 'asset_model'); |
|
1928 | 1928 | if ($usemenuhider || empty($leftmenu) || preg_match('/asset_model/', $leftmenu)) { |
1929 | - $newmenu->add("/asset/model/card.php?leftmenu=asset_model&action=create", $langs->trans("MenuNewAssetModel"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'write')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'write'))); |
|
1930 | - $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuListAssetModels"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read'))); |
|
1929 | + $newmenu->add("/asset/model/card.php?leftmenu=asset_model&action=create", $langs->trans("MenuNewAssetModel"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'write')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'write'))); |
|
1930 | + $newmenu->add("/asset/model/list.php?leftmenu=asset_model", $langs->trans("MenuListAssetModels"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'read')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'read'))); |
|
1931 | 1931 | } |
1932 | 1932 | } |
1933 | 1933 | } |
@@ -1953,62 +1953,62 @@ discard block |
||
1953 | 1953 | |
1954 | 1954 | // Bank-Cash account |
1955 | 1955 | if (isModEnabled('banque')) { |
1956 | - $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank', 0, '', '', '', img_picto('', 'bank_account', 'class="paddingright pictofixedwidth"')); |
|
1956 | + $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("MenuBankCash"), 0, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank', 0, '', '', '', img_picto('', 'bank_account', 'class="paddingright pictofixedwidth"')); |
|
1957 | 1957 | |
1958 | - $newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->hasRight('banque', 'configurer')); |
|
1959 | - $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank'); |
|
1960 | - $newmenu->add("/compta/bank/bankentries_list.php", $langs->trans("ListTransactions"), 1, $user->hasRight('banque', 'lire')); |
|
1961 | - $newmenu->add("/compta/bank/budget.php", $langs->trans("ListTransactionsByCategory"), 1, $user->hasRight('banque', 'lire')); |
|
1958 | + $newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->hasRight('banque', 'configurer')); |
|
1959 | + $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank'); |
|
1960 | + $newmenu->add("/compta/bank/bankentries_list.php", $langs->trans("ListTransactions"), 1, $user->hasRight('banque', 'lire')); |
|
1961 | + $newmenu->add("/compta/bank/budget.php", $langs->trans("ListTransactionsByCategory"), 1, $user->hasRight('banque', 'lire')); |
|
1962 | 1962 | |
1963 | - $newmenu->add("/compta/bank/transfer.php", $langs->trans("MenuBankInternalTransfer"), 1, $user->hasRight('banque', 'transfer')); |
|
1963 | + $newmenu->add("/compta/bank/transfer.php", $langs->trans("MenuBankInternalTransfer"), 1, $user->hasRight('banque', 'transfer')); |
|
1964 | 1964 | } |
1965 | 1965 | |
1966 | 1966 | if (isModEnabled('categorie')) { |
1967 | 1967 | $langs->load("categories"); |
1968 | - $newmenu->add("/categories/index.php?type=5", $langs->trans("Rubriques"), 1, $user->hasRight('categorie', 'creer'), '', $mainmenu, 'tags'); |
|
1969 | - $newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->hasRight('banque', 'configurer'), '', $mainmenu, 'tags'); |
|
1968 | + $newmenu->add("/categories/index.php?type=5", $langs->trans("Rubriques"), 1, $user->hasRight('categorie', 'creer'), '', $mainmenu, 'tags'); |
|
1969 | + $newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->hasRight('banque', 'configurer'), '', $mainmenu, 'tags'); |
|
1970 | 1970 | } |
1971 | 1971 | |
1972 | 1972 | // Direct debit order |
1973 | 1973 | if (isModEnabled('prelevement')) { |
1974 | - $newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank", $langs->trans("PaymentByDirectDebit"), 0, $user->hasRight('prelevement', 'bons', 'lire'), '', $mainmenu, 'withdraw', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1974 | + $newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank", $langs->trans("PaymentByDirectDebit"), 0, $user->hasRight('prelevement', 'bons', 'lire'), '', $mainmenu, 'withdraw', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1975 | 1975 | |
1976 | 1976 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "withdraw") { |
1977 | - $newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->hasRight('prelevement', 'bons', 'creer')); |
|
1977 | + $newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->hasRight('prelevement', 'bons', 'creer')); |
|
1978 | 1978 | |
1979 | - $newmenu->add("/compta/prelevement/orders_list.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1980 | - $newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1981 | - $newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1982 | - $newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1979 | + $newmenu->add("/compta/prelevement/orders_list.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1980 | + $newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1981 | + $newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1982 | + $newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
1983 | 1983 | } |
1984 | 1984 | } |
1985 | 1985 | |
1986 | 1986 | // Bank transfer order |
1987 | 1987 | if (isModEnabled('paymentbybanktransfer')) { |
1988 | - $newmenu->add("/compta/paymentbybanktransfer/index.php?leftmenu=banktransfer&mainmenu=bank", $langs->trans("PaymentByBankTransfer"), 0, $user->hasRight('paymentbybanktransfer', 'read'), '', $mainmenu, 'banktransfer', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1988 | + $newmenu->add("/compta/paymentbybanktransfer/index.php?leftmenu=banktransfer&mainmenu=bank", $langs->trans("PaymentByBankTransfer"), 0, $user->hasRight('paymentbybanktransfer', 'read'), '', $mainmenu, 'banktransfer', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
1989 | 1989 | |
1990 | 1990 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "banktransfer") { |
1991 | - $newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->hasRight('paymentbybanktransfer', 'create')); |
|
1991 | + $newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->hasRight('paymentbybanktransfer', 'create')); |
|
1992 | 1992 | |
1993 | - $newmenu->add("/compta/prelevement/orders_list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
1994 | - $newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
1995 | - $newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
1996 | - $newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
1993 | + $newmenu->add("/compta/prelevement/orders_list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
1994 | + $newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
1995 | + $newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
1996 | + $newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
1997 | 1997 | } |
1998 | 1998 | } |
1999 | 1999 | |
2000 | 2000 | // Management of checks |
2001 | 2001 | if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && isModEnabled('banque') && (isModEnabled('facture') || !empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))) { |
2002 | - $newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->hasRight('banque', 'cheque'), '', $mainmenu, 'checks', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
2002 | + $newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank", $langs->trans("MenuChequeDeposits"), 0, $user->hasRight('banque', 'cheque'), '', $mainmenu, 'checks', 0, '', '', '', img_picto('', 'payment', 'class="paddingright pictofixedwidth"')); |
|
2003 | 2003 | if (preg_match('/checks/', $leftmenu)) { |
2004 | - $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank", $langs->trans("NewChequeDeposit"), 1, $user->hasRight('banque', 'cheque')); |
|
2005 | - $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'cheque')); |
|
2004 | + $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank", $langs->trans("NewChequeDeposit"), 1, $user->hasRight('banque', 'cheque')); |
|
2005 | + $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'cheque')); |
|
2006 | 2006 | } |
2007 | 2007 | } |
2008 | 2008 | |
2009 | 2009 | // Cash Control |
2010 | 2010 | if (isModEnabled('takepos') || isModEnabled('cashdesk')) { |
2011 | - $permtomakecashfence = ($user->hasRight('cashdesk', 'run')|| $user->hasRight('takepos', 'run')); |
|
2011 | + $permtomakecashfence = ($user->hasRight('cashdesk', 'run') || $user->hasRight('takepos', 'run')); |
|
2012 | 2012 | $newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", $langs->trans("POS"), 0, $permtomakecashfence, '', $mainmenu, 'cashcontrol', 0, '', '', '', img_picto('', 'pos', 'class="pictofixedwidth"')); |
2013 | 2013 | $newmenu->add("/compta/cashcontrol/cashcontrol_card.php?action=create", $langs->trans("NewCashFence"), 1, $permtomakecashfence); |
2014 | 2014 | $newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", $langs->trans("List"), 1, $permtomakecashfence); |
@@ -2033,44 +2033,44 @@ discard block |
||
2033 | 2033 | if ($mainmenu == 'products') { |
2034 | 2034 | // Products |
2035 | 2035 | if (isModEnabled('product')) { |
2036 | - $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->hasRight('product', 'read'), '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="pictofixedwidth"')); |
|
2037 | - $newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->hasRight('product', 'creer')); |
|
2038 | - $newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->hasRight('product', 'read')); |
|
2036 | + $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->hasRight('product', 'read'), '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="pictofixedwidth"')); |
|
2037 | + $newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->hasRight('product', 'creer')); |
|
2038 | + $newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->hasRight('product', 'read')); |
|
2039 | 2039 | if (isModEnabled('stock')) { |
2040 | - $newmenu->add("/product/reassort.php?type=0", $langs->trans("MenuStocks"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2040 | + $newmenu->add("/product/reassort.php?type=0", $langs->trans("MenuStocks"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2041 | 2041 | } |
2042 | 2042 | if (isModEnabled('productbatch')) { |
2043 | 2043 | $langs->load("stocks"); |
2044 | - $newmenu->add("/product/reassortlot.php?type=0&search_subjecttolotserial=1", $langs->trans("StocksByLotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2045 | - $newmenu->add("/product/stock/productlot_list.php", $langs->trans("LotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2044 | + $newmenu->add("/product/reassortlot.php?type=0&search_subjecttolotserial=1", $langs->trans("StocksByLotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2045 | + $newmenu->add("/product/stock/productlot_list.php", $langs->trans("LotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2046 | 2046 | } |
2047 | 2047 | if (isModEnabled('variants')) { |
2048 | - $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('product', 'read')); |
|
2048 | + $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('product', 'read')); |
|
2049 | 2049 | } |
2050 | 2050 | if (isModEnabled('propal') || isModEnabled('commande') || isModEnabled('facture') || isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
2051 | - $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->hasRight('product', 'read')); |
|
2051 | + $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->hasRight('product', 'read')); |
|
2052 | 2052 | } |
2053 | 2053 | |
2054 | 2054 | // Categories |
2055 | 2055 | if (isModEnabled('categorie')) { |
2056 | 2056 | $langs->load("categories"); |
2057 | - $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2057 | + $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2058 | 2058 | //if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->hasRight('categorie', 'lire')); |
2059 | 2059 | } |
2060 | 2060 | } |
2061 | 2061 | |
2062 | 2062 | // Services |
2063 | 2063 | if (isModEnabled('service')) { |
2064 | - $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->hasRight('service', 'read'), '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="pictofixedwidth"')); |
|
2065 | - $newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->hasRight('service', 'creer')); |
|
2066 | - $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->hasRight('service', 'read')); |
|
2064 | + $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->hasRight('service', 'read'), '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="pictofixedwidth"')); |
|
2065 | + $newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->hasRight('service', 'creer')); |
|
2066 | + $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->hasRight('service', 'read')); |
|
2067 | 2067 | if (isModEnabled('propal') || isModEnabled('commande') || isModEnabled('facture') || isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
2068 | - $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->hasRight('service', 'read')); |
|
2068 | + $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->hasRight('service', 'read')); |
|
2069 | 2069 | } |
2070 | 2070 | // Categories |
2071 | 2071 | if (isModEnabled('categorie')) { |
2072 | 2072 | $langs->load("categories"); |
2073 | - $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2073 | + $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2074 | 2074 | //if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->hasRight('categorie', 'lire')); |
2075 | 2075 | } |
2076 | 2076 | } |
@@ -2080,41 +2080,41 @@ discard block |
||
2080 | 2080 | $langs->load("stocks"); |
2081 | 2081 | $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"')); |
2082 | 2082 | $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->hasRight('stock', 'creer')); |
2083 | - $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
|
2083 | + $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
|
2084 | 2084 | $newmenu->add("/product/stock/movement_list.php", $langs->trans("Movements"), 1, $user->hasRight('stock', 'mouvement', 'lire')); |
2085 | 2085 | |
2086 | 2086 | $newmenu->add("/product/stock/massstockmove.php?init=1", $langs->trans("MassStockTransferShort"), 1, $user->hasRight('stock', 'mouvement', 'creer')); |
2087 | 2087 | if (isModEnabled('supplier_order')) { |
2088 | - $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->hasRight('stock', 'mouvement', 'creer') && $user->hasRight('fournisseur', 'lire')); |
|
2088 | + $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->hasRight('stock', 'mouvement', 'creer') && $user->hasRight('fournisseur', 'lire')); |
|
2089 | 2089 | } |
2090 | 2090 | $newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
2091 | 2091 | |
2092 | 2092 | // Categories for warehouses |
2093 | 2093 | if (isModEnabled('categorie')) { |
2094 | - $newmenu->add("/categories/index.php?leftmenu=stock&type=9", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2094 | + $newmenu->add("/categories/index.php?leftmenu=stock&type=9", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2095 | 2095 | } |
2096 | 2096 | } |
2097 | 2097 | |
2098 | 2098 | if (isModEnabled('stocktransfer')) { |
2099 | - $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans("ModuleStockTransferName"), 0, $user->hasRight('stocktransfer', 'stocktransfer', 'read'), '', $mainmenu, 'stocktransfer', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"')); |
|
2100 | - $newmenu->add('/product/stock/stocktransfer/stocktransfer_card.php?action=create', $langs->trans('StockTransferNew'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'write')); |
|
2101 | - $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans('List'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'read')); |
|
2099 | + $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans("ModuleStockTransferName"), 0, $user->hasRight('stocktransfer', 'stocktransfer', 'read'), '', $mainmenu, 'stocktransfer', 0, '', '', '', img_picto('', 'stock', 'class="pictofixedwidth"')); |
|
2100 | + $newmenu->add('/product/stock/stocktransfer/stocktransfer_card.php?action=create', $langs->trans('StockTransferNew'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'write')); |
|
2101 | + $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans('List'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'read')); |
|
2102 | 2102 | } |
2103 | 2103 | |
2104 | 2104 | // Inventory |
2105 | 2105 | if (isModEnabled('stock')) { |
2106 | 2106 | $langs->load("stocks"); |
2107 | 2107 | if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { |
2108 | - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"')); |
|
2108 | + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"')); |
|
2109 | 2109 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") { |
2110 | - $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'creer')); |
|
2111 | - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
|
2110 | + $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'creer')); |
|
2111 | + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
|
2112 | 2112 | } |
2113 | 2113 | } else { |
2114 | - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'inventory_advance', 'read'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"')); |
|
2114 | + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'inventory_advance', 'read'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="pictofixedwidth"')); |
|
2115 | 2115 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") { |
2116 | - $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'inventory_advance', 'write')); |
|
2117 | - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'inventory_advance', 'read')); |
|
2116 | + $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'inventory_advance', 'write')); |
|
2117 | + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'inventory_advance', 'read')); |
|
2118 | 2118 | } |
2119 | 2119 | } |
2120 | 2120 | } |
@@ -2122,33 +2122,33 @@ discard block |
||
2122 | 2122 | // Shipments |
2123 | 2123 | if (isModEnabled('expedition')) { |
2124 | 2124 | $langs->load("sendings"); |
2125 | - $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->hasRight('expedition', 'lire'), '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="pictofixedwidth"')); |
|
2126 | - $newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->hasRight('expedition', 'creer')); |
|
2127 | - $newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->hasRight('expedition', 'lire')); |
|
2125 | + $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->hasRight('expedition', 'lire'), '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="pictofixedwidth"')); |
|
2126 | + $newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->hasRight('expedition', 'creer')); |
|
2127 | + $newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->hasRight('expedition', 'lire')); |
|
2128 | 2128 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "sendings") { |
2129 | - $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=0", $langs->trans("StatusSendingDraftShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2130 | - $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2131 | - $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2129 | + $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=0", $langs->trans("StatusSendingDraftShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2130 | + $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2131 | + $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2132 | 2132 | } |
2133 | - $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->hasRight('expedition', 'lire')); |
|
2133 | + $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->hasRight('expedition', 'lire')); |
|
2134 | 2134 | } |
2135 | 2135 | |
2136 | 2136 | // Receptions |
2137 | 2137 | if (isModEnabled('reception')) { |
2138 | 2138 | $langs->load("receptions"); |
2139 | - $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->hasRight('reception', 'lire'), '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="pictofixedwidth"')); |
|
2140 | - $newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->hasRight('reception', 'creer')); |
|
2141 | - $newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->hasRight('reception', 'lire')); |
|
2139 | + $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->hasRight('reception', 'lire'), '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="pictofixedwidth"')); |
|
2140 | + $newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->hasRight('reception', 'creer')); |
|
2141 | + $newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->hasRight('reception', 'lire')); |
|
2142 | 2142 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { |
2143 | - $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->hasRight('reception', 'lire')); |
|
2143 | + $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->hasRight('reception', 'lire')); |
|
2144 | 2144 | } |
2145 | 2145 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { |
2146 | - $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->hasRight('reception', 'lire')); |
|
2146 | + $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->hasRight('reception', 'lire')); |
|
2147 | 2147 | } |
2148 | 2148 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { |
2149 | - $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->hasRight('reception', 'lire')); |
|
2149 | + $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->hasRight('reception', 'lire')); |
|
2150 | 2150 | } |
2151 | - $newmenu->add("/reception/stats/index.php?leftmenu=receptions", $langs->trans("Statistics"), 1, $user->hasRight('reception', 'lire')); |
|
2151 | + $newmenu->add("/reception/stats/index.php?leftmenu=receptions", $langs->trans("Statistics"), 1, $user->hasRight('reception', 'lire')); |
|
2152 | 2152 | } |
2153 | 2153 | } |
2154 | 2154 | } |
@@ -2172,17 +2172,17 @@ discard block |
||
2172 | 2172 | if (isModEnabled('bom') || isModEnabled('mrp')) { |
2173 | 2173 | $langs->load("mrp"); |
2174 | 2174 | |
2175 | - $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom', 0, '', '', '', img_picto('', 'bom', 'class="paddingright pictofixedwidth"')); |
|
2176 | - $newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->hasRight('bom', 'write'), '', $mainmenu, 'bom'); |
|
2177 | - $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom'); |
|
2175 | + $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom', 0, '', '', '', img_picto('', 'bom', 'class="paddingright pictofixedwidth"')); |
|
2176 | + $newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->hasRight('bom', 'write'), '', $mainmenu, 'bom'); |
|
2177 | + $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom'); |
|
2178 | 2178 | } |
2179 | 2179 | |
2180 | 2180 | if (isModEnabled('mrp')) { |
2181 | 2181 | $langs->load("mrp"); |
2182 | 2182 | |
2183 | - $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mrp', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"')); |
|
2184 | - $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->hasRight('mrp', 'write'), '', $mainmenu, ''); |
|
2185 | - $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->hasRight('mrp', 'read'), '', $mainmenu, ''); |
|
2183 | + $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mrp', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"')); |
|
2184 | + $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->hasRight('mrp', 'write'), '', $mainmenu, ''); |
|
2185 | + $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->hasRight('mrp', 'read'), '', $mainmenu, ''); |
|
2186 | 2186 | } |
2187 | 2187 | } |
2188 | 2188 | } |
@@ -2209,7 +2209,7 @@ discard block |
||
2209 | 2209 | |
2210 | 2210 | $tmpentry = array( |
2211 | 2211 | 'enabled'=>isModEnabled('projet'), |
2212 | - 'perms'=>$user->hasRight('projet', 'lire'), |
|
2212 | + 'perms'=>$user->hasRight('projet', 'lire'), |
|
2213 | 2213 | 'module'=>'projet' |
2214 | 2214 | ); |
2215 | 2215 | $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); |
@@ -2227,8 +2227,8 @@ discard block |
||
2227 | 2227 | } |
2228 | 2228 | |
2229 | 2229 | // Project assigned to user |
2230 | - $newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'projects', 0, '', '', '', img_picto('', 'project', 'class="paddingright pictofixedwidth"')); |
|
2231 | - $newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->hasRight('projet', 'creer')); |
|
2230 | + $newmenu->add("/projet/index.php?leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'projects', 0, '', '', '', img_picto('', 'project', 'class="paddingright pictofixedwidth"')); |
|
2231 | + $newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->hasRight('projet', 'creer')); |
|
2232 | 2232 | |
2233 | 2233 | if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { |
2234 | 2234 | $newmenu->add("/projet/list.php?leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : '').'&search_status=99', $langs->trans("List"), 1, $showmode, '', 'project', 'list'); |
@@ -2240,23 +2240,23 @@ discard block |
||
2240 | 2240 | $newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_usage_opportunity=1&search_status=99', $langs->trans("List"), 2, $showmode); |
2241 | 2241 | } |
2242 | 2242 | |
2243 | - $newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
|
2243 | + $newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
|
2244 | 2244 | |
2245 | 2245 | // Categories |
2246 | 2246 | if (isModEnabled('categorie')) { |
2247 | 2247 | $langs->load("categories"); |
2248 | - $newmenu->add("/categories/index.php?leftmenu=cat&type=6", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2248 | + $newmenu->add("/categories/index.php?leftmenu=cat&type=6", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2249 | 2249 | } |
2250 | 2250 | |
2251 | 2251 | if (empty($conf->global->PROJECT_HIDE_TASKS)) { |
2252 | 2252 | // Project affected to user |
2253 | - $newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'tasks', 0, '', '', '', img_picto('', 'projecttask', 'class="paddingright pictofixedwidth"')); |
|
2254 | - $newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->hasRight('projet', 'creer')); |
|
2255 | - $newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire')); |
|
2256 | - $newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
|
2253 | + $newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'tasks', 0, '', '', '', img_picto('', 'projecttask', 'class="paddingright pictofixedwidth"')); |
|
2254 | + $newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->hasRight('projet', 'creer')); |
|
2255 | + $newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire')); |
|
2256 | + $newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
|
2257 | 2257 | |
2258 | - $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); |
|
2259 | - $newmenu->add("/projet/tasks/time.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire')); |
|
2258 | + $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet', 'lire'), '', 'project', 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); |
|
2259 | + $newmenu->add("/projet/tasks/time.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->hasRight('projet', 'lire')); |
|
2260 | 2260 | } |
2261 | 2261 | } |
2262 | 2262 | } |
@@ -2314,47 +2314,47 @@ discard block |
||
2314 | 2314 | // Load translation files required by the page |
2315 | 2315 | $langs->loadLangs(array("holiday", "trips")); |
2316 | 2316 | |
2317 | - $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("CPTitreMenu"), 0, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday', 0, '', '', '', img_picto('', 'holiday', 'class="paddingright pictofixedwidth"')); |
|
2318 | - $newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->hasRight('holiday', 'write'), '', $mainmenu); |
|
2319 | - $newmenu->add("/holiday/card_group.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("NewHolidayForGroup"), 1, ($user->hasRight('holiday', 'writeall') && $user->hasRight('holiday', 'readall')), '', $mainmenu, 'holiday_sm'); |
|
2320 | - $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("List"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu); |
|
2317 | + $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("CPTitreMenu"), 0, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday', 0, '', '', '', img_picto('', 'holiday', 'class="paddingright pictofixedwidth"')); |
|
2318 | + $newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->hasRight('holiday', 'write'), '', $mainmenu); |
|
2319 | + $newmenu->add("/holiday/card_group.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("NewHolidayForGroup"), 1, ($user->hasRight('holiday', 'writeall') && $user->hasRight('holiday', 'readall')), '', $mainmenu, 'holiday_sm'); |
|
2320 | + $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("List"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu); |
|
2321 | 2321 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "holiday") { |
2322 | - $newmenu->add("/holiday/list.php?search_status=1&mainmenu=hrm&leftmenu=holiday", $langs->trans("DraftCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2323 | - $newmenu->add("/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=holiday", $langs->trans("ToReviewCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2324 | - $newmenu->add("/holiday/list.php?search_status=3&mainmenu=hrm&leftmenu=holiday", $langs->trans("ApprovedCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2325 | - $newmenu->add("/holiday/list.php?search_status=4&mainmenu=hrm&leftmenu=holiday", $langs->trans("CancelCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2326 | - $newmenu->add("/holiday/list.php?search_status=5&mainmenu=hrm&leftmenu=holiday", $langs->trans("RefuseCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2322 | + $newmenu->add("/holiday/list.php?search_status=1&mainmenu=hrm&leftmenu=holiday", $langs->trans("DraftCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2323 | + $newmenu->add("/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=holiday", $langs->trans("ToReviewCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2324 | + $newmenu->add("/holiday/list.php?search_status=3&mainmenu=hrm&leftmenu=holiday", $langs->trans("ApprovedCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2325 | + $newmenu->add("/holiday/list.php?search_status=4&mainmenu=hrm&leftmenu=holiday", $langs->trans("CancelCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2326 | + $newmenu->add("/holiday/list.php?search_status=5&mainmenu=hrm&leftmenu=holiday", $langs->trans("RefuseCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2327 | 2327 | } |
2328 | - $newmenu->add("/holiday/define_holiday.php?mainmenu=hrm", $langs->trans("MenuConfCP"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2329 | - $newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->hasRight('holiday', 'readall'), '', $mainmenu, 'holiday_sm'); |
|
2330 | - $newmenu->add("/holiday/view_log.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuLogCP"), 1, $user->hasRight('holiday', 'define_holiday'), '', $mainmenu, 'holiday_sm'); |
|
2328 | + $newmenu->add("/holiday/define_holiday.php?mainmenu=hrm", $langs->trans("MenuConfCP"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2329 | + $newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->hasRight('holiday', 'readall'), '', $mainmenu, 'holiday_sm'); |
|
2330 | + $newmenu->add("/holiday/view_log.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuLogCP"), 1, $user->hasRight('holiday', 'define_holiday'), '', $mainmenu, 'holiday_sm'); |
|
2331 | 2331 | } |
2332 | 2332 | |
2333 | 2333 | // Trips and expenses (old module) |
2334 | 2334 | if (isModEnabled('deplacement')) { |
2335 | 2335 | $langs->load("trips"); |
2336 | - $newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('deplacement', 'lire'), '', $mainmenu, 'tripsandexpenses', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); |
|
2337 | - $newmenu->add("/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('deplacement', 'creer')); |
|
2338 | - $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('deplacement', 'lire')); |
|
2339 | - $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('deplacement', 'lire')); |
|
2336 | + $newmenu->add("/compta/deplacement/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('deplacement', 'lire'), '', $mainmenu, 'tripsandexpenses', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); |
|
2337 | + $newmenu->add("/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('deplacement', 'creer')); |
|
2338 | + $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('deplacement', 'lire')); |
|
2339 | + $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('deplacement', 'lire')); |
|
2340 | 2340 | } |
2341 | 2341 | |
2342 | 2342 | // Expense report |
2343 | 2343 | if (isModEnabled('expensereport')) { |
2344 | 2344 | $langs->loadLangs(array("trips", "bills")); |
2345 | - $newmenu->add("/expensereport/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('expensereport', 'lire'), '', $mainmenu, 'expensereport', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); |
|
2346 | - $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('expensereport', 'creer')); |
|
2347 | - $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('expensereport', 'lire')); |
|
2345 | + $newmenu->add("/expensereport/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("TripsAndExpenses"), 0, $user->hasRight('expensereport', 'lire'), '', $mainmenu, 'expensereport', 0, '', '', '', img_picto('', 'trip', 'class="paddingright pictofixedwidth"')); |
|
2346 | + $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('expensereport', 'creer')); |
|
2347 | + $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('expensereport', 'lire')); |
|
2348 | 2348 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "expensereport") { |
2349 | - $newmenu->add("/expensereport/list.php?search_status=0&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Draft"), 2, $user->hasRight('expensereport', 'lire')); |
|
2350 | - $newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Validated"), 2, $user->hasRight('expensereport', 'lire')); |
|
2351 | - $newmenu->add("/expensereport/list.php?search_status=5&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Approved"), 2, $user->hasRight('expensereport', 'lire')); |
|
2352 | - $newmenu->add("/expensereport/list.php?search_status=6&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Paid"), 2, $user->hasRight('expensereport', 'lire')); |
|
2353 | - $newmenu->add("/expensereport/list.php?search_status=4&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Canceled"), 2, $user->hasRight('expensereport', 'lire')); |
|
2354 | - $newmenu->add("/expensereport/list.php?search_status=99&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Refused"), 2, $user->hasRight('expensereport', 'lire')); |
|
2349 | + $newmenu->add("/expensereport/list.php?search_status=0&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Draft"), 2, $user->hasRight('expensereport', 'lire')); |
|
2350 | + $newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Validated"), 2, $user->hasRight('expensereport', 'lire')); |
|
2351 | + $newmenu->add("/expensereport/list.php?search_status=5&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Approved"), 2, $user->hasRight('expensereport', 'lire')); |
|
2352 | + $newmenu->add("/expensereport/list.php?search_status=6&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Paid"), 2, $user->hasRight('expensereport', 'lire')); |
|
2353 | + $newmenu->add("/expensereport/list.php?search_status=4&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Canceled"), 2, $user->hasRight('expensereport', 'lire')); |
|
2354 | + $newmenu->add("/expensereport/list.php?search_status=99&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Refused"), 2, $user->hasRight('expensereport', 'lire')); |
|
2355 | 2355 | } |
2356 | - $newmenu->add("/expensereport/payment/list.php?leftmenu=expensereport_payments&mainmenu=hrm", $langs->trans("Payments"), 1, $user->hasRight('expensereport', 'lire')); |
|
2357 | - $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('expensereport', 'lire')); |
|
2356 | + $newmenu->add("/expensereport/payment/list.php?leftmenu=expensereport_payments&mainmenu=hrm", $langs->trans("Payments"), 1, $user->hasRight('expensereport', 'lire')); |
|
2357 | + $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('expensereport', 'lire')); |
|
2358 | 2358 | } |
2359 | 2359 | |
2360 | 2360 | if (isModEnabled('projet')) { |
@@ -2363,7 +2363,7 @@ discard block |
||
2363 | 2363 | |
2364 | 2364 | $search_project_user = GETPOST('search_project_user', 'int'); |
2365 | 2365 | |
2366 | - $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); |
|
2366 | + $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->hasRight('projet', 'lire'), '', $mainmenu, 'timespent', 0, '', '', '', img_picto('', 'timespent', 'class="paddingright pictofixedwidth"')); |
|
2367 | 2367 | } |
2368 | 2368 | } |
2369 | 2369 | } |
@@ -2391,22 +2391,22 @@ discard block |
||
2391 | 2391 | } |
2392 | 2392 | |
2393 | 2393 | if (isModEnabled('mailing')) { |
2394 | - $newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->hasRight('mailing', 'lire'), '', $mainmenu, 'mailing', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"')); |
|
2395 | - $newmenu->add("/comm/mailing/card.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->hasRight('mailing', 'creer')); |
|
2396 | - $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->hasRight('mailing', 'lire')); |
|
2394 | + $newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->hasRight('mailing', 'lire'), '', $mainmenu, 'mailing', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"')); |
|
2395 | + $newmenu->add("/comm/mailing/card.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->hasRight('mailing', 'creer')); |
|
2396 | + $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->hasRight('mailing', 'lire')); |
|
2397 | 2397 | } |
2398 | 2398 | |
2399 | 2399 | if (isModEnabled('export')) { |
2400 | 2400 | $langs->load("exports"); |
2401 | - $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->hasRight('export', 'lire'), '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
2402 | - $newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->hasRight('export', 'creer')); |
|
2401 | + $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->hasRight('export', 'lire'), '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
2402 | + $newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->hasRight('export', 'creer')); |
|
2403 | 2403 | //$newmenu->add("/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->hasRight('export', 'lire')); |
2404 | 2404 | } |
2405 | 2405 | |
2406 | 2406 | if (isModEnabled('import')) { |
2407 | 2407 | $langs->load("exports"); |
2408 | - $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->hasRight('import', 'run'), '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
2409 | - $newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->hasRight('import', 'run')); |
|
2408 | + $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->hasRight('import', 'run'), '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
2409 | + $newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->hasRight('import', 'run')); |
|
2410 | 2410 | } |
2411 | 2411 | } |
2412 | 2412 | } |
@@ -2444,7 +2444,7 @@ discard block |
||
2444 | 2444 | |
2445 | 2445 | $newmenu->add("/adherents/cartes/carte.php?leftmenu=export", $langs->trans("MembersCards"), 1, $user->hasRight('adherent', 'export')); |
2446 | 2446 | if (!empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && ($usemenuhider || empty($leftmenu) || $leftmenu == 'none' || $leftmenu == "members" || $leftmenu == "export")) { |
2447 | - $newmenu->add("/adherents/htpasswd.php?leftmenu=export", $langs->trans("Filehtpasswd"), 1, $user->hasRight('adherent', 'export')); |
|
2447 | + $newmenu->add("/adherents/htpasswd.php?leftmenu=export", $langs->trans("Filehtpasswd"), 1, $user->hasRight('adherent', 'export')); |
|
2448 | 2448 | } |
2449 | 2449 | |
2450 | 2450 | if (isModEnabled('categorie')) { |
@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | |
30 | 30 | // Load Dolibarr environment |
31 | 31 | require '../main.inc.php'; |
32 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; |
|
33 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
34 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
35 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; |
|
36 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; |
|
32 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
|
33 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
34 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
35 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/skill.class.php'; |
|
36 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_skill.lib.php'; |
|
37 | 37 | |
38 | 38 | |
39 | 39 | // Load translation files required by the page |
40 | -$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
40 | +$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
41 | 41 | |
42 | 42 | // Get parameters |
43 | 43 | $id = GETPOST('id', 'int'); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'skillcard'; // To manage different context of search |
49 | 49 | $backtopage = GETPOST('backtopage', 'alpha'); |
50 | 50 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
51 | -$lineid = GETPOST('lineid', 'int'); |
|
51 | +$lineid = GETPOST('lineid', 'int'); |
|
52 | 52 | |
53 | 53 | // Initialize technical objects |
54 | 54 | $object = new Skill($db); |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | $search_all = GETPOST("search_all", 'alpha'); |
67 | 67 | $search = array(); |
68 | 68 | foreach ($object->fields as $key => $val) { |
69 | - if (GETPOST('search_' . $key, 'alpha')) { |
|
70 | - $search[$key] = GETPOST('search_' . $key, 'alpha'); |
|
69 | + if (GETPOST('search_'.$key, 'alpha')) { |
|
70 | + $search[$key] = GETPOST('search_'.$key, 'alpha'); |
|
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
@@ -76,13 +76,13 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | // Load object |
79 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. |
|
79 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. |
|
80 | 80 | |
81 | 81 | // Permissions |
82 | 82 | $permissiontoread = $user->rights->hrm->all->read; |
83 | 83 | $permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
84 | 84 | $permissiontodelete = $user->rights->hrm->all->delete; |
85 | -$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/skill'; |
|
85 | +$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1].'/skill'; |
|
86 | 86 | |
87 | 87 | // Security check (enable the most restrictive one) |
88 | 88 | //if ($user->socid > 0) accessforbidden(); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { |
120 | 120 | $backtopage = $backurlforlist; |
121 | 121 | } else { |
122 | - $backtopage = DOL_URL_ROOT.'/hrm/skill_card.php?id=' . ($id > 0 ? $id : '__ID__'); |
|
122 | + $backtopage = DOL_URL_ROOT.'/hrm/skill_card.php?id='.($id > 0 ? $id : '__ID__'); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 | } |
@@ -152,16 +152,16 @@ discard block |
||
152 | 152 | |
153 | 153 | |
154 | 154 | // Actions when linking object each other |
155 | - include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; |
|
155 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; |
|
156 | 156 | |
157 | 157 | // Actions when printing a doc from card |
158 | - include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php'; |
|
158 | + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; |
|
159 | 159 | |
160 | 160 | // Action to move up and down lines of object |
161 | 161 | //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; |
162 | 162 | |
163 | 163 | // Action to build doc |
164 | - include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php'; |
|
164 | + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
|
165 | 165 | |
166 | 166 | if ($action == 'set_thirdparty' && $permissiontoadd) { |
167 | 167 | $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, $triggermodname); |
@@ -173,8 +173,8 @@ discard block |
||
173 | 173 | // Actions to send emails |
174 | 174 | $triggersendname = 'HRM_SKILL_SENTBYMAIL'; |
175 | 175 | $autocopy = 'MAIN_MAIL_AUTOCOPY_SKILL_TO'; |
176 | - $trackid = 'skill' . $object->id; |
|
177 | - include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; |
|
176 | + $trackid = 'skill'.$object->id; |
|
177 | + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | |
@@ -193,25 +193,25 @@ discard block |
||
193 | 193 | |
194 | 194 | // Part to create |
195 | 195 | if ($action == 'create') { |
196 | - print load_fiche_titre($langs->trans("NewSkill"), '', 'object_' . $object->picto); |
|
196 | + print load_fiche_titre($langs->trans("NewSkill"), '', 'object_'.$object->picto); |
|
197 | 197 | |
198 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
199 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
198 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
199 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
200 | 200 | print '<input type="hidden" name="action" value="add">'; |
201 | - $backtopage .= (strpos($backtopage, '?') > 0 ? '&' : '?' ) ."objecttype=job"; |
|
201 | + $backtopage .= (strpos($backtopage, '?') > 0 ? '&' : '?')."objecttype=job"; |
|
202 | 202 | if ($backtopage) { |
203 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
203 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
204 | 204 | } |
205 | 205 | if ($backtopageforcancel) { |
206 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
206 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
207 | 207 | } |
208 | 208 | |
209 | 209 | print dol_get_fiche_head(array(), ''); |
210 | 210 | |
211 | - print '<table class="border centpercent tableforfieldcreate">' . "\n"; |
|
211 | + print '<table class="border centpercent tableforfieldcreate">'."\n"; |
|
212 | 212 | |
213 | 213 | // Common attributes |
214 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php'; |
|
214 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; |
|
215 | 215 | |
216 | 216 | // Other attributes |
217 | 217 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
@@ -221,15 +221,15 @@ discard block |
||
221 | 221 | //@todo je stop ici ... à continuer (affichage des 5 skilled input pour create action |
222 | 222 | //print $object->showInputField($val, $key, $value, '', '['']', '', 0); |
223 | 223 | |
224 | - print '</table>' . "\n"; |
|
224 | + print '</table>'."\n"; |
|
225 | 225 | |
226 | 226 | print dol_get_fiche_end(); |
227 | 227 | |
228 | 228 | print '<div class="center">'; |
229 | - print '<input type="submit" class="button" name="add" value="' . dol_escape_htmltag($langs->trans("Create")) . '">'; |
|
229 | + print '<input type="submit" class="button" name="add" value="'.dol_escape_htmltag($langs->trans("Create")).'">'; |
|
230 | 230 | print ' '; |
231 | 231 | |
232 | - print '<input type="' . ($backtopage ? "submit" : "button") . '" class="button button-cancel" name="cancel" value="' . dol_escape_htmltag($langs->trans("Cancel")) . '"' . ($backtopage ? '' : ' onclick="history.go(-1)"') . '>'; // Cancel for create does not post form if we don't know the backtopage |
|
232 | + print '<input type="'.($backtopage ? "submit" : "button").'" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'"'.($backtopage ? '' : ' onclick="history.go(-1)"').'>'; // Cancel for create does not post form if we don't know the backtopage |
|
233 | 233 | print '</div>'; |
234 | 234 | |
235 | 235 | print '</form>'; |
@@ -240,25 +240,25 @@ discard block |
||
240 | 240 | // Part to edit record |
241 | 241 | // and skilldet edition |
242 | 242 | if (($id || $ref) && $action == 'edit') { |
243 | - print load_fiche_titre($langs->trans("Skill"), '', 'object_' . $object->picto); |
|
243 | + print load_fiche_titre($langs->trans("Skill"), '', 'object_'.$object->picto); |
|
244 | 244 | |
245 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
246 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
245 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
246 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
247 | 247 | print '<input type="hidden" name="action" value="update">'; |
248 | - print '<input type="hidden" name="id" value="' . $object->id . '">'; |
|
248 | + print '<input type="hidden" name="id" value="'.$object->id.'">'; |
|
249 | 249 | if ($backtopage) { |
250 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
250 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
251 | 251 | } |
252 | 252 | if ($backtopageforcancel) { |
253 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
253 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | print dol_get_fiche_head(); |
257 | 257 | |
258 | - print '<table class="border centpercent tableforfieldedit">' . "\n"; |
|
258 | + print '<table class="border centpercent tableforfieldedit">'."\n"; |
|
259 | 259 | |
260 | 260 | // Common attributes |
261 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php'; |
|
261 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; |
|
262 | 262 | |
263 | 263 | // Other attributes |
264 | 264 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | continue; |
282 | 282 | } |
283 | 283 | |
284 | - print '<table class="border centpercent =">' . "\n"; |
|
284 | + print '<table class="border centpercent =">'."\n"; |
|
285 | 285 | $sk->fields = dol_sort_array($sk->fields, 'position'); |
286 | 286 | foreach ($sk->fields as $key => $val) { |
287 | 287 | if (abs($val['visible']) != 1 && abs($val['visible']) != 3 && abs($val['visible']) != 4) { |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | continue; // We don't want this field |
293 | 293 | } |
294 | 294 | |
295 | - print '<tr class="field_' . $key . '"><td'; |
|
295 | + print '<tr class="field_'.$key.'"><td'; |
|
296 | 296 | print ' class="titlefieldcreate'; |
297 | 297 | if (isset($val['notnull']) && $val['notnull'] > 0) { |
298 | 298 | print ' fieldrequired'; |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | if (empty($skilldetArray)) { |
328 | 328 | $value = GETPOSTISSET($key) ? GETPOST($key, $check) : $sk->$key; |
329 | 329 | } else { |
330 | - $value=$skilldetArray[$sk->id]; |
|
330 | + $value = $skilldetArray[$sk->id]; |
|
331 | 331 | } |
332 | 332 | // |
333 | 333 | // } elseif ($val['type'] == 'price') { |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | print $sk->showOutputField($val, $key, $value, '', '', '', 0); |
341 | 341 | } else { |
342 | 342 | /** @var Skilldet $sk */ |
343 | - print $sk->showInputField($val, $key, $value, "", "line[" . $sk->id . "]", "", ""); |
|
343 | + print $sk->showInputField($val, $key, $value, "", "line[".$sk->id."]", "", ""); |
|
344 | 344 | } |
345 | 345 | print '</td>'; |
346 | 346 | print '</tr>'; |
@@ -352,8 +352,8 @@ discard block |
||
352 | 352 | |
353 | 353 | print dol_get_fiche_end(); |
354 | 354 | |
355 | - print '<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans("Save") . '">'; |
|
356 | - print ' <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
355 | + print '<div class="center"><input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">'; |
|
356 | + print ' <input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
357 | 357 | print '</div>'; |
358 | 358 | |
359 | 359 | print '</form>'; |
@@ -371,17 +371,17 @@ discard block |
||
371 | 371 | |
372 | 372 | // Confirmation to delete |
373 | 373 | if ($action == 'delete') { |
374 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteSkill'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); |
|
374 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteSkill'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); |
|
375 | 375 | } |
376 | 376 | // Confirmation to delete line |
377 | 377 | if ($action == 'deleteline') { |
378 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); |
|
378 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); |
|
379 | 379 | } |
380 | 380 | // Clone confirmation |
381 | 381 | if ($action == 'clone') { |
382 | 382 | // Create an array for form |
383 | 383 | $formquestion = array(); |
384 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); |
|
384 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); |
|
385 | 385 | } |
386 | 386 | |
387 | 387 | // Confirmation of action xxxx |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | // array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo)) |
398 | 398 | ); |
399 | 399 | */ |
400 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); |
|
400 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220); |
|
401 | 401 | } |
402 | 402 | |
403 | 403 | // Call Hook formConfirm |
@@ -415,11 +415,11 @@ discard block |
||
415 | 415 | |
416 | 416 | // Object card |
417 | 417 | // ------------------------------------------------------------ |
418 | - $linkback = '<a href="' . DOL_URL_ROOT.'/hrm/skill_list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
418 | + $linkback = '<a href="'.DOL_URL_ROOT.'/hrm/skill_list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
419 | 419 | |
420 | 420 | |
421 | 421 | $morehtmlref = '<div class="refid">'; |
422 | - $morehtmlref.= $object->label; |
|
422 | + $morehtmlref .= $object->label; |
|
423 | 423 | $morehtmlref .= '</div>'; |
424 | 424 | dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref); |
425 | 425 | |
@@ -427,10 +427,10 @@ discard block |
||
427 | 427 | print '<div class="fichecenter">'; |
428 | 428 | print '<div class="fichehalfleft">'; |
429 | 429 | print '<div class="underbanner clearboth"></div>'; |
430 | - print '<table class="border centpercent tableforfield">' . "\n"; |
|
430 | + print '<table class="border centpercent tableforfield">'."\n"; |
|
431 | 431 | |
432 | - $object->fields['label']['visible']=0; // Already in banner |
|
433 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; |
|
432 | + $object->fields['label']['visible'] = 0; // Already in banner |
|
433 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; |
|
434 | 434 | |
435 | 435 | // Other attributes. Fields from hook formObjectOptions and Extrafields. |
436 | 436 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
@@ -450,7 +450,7 @@ discard block |
||
450 | 450 | // Buttons for actions |
451 | 451 | |
452 | 452 | if ($action != 'presend' && $action != 'editline') { |
453 | - print '<div class="tabsAction">' . "\n"; |
|
453 | + print '<div class="tabsAction">'."\n"; |
|
454 | 454 | $parameters = array(); |
455 | 455 | $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
456 | 456 | if ($reshook < 0) { |
@@ -460,15 +460,15 @@ discard block |
||
460 | 460 | if (empty($reshook)) { |
461 | 461 | // Back to draft |
462 | 462 | if ($object->status == $object::STATUS_VALIDATED) { |
463 | - print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=confirm_setdraft&confirm=yes&token=' . newToken(), '', $permissiontoadd); |
|
463 | + print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd); |
|
464 | 464 | } |
465 | 465 | |
466 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd); |
|
466 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd); |
|
467 | 467 | |
468 | 468 | // Delete (need delete permission, or if draft, just need create/modify permission) |
469 | - print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete); |
|
469 | + print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete); |
|
470 | 470 | } |
471 | - print '</div>' . "\n"; |
|
471 | + print '</div>'."\n"; |
|
472 | 472 | } |
473 | 473 | } |
474 | 474 | |
@@ -476,12 +476,12 @@ discard block |
||
476 | 476 | //*--------------------------------------------------------------------------- |
477 | 477 | |
478 | 478 | if ($action != "create" && $action != "edit") { |
479 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; |
|
480 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
481 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; |
|
479 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
|
480 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
481 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
|
482 | 482 | |
483 | 483 | // load hrm libraries |
484 | - require_once __DIR__ . '/class/skilldet.class.php'; |
|
484 | + require_once __DIR__.'/class/skilldet.class.php'; |
|
485 | 485 | |
486 | 486 | // for other modules |
487 | 487 | //dol_include_once('/othermodule/class/otherobject.class.php'); |
@@ -518,8 +518,8 @@ discard block |
||
518 | 518 | |
519 | 519 | // Default sort order (if not yet defined by previous GETPOST) |
520 | 520 | if (!$sortfield) { |
521 | - reset($objectline->fields); // Reset is required to avoid key() to return null. |
|
522 | - $sortfield = "t." . key($objectline->fields); // Set here default search field. By default 1st field in definition. |
|
521 | + reset($objectline->fields); // Reset is required to avoid key() to return null. |
|
522 | + $sortfield = "t.".key($objectline->fields); // Set here default search field. By default 1st field in definition. |
|
523 | 523 | } |
524 | 524 | if (!$sortorder) { |
525 | 525 | $sortorder = "ASC"; |
@@ -529,12 +529,12 @@ discard block |
||
529 | 529 | $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); |
530 | 530 | $search = array(); |
531 | 531 | foreach ($objectline->fields as $key => $val) { |
532 | - if (GETPOST('search_' . $key, 'alpha') !== '') { |
|
533 | - $search[$key] = GETPOST('search_' . $key, 'alpha'); |
|
532 | + if (GETPOST('search_'.$key, 'alpha') !== '') { |
|
533 | + $search[$key] = GETPOST('search_'.$key, 'alpha'); |
|
534 | 534 | } |
535 | 535 | if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
536 | - $search[$key . '_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_' . $key . '_dtstartmonth', 'int'), GETPOST('search_' . $key . '_dtstartday', 'int'), GETPOST('search_' . $key . '_dtstartyear', 'int')); |
|
537 | - $search[$key . '_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_' . $key . '_dtendmonth', 'int'), GETPOST('search_' . $key . '_dtendday', 'int'), GETPOST('search_' . $key . '_dtendyear', 'int')); |
|
536 | + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); |
|
537 | + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); |
|
538 | 538 | } |
539 | 539 | } |
540 | 540 | |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | $fieldstosearchall = array(); |
543 | 543 | foreach ($objectline->fields as $key => $val) { |
544 | 544 | if (!empty($val['searchall'])) { |
545 | - $fieldstosearchall['t.' . $key] = $val['label']; |
|
545 | + $fieldstosearchall['t.'.$key] = $val['label']; |
|
546 | 546 | } |
547 | 547 | } |
548 | 548 | |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | // If $val['visible']==0, then we never show the field |
553 | 553 | if (!empty($val['visible'])) { |
554 | 554 | $visible = (int) dol_eval($val['visible'], 1, 1, '1'); |
555 | - $arrayfields['t.' . $key] = array( |
|
555 | + $arrayfields['t.'.$key] = array( |
|
556 | 556 | 'label' => $val['label'], |
557 | 557 | 'checked' => (($visible < 0) ? 0 : 1), |
558 | 558 | 'enabled' => ($visible != 3 && dol_eval($val['enabled'], 1, 1, '1')), |
@@ -584,9 +584,9 @@ discard block |
||
584 | 584 | // -------------------------------------------------------------------- |
585 | 585 | $sql = 'SELECT '; |
586 | 586 | $sql .= $objectline->getFieldList('t'); |
587 | - $sql .= " FROM " . MAIN_DB_PREFIX . $objectline->table_element . " as t"; |
|
587 | + $sql .= " FROM ".MAIN_DB_PREFIX.$objectline->table_element." as t"; |
|
588 | 588 | if ($objectline->ismultientitymanaged == 1) { |
589 | - $sql .= " WHERE t.entity IN (" . getEntity($objectline->element) . ")"; |
|
589 | + $sql .= " WHERE t.entity IN (".getEntity($objectline->element).")"; |
|
590 | 590 | } else { |
591 | 591 | $sql .= " WHERE 1 = 1 "; |
592 | 592 | } |
@@ -596,41 +596,41 @@ discard block |
||
596 | 596 | $nbtotalofrecords = $db->num_rows($resql); |
597 | 597 | $num = $db->num_rows($resql); |
598 | 598 | |
599 | - print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '">' . "\n"; |
|
599 | + print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n"; |
|
600 | 600 | if ($optioncss != '') { |
601 | - print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; |
|
601 | + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
|
602 | 602 | } |
603 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
603 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
604 | 604 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
605 | 605 | print '<input type="hidden" name="action" value="list">'; |
606 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
607 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
608 | - print '<input type="hidden" name="page" value="' . $page . '">'; |
|
609 | - print '<input type="hidden" name="contextpage" value="' . $contextpage . '">'; |
|
606 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
607 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
608 | + print '<input type="hidden" name="page" value="'.$page.'">'; |
|
609 | + print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; |
|
610 | 610 | if (!empty($id)) { |
611 | - print '<input type="hidden" name="id" value="' . $id . '">'; |
|
611 | + print '<input type="hidden" name="id" value="'.$id.'">'; |
|
612 | 612 | } |
613 | 613 | |
614 | - $param_fk = "&fk_skill=" . $id . "&fk_user_creat=" . (!empty($user->rowid) ? $user->rowid :0); |
|
615 | - $backtopage = dol_buildpath('/hrm/skill_card.php', 1) . '?id=' . $id; |
|
614 | + $param_fk = "&fk_skill=".$id."&fk_user_creat=".(!empty($user->rowid) ? $user->rowid : 0); |
|
615 | + $backtopage = dol_buildpath('/hrm/skill_card.php', 1).'?id='.$id; |
|
616 | 616 | $param = ""; |
617 | 617 | $massactionbutton = ""; |
618 | 618 | //$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/hrm/skilldet_card.php', 1) . '?action=create&backtopage=' . urlencode($_SERVER['PHP_SELF']) . $param_fk . '&backtopage=' . $backtopage, '', $permissiontoadd); |
619 | 619 | |
620 | - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_' . $object->picto, 0, "", '', '', 0, 0, 1); |
|
620 | + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, "", '', '', 0, 0, 1); |
|
621 | 621 | |
622 | 622 | // Add code for pre mass action (confirmation or email presend form) |
623 | 623 | $topicmail = "SendSkilldetRef"; |
624 | 624 | $modelmail = "skilldet"; |
625 | 625 | $objecttmp = new Skilldet($db); |
626 | - $trackid = 'xxxx' . $object->id; |
|
626 | + $trackid = 'xxxx'.$object->id; |
|
627 | 627 | //include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; |
628 | 628 | |
629 | 629 | if ($search_all) { |
630 | 630 | foreach ($fieldstosearchall as $key => $val) { |
631 | 631 | $fieldstosearchall[$key] = $langs->trans($val); |
632 | 632 | } |
633 | - print '<div class="divsearchfieldfilter">' . $langs->trans("FilterOnInto", $search_all) . join(', ', $fieldstosearchall) . '</div>'; |
|
633 | + print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; |
|
634 | 634 | } |
635 | 635 | |
636 | 636 | $moreforfilter = ''; |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | // $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
658 | 658 | |
659 | 659 | print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table |
660 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
660 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
661 | 661 | |
662 | 662 | |
663 | 663 | // Fields title label |
@@ -674,13 +674,13 @@ discard block |
||
674 | 674 | // } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
675 | 675 | // $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
676 | 676 | // } |
677 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
678 | - print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, (!empty($cssforfield) ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, (!empty($cssforfield) ? $cssforfield . ' ' : '')) . "\n"; |
|
677 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
678 | + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, (!empty($cssforfield) ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, (!empty($cssforfield) ? $cssforfield.' ' : ''))."\n"; |
|
679 | 679 | } |
680 | 680 | } |
681 | 681 | print '<td></td>'; |
682 | 682 | print '<td></td>'; |
683 | - print '</tr>' . "\n"; |
|
683 | + print '</tr>'."\n"; |
|
684 | 684 | |
685 | 685 | |
686 | 686 | // Display all ranks of skill |
@@ -723,14 +723,14 @@ discard block |
||
723 | 723 | // } |
724 | 724 | //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; |
725 | 725 | |
726 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
727 | - print '<td' . ($cssforfield ? ' class="' . $cssforfield . '"' : '') . '>'; |
|
726 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
727 | + print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; |
|
728 | 728 | if ($key == 'status') { |
729 | 729 | print $objectline->getLibStatut(5); |
730 | 730 | } elseif ($key == 'rowid') { |
731 | 731 | print $objectline->showOutputField($val, $key, $objectline->id, ''); |
732 | 732 | // ajout pencil |
733 | - print '<a class="timeline-btn" href="' . DOL_MAIN_URL_ROOT . '/comm/action/skilldet_card.php?action=edit&id=' . $objectline->id . '"><i class="fa fa-pencil" title="' . $langs->trans("Modify") . '" ></i></a>'; |
|
733 | + print '<a class="timeline-btn" href="'.DOL_MAIN_URL_ROOT.'/comm/action/skilldet_card.php?action=edit&id='.$objectline->id.'"><i class="fa fa-pencil" title="'.$langs->trans("Modify").'" ></i></a>'; |
|
734 | 734 | } else { |
735 | 735 | print $objectline->showOutputField($val, $key, $objectline->$key, ''); |
736 | 736 | } |
@@ -742,15 +742,15 @@ discard block |
||
742 | 742 | } |
743 | 743 | if (!empty($val['isameasure']) && $val['isameasure'] == 1) { |
744 | 744 | if (!$i) { |
745 | - $totalarray['pos'][$totalarray['nbfield']] = 't.' . $key; |
|
745 | + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; |
|
746 | 746 | } |
747 | 747 | if (!isset($totalarray['val'])) { |
748 | 748 | $totalarray['val'] = array(); |
749 | 749 | } |
750 | - if (!isset($totalarray['val']['t.' . $key])) { |
|
751 | - $totalarray['val']['t.' . $key] = 0; |
|
750 | + if (!isset($totalarray['val']['t.'.$key])) { |
|
751 | + $totalarray['val']['t.'.$key] = 0; |
|
752 | 752 | } |
753 | - $totalarray['val']['t.' . $key] += $objectline->$key; |
|
753 | + $totalarray['val']['t.'.$key] += $objectline->$key; |
|
754 | 754 | } |
755 | 755 | } |
756 | 756 | } |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | $totalarray['nbfield']++; |
784 | 784 | } |
785 | 785 | |
786 | - print '</tr>' . "\n"; |
|
786 | + print '</tr>'."\n"; |
|
787 | 787 | |
788 | 788 | $i++; |
789 | 789 | } |
@@ -798,7 +798,7 @@ discard block |
||
798 | 798 | $colspan++; |
799 | 799 | } |
800 | 800 | } |
801 | - print '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs->trans("NoRecordFound") . '</span></td></tr>'; |
|
801 | + print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>'; |
|
802 | 802 | } |
803 | 803 | |
804 | 804 | if (!empty($resql)) $db->free($resql); |
@@ -807,10 +807,10 @@ discard block |
||
807 | 807 | $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $objectline); // Note that $action and $objectline may have been modified by hook |
808 | 808 | print $hookmanager->resPrint; |
809 | 809 | |
810 | - print '</table>' . "\n"; |
|
811 | - print '</div>' . "\n"; |
|
810 | + print '</table>'."\n"; |
|
811 | + print '</div>'."\n"; |
|
812 | 812 | |
813 | - print '</form>' . "\n"; |
|
813 | + print '</form>'."\n"; |
|
814 | 814 | |
815 | 815 | // if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { |
816 | 816 | // $hidegeneratedfilelistifempty = 1; |
@@ -845,9 +845,9 @@ discard block |
||
845 | 845 | $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/hrm/skill_agenda.php?id='.$object->id); |
846 | 846 | |
847 | 847 | // List of actions on element |
848 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
848 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; |
|
849 | 849 | $formactions = new FormActions($db); |
850 | - $somethingshown = $formactions->showactions($object, $object->element . '@' . $object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter); |
|
850 | + $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter); |
|
851 | 851 | |
852 | 852 | print '</div></div>'; |
853 | 853 | } |
@@ -801,7 +801,9 @@ |
||
801 | 801 | print '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs->trans("NoRecordFound") . '</span></td></tr>'; |
802 | 802 | } |
803 | 803 | |
804 | - if (!empty($resql)) $db->free($resql); |
|
804 | + if (!empty($resql)) { |
|
805 | + $db->free($resql); |
|
806 | + } |
|
805 | 807 | |
806 | 808 | $parameters = array('arrayfields' => $arrayfields, 'sql' => $sql); |
807 | 809 | $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $objectline); // Note that $action and $objectline may have been modified by hook |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | |
448 | 448 | // Add fields from hooks - ListFrom |
449 | 449 | $parameters = array(); |
450 | -$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
450 | +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
451 | 451 | $sql .= $hookmanager->resPrint; |
452 | 452 | $sql .= ' WHERE p.entity IN ('.getEntity('contact').')'; |
453 | 453 | if (empty($user->rights->societe->client->voir) && !$socid) { //restriction |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | if ($searchCategoryContactOperator == 0) { |
491 | 491 | $searchCategoryContactSqlList[] = " EXISTS (SELECT ck.fk_socpeople FROM ".MAIN_DB_PREFIX."categorie_contact as ck WHERE p.rowid = ck.fk_socpeople AND ck.fk_categorie = ".((int) $searchCategoryContact).")"; |
492 | 492 | } else { |
493 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryContact); |
|
493 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryContact); |
|
494 | 494 | } |
495 | 495 | } |
496 | 496 | } |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | if ($searchCategoryCustomerOperator == 0) { |
523 | 523 | $searchCategoryCustomerSqlList[] = " EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_societe as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = ".((int) $searchCategoryCustomer).")"; |
524 | 524 | } else { |
525 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryCustomer); |
|
525 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryCustomer); |
|
526 | 526 | } |
527 | 527 | } |
528 | 528 | } |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | if ($searchCategorySupplierOperator == 0) { |
555 | 555 | $searchCategorySupplierSqlList[] = " EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = ".((int) $searchCategorySupplier).")"; |
556 | 556 | } else { |
557 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategorySupplier); |
|
557 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategorySupplier); |
|
558 | 558 | } |
559 | 559 | } |
560 | 560 | } |
@@ -844,7 +844,7 @@ discard block |
||
844 | 844 | if (count($search_roles) > 0) { |
845 | 845 | $param .= implode('&search_roles[]=', $search_roles); |
846 | 846 | } |
847 | -if ($search_birthday_start) { |
|
847 | +if ($search_birthday_start) { |
|
848 | 848 | $param .= '&search_birthday_start='.urlencode(dol_print_date($search_birthday_start, '%d')).'&search_birthday_startmonth='.urlencode(dol_print_date($search_birthday_start, '%m')).'&search_birthday_startyear='.urlencode(dol_print_date($search_birthday_start, '%Y')); |
849 | 849 | } |
850 | 850 | if ($search_birthday_end) { |
@@ -865,7 +865,7 @@ discard block |
||
865 | 865 | if (isModEnabled('category') && $user->hasRight('societe', 'creer')) { |
866 | 866 | $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); |
867 | 867 | } |
868 | -if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) { |
|
868 | +if (in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) { |
|
869 | 869 | $arrayofmassactions = array(); |
870 | 870 | } |
871 | 871 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |
@@ -72,7 +72,7 @@ |
||
72 | 72 | public $sql; |
73 | 73 | |
74 | 74 | |
75 | - public $evenunsubscribe = 0; // Set this to 1 if you want to flag you also want to include email in target that has opt-out. |
|
75 | + public $evenunsubscribe = 0; // Set this to 1 if you want to flag you also want to include email in target that has opt-out. |
|
76 | 76 | |
77 | 77 | |
78 | 78 | /** |
@@ -66,7 +66,7 @@ |
||
66 | 66 | if (preg_match("/^export_(.*)\.modules\.php$/i", $file, $reg)) { |
67 | 67 | $moduleid = $reg[1]; |
68 | 68 | if ($moduleid == 'csv') { |
69 | - continue; // This may happen if on old file export_csv.modules.php was not correctly deleted |
|
69 | + continue; // This may happen if on old file export_csv.modules.php was not correctly deleted |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | // Loading Class |
@@ -144,20 +144,20 @@ discard block |
||
144 | 144 | $search_date_start_startmonth = GETPOST('search_date_start_startmonth', 'int'); |
145 | 145 | $search_date_start_startyear = GETPOST('search_date_start_startyear', 'int'); |
146 | 146 | $search_date_start_startday = GETPOST('search_date_start_startday', 'int'); |
147 | -$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
147 | +$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
148 | 148 | $search_date_start_endmonth = GETPOST('search_date_start_endmonth', 'int'); |
149 | 149 | $search_date_start_endyear = GETPOST('search_date_start_endyear', 'int'); |
150 | 150 | $search_date_start_endday = GETPOST('search_date_start_endday', 'int'); |
151 | -$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
151 | +$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
152 | 152 | |
153 | 153 | $search_date_end_startmonth = GETPOST('search_date_end_startmonth', 'int'); |
154 | 154 | $search_date_end_startyear = GETPOST('search_date_end_startyear', 'int'); |
155 | 155 | $search_date_end_startday = GETPOST('search_date_end_startday', 'int'); |
156 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
156 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
157 | 157 | $search_date_end_endmonth = GETPOST('search_date_end_endmonth', 'int'); |
158 | 158 | $search_date_end_endyear = GETPOST('search_date_end_endyear', 'int'); |
159 | 159 | $search_date_end_endday = GETPOST('search_date_end_endday', 'int'); |
160 | -$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
160 | +$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
161 | 161 | |
162 | 162 | if (isModEnabled('categorie')) { |
163 | 163 | $search_category_array = GETPOST("search_category_".Categorie::TYPE_PROJECT."_list", "array"); |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | $sqlfields = $sql; // $sql fields to remove for count total |
454 | 454 | |
455 | 455 | $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as p"; |
456 | -if (!empty($extrafields->attributes[$object->table_element]['label']) &&is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
|
456 | +if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
|
457 | 457 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)"; |
458 | 458 | } |
459 | 459 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | if ($searchCategoryProjectOperator == 0) { |
624 | 624 | $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie = ".((int) $searchCategoryProject).")"; |
625 | 625 | } else { |
626 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); |
|
626 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProject); |
|
627 | 627 | } |
628 | 628 | } |
629 | 629 | } |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | $param .= '&search_date_end_endday='.urlencode($search_date_end_endday); |
820 | 820 | } |
821 | 821 | if ($search_date_end_end) { |
822 | - $param .= '&search_date_end_end=' . urlencode($search_date_end_end); |
|
822 | + $param .= '&search_date_end_end='.urlencode($search_date_end_end); |
|
823 | 823 | } |
824 | 824 | if ($socid) { |
825 | 825 | $param .= '&socid='.urlencode($socid); |
@@ -1023,7 +1023,7 @@ discard block |
||
1023 | 1023 | $categoriesArr[-2] = '- '.$langs->trans('NotCategorized').' -'; |
1024 | 1024 | $moreforfilter .= Form::multiselectarray('search_category_customer_list', $categoriesArr, $searchCategoryCustomerList, 0, 0, 'minwidth300im minwidth300 widthcentpercentminusx', 0, 0, '', 'category', $tmptitle); |
1025 | 1025 | $moreforfilter .= ' <input type="checkbox" class="valignmiddle" id="search_category_customer_operator" name="search_category_customer_operator" value="1"'.($searchCategoryCustomerOperator == 1 ? ' checked="checked"' : '').'/>'; |
1026 | - $moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories') . ' : ' . $tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click |
|
1026 | + $moreforfilter .= $form->textwithpicto('', $langs->trans('UseOrOperatorForCategories').' : '.$tmptitle, 1, 'help', '', 0, 2, 'tooltip_cat_cus'); // Tooltip on click |
|
1027 | 1027 | $moreforfilter .= '</div>'; |
1028 | 1028 | } |
1029 | 1029 | |
@@ -1536,7 +1536,7 @@ discard block |
||
1536 | 1536 | // Project url |
1537 | 1537 | if (!empty($arrayfields['p.ref']['checked'])) { |
1538 | 1538 | print '<td class="nowraponall tdoverflowmax200" title="'.dol_escape_htmltag($object->ref).'">'; |
1539 | - print $object->getNomUrl(1, (!empty(GETPOST('search_usage_event_organization', 'int'))?'eventorganization':'')); |
|
1539 | + print $object->getNomUrl(1, (!empty(GETPOST('search_usage_event_organization', 'int')) ? 'eventorganization' : '')); |
|
1540 | 1540 | if ($object->hasDelay()) { |
1541 | 1541 | print img_warning($langs->trans('Late')); |
1542 | 1542 | } |
@@ -763,7 +763,7 @@ |
||
763 | 763 | if (empty($totalforeachday[$tmpday])) { |
764 | 764 | $totalforeachday[$tmpday] = empty($projectstatic->weekWorkLoad[$tmpday]) ? 0 : $projectstatic->weekWorkLoad[$tmpday]; |
765 | 765 | } else { |
766 | - $totalforeachday[$tmpday] += empty($projectstatic->weekWorkLoad[$tmpday]) ? 0 : $projectstatic->weekWorkLoad[$tmpday]; |
|
766 | + $totalforeachday[$tmpday] += empty($projectstatic->weekWorkLoad[$tmpday]) ? 0 : $projectstatic->weekWorkLoad[$tmpday]; |
|
767 | 767 | } |
768 | 768 | } |
769 | 769 | } |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | // Validation |
276 | 276 | $idwarehouse = GETPOST('idwarehouse', 'int'); |
277 | 277 | $result = $object->valid($user); |
278 | - if ( $result > 0 && ! empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) ) { |
|
278 | + if ($result > 0 && !empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) { |
|
279 | 279 | $result = $object->closeProposal($user, $object::STATUS_SIGNED); |
280 | 280 | } |
281 | 281 | if ($result >= 0) { |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | $object->deposit_percent = GETPOST('cond_reglement_id_deposit_percent', 'alpha'); |
428 | 428 | $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); |
429 | 429 | $object->fk_account = GETPOST('fk_account', 'int'); |
430 | - $object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU', 2); // deprecated |
|
430 | + $object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU', 2); // deprecated |
|
431 | 431 | $object->remise_percent = price2num(GETPOST('remise_percent'), '', 2); |
432 | 432 | $object->socid = GETPOST('socid', 'int'); |
433 | 433 | $object->contact_id = GETPOST('contactid', 'int'); |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | } elseif (GETPOST('statut', 'int') == $object::STATUS_SIGNED || GETPOST('statut', 'int') == $object::STATUS_NOTSIGNED) { |
705 | 705 | $locationTarget = ''; |
706 | 706 | // prevent browser refresh from closing proposal several times |
707 | - if ($object->statut == $object::STATUS_VALIDATED || ( ! empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) && $object->statut == $object::STATUS_DRAFT)) { |
|
707 | + if ($object->statut == $object::STATUS_VALIDATED || (!empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE) && $object->statut == $object::STATUS_DRAFT)) { |
|
708 | 708 | $db->begin(); |
709 | 709 | |
710 | 710 | $result = $object->closeProposal($user, GETPOST('statut', 'int'), GETPOST('note_private', 'restricthtml')); |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | $error++; |
714 | 714 | } else { |
715 | 715 | // Needed if object linked modified by trigger (because linked objects can't be fetched two times : linkedObjectsFullLoaded) |
716 | - $locationTarget = DOL_URL_ROOT . '/comm/propal/card.php?id=' . $object->id; |
|
716 | + $locationTarget = DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id; |
|
717 | 717 | } |
718 | 718 | |
719 | 719 | $deposit = null; |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | !$error && GETPOST('statut', 'int') == $object::STATUS_SIGNED && GETPOST('generate_deposit', 'alpha') == 'on' |
725 | 725 | && !empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && !empty($user->rights->facture->creer) |
726 | 726 | ) { |
727 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
727 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
728 | 728 | |
729 | 729 | $date = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int')); |
730 | 730 | $forceFields = array(); |
@@ -737,7 +737,7 @@ discard block |
||
737 | 737 | |
738 | 738 | if ($deposit) { |
739 | 739 | setEventMessage('DepositGenerated'); |
740 | - $locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id; |
|
740 | + $locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id; |
|
741 | 741 | } else { |
742 | 742 | $error++; |
743 | 743 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | } |
766 | 766 | |
767 | 767 | if ($locationTarget) { |
768 | - header('Location: ' . $locationTarget); |
|
768 | + header('Location: '.$locationTarget); |
|
769 | 769 | exit; |
770 | 770 | } |
771 | 771 | } else { |
@@ -925,11 +925,11 @@ discard block |
||
925 | 925 | // Define margin |
926 | 926 | $margin_rate = (GETPOST('marginforalllines') ? GETPOST('marginforalllines') : 0); |
927 | 927 | foreach ($object->lines as &$line) { |
928 | - $subprice = price2num($line->pa_ht * (1 + $margin_rate/100), 'MU'); |
|
928 | + $subprice = price2num($line->pa_ht * (1 + $margin_rate / 100), 'MU'); |
|
929 | 929 | $prod = new Product($db); |
930 | 930 | $prod->fetch($line->fk_product); |
931 | 931 | if ($prod->price_min > $subprice) { |
932 | - $price_subprice = price($subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
|
932 | + $price_subprice = price($subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
|
933 | 933 | $price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto'); |
934 | 934 | setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings'); |
935 | 935 | } |
@@ -1043,7 +1043,7 @@ discard block |
||
1043 | 1043 | $pu_ttc_devise = 0; |
1044 | 1044 | $price_min = 0; |
1045 | 1045 | $price_min_ttc = 0; |
1046 | - $tva_npr=0; |
|
1046 | + $tva_npr = 0; |
|
1047 | 1047 | $price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT'); |
1048 | 1048 | |
1049 | 1049 | $db->begin(); |
@@ -1102,8 +1102,8 @@ discard block |
||
1102 | 1102 | if (count($prodcustprice->lines) > 0) { |
1103 | 1103 | $pu_ht = price($prodcustprice->lines[0]->price); |
1104 | 1104 | $pu_ttc = price($prodcustprice->lines[0]->price_ttc); |
1105 | - $price_min = price($prodcustprice->lines[0]->price_min); |
|
1106 | - $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
1105 | + $price_min = price($prodcustprice->lines[0]->price_min); |
|
1106 | + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
1107 | 1107 | $price_base_type = $prodcustprice->lines[0]->price_base_type; |
1108 | 1108 | /*$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx); |
1109 | 1109 | if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { |
@@ -1201,8 +1201,8 @@ discard block |
||
1201 | 1201 | } |
1202 | 1202 | |
1203 | 1203 | //If text set in desc is the same as product description (as now it's preloaded) whe add it only one time |
1204 | - if ($product_desc==$desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
|
1205 | - $product_desc=''; |
|
1204 | + if ($product_desc == $desc && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
|
1205 | + $product_desc = ''; |
|
1206 | 1206 | } |
1207 | 1207 | |
1208 | 1208 | if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { |
@@ -1663,7 +1663,7 @@ discard block |
||
1663 | 1663 | } |
1664 | 1664 | |
1665 | 1665 | // Actions to build doc |
1666 | - $upload_dir = !empty($conf->propal->multidir_output[$object->entity])?$conf->propal->multidir_output[$object->entity]:$conf->propal->dir_output; |
|
1666 | + $upload_dir = !empty($conf->propal->multidir_output[$object->entity]) ? $conf->propal->multidir_output[$object->entity] : $conf->propal->dir_output; |
|
1667 | 1667 | $permissiontoadd = $usercancreate; |
1668 | 1668 | include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
1669 | 1669 | } |
@@ -1754,7 +1754,7 @@ discard block |
||
1754 | 1754 | |
1755 | 1755 | $cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0)); |
1756 | 1756 | $mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0)); |
1757 | - $remise_absolue = (!empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0)); // deprecated |
|
1757 | + $remise_absolue = (!empty($objectsrc->remise_absolue) ? $objectsrc->remise_absolue : (!empty($soc->remise_absolue) ? $soc->remise_absolue : 0)); // deprecated |
|
1758 | 1758 | $remise_percent = (!empty($objectsrc->remise_percent) ? $objectsrc->remise_percent : (!empty($soc->remise_percent) ? $soc->remise_percent : 0)); |
1759 | 1759 | $warehouse_id = (!empty($objectsrc->warehouse_id) ? $objectsrc->warehouse_id : (!empty($soc->warehouse_id) ? $soc->warehouse_id : 0)); |
1760 | 1760 | |
@@ -1817,7 +1817,7 @@ discard block |
||
1817 | 1817 | print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; |
1818 | 1818 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
1819 | 1819 | print '<input type="hidden" name="action" value="add">'; |
1820 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
1820 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
1821 | 1821 | print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
1822 | 1822 | if ($origin != 'project' && $originid) { |
1823 | 1823 | print '<input type="hidden" name="origin" value="'.$origin.'">'; |
@@ -1835,7 +1835,7 @@ discard block |
||
1835 | 1835 | |
1836 | 1836 | // Ref customer |
1837 | 1837 | print '<tr class="field_ref_client"><td class="titlefieldcreate">'.$langs->trans('RefCustomer').'</td><td class="valuefieldcreate">'; |
1838 | - print '<input type="text" name="ref_client" value="'.(!empty($ref_client)?$ref_client:GETPOST('ref_client')).'"></td>'; |
|
1838 | + print '<input type="text" name="ref_client" value="'.(!empty($ref_client) ? $ref_client : GETPOST('ref_client')).'"></td>'; |
|
1839 | 1839 | print '</tr>'; |
1840 | 1840 | |
1841 | 1841 | // Third party |
@@ -2042,7 +2042,7 @@ discard block |
||
2042 | 2042 | // TODO for compatibility |
2043 | 2043 | if ($origin == 'contrat') { |
2044 | 2044 | // Calcul contrat->price (HT), contrat->total (TTC), contrat->tva |
2045 | - $objectsrc->remise_absolue = $remise_absolue; // deprecated |
|
2045 | + $objectsrc->remise_absolue = $remise_absolue; // deprecated |
|
2046 | 2046 | $objectsrc->remise_percent = $remise_percent; |
2047 | 2047 | $objectsrc->update_price(1, 'auto', 1); |
2048 | 2048 | } |
@@ -2197,7 +2197,7 @@ discard block |
||
2197 | 2197 | if (empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) { |
2198 | 2198 | $formquestion[] = array('type' => 'select', 'name' => 'statut', 'label' => '<span class="fieldrequired">'.$langs->trans("CloseAs").'</span>', 'values' => array($object::STATUS_SIGNED => $object->LibStatut($object::STATUS_SIGNED), $object::STATUS_NOTSIGNED => $object->LibStatut($object::STATUS_NOTSIGNED))); |
2199 | 2199 | } |
2200 | - $formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace) |
|
2200 | + $formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace) |
|
2201 | 2201 | |
2202 | 2202 | if (getDolGlobalInt('PROPOSAL_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) { |
2203 | 2203 | // This is a hidden option: |
@@ -2207,7 +2207,7 @@ discard block |
||
2207 | 2207 | $deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id); |
2208 | 2208 | |
2209 | 2209 | if (!empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && !empty($user->rights->facture->creer)) { |
2210 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
2210 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
2211 | 2211 | |
2212 | 2212 | $object->fetchObjectLinked(); |
2213 | 2213 | |
@@ -2289,7 +2289,7 @@ discard block |
||
2289 | 2289 | 'type' => 'onecolumn', |
2290 | 2290 | 'value' => ' |
2291 | 2291 | <script> |
2292 | - let signedValue = ' . $object::STATUS_SIGNED . '; |
|
2292 | + let signedValue = ' . $object::STATUS_SIGNED.'; |
|
2293 | 2293 | |
2294 | 2294 | $(document).ready(function() { |
2295 | 2295 | $("[name=generate_deposit]").change(function () { |
@@ -2339,7 +2339,7 @@ discard block |
||
2339 | 2339 | if (empty($conf->global->PROPAL_SKIP_ACCEPT_REFUSE)) { |
2340 | 2340 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
2341 | 2341 | } else { |
2342 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
|
2342 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?statut=3&id='.$object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
|
2343 | 2343 | } |
2344 | 2344 | } elseif ($action == 'delete') { |
2345 | 2345 | // Confirm delete |
@@ -2378,8 +2378,8 @@ discard block |
||
2378 | 2378 | $nbMandated = 0; |
2379 | 2379 | foreach ($object->lines as $line) { |
2380 | 2380 | $res = $line->fetch_product(); |
2381 | - if ($res > 0 ) { |
|
2382 | - if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end) )) { |
|
2381 | + if ($res > 0) { |
|
2382 | + if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
|
2383 | 2383 | $nbMandated++; |
2384 | 2384 | break; |
2385 | 2385 | } |
@@ -2798,46 +2798,46 @@ discard block |
||
2798 | 2798 | print '<table class="border tableforfield centpercent">'; |
2799 | 2799 | |
2800 | 2800 | print '<tr>'; |
2801 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
2802 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
2801 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
2802 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
2803 | 2803 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
2804 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
2804 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
2805 | 2805 | } |
2806 | 2806 | print '</tr>'; |
2807 | 2807 | |
2808 | 2808 | print '<tr>'; |
2809 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
2810 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
2809 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
2810 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
2811 | 2811 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
2812 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
2812 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
2813 | 2813 | } |
2814 | 2814 | print '</tr>'; |
2815 | 2815 | |
2816 | 2816 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
2817 | 2817 | print '<tr>'; |
2818 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
2819 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
2818 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
2819 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
2820 | 2820 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
2821 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
2821 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
2822 | 2822 | } |
2823 | 2823 | print '</tr>'; |
2824 | 2824 | |
2825 | 2825 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
2826 | 2826 | print '<tr>'; |
2827 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
2828 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
2827 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
2828 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
2829 | 2829 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
2830 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
2830 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
2831 | 2831 | } |
2832 | 2832 | print '</tr>'; |
2833 | 2833 | } |
2834 | 2834 | } |
2835 | 2835 | |
2836 | 2836 | print '<tr>'; |
2837 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
2838 | - print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
2837 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
2838 | + print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
2839 | 2839 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
2840 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
2840 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
2841 | 2841 | } |
2842 | 2842 | print '</tr>'; |
2843 | 2843 | |
@@ -2955,7 +2955,7 @@ discard block |
||
2955 | 2955 | } |
2956 | 2956 | |
2957 | 2957 | // ReOpen |
2958 | - if ( (( !empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) { |
|
2958 | + if (((!empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && $object->statut == Propal::STATUS_NOTSIGNED) || (empty($conf->global->PROPAL_REOPEN_UNSIGNED_ONLY) && ($object->statut == Propal::STATUS_SIGNED || $object->statut == Propal::STATUS_NOTSIGNED || $object->statut == Propal::STATUS_BILLED))) && $usercanclose) { |
|
2959 | 2959 | print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#reopen').'"'; |
2960 | 2960 | print '>'.$langs->trans('ReOpen').'</a>'; |
2961 | 2961 | } |
@@ -3030,8 +3030,8 @@ discard block |
||
3030 | 3030 | } else { |
3031 | 3031 | // Set not signed (close) |
3032 | 3032 | if ($object->statut == Propal::STATUS_DRAFT && $usercanclose) { |
3033 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&token='.newToken().'&action=closeas&token='.newToken() . (empty($conf->global->MAIN_JUMP_TAG) ? '' : '#close') . '"'; |
|
3034 | - print '>' . $langs->trans('SetRefusedAndClose') . '</a>'; |
|
3033 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=closeas&token='.newToken().(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#close').'"'; |
|
3034 | + print '>'.$langs->trans('SetRefusedAndClose').'</a>'; |
|
3035 | 3035 | } |
3036 | 3036 | } |
3037 | 3037 |