@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | $idprod = GETPOST('idprod', 'int'); |
596 | 596 | } |
597 | 597 | |
598 | - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
598 | + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)' |
|
599 | 599 | |
600 | 600 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
601 | 601 | $price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2); |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | |
705 | 705 | //If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time |
706 | 706 | if (trim($product_desc) == trim($desc) && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) { |
707 | - $product_desc=''; |
|
707 | + $product_desc = ''; |
|
708 | 708 | } |
709 | 709 | |
710 | 710 | if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) { |
@@ -1824,40 +1824,40 @@ discard block |
||
1824 | 1824 | |
1825 | 1825 | print '<tr>'; |
1826 | 1826 | // Amount HT |
1827 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
1828 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
1827 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
1828 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
1829 | 1829 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
1830 | 1830 | // Multicurrency Amount HT |
1831 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
1831 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
1832 | 1832 | } |
1833 | 1833 | print '</tr>'; |
1834 | 1834 | |
1835 | 1835 | print '<tr>'; |
1836 | 1836 | // Amount VAT |
1837 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
1838 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
1837 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
1838 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
1839 | 1839 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
1840 | 1840 | // Multicurrency Amount VAT |
1841 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
1841 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
1842 | 1842 | } |
1843 | 1843 | print '</tr>'; |
1844 | 1844 | |
1845 | 1845 | // Amount Local Taxes |
1846 | 1846 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
1847 | 1847 | print '<tr>'; |
1848 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
1849 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
1848 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
1849 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
1850 | 1850 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
1851 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
1851 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
1852 | 1852 | } |
1853 | 1853 | print '</tr>'; |
1854 | 1854 | |
1855 | 1855 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
1856 | 1856 | print '<tr>'; |
1857 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
1858 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
1857 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
1858 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
1859 | 1859 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
1860 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
1860 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
1861 | 1861 | } |
1862 | 1862 | print '</tr>'; |
1863 | 1863 | } |
@@ -1865,11 +1865,11 @@ discard block |
||
1865 | 1865 | |
1866 | 1866 | print '<tr>'; |
1867 | 1867 | // Amount TTC |
1868 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
1869 | - print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
1868 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
1869 | + print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
1870 | 1870 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
1871 | 1871 | // Multicurrency Amount TTC |
1872 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
1872 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
1873 | 1873 | } |
1874 | 1874 | print '</tr>'; |
1875 | 1875 |
@@ -1938,9 +1938,12 @@ |
||
1938 | 1938 | |
1939 | 1939 | $parameters = array(); |
1940 | 1940 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
1941 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
1942 | - if (empty($reshook)) |
|
1943 | - $object->formAddObjectLine($dateSelector, $soc, $mysoc); |
|
1941 | + if ($reshook < 0) { |
|
1942 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
1943 | + } |
|
1944 | + if (empty($reshook)) { |
|
1945 | + $object->formAddObjectLine($dateSelector, $soc, $mysoc); |
|
1946 | + } |
|
1944 | 1947 | } |
1945 | 1948 | } |
1946 | 1949 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * \brief Module to show box of members |
26 | 26 | */ |
27 | 27 | |
28 | -include_once DOL_DOCUMENT_ROOT . '/core/boxes/modules_boxes.php'; |
|
28 | +include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; |
|
29 | 29 | |
30 | 30 | |
31 | 31 | /** |
@@ -84,15 +84,15 @@ discard block |
||
84 | 84 | |
85 | 85 | $this->max = $max; |
86 | 86 | |
87 | - include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php'; |
|
88 | - require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent_type.class.php'; |
|
87 | + include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; |
|
88 | + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; |
|
89 | 89 | $staticmember = new Adherent($this->db); |
90 | 90 | |
91 | 91 | $now = dol_now(); |
92 | 92 | $year = date('Y'); |
93 | 93 | $numberyears = getDolGlobalInt("MAIN_NB_OF_YEAR_IN_MEMBERSHIP_WIDGET_GRAPH"); |
94 | 94 | |
95 | - $this->info_box_head = array('text' => $langs->trans("BoxTitleMembersByType").($numberyears ? ' ('.($year-$numberyears).' - '.$year.')' : '')); |
|
95 | + $this->info_box_head = array('text' => $langs->trans("BoxTitleMembersByType").($numberyears ? ' ('.($year - $numberyears).' - '.$year.')' : '')); |
|
96 | 96 | |
97 | 97 | if ($user->hasRight('adherent', 'lire')) { |
98 | 98 | require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherentstats.class.php'; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $adhtype = new AdherentType($this->db); |
153 | 153 | $adhtype->id = $key; |
154 | 154 | |
155 | - if ($key=='total') { |
|
155 | + if ($key == 'total') { |
|
156 | 156 | break; |
157 | 157 | } |
158 | 158 | $adhtype->label = $data['label']; |
@@ -165,32 +165,32 @@ discard block |
||
165 | 165 | ); |
166 | 166 | $this->info_box_contents[$line][] = array( |
167 | 167 | 'td' => 'class="right"', |
168 | - 'text' => (isset($data['members_draft']) && $data['members_draft'] > 0 ? $data['members_draft'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_DRAFT, 1, 0, 3), |
|
168 | + 'text' => (isset($data['members_draft']) && $data['members_draft'] > 0 ? $data['members_draft'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_DRAFT, 1, 0, 3), |
|
169 | 169 | 'asis' => 1, |
170 | 170 | ); |
171 | 171 | $this->info_box_contents[$line][] = array( |
172 | 172 | 'td' => 'class="right"', |
173 | - 'text' => (isset($data['members_pending']) && $data['members_pending'] > 0 ? $data['members_pending'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, 0, 3), |
|
173 | + 'text' => (isset($data['members_pending']) && $data['members_pending'] > 0 ? $data['members_pending'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, 0, 3), |
|
174 | 174 | 'asis' => 1, |
175 | 175 | ); |
176 | 176 | $this->info_box_contents[$line][] = array( |
177 | 177 | 'td' => 'class="right"', |
178 | - 'text' => (isset($data['members_uptodate']) && $data['members_uptodate'] > 0 ? $data['members_uptodate'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_VALIDATED, 0, 0, 3), |
|
178 | + 'text' => (isset($data['members_uptodate']) && $data['members_uptodate'] > 0 ? $data['members_uptodate'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 0, 0, 3), |
|
179 | 179 | 'asis' => 1, |
180 | 180 | ); |
181 | 181 | $this->info_box_contents[$line][] = array( |
182 | 182 | 'td' => 'class="right"', |
183 | - 'text' => (isset($data['members_expired']) && $data['members_expired'] > 0 ? $data['members_expired'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, 1, 3), |
|
183 | + 'text' => (isset($data['members_expired']) && $data['members_expired'] > 0 ? $data['members_expired'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_VALIDATED, 1, 1, 3), |
|
184 | 184 | 'asis' => 1, |
185 | 185 | ); |
186 | 186 | $this->info_box_contents[$line][] = array( |
187 | 187 | 'td' => 'class="right"', |
188 | - 'text' => (isset($data['members_excluded']) && $data['members_excluded'] > 0 ? $data['members_excluded'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_EXCLUDED, 1, $now, 3), |
|
188 | + 'text' => (isset($data['members_excluded']) && $data['members_excluded'] > 0 ? $data['members_excluded'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_EXCLUDED, 1, $now, 3), |
|
189 | 189 | 'asis' => 1, |
190 | 190 | ); |
191 | 191 | $this->info_box_contents[$line][] = array( |
192 | 192 | 'td' => 'class="right"', |
193 | - 'text' => (isset($data['members_resiliated']) && $data['members_resiliated'] > 0 ? $data['members_resiliated'] : '') . ' ' . $staticmember->LibStatut(Adherent::STATUS_RESILIATED, 1, 0, 3), |
|
193 | + 'text' => (isset($data['members_resiliated']) && $data['members_resiliated'] > 0 ? $data['members_resiliated'] : '').' '.$staticmember->LibStatut(Adherent::STATUS_RESILIATED, 1, 0, 3), |
|
194 | 194 | 'asis' => 1, |
195 | 195 | ); |
196 | 196 | $this->info_box_contents[$line][] = array( |
@@ -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 = ''; |
@@ -1196,17 +1196,17 @@ discard block |
||
1196 | 1196 | $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"')); |
1197 | 1197 | if ($user->hasRight('user', 'user', 'read')) { |
1198 | 1198 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "users") { |
1199 | - $newmenu->add("", $langs->trans("Users"), 1, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1199 | + $newmenu->add("", $langs->trans("Users"), 1, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1200 | 1200 | $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'); |
1201 | - $newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1202 | - $newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1201 | + $newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1202 | + $newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin); |
|
1203 | 1203 | if (isModEnabled('categorie')) { |
1204 | 1204 | $langs->load("categories"); |
1205 | - $newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1205 | + $newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1206 | 1206 | } |
1207 | - $newmenu->add("", $langs->trans("Groups"), 1, ($user->hasRight('user', 'user', 'lire') || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
|
1207 | + $newmenu->add("", $langs->trans("Groups"), 1, ($user->hasRight('user', 'user', 'lire') || $user->admin) && !(isModEnabled('multicompany') && $conf->entity > 1 && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE))); |
|
1208 | 1208 | $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))); |
1209 | - $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))); |
|
1209 | + $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))); |
|
1210 | 1210 | } |
1211 | 1211 | } |
1212 | 1212 | } |
@@ -1230,9 +1230,9 @@ discard block |
||
1230 | 1230 | // Societes |
1231 | 1231 | if (isModEnabled('societe')) { |
1232 | 1232 | $langs->load("companies"); |
1233 | - $newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->hasRight('societe', 'lire'), '', $mainmenu, 'thirdparties', 0, '', '', '', img_picto('', 'company', 'class="paddingright pictofixedwidth"')); |
|
1233 | + $newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->hasRight('societe', 'lire'), '', $mainmenu, 'thirdparties', 0, '', '', '', img_picto('', 'company', 'class="paddingright pictofixedwidth"')); |
|
1234 | 1234 | |
1235 | - if ($user->hasRight('societe', 'creer')) { |
|
1235 | + if ($user->hasRight('societe', 'creer')) { |
|
1236 | 1236 | $newmenu->add("/societe/card.php?action=create", $langs->trans("MenuNewThirdParty"), 1); |
1237 | 1237 | if (!$conf->use_javascript_ajax) { |
1238 | 1238 | $newmenu->add("/societe/card.php?action=create&private=1", $langs->trans("MenuNewPrivateIndividual"), 1); |
@@ -1245,7 +1245,7 @@ discard block |
||
1245 | 1245 | // Prospects |
1246 | 1246 | if (isModEnabled('societe') && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { |
1247 | 1247 | $langs->load("commercial"); |
1248 | - $newmenu->add("/societe/list.php?type=p&leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'prospects'); |
|
1248 | + $newmenu->add("/societe/list.php?type=p&leftmenu=prospects", $langs->trans("ListProspectsShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'prospects'); |
|
1249 | 1249 | /* no more required, there is a filter that can do more |
1250 | 1250 | 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')); |
1251 | 1251 | 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')); |
@@ -1253,22 +1253,22 @@ discard block |
||
1253 | 1253 | 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')); |
1254 | 1254 | 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')); |
1255 | 1255 | */ |
1256 | - $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 3, $user->hasRight('societe', 'creer')); |
|
1256 | + $newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 3, $user->hasRight('societe', 'creer')); |
|
1257 | 1257 | } |
1258 | 1258 | |
1259 | 1259 | // Customers/Prospects |
1260 | 1260 | if (isModEnabled('societe') && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { |
1261 | 1261 | $langs->load("commercial"); |
1262 | - $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'customers'); |
|
1262 | + $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 2, $user->hasRight('societe', 'lire'), '', $mainmenu, 'customers'); |
|
1263 | 1263 | |
1264 | - $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 3, $user->hasRight('societe', 'creer')); |
|
1264 | + $newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 3, $user->hasRight('societe', 'creer')); |
|
1265 | 1265 | } |
1266 | 1266 | |
1267 | 1267 | // Suppliers |
1268 | 1268 | if (isModEnabled('societe') && (isModEnabled('supplier_order') || isModEnabled('supplier_invoice') || isModEnabled('supplier_proposal'))) { |
1269 | 1269 | $langs->load("suppliers"); |
1270 | - $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'); |
|
1271 | - $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'))); |
|
1270 | + $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'); |
|
1271 | + $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'))); |
|
1272 | 1272 | } |
1273 | 1273 | |
1274 | 1274 | // Categories |
@@ -1283,36 +1283,36 @@ discard block |
||
1283 | 1283 | if (!empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { |
1284 | 1284 | $menutoshow = $langs->trans("ProspectsCategoriesShort"); |
1285 | 1285 | } |
1286 | - $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1286 | + $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1287 | 1287 | } |
1288 | 1288 | // Categories suppliers |
1289 | 1289 | if (isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
1290 | - $newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->hasRight('categorie', 'lire')); |
|
1290 | + $newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->hasRight('categorie', 'lire')); |
|
1291 | 1291 | } |
1292 | 1292 | } |
1293 | 1293 | |
1294 | 1294 | // Contacts |
1295 | - $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"')); |
|
1295 | + $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"')); |
|
1296 | 1296 | |
1297 | - $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')); |
|
1298 | - $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->hasRight('societe', 'contact', 'lire')); |
|
1297 | + $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')); |
|
1298 | + $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->hasRight('societe', 'contact', 'lire')); |
|
1299 | 1299 | if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { |
1300 | - $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1300 | + $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1301 | 1301 | } |
1302 | 1302 | if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { |
1303 | - $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1303 | + $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1304 | 1304 | } |
1305 | 1305 | if (isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
1306 | - $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->hasRight('fournisseur', 'lire')); |
|
1306 | + $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->hasRight('fournisseur', 'lire')); |
|
1307 | 1307 | } |
1308 | - $newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1308 | + $newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->hasRight('societe', 'contact', 'lire')); |
|
1309 | 1309 | //$newmenu->add("/contact/list.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->hasRight('societe', 'contact', 'lire')); |
1310 | 1310 | |
1311 | 1311 | // Categories |
1312 | 1312 | if (isModEnabled('categorie')) { |
1313 | 1313 | $langs->load("categories"); |
1314 | 1314 | // Categories Contact |
1315 | - $newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1315 | + $newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", $langs->trans("ContactCategoriesShort"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
1316 | 1316 | } |
1317 | 1317 | } |
1318 | 1318 | } |
@@ -1337,108 +1337,108 @@ discard block |
||
1337 | 1337 | // Customer proposal |
1338 | 1338 | if (isModEnabled('propal')) { |
1339 | 1339 | $langs->load("propal"); |
1340 | - $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"')); |
|
1341 | - $newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", $langs->trans("NewPropal"), 1, $user->hasRight('propal', 'write')); |
|
1342 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->hasRight('propal', 'read')); |
|
1340 | + $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"')); |
|
1341 | + $newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", $langs->trans("NewPropal"), 1, $user->hasRight('propal', 'write')); |
|
1342 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals", $langs->trans("List"), 1, $user->hasRight('propal', 'read')); |
|
1343 | 1343 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "propals") { |
1344 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=0", $langs->trans("PropalsDraft"), 2, $user->hasRight('propal', 'read')); |
|
1345 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=1", $langs->trans("PropalsOpened"), 2, $user->hasRight('propal', 'read')); |
|
1346 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2", $langs->trans("PropalStatusSigned"), 2, $user->hasRight('propal', 'read')); |
|
1347 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=3", $langs->trans("PropalStatusNotSigned"), 2, $user->hasRight('propal', 'read')); |
|
1348 | - $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=4", $langs->trans("PropalStatusBilled"), 2, $user->hasRight('propal', 'read')); |
|
1344 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=0", $langs->trans("PropalsDraft"), 2, $user->hasRight('propal', 'read')); |
|
1345 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=1", $langs->trans("PropalsOpened"), 2, $user->hasRight('propal', 'read')); |
|
1346 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2", $langs->trans("PropalStatusSigned"), 2, $user->hasRight('propal', 'read')); |
|
1347 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=3", $langs->trans("PropalStatusNotSigned"), 2, $user->hasRight('propal', 'read')); |
|
1348 | + $newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=4", $langs->trans("PropalStatusBilled"), 2, $user->hasRight('propal', 'read')); |
|
1349 | 1349 | //$newmenu->add("/comm/propal/list.php?leftmenu=propals&search_status=2,3,4", $langs->trans("PropalStatusClosedShort"), 2, $user->hasRight('propal', 'read')); |
1350 | 1350 | } |
1351 | - $newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", $langs->trans("Statistics"), 1, $user->hasRight('propal', 'read')); |
|
1351 | + $newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", $langs->trans("Statistics"), 1, $user->hasRight('propal', 'read')); |
|
1352 | 1352 | } |
1353 | 1353 | |
1354 | 1354 | // Customers orders |
1355 | 1355 | if (isModEnabled('commande')) { |
1356 | 1356 | $langs->load("orders"); |
1357 | - $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 200, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); |
|
1358 | - $newmenu->add("/commande/card.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->hasRight('commande', 'creer')); |
|
1359 | - $newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->hasRight('commande', 'lire')); |
|
1357 | + $newmenu->add("/commande/index.php?leftmenu=orders", $langs->trans("CustomersOrders"), 0, $user->hasRight('commande', 'lire'), '', $mainmenu, 'orders', 200, '', '', '', img_picto('', 'order', 'class="paddingright pictofixedwidth"')); |
|
1358 | + $newmenu->add("/commande/card.php?action=create&leftmenu=orders", $langs->trans("NewOrder"), 1, $user->hasRight('commande', 'creer')); |
|
1359 | + $newmenu->add("/commande/list.php?leftmenu=orders", $langs->trans("List"), 1, $user->hasRight('commande', 'lire')); |
|
1360 | 1360 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders") { |
1361 | - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=0", $langs->trans("StatusOrderDraftShort"), 2, $user->hasRight('commande', 'lire')); |
|
1362 | - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=1", $langs->trans("StatusOrderValidated"), 2, $user->hasRight('commande', 'lire')); |
|
1361 | + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=0", $langs->trans("StatusOrderDraftShort"), 2, $user->hasRight('commande', 'lire')); |
|
1362 | + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=1", $langs->trans("StatusOrderValidated"), 2, $user->hasRight('commande', 'lire')); |
|
1363 | 1363 | if (isModEnabled('expedition')) { |
1364 | - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=2", $langs->trans("StatusOrderSentShort"), 2, $user->hasRight('commande', 'lire')); |
|
1364 | + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=2", $langs->trans("StatusOrderSentShort"), 2, $user->hasRight('commande', 'lire')); |
|
1365 | 1365 | } |
1366 | - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=3", $langs->trans("StatusOrderDelivered"), 2, $user->hasRight('commande', 'lire')); |
|
1366 | + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=3", $langs->trans("StatusOrderDelivered"), 2, $user->hasRight('commande', 'lire')); |
|
1367 | 1367 | //$newmenu->add("/commande/list.php?leftmenu=orders&search_status=4", $langs->trans("StatusOrderProcessed"), 2, $user->hasRight('commande', 'lire')); |
1368 | - $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->hasRight('commande', 'lire')); |
|
1368 | + $newmenu->add("/commande/list.php?leftmenu=orders&search_status=-1", $langs->trans("StatusOrderCanceledShort"), 2, $user->hasRight('commande', 'lire')); |
|
1369 | 1369 | } |
1370 | 1370 | if ($conf->global->MAIN_FEATURES_LEVEL >= 2 && empty($user->socid)) { |
1371 | - $newmenu->add("/commande/list_det.php?leftmenu=orders", $langs->trans("ListOrderLigne"), 1, $user->hasRight('commande', 'lire')); |
|
1371 | + $newmenu->add("/commande/list_det.php?leftmenu=orders", $langs->trans("ListOrderLigne"), 1, $user->hasRight('commande', 'lire')); |
|
1372 | 1372 | } |
1373 | 1373 | if (getDolGlobalInt('MAIN_NEED_EXPORT_PERMISSION_TO_READ_STATISTICS')) { |
1374 | 1374 | $newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->hasRight('commande', 'commande', 'export')); |
1375 | 1375 | } else { |
1376 | - $newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->hasRight('commande', 'lire')); |
|
1376 | + $newmenu->add("/commande/stats/index.php?leftmenu=orders", $langs->trans("Statistics"), 1, $user->hasRight('commande', 'lire')); |
|
1377 | 1377 | } |
1378 | 1378 | } |
1379 | 1379 | |
1380 | 1380 | // Supplier proposal |
1381 | 1381 | if (isModEnabled('supplier_proposal')) { |
1382 | 1382 | $langs->load("supplier_proposal"); |
1383 | - $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"')); |
|
1384 | - $newmenu->add("/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->hasRight('supplier_proposal', 'creer')); |
|
1385 | - $newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->hasRight('supplier_proposal', 'lire')); |
|
1386 | - $newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('supplier_proposal', 'lire')); |
|
1383 | + $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"')); |
|
1384 | + $newmenu->add("/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals", $langs->trans("SupplierProposalNew"), 1, $user->hasRight('supplier_proposal', 'creer')); |
|
1385 | + $newmenu->add("/supplier_proposal/list.php?leftmenu=supplier_proposals", $langs->trans("List"), 1, $user->hasRight('supplier_proposal', 'lire')); |
|
1386 | + $newmenu->add("/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('supplier_proposal', 'lire')); |
|
1387 | 1387 | } |
1388 | 1388 | |
1389 | 1389 | // Suppliers orders |
1390 | 1390 | if (isModEnabled('supplier_order')) { |
1391 | 1391 | $langs->load("orders"); |
1392 | - $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"')); |
|
1393 | - $newmenu->add("/fourn/commande/card.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewSupplierOrderShort"), 1, $user->hasRight('fournisseur', 'commande', 'creer')); |
|
1394 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1392 | + $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"')); |
|
1393 | + $newmenu->add("/fourn/commande/card.php?action=create&leftmenu=orders_suppliers", $langs->trans("NewSupplierOrderShort"), 1, $user->hasRight('fournisseur', 'commande', 'creer')); |
|
1394 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1395 | 1395 | |
1396 | 1396 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders_suppliers") { |
1397 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusSupplierOrderDraftShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1397 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusSupplierOrderDraftShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1398 | 1398 | if (empty($conf->global->SUPPLIER_ORDER_HIDE_VALIDATED)) { |
1399 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusSupplierOrderValidated"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1399 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusSupplierOrderValidated"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1400 | 1400 | } |
1401 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusSupplierOrderApprovedShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1402 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusSupplierOrderOnProcessShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1403 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusSupplierOrderReceivedPartiallyShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1404 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusSupplierOrderReceivedAll"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1405 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusSupplierOrderCanceled"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1406 | - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusSupplierOrderRefused"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1401 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusSupplierOrderApprovedShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1402 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusSupplierOrderOnProcessShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1403 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusSupplierOrderReceivedPartiallyShort"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1404 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusSupplierOrderReceivedAll"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1405 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusSupplierOrderCanceled"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1406 | + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusSupplierOrderRefused"), 2, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1407 | 1407 | } |
1408 | 1408 | // 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')); |
1409 | 1409 | |
1410 | 1410 | if (getDolGlobalInt('MAIN_NEED_EXPORT_PERMISSION_TO_READ_STATISTICS')) { |
1411 | 1411 | $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'commande', 'export')); |
1412 | 1412 | } else { |
1413 | - $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1413 | + $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->hasRight('fournisseur', 'commande', 'lire')); |
|
1414 | 1414 | } |
1415 | 1415 | } |
1416 | 1416 | |
1417 | 1417 | // Contrat |
1418 | 1418 | if (isModEnabled('contrat')) { |
1419 | 1419 | $langs->load("contracts"); |
1420 | - $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->hasRight('contrat', 'lire'), '', $mainmenu, 'contracts', 2000, '', '', '', img_picto('', 'contract', 'class="paddingright pictofixedwidth"')); |
|
1421 | - $newmenu->add("/contrat/card.php?action=create&leftmenu=contracts", $langs->trans("NewContractSubscription"), 1, $user->hasRight('contrat', 'creer')); |
|
1422 | - $newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->hasRight('contrat', 'lire')); |
|
1423 | - $newmenu->add("/contrat/services_list.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->hasRight('contrat', 'lire')); |
|
1420 | + $newmenu->add("/contrat/index.php?leftmenu=contracts", $langs->trans("ContractsSubscriptions"), 0, $user->hasRight('contrat', 'lire'), '', $mainmenu, 'contracts', 2000, '', '', '', img_picto('', 'contract', 'class="paddingright pictofixedwidth"')); |
|
1421 | + $newmenu->add("/contrat/card.php?action=create&leftmenu=contracts", $langs->trans("NewContractSubscription"), 1, $user->hasRight('contrat', 'creer')); |
|
1422 | + $newmenu->add("/contrat/list.php?leftmenu=contracts", $langs->trans("List"), 1, $user->hasRight('contrat', 'lire')); |
|
1423 | + $newmenu->add("/contrat/services_list.php?leftmenu=contracts", $langs->trans("MenuServices"), 1, $user->hasRight('contrat', 'lire')); |
|
1424 | 1424 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "contracts") { |
1425 | - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=0", $langs->trans("MenuInactiveServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1426 | - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4", $langs->trans("MenuRunningServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1427 | - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4&filter=expired", $langs->trans("MenuExpiredServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1428 | - $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=5", $langs->trans("MenuClosedServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1425 | + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=0", $langs->trans("MenuInactiveServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1426 | + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4", $langs->trans("MenuRunningServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1427 | + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=4&filter=expired", $langs->trans("MenuExpiredServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1428 | + $newmenu->add("/contrat/services_list.php?leftmenu=contracts&search_status=5", $langs->trans("MenuClosedServices"), 2, $user->hasRight('contrat', 'lire')); |
|
1429 | 1429 | } |
1430 | 1430 | } |
1431 | 1431 | |
1432 | 1432 | // Interventions |
1433 | 1433 | if (isModEnabled('ficheinter')) { |
1434 | 1434 | $langs->load("interventions"); |
1435 | - $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->hasRight('ficheinter', 'lire'), '', $mainmenu, 'ficheinter', 2200, '', '', '', img_picto('', 'intervention', 'class="paddingright pictofixedwidth"')); |
|
1436 | - $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->hasRight('ficheinter', 'creer'), '', '', '', 201); |
|
1437 | - $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 202); |
|
1435 | + $newmenu->add("/fichinter/index.php?leftmenu=ficheinter", $langs->trans("Interventions"), 0, $user->hasRight('ficheinter', 'lire'), '', $mainmenu, 'ficheinter', 2200, '', '', '', img_picto('', 'intervention', 'class="paddingright pictofixedwidth"')); |
|
1436 | + $newmenu->add("/fichinter/card.php?action=create&leftmenu=ficheinter", $langs->trans("NewIntervention"), 1, $user->hasRight('ficheinter', 'creer'), '', '', '', 201); |
|
1437 | + $newmenu->add("/fichinter/list.php?leftmenu=ficheinter", $langs->trans("List"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 202); |
|
1438 | 1438 | if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { |
1439 | - $newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ListOfTemplates"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 203); |
|
1439 | + $newmenu->add("/fichinter/card-rec.php?leftmenu=ficheinter", $langs->trans("ListOfTemplates"), 1, $user->hasRight('ficheinter', 'lire'), '', '', '', 203); |
|
1440 | 1440 | } |
1441 | - $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->hasRight('ficheinter', 'lire')); |
|
1441 | + $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", $langs->trans("Statistics"), 1, $user->hasRight('ficheinter', 'lire')); |
|
1442 | 1442 | } |
1443 | 1443 | } |
1444 | 1444 | } |
@@ -1463,59 +1463,59 @@ discard block |
||
1463 | 1463 | // Customers invoices |
1464 | 1464 | if (isModEnabled('facture')) { |
1465 | 1465 | $langs->load("bills"); |
1466 | - $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"')); |
|
1467 | - $newmenu->add("/compta/facture/card.php?action=create", $langs->trans("NewBill"), 1, $user->hasRight('facture', 'creer')); |
|
1468 | - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", $langs->trans("List"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_list'); |
|
1466 | + $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"')); |
|
1467 | + $newmenu->add("/compta/facture/card.php?action=create", $langs->trans("NewBill"), 1, $user->hasRight('facture', 'creer')); |
|
1468 | + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", $langs->trans("List"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_list'); |
|
1469 | 1469 | |
1470 | 1470 | if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills(|_draft|_notpaid|_paid|_canceled)$/', $leftmenu)) { |
1471 | - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('facture', 'lire')); |
|
1472 | - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('facture', 'lire')); |
|
1473 | - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('facture', 'lire')); |
|
1474 | - $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3", $langs->trans("BillShortStatusCanceled"), 2, $user->hasRight('facture', 'lire')); |
|
1471 | + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_draft&search_status=0", $langs->trans("BillShortStatusDraft"), 2, $user->hasRight('facture', 'lire')); |
|
1472 | + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_notpaid&search_status=1", $langs->trans("BillShortStatusNotPaid"), 2, $user->hasRight('facture', 'lire')); |
|
1473 | + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2", $langs->trans("BillShortStatusPaid"), 2, $user->hasRight('facture', 'lire')); |
|
1474 | + $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3", $langs->trans("BillShortStatusCanceled"), 2, $user->hasRight('facture', 'lire')); |
|
1475 | 1475 | } |
1476 | - $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. |
|
1476 | + $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. |
|
1477 | 1477 | |
1478 | - $newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment'); |
|
1478 | + $newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment'); |
|
1479 | 1479 | |
1480 | 1480 | if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { |
1481 | - $newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", $langs->trans("MenuToValid"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customer_bills_tovalid'); |
|
1481 | + $newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", $langs->trans("MenuToValid"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customer_bills_tovalid'); |
|
1482 | 1482 | } |
1483 | 1483 | if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills/', $leftmenu)) { |
1484 | - $newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment_report'); |
|
1484 | + $newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_payment_report", $langs->trans("Reportings"), 2, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_payment_report'); |
|
1485 | 1485 | } |
1486 | 1486 | |
1487 | - $newmenu->add("/compta/facture/stats/index.php?leftmenu=customers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_stats'); |
|
1487 | + $newmenu->add("/compta/facture/stats/index.php?leftmenu=customers_bills_stats", $langs->trans("Statistics"), 1, $user->hasRight('facture', 'lire'), '', $mainmenu, 'customers_bills_stats'); |
|
1488 | 1488 | } |
1489 | 1489 | |
1490 | 1490 | // Suppliers invoices |
1491 | 1491 | if (isModEnabled('societe') && isModEnabled('supplier_invoice')) { |
1492 | 1492 | $langs->load("bills"); |
1493 | - $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"')); |
|
1494 | - $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'); |
|
1495 | - $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_list'); |
|
1493 | + $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"')); |
|
1494 | + $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'); |
|
1495 | + $newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", $langs->trans("List"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_list'); |
|
1496 | 1496 | |
1497 | 1497 | if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) { |
1498 | - $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'); |
|
1499 | - $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'); |
|
1500 | - $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'); |
|
1498 | + $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'); |
|
1499 | + $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'); |
|
1500 | + $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'); |
|
1501 | 1501 | } |
1502 | 1502 | |
1503 | - $newmenu->add("/fourn/facture/list-rec.php?leftmenu=supplierinvoicestemplate_list", $langs->trans("ListOfTemplates"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'supplierinvoicestemplate_list'); |
|
1503 | + $newmenu->add("/fourn/facture/list-rec.php?leftmenu=supplierinvoicestemplate_list", $langs->trans("ListOfTemplates"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'supplierinvoicestemplate_list'); |
|
1504 | 1504 | |
1505 | - $newmenu->add("/fourn/paiement/list.php?leftmenu=suppliers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment'); |
|
1505 | + $newmenu->add("/fourn/paiement/list.php?leftmenu=suppliers_bills_payment", $langs->trans("Payments"), 1, $user->hasRight('fournisseur', 'facture', 'lire'), '', $mainmenu, 'suppliers_bills_payment'); |
|
1506 | 1506 | |
1507 | 1507 | if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) { |
1508 | - $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'); |
|
1508 | + $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'); |
|
1509 | 1509 | } |
1510 | 1510 | |
1511 | - $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'); |
|
1511 | + $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'); |
|
1512 | 1512 | } |
1513 | 1513 | |
1514 | 1514 | // Orders |
1515 | 1515 | if (isModEnabled('commande')) { |
1516 | 1516 | $langs->load("orders"); |
1517 | 1517 | if (isModEnabled('facture')) { |
1518 | - $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"')); |
|
1518 | + $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"')); |
|
1519 | 1519 | } |
1520 | 1520 | //if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->hasRight('commande', 'lire')); |
1521 | 1521 | } |
@@ -1524,7 +1524,7 @@ discard block |
||
1524 | 1524 | if (isModEnabled('supplier_invoice')) { |
1525 | 1525 | if (!empty($conf->global->SUPPLIER_MENU_ORDER_RECEIVED_INTO_INVOICE)) { |
1526 | 1526 | $langs->load("supplier"); |
1527 | - $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"')); |
|
1527 | + $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"')); |
|
1528 | 1528 | //if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->hasRight('commande', 'lire')); |
1529 | 1529 | } |
1530 | 1530 | } |
@@ -1533,58 +1533,58 @@ discard block |
||
1533 | 1533 | // Donations |
1534 | 1534 | if (isModEnabled('don')) { |
1535 | 1535 | $langs->load("donations"); |
1536 | - $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"')); |
|
1536 | + $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"')); |
|
1537 | 1537 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "donations") { |
1538 | - $newmenu->add("/don/card.php?leftmenu=donations&action=create", $langs->trans("NewDonation"), 1, $user->hasRight('don', 'creer')); |
|
1539 | - $newmenu->add("/don/list.php?leftmenu=donations", $langs->trans("List"), 1, $user->hasRight('don', 'lire')); |
|
1538 | + $newmenu->add("/don/card.php?leftmenu=donations&action=create", $langs->trans("NewDonation"), 1, $user->hasRight('don', 'creer')); |
|
1539 | + $newmenu->add("/don/list.php?leftmenu=donations", $langs->trans("List"), 1, $user->hasRight('don', 'lire')); |
|
1540 | 1540 | } |
1541 | 1541 | // if ($leftmenu=="donations") $newmenu->add("/don/stats/index.php",$langs->trans("Statistics"), 1, $user->hasRight('don', 'lire')); |
1542 | 1542 | } |
1543 | 1543 | |
1544 | 1544 | // Taxes and social contributions |
1545 | 1545 | if (isModEnabled('tax')) { |
1546 | - $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"')); |
|
1546 | + $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"')); |
|
1547 | 1547 | |
1548 | - $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("MenuSocialContributions"), 1, $user->hasRight('tax', 'charges', 'lire')); |
|
1548 | + $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("MenuSocialContributions"), 1, $user->hasRight('tax', 'charges', 'lire')); |
|
1549 | 1549 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_social/i', $leftmenu)) { |
1550 | - $newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", $langs->trans("MenuNewSocialContribution"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1551 | - $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1552 | - $newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1550 | + $newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", $langs->trans("MenuNewSocialContribution"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1551 | + $newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1552 | + $newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1553 | 1553 | } |
1554 | 1554 | // VAT |
1555 | 1555 | if (empty($conf->global->TAX_DISABLE_VAT_MENUS)) { |
1556 | 1556 | global $mysoc; |
1557 | 1557 | |
1558 | - $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'); |
|
1558 | + $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'); |
|
1559 | 1559 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i', $leftmenu)) { |
1560 | - $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1561 | - $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1562 | - $newmenu->add("/compta/tva/payments.php?mode=tvaonly&leftmenu=tax_vat", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1563 | - $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1564 | - $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1565 | - $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1560 | + $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1561 | + $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1562 | + $newmenu->add("/compta/tva/payments.php?mode=tvaonly&leftmenu=tax_vat", $langs->trans("Payments"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1563 | + $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1564 | + $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1565 | + $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1566 | 1566 | } |
1567 | 1567 | |
1568 | 1568 | //Local Taxes 1 |
1569 | 1569 | if ($mysoc->useLocalTax(1) && (isset($mysoc->localtax1_assuj) && $mysoc->localtax1_assuj == "1")) { |
1570 | - $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')); |
|
1570 | + $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')); |
|
1571 | 1571 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i', $leftmenu)) { |
1572 | - $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1573 | - $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1574 | - $newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1575 | - $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1576 | - $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1572 | + $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1573 | + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1574 | + $newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1575 | + $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1576 | + $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1577 | 1577 | } |
1578 | 1578 | } |
1579 | 1579 | //Local Taxes 2 |
1580 | 1580 | if ($mysoc->useLocalTax(2) && (isset($mysoc->localtax2_assuj) && $mysoc->localtax2_assuj == "1")) { |
1581 | - $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')); |
|
1581 | + $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')); |
|
1582 | 1582 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i', $leftmenu)) { |
1583 | - $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1584 | - $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1585 | - $newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1586 | - $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1587 | - $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1583 | + $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2", $langs->trans("New"), 2, $user->hasRight('tax', 'charges', 'creer')); |
|
1584 | + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("List"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1585 | + $newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByMonth"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1586 | + $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByThirdparties"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1587 | + $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->hasRight('tax', 'charges', 'lire')); |
|
1588 | 1588 | } |
1589 | 1589 | } |
1590 | 1590 | } |
@@ -1593,21 +1593,21 @@ discard block |
||
1593 | 1593 | // Salaries |
1594 | 1594 | if (isModEnabled('salaries')) { |
1595 | 1595 | $langs->load("salaries"); |
1596 | - $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"')); |
|
1596 | + $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"')); |
|
1597 | 1597 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_salary/i', $leftmenu)) { |
1598 | - $newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("New"), 1, $user->hasRight('salaries', 'write')); |
|
1599 | - $newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("List"), 1, $user->hasRight('salaries', 'read')); |
|
1600 | - $newmenu->add("/salaries/payments.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->hasRight('salaries', 'read')); |
|
1601 | - $newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->hasRight('salaries', 'read')); |
|
1598 | + $newmenu->add("/salaries/card.php?leftmenu=tax_salary&action=create", $langs->trans("New"), 1, $user->hasRight('salaries', 'write')); |
|
1599 | + $newmenu->add("/salaries/list.php?leftmenu=tax_salary", $langs->trans("List"), 1, $user->hasRight('salaries', 'read')); |
|
1600 | + $newmenu->add("/salaries/payments.php?leftmenu=tax_salary", $langs->trans("Payments"), 1, $user->hasRight('salaries', 'read')); |
|
1601 | + $newmenu->add("/salaries/stats/index.php?leftmenu=tax_salary", $langs->trans("Statistics"), 1, $user->hasRight('salaries', 'read')); |
|
1602 | 1602 | } |
1603 | 1603 | } |
1604 | 1604 | |
1605 | 1605 | // Loan |
1606 | 1606 | if (isModEnabled('loan')) { |
1607 | 1607 | $langs->load("loan"); |
1608 | - $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"')); |
|
1608 | + $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"')); |
|
1609 | 1609 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_loan/i', $leftmenu)) { |
1610 | - $newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->hasRight('loan', 'write')); |
|
1610 | + $newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", $langs->trans("NewLoan"), 1, $user->hasRight('loan', 'write')); |
|
1611 | 1611 | //$newmenu->add("/loan/payment/list.php?leftmenu=tax_loan",$langs->trans("Payments"),2,$user->hasRight('loan', 'read')); |
1612 | 1612 | } |
1613 | 1613 | } |
@@ -1615,10 +1615,10 @@ discard block |
||
1615 | 1615 | // Various payment |
1616 | 1616 | if (isModEnabled('banque') && empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) { |
1617 | 1617 | $langs->load("banks"); |
1618 | - $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"')); |
|
1618 | + $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"')); |
|
1619 | 1619 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_various/i', $leftmenu)) { |
1620 | - $newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->hasRight('banque', 'modifier')); |
|
1621 | - $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->hasRight('banque', 'lire')); |
|
1620 | + $newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", $langs->trans("New"), 1, $user->hasRight('banque', 'modifier')); |
|
1621 | + $newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", $langs->trans("List"), 1, $user->hasRight('banque', 'lire')); |
|
1622 | 1622 | } |
1623 | 1623 | } |
1624 | 1624 | } |
@@ -1648,71 +1648,71 @@ discard block |
||
1648 | 1648 | //$newmenu->add("/accountancy/index.php?leftmenu=accountancy", $langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy'); |
1649 | 1649 | |
1650 | 1650 | // Configuration |
1651 | - $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"')); |
|
1651 | + $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"')); |
|
1652 | 1652 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/', $leftmenu)) { |
1653 | 1653 | global $mysoc; |
1654 | - $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_general', 10); |
|
1654 | + $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("General"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_general', 10); |
|
1655 | 1655 | |
1656 | 1656 | // Fiscal year - Not really yet used. In a future will lock some periods. |
1657 | 1657 | if ($conf->global->MAIN_FEATURES_LEVEL > 1) { |
1658 | - $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'fiscalyear', 20); |
|
1658 | + $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("FiscalPeriod"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'fiscalyear', 20); |
|
1659 | 1659 | } |
1660 | 1660 | |
1661 | - $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); |
|
1662 | - $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); |
|
1663 | - $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
|
1664 | - $newmenu->add("/accountancy/admin/subaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ChartOfSubaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
|
1665 | - $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 60); |
|
1661 | + $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); |
|
1662 | + $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); |
|
1663 | + $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
|
1664 | + $newmenu->add("/accountancy/admin/subaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ChartOfSubaccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 41); |
|
1665 | + $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuDefaultAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_default', 60); |
|
1666 | 1666 | if (isModEnabled('banque')) { |
1667 | - $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); |
|
1667 | + $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); |
|
1668 | 1668 | } |
1669 | 1669 | if (isModEnabled('facture') || isModEnabled('supplier_invoice')) { |
1670 | - $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); |
|
1670 | + $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); |
|
1671 | 1671 | } |
1672 | 1672 | if (isModEnabled('tax')) { |
1673 | - $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); |
|
1673 | + $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); |
|
1674 | 1674 | } |
1675 | 1675 | if (isModEnabled('expensereport')) { |
1676 | - $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); |
|
1676 | + $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); |
|
1677 | 1677 | } |
1678 | - $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_product', 110); |
|
1678 | + $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_product', 110); |
|
1679 | 1679 | if ($conf->global->MAIN_FEATURES_LEVEL > 1) { |
1680 | - $newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_closure', 120); |
|
1680 | + $newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_closure', 120); |
|
1681 | 1681 | } |
1682 | - $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); |
|
1683 | - $newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_export', 130); |
|
1682 | + $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); |
|
1683 | + $newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("ExportOptions"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_export', 130); |
|
1684 | 1684 | } |
1685 | 1685 | |
1686 | 1686 | // Transfer in accounting |
1687 | - $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"')); |
|
1687 | + $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"')); |
|
1688 | 1688 | |
1689 | 1689 | // Binding |
1690 | 1690 | // $newmenu->add("", $langs->trans("Binding"), 0, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch'); |
1691 | 1691 | if (isModEnabled('facture') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) { |
1692 | - $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_customer'); |
|
1692 | + $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", $langs->trans("CustomersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_customer'); |
|
1693 | 1693 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_customer/', $leftmenu)) { |
1694 | - $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1695 | - $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1694 | + $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1695 | + $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1696 | 1696 | } |
1697 | 1697 | } |
1698 | 1698 | if (isModEnabled('supplier_invoice') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)) { |
1699 | - $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_supplier'); |
|
1699 | + $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", $langs->trans("SuppliersVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_supplier'); |
|
1700 | 1700 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_supplier/', $leftmenu)) { |
1701 | - $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1702 | - $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1701 | + $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1702 | + $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1703 | 1703 | } |
1704 | 1704 | } |
1705 | 1705 | if (isModEnabled('expensereport') && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) { |
1706 | - $newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_expensereport'); |
|
1706 | + $newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", $langs->trans("ExpenseReportsVentilation"), 1, $user->hasRight('accounting', 'bind', 'write'), '', $mainmenu, 'dispatch_expensereport'); |
|
1707 | 1707 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_expensereport/', $leftmenu)) { |
1708 | - $newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1709 | - $newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1708 | + $newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("ToBind"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1709 | + $newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", $langs->trans("Binded"), 2, $user->hasRight('accounting', 'bind', 'write')); |
|
1710 | 1710 | } |
1711 | 1711 | } |
1712 | 1712 | |
1713 | 1713 | // Journals |
1714 | - if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1715 | - $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy_journal'); |
|
1714 | + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1715 | + $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'accountancy_journal'); |
|
1716 | 1716 | |
1717 | 1717 | // Multi journal |
1718 | 1718 | $sql = "SELECT rowid, code, label, nature"; |
@@ -1748,7 +1748,7 @@ discard block |
||
1748 | 1748 | $nature = "expensereports"; |
1749 | 1749 | } |
1750 | 1750 | if ($objp->nature == 1 && isModEnabled('asset')) { |
1751 | - $nature = "various"; // Warning: The page /accountancy/journal/variousjournal.php is bugged. It read tables that does not exists. |
|
1751 | + $nature = "various"; // Warning: The page /accountancy/journal/variousjournal.php is bugged. It read tables that does not exists. |
|
1752 | 1752 | } |
1753 | 1753 | if ($objp->nature == 8) { |
1754 | 1754 | $nature = "inventory"; |
@@ -1772,16 +1772,16 @@ discard block |
||
1772 | 1772 | $journallabel = '<span class="opacitymedium">('.$langs->trans($objp->label).')</span>'; // Label of bank account in llx_accounting_journal |
1773 | 1773 | } |
1774 | 1774 | |
1775 | - $key = $langs->trans("AccountingJournalType".$objp->nature); // $objp->nature is 1, 2, 3 ... |
|
1776 | - $transferlabel = (($objp->nature && $key != "AccountingJournalType".$objp->nature) ? $key.($journallabelwithoutspan != $key ? ' '.$journallabel : ''): $journallabel); |
|
1775 | + $key = $langs->trans("AccountingJournalType".$objp->nature); // $objp->nature is 1, 2, 3 ... |
|
1776 | + $transferlabel = (($objp->nature && $key != "AccountingJournalType".$objp->nature) ? $key.($journallabelwithoutspan != $key ? ' '.$journallabel : '') : $journallabel); |
|
1777 | 1777 | |
1778 | - $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $transferlabel, 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1778 | + $newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $transferlabel, 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1779 | 1779 | } |
1780 | 1780 | $i++; |
1781 | 1781 | } |
1782 | 1782 | } else { |
1783 | 1783 | // Should not happend. Entries are added |
1784 | - $newmenu->add('', $langs->trans("NoJournalDefined"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1784 | + $newmenu->add('', $langs->trans("NoJournalDefined"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1785 | 1785 | } |
1786 | 1786 | } else { |
1787 | 1787 | dol_print_error($db); |
@@ -1791,48 +1791,48 @@ discard block |
||
1791 | 1791 | |
1792 | 1792 | // Files |
1793 | 1793 | if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) { |
1794 | - $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1794 | + $newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1795 | 1795 | } |
1796 | 1796 | |
1797 | 1797 | |
1798 | 1798 | // Accounting |
1799 | - $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"')); |
|
1799 | + $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"')); |
|
1800 | 1800 | |
1801 | 1801 | // General Ledger |
1802 | - $newmenu->add("/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1802 | + $newmenu->add("/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Bookkeeping"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1803 | 1803 | |
1804 | 1804 | // Journals |
1805 | - $newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Journals"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1805 | + $newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("Journals"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1806 | 1806 | |
1807 | 1807 | // Account Balance |
1808 | - $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1808 | + $newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1809 | 1809 | |
1810 | 1810 | // Export accountancy |
1811 | - $newmenu->add("/accountancy/bookkeeping/export.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("MenuExportAccountancy"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1811 | + $newmenu->add("/accountancy/bookkeeping/export.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("MenuExportAccountancy"), 1, $user->hasRight('accounting', 'mouvements', 'lire')); |
|
1812 | 1812 | |
1813 | 1813 | // Closure |
1814 | - $newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'closure'); |
|
1814 | + $newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'closure'); |
|
1815 | 1815 | |
1816 | 1816 | // Reports |
1817 | - $newmenu->add("/accountancy/index.php?leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'ca'); |
|
1817 | + $newmenu->add("/accountancy/index.php?leftmenu=accountancy_report", $langs->trans("Reportings"), 1, $user->hasRight('accounting', 'comptarapport', 'lire'), '', $mainmenu, 'ca'); |
|
1818 | 1818 | |
1819 | 1819 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1820 | - $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1821 | - $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1822 | - $newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", $langs->trans("ByPersonalizedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1820 | + $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", $langs->trans("MenuReportInOut"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1821 | + $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", $langs->trans("ByPredefinedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1822 | + $newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", $langs->trans("ByPersonalizedAccountGroups"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1823 | 1823 | } |
1824 | 1824 | |
1825 | 1825 | $modecompta = 'CREANCES-DETTES'; |
1826 | - if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1826 | + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1827 | 1827 | $modecompta = 'BOOKKEEPING'; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED |
1828 | 1828 | } |
1829 | 1829 | if ($modecompta) { |
1830 | 1830 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1831 | - $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1832 | - $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1833 | - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1834 | - $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1835 | - $newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1831 | + $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1832 | + $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1833 | + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1834 | + $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1835 | + $newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1836 | 1836 | } |
1837 | 1837 | } |
1838 | 1838 | |
@@ -1840,34 +1840,34 @@ discard block |
||
1840 | 1840 | //if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') $modecompta=''; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED |
1841 | 1841 | if ($modecompta) { |
1842 | 1842 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1843 | - $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1844 | - $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1845 | - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1843 | + $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1844 | + $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1845 | + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1846 | 1846 | //$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"),3,$user->hasRight('accounting', 'comptarapport', 'lire')); |
1847 | 1847 | //$newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByVatRate"),3,$user->hasRight('accounting', 'comptarapport', 'lire')); |
1848 | 1848 | } |
1849 | 1849 | } |
1850 | 1850 | |
1851 | 1851 | $modecompta = 'CREANCES-DETTES'; |
1852 | - if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1852 | + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1853 | 1853 | $modecompta = 'BOOKKEEPING'; // Not yet implemented. |
1854 | 1854 | } |
1855 | 1855 | if ($modecompta && isModEnabled('supplier_invoice')) { |
1856 | 1856 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1857 | - $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1858 | - $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1859 | - $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1857 | + $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1858 | + $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1859 | + $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1860 | 1860 | } |
1861 | 1861 | } |
1862 | 1862 | |
1863 | 1863 | $modecompta = 'RECETTES-DEPENSES'; |
1864 | - if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1864 | + if (isModEnabled('accounting') && $user->hasRight('accounting', 'comptarapport', 'lire') && $mainmenu == 'accountancy') { |
|
1865 | 1865 | $modecompta = 'BOOKKEEPINGCOLLECTED'; // Not yet implemented. |
1866 | 1866 | } |
1867 | 1867 | if ($modecompta && ((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled('supplier_invoice'))) { |
1868 | 1868 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) { |
1869 | - $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1870 | - $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1869 | + $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnoverCollected"), 2, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1870 | + $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 3, $user->hasRight('accounting', 'comptarapport', 'lire')); |
|
1871 | 1871 | } |
1872 | 1872 | } |
1873 | 1873 | } |
@@ -1876,15 +1876,15 @@ discard block |
||
1876 | 1876 | if (isModEnabled('comptabilite')) { |
1877 | 1877 | // Files |
1878 | 1878 | if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU)) { |
1879 | - $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"')); |
|
1879 | + $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"')); |
|
1880 | 1880 | } |
1881 | 1881 | |
1882 | 1882 | // Bilan, resultats |
1883 | - $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"')); |
|
1883 | + $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"')); |
|
1884 | 1884 | |
1885 | 1885 | if ($usemenuhider || empty($leftmenu) || preg_match('/report/', $leftmenu)) { |
1886 | - $newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1887 | - $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByPredefinedAccountGroups"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1886 | + $newmenu->add("/compta/resultat/index.php?leftmenu=report", $langs->trans("MenuReportInOut"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1887 | + $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", $langs->trans("ByPredefinedAccountGroups"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1888 | 1888 | /* On verra ca avec module compabilite expert |
1889 | 1889 | $newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,$user->hasRight('compta', 'resultat', 'lire')); |
1890 | 1890 | $newmenu->add("/compta/resultat/bilan.php?leftmenu=report","Bilan",2,$user->hasRight('compta', 'resultat', 'lire')); |
@@ -1899,22 +1899,22 @@ discard block |
||
1899 | 1899 | */ |
1900 | 1900 | |
1901 | 1901 | $modecompta = 'CREANCES-DETTES'; |
1902 | - $newmenu->add("/compta/stats/index.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1903 | - $newmenu->add("/compta/stats/casoc.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1904 | - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1905 | - $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1906 | - $newmenu->add("/compta/stats/byratecountry.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1902 | + $newmenu->add("/compta/stats/index.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ReportTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1903 | + $newmenu->add("/compta/stats/casoc.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1904 | + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1905 | + $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1906 | + $newmenu->add("/compta/stats/byratecountry.php?leftmenu=report&modecompta=".$modecompta, $langs->trans("ByVatRate"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1907 | 1907 | |
1908 | 1908 | $modecompta = 'RECETTES-DEPENSES'; |
1909 | - $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1910 | - $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1911 | - $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1909 | + $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportTurnoverCollected"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1910 | + $newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1911 | + $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByUsers"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1912 | 1912 | |
1913 | 1913 | //Achats |
1914 | 1914 | $modecompta = 'CREANCES-DETTES'; |
1915 | - $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1916 | - $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1917 | - $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1915 | + $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ReportPurchaseTurnover"), 1, $user->hasRight('compta', 'resultat', 'lire')); |
|
1916 | + $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByCompanies"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1917 | + $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report&modecompta=".$modecompta, $langs->trans("ByProductsAndServices"), 2, $user->hasRight('compta', 'resultat', 'lire')); |
|
1918 | 1918 | |
1919 | 1919 | /* |
1920 | 1920 | $modecompta = 'RECETTES-DEPENSES'; |
@@ -1924,31 +1924,31 @@ discard block |
||
1924 | 1924 | */ |
1925 | 1925 | |
1926 | 1926 | // Journals |
1927 | - $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 50); |
|
1928 | - $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 51); |
|
1927 | + $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 50); |
|
1928 | + $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->hasRight('compta', 'resultat', 'lire'), '', '', '', 51); |
|
1929 | 1929 | } |
1930 | 1930 | //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')); |
1931 | 1931 | } |
1932 | 1932 | |
1933 | 1933 | // Intracomm report |
1934 | 1934 | if (isModEnabled('intracommreport')) { |
1935 | - $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReport"), 0, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 60, '', '', '', img_picto('', 'intracommreport', 'class="paddingright pictofixedwidth"')); |
|
1935 | + $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReport"), 0, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 60, '', '', '', img_picto('', 'intracommreport', 'class="paddingright pictofixedwidth"')); |
|
1936 | 1936 | if ($usemenuhider || empty($leftmenu) || preg_match('/intracommreport/', $leftmenu)) { |
1937 | 1937 | // DEB / DES |
1938 | - $newmenu->add("/intracommreport/card.php?action=create&leftmenu=intracommreport", $langs->trans("MenuIntracommReportNew"), 1, $user->hasRight('intracommreport', 'write'), '', $mainmenu, 'intracommreport', 1); |
|
1939 | - $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReportList"), 1, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 1); |
|
1938 | + $newmenu->add("/intracommreport/card.php?action=create&leftmenu=intracommreport", $langs->trans("MenuIntracommReportNew"), 1, $user->hasRight('intracommreport', 'write'), '', $mainmenu, 'intracommreport', 1); |
|
1939 | + $newmenu->add("/intracommreport/list.php?leftmenu=intracommreport", $langs->trans("MenuIntracommReportList"), 1, $user->hasRight('intracommreport', 'read'), '', $mainmenu, 'intracommreport', 1); |
|
1940 | 1940 | } |
1941 | 1941 | } |
1942 | 1942 | |
1943 | 1943 | // Assets |
1944 | 1944 | if (isModEnabled('asset')) { |
1945 | - $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"')); |
|
1946 | - $newmenu->add("/asset/card.php?leftmenu=asset&action=create", $langs->trans("MenuNewAsset"), 1, $user->hasRight('asset', 'write')); |
|
1947 | - $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->hasRight('asset', 'read')); |
|
1948 | - $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'); |
|
1945 | + $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"')); |
|
1946 | + $newmenu->add("/asset/card.php?leftmenu=asset&action=create", $langs->trans("MenuNewAsset"), 1, $user->hasRight('asset', 'write')); |
|
1947 | + $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->hasRight('asset', 'read')); |
|
1948 | + $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'); |
|
1949 | 1949 | if ($usemenuhider || empty($leftmenu) || preg_match('/asset_model/', $leftmenu)) { |
1950 | - $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'))); |
|
1951 | - $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'))); |
|
1950 | + $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'))); |
|
1951 | + $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'))); |
|
1952 | 1952 | } |
1953 | 1953 | } |
1954 | 1954 | } |
@@ -1974,62 +1974,62 @@ discard block |
||
1974 | 1974 | |
1975 | 1975 | // Bank-Cash account |
1976 | 1976 | if (isModEnabled('banque')) { |
1977 | - $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"')); |
|
1977 | + $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"')); |
|
1978 | 1978 | |
1979 | - $newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->hasRight('banque', 'configurer')); |
|
1980 | - $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank'); |
|
1981 | - $newmenu->add("/compta/bank/bankentries_list.php", $langs->trans("ListTransactions"), 1, $user->hasRight('banque', 'lire')); |
|
1982 | - $newmenu->add("/compta/bank/budget.php", $langs->trans("ListTransactionsByCategory"), 1, $user->hasRight('banque', 'lire')); |
|
1979 | + $newmenu->add("/compta/bank/card.php?action=create", $langs->trans("MenuNewFinancialAccount"), 1, $user->hasRight('banque', 'configurer')); |
|
1980 | + $newmenu->add("/compta/bank/list.php?leftmenu=bank&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'lire'), '', $mainmenu, 'bank'); |
|
1981 | + $newmenu->add("/compta/bank/bankentries_list.php", $langs->trans("ListTransactions"), 1, $user->hasRight('banque', 'lire')); |
|
1982 | + $newmenu->add("/compta/bank/budget.php", $langs->trans("ListTransactionsByCategory"), 1, $user->hasRight('banque', 'lire')); |
|
1983 | 1983 | |
1984 | - $newmenu->add("/compta/bank/transfer.php", $langs->trans("MenuBankInternalTransfer"), 1, $user->hasRight('banque', 'transfer')); |
|
1984 | + $newmenu->add("/compta/bank/transfer.php", $langs->trans("MenuBankInternalTransfer"), 1, $user->hasRight('banque', 'transfer')); |
|
1985 | 1985 | } |
1986 | 1986 | |
1987 | 1987 | if (isModEnabled('categorie')) { |
1988 | 1988 | $langs->load("categories"); |
1989 | - $newmenu->add("/categories/index.php?type=5", $langs->trans("Rubriques"), 1, $user->hasRight('categorie', 'creer'), '', $mainmenu, 'tags'); |
|
1990 | - $newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->hasRight('banque', 'configurer'), '', $mainmenu, 'tags'); |
|
1989 | + $newmenu->add("/categories/index.php?type=5", $langs->trans("Rubriques"), 1, $user->hasRight('categorie', 'creer'), '', $mainmenu, 'tags'); |
|
1990 | + $newmenu->add("/compta/bank/categ.php", $langs->trans("RubriquesTransactions"), 1, $user->hasRight('banque', 'configurer'), '', $mainmenu, 'tags'); |
|
1991 | 1991 | } |
1992 | 1992 | |
1993 | 1993 | // Direct debit order |
1994 | 1994 | if (isModEnabled('prelevement')) { |
1995 | - $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"')); |
|
1995 | + $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"')); |
|
1996 | 1996 | |
1997 | 1997 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "withdraw") { |
1998 | - $newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->hasRight('prelevement', 'bons', 'creer')); |
|
1998 | + $newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->hasRight('prelevement', 'bons', 'creer')); |
|
1999 | 1999 | |
2000 | - $newmenu->add("/compta/prelevement/orders_list.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
2001 | - $newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
2002 | - $newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
2003 | - $newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
2000 | + $newmenu->add("/compta/prelevement/orders_list.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
2001 | + $newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
2002 | + $newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
2003 | + $newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('prelevement', 'bons', 'lire')); |
|
2004 | 2004 | } |
2005 | 2005 | } |
2006 | 2006 | |
2007 | 2007 | // Bank transfer order |
2008 | 2008 | if (isModEnabled('paymentbybanktransfer')) { |
2009 | - $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"')); |
|
2009 | + $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"')); |
|
2010 | 2010 | |
2011 | 2011 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "banktransfer") { |
2012 | - $newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->hasRight('paymentbybanktransfer', 'create')); |
|
2012 | + $newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->hasRight('paymentbybanktransfer', 'create')); |
|
2013 | 2013 | |
2014 | - $newmenu->add("/compta/prelevement/orders_list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2015 | - $newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2016 | - $newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2017 | - $newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2014 | + $newmenu->add("/compta/prelevement/orders_list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2015 | + $newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2016 | + $newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2017 | + $newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->hasRight('paymentbybanktransfer', 'read')); |
|
2018 | 2018 | } |
2019 | 2019 | } |
2020 | 2020 | |
2021 | 2021 | // Management of checks |
2022 | 2022 | if (empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && isModEnabled('banque') && (isModEnabled('facture') || !empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))) { |
2023 | - $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"')); |
|
2023 | + $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"')); |
|
2024 | 2024 | if (preg_match('/checks/', $leftmenu)) { |
2025 | - $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank", $langs->trans("NewChequeDeposit"), 1, $user->hasRight('banque', 'cheque')); |
|
2026 | - $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'cheque')); |
|
2025 | + $newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank", $langs->trans("NewChequeDeposit"), 1, $user->hasRight('banque', 'cheque')); |
|
2026 | + $newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank", $langs->trans("List"), 1, $user->hasRight('banque', 'cheque')); |
|
2027 | 2027 | } |
2028 | 2028 | } |
2029 | 2029 | |
2030 | 2030 | // Cash Control |
2031 | 2031 | if (isModEnabled('takepos') || isModEnabled('cashdesk')) { |
2032 | - $permtomakecashfence = ($user->hasRight('cashdesk', 'run')|| $user->hasRight('takepos', 'run')); |
|
2032 | + $permtomakecashfence = ($user->hasRight('cashdesk', 'run') || $user->hasRight('takepos', 'run')); |
|
2033 | 2033 | $newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", $langs->trans("CashControl"), 0, $permtomakecashfence, '', $mainmenu, 'cashcontrol', 0, '', '', '', img_picto('', 'pos', 'class="paddingright pictofixedwidth"')); |
2034 | 2034 | $newmenu->add("/compta/cashcontrol/cashcontrol_card.php?action=create", $langs->trans("NewCashFence"), 1, $permtomakecashfence); |
2035 | 2035 | $newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", $langs->trans("List"), 1, $permtomakecashfence); |
@@ -2054,51 +2054,51 @@ discard block |
||
2054 | 2054 | if ($mainmenu == 'products') { |
2055 | 2055 | // Products |
2056 | 2056 | if (isModEnabled('product')) { |
2057 | - $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->hasRight('product', 'read'), '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="paddingright pictofixedwidth"')); |
|
2058 | - $newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->hasRight('product', 'creer')); |
|
2059 | - $newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->hasRight('product', 'read')); |
|
2057 | + $newmenu->add("/product/index.php?leftmenu=product&type=0", $langs->trans("Products"), 0, $user->hasRight('product', 'read'), '', $mainmenu, 'product', 0, '', '', '', img_picto('', 'product', 'class="paddingright pictofixedwidth"')); |
|
2058 | + $newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->hasRight('product', 'creer')); |
|
2059 | + $newmenu->add("/product/list.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->hasRight('product', 'read')); |
|
2060 | 2060 | if (isModEnabled('stock')) { |
2061 | - $newmenu->add("/product/reassort.php?type=0", $langs->trans("MenuStocks"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2061 | + $newmenu->add("/product/reassort.php?type=0", $langs->trans("MenuStocks"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2062 | 2062 | } |
2063 | 2063 | if (isModEnabled('productbatch')) { |
2064 | 2064 | $langs->load("stocks"); |
2065 | - $newmenu->add("/product/reassortlot.php?type=0&search_subjecttolotserial=1", $langs->trans("StocksByLotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2066 | - $newmenu->add("/product/stock/productlot_list.php", $langs->trans("LotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2065 | + $newmenu->add("/product/reassortlot.php?type=0&search_subjecttolotserial=1", $langs->trans("StocksByLotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2066 | + $newmenu->add("/product/stock/productlot_list.php", $langs->trans("LotSerial"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
|
2067 | 2067 | } |
2068 | 2068 | if (isModEnabled('variants')) { |
2069 | - $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('product', 'read')); |
|
2069 | + $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('product', 'read')); |
|
2070 | 2070 | } |
2071 | 2071 | if (isModEnabled('propal') || isModEnabled('commande') || isModEnabled('facture') || isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
2072 | - $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->hasRight('product', 'read')); |
|
2072 | + $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->hasRight('product', 'read')); |
|
2073 | 2073 | } |
2074 | 2074 | |
2075 | 2075 | // Categories |
2076 | 2076 | if (isModEnabled('categorie')) { |
2077 | 2077 | $langs->load("categories"); |
2078 | - $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2078 | + $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2079 | 2079 | //if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->hasRight('categorie', 'lire')); |
2080 | 2080 | } |
2081 | 2081 | } |
2082 | 2082 | |
2083 | 2083 | // Services |
2084 | 2084 | if (isModEnabled('service')) { |
2085 | - $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->hasRight('service', 'read'), '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="paddingright pictofixedwidth"')); |
|
2086 | - $newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->hasRight('service', 'creer')); |
|
2087 | - $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->hasRight('service', 'read')); |
|
2085 | + $newmenu->add("/product/index.php?leftmenu=service&type=1", $langs->trans("Services"), 0, $user->hasRight('service', 'read'), '', $mainmenu, 'service', 0, '', '', '', img_picto('', 'service', 'class="paddingright pictofixedwidth"')); |
|
2086 | + $newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->hasRight('service', 'creer')); |
|
2087 | + $newmenu->add("/product/list.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->hasRight('service', 'read')); |
|
2088 | 2088 | |
2089 | 2089 | if (isModEnabled('Stock') && getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { |
2090 | - $newmenu->add("/product/reassort.php?type=1", $langs->trans("MenuStocks"), 1, $user->hasRight('service', 'read') && $user->hasRight('stock', 'lire')); |
|
2090 | + $newmenu->add("/product/reassort.php?type=1", $langs->trans("MenuStocks"), 1, $user->hasRight('service', 'read') && $user->hasRight('stock', 'lire')); |
|
2091 | 2091 | } |
2092 | 2092 | if (isModEnabled('variants')) { |
2093 | - $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('service', 'read')); |
|
2093 | + $newmenu->add("/variants/list.php", $langs->trans("VariantAttributes"), 1, $user->hasRight('service', 'read')); |
|
2094 | 2094 | } |
2095 | 2095 | if (isModEnabled('propal') || isModEnabled('commande') || isModEnabled('facture') || isModEnabled('supplier_proposal') || isModEnabled('supplier_order') || isModEnabled('supplier_invoice')) { |
2096 | - $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->hasRight('service', 'read')); |
|
2096 | + $newmenu->add("/product/stats/card.php?id=all&leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->hasRight('service', 'read')); |
|
2097 | 2097 | } |
2098 | 2098 | // Categories |
2099 | 2099 | if (isModEnabled('categorie')) { |
2100 | 2100 | $langs->load("categories"); |
2101 | - $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2101 | + $newmenu->add("/categories/index.php?leftmenu=cat&type=0", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2102 | 2102 | //if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->hasRight('categorie', 'lire')); |
2103 | 2103 | } |
2104 | 2104 | } |
@@ -2108,41 +2108,41 @@ discard block |
||
2108 | 2108 | $langs->load("stocks"); |
2109 | 2109 | $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'stock', 'class="paddingright pictofixedwidth"')); |
2110 | 2110 | $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->hasRight('stock', 'creer')); |
2111 | - $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
|
2111 | + $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
|
2112 | 2112 | $newmenu->add("/product/stock/movement_list.php", $langs->trans("Movements"), 1, $user->hasRight('stock', 'mouvement', 'lire')); |
2113 | 2113 | |
2114 | 2114 | $newmenu->add("/product/stock/massstockmove.php?init=1", $langs->trans("MassStockTransferShort"), 1, $user->hasRight('stock', 'mouvement', 'creer')); |
2115 | 2115 | if (isModEnabled('supplier_order')) { |
2116 | - $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->hasRight('stock', 'mouvement', 'creer') && $user->hasRight('fournisseur', 'lire')); |
|
2116 | + $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->hasRight('stock', 'mouvement', 'creer') && $user->hasRight('fournisseur', 'lire')); |
|
2117 | 2117 | } |
2118 | 2118 | $newmenu->add("/product/stock/stockatdate.php", $langs->trans("StockAtDate"), 1, $user->hasRight('product', 'read') && $user->hasRight('stock', 'lire')); |
2119 | 2119 | |
2120 | 2120 | // Categories for warehouses |
2121 | 2121 | if (isModEnabled('categorie')) { |
2122 | - $newmenu->add("/categories/index.php?leftmenu=stock&type=9", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2122 | + $newmenu->add("/categories/index.php?leftmenu=stock&type=9", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2123 | 2123 | } |
2124 | 2124 | } |
2125 | 2125 | |
2126 | 2126 | if (isModEnabled('stocktransfer')) { |
2127 | - $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans("ModuleStockTransferName"), 0, $user->hasRight('stocktransfer', 'stocktransfer', 'read'), '', $mainmenu, 'stocktransfer', 0, '', '', '', img_picto('', 'stock', 'class="paddingright pictofixedwidth"')); |
|
2128 | - $newmenu->add('/product/stock/stocktransfer/stocktransfer_card.php?action=create', $langs->trans('StockTransferNew'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'write')); |
|
2129 | - $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans('List'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'read')); |
|
2127 | + $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans("ModuleStockTransferName"), 0, $user->hasRight('stocktransfer', 'stocktransfer', 'read'), '', $mainmenu, 'stocktransfer', 0, '', '', '', img_picto('', 'stock', 'class="paddingright pictofixedwidth"')); |
|
2128 | + $newmenu->add('/product/stock/stocktransfer/stocktransfer_card.php?action=create', $langs->trans('StockTransferNew'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'write')); |
|
2129 | + $newmenu->add('/product/stock/stocktransfer/stocktransfer_list.php', $langs->trans('List'), 1, $user->hasRight('stocktransfer', 'stocktransfer', 'read')); |
|
2130 | 2130 | } |
2131 | 2131 | |
2132 | 2132 | // Inventory |
2133 | 2133 | if (isModEnabled('stock')) { |
2134 | 2134 | $langs->load("stocks"); |
2135 | 2135 | if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { |
2136 | - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="paddingright pictofixedwidth"')); |
|
2136 | + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("Inventories"), 0, $user->hasRight('stock', 'lire'), '', $mainmenu, 'stock', 0, '', '', '', img_picto('', 'inventory', 'class="paddingright pictofixedwidth"')); |
|
2137 | 2137 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") { |
2138 | - $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'creer')); |
|
2139 | - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
|
2138 | + $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'creer')); |
|
2139 | + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'lire')); |
|
2140 | 2140 | } |
2141 | 2141 | } else { |
2142 | - $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="paddingright pictofixedwidth"')); |
|
2142 | + $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="paddingright pictofixedwidth"')); |
|
2143 | 2143 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "stock_inventories") { |
2144 | - $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'inventory_advance', 'write')); |
|
2145 | - $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'inventory_advance', 'read')); |
|
2144 | + $newmenu->add("/product/inventory/card.php?action=create&leftmenu=stock_inventories", $langs->trans("NewInventory"), 1, $user->hasRight('stock', 'inventory_advance', 'write')); |
|
2145 | + $newmenu->add("/product/inventory/list.php?leftmenu=stock_inventories", $langs->trans("List"), 1, $user->hasRight('stock', 'inventory_advance', 'read')); |
|
2146 | 2146 | } |
2147 | 2147 | } |
2148 | 2148 | } |
@@ -2150,33 +2150,33 @@ discard block |
||
2150 | 2150 | // Shipments |
2151 | 2151 | if (isModEnabled('expedition')) { |
2152 | 2152 | $langs->load("sendings"); |
2153 | - $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->hasRight('expedition', 'lire'), '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="paddingright pictofixedwidth"')); |
|
2154 | - $newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->hasRight('expedition', 'creer')); |
|
2155 | - $newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->hasRight('expedition', 'lire')); |
|
2153 | + $newmenu->add("/expedition/index.php?leftmenu=sendings", $langs->trans("Shipments"), 0, $user->hasRight('expedition', 'lire'), '', $mainmenu, 'sendings', 0, '', '', '', img_picto('', 'shipment', 'class="paddingright pictofixedwidth"')); |
|
2154 | + $newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", $langs->trans("NewSending"), 1, $user->hasRight('expedition', 'creer')); |
|
2155 | + $newmenu->add("/expedition/list.php?leftmenu=sendings", $langs->trans("List"), 1, $user->hasRight('expedition', 'lire')); |
|
2156 | 2156 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "sendings") { |
2157 | - $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=0", $langs->trans("StatusSendingDraftShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2158 | - $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2159 | - $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2157 | + $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=0", $langs->trans("StatusSendingDraftShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2158 | + $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=1", $langs->trans("StatusSendingValidatedShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2159 | + $newmenu->add("/expedition/list.php?leftmenu=sendings&search_status=2", $langs->trans("StatusSendingProcessedShort"), 2, $user->hasRight('expedition', 'lire')); |
|
2160 | 2160 | } |
2161 | - $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->hasRight('expedition', 'lire')); |
|
2161 | + $newmenu->add("/expedition/stats/index.php?leftmenu=sendings", $langs->trans("Statistics"), 1, $user->hasRight('expedition', 'lire')); |
|
2162 | 2162 | } |
2163 | 2163 | |
2164 | 2164 | // Receptions |
2165 | 2165 | if (isModEnabled('reception')) { |
2166 | 2166 | $langs->load("receptions"); |
2167 | - $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->hasRight('reception', 'lire'), '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="paddingright pictofixedwidth"')); |
|
2168 | - $newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->hasRight('reception', 'creer')); |
|
2169 | - $newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->hasRight('reception', 'lire')); |
|
2167 | + $newmenu->add("/reception/index.php?leftmenu=receptions", $langs->trans("Receptions"), 0, $user->hasRight('reception', 'lire'), '', $mainmenu, 'receptions', 0, '', '', '', img_picto('', 'dollyrevert', 'class="paddingright pictofixedwidth"')); |
|
2168 | + $newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", $langs->trans("NewReception"), 1, $user->hasRight('reception', 'creer')); |
|
2169 | + $newmenu->add("/reception/list.php?leftmenu=receptions", $langs->trans("List"), 1, $user->hasRight('reception', 'lire')); |
|
2170 | 2170 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { |
2171 | - $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->hasRight('reception', 'lire')); |
|
2171 | + $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=0", $langs->trans("StatusReceptionDraftShort"), 2, $user->hasRight('reception', 'lire')); |
|
2172 | 2172 | } |
2173 | 2173 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { |
2174 | - $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->hasRight('reception', 'lire')); |
|
2174 | + $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=1", $langs->trans("StatusReceptionValidatedShort"), 2, $user->hasRight('reception', 'lire')); |
|
2175 | 2175 | } |
2176 | 2176 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") { |
2177 | - $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->hasRight('reception', 'lire')); |
|
2177 | + $newmenu->add("/reception/list.php?leftmenu=receptions&search_status=2", $langs->trans("StatusReceptionProcessedShort"), 2, $user->hasRight('reception', 'lire')); |
|
2178 | 2178 | } |
2179 | - $newmenu->add("/reception/stats/index.php?leftmenu=receptions", $langs->trans("Statistics"), 1, $user->hasRight('reception', 'lire')); |
|
2179 | + $newmenu->add("/reception/stats/index.php?leftmenu=receptions", $langs->trans("Statistics"), 1, $user->hasRight('reception', 'lire')); |
|
2180 | 2180 | } |
2181 | 2181 | } |
2182 | 2182 | } |
@@ -2200,17 +2200,17 @@ discard block |
||
2200 | 2200 | if (isModEnabled('bom') || isModEnabled('mrp')) { |
2201 | 2201 | $langs->load("mrp"); |
2202 | 2202 | |
2203 | - $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom', 0, '', '', '', img_picto('', 'bom', 'class="paddingright pictofixedwidth"')); |
|
2204 | - $newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->hasRight('bom', 'write'), '', $mainmenu, 'bom'); |
|
2205 | - $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom'); |
|
2203 | + $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom', 0, '', '', '', img_picto('', 'bom', 'class="paddingright pictofixedwidth"')); |
|
2204 | + $newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->hasRight('bom', 'write'), '', $mainmenu, 'bom'); |
|
2205 | + $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->hasRight('bom', 'read'), '', $mainmenu, 'bom'); |
|
2206 | 2206 | } |
2207 | 2207 | |
2208 | 2208 | if (isModEnabled('mrp')) { |
2209 | 2209 | $langs->load("mrp"); |
2210 | 2210 | |
2211 | - $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mrp', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"')); |
|
2212 | - $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->hasRight('mrp', 'write'), '', $mainmenu, ''); |
|
2213 | - $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->hasRight('mrp', 'read'), '', $mainmenu, ''); |
|
2211 | + $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->hasRight('mrp', 'read'), '', $mainmenu, 'mrp', 0, '', '', '', img_picto('', 'mrp', 'class="paddingright pictofixedwidth"')); |
|
2212 | + $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->hasRight('mrp', 'write'), '', $mainmenu, ''); |
|
2213 | + $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->hasRight('mrp', 'read'), '', $mainmenu, ''); |
|
2214 | 2214 | } |
2215 | 2215 | } |
2216 | 2216 | } |
@@ -2237,7 +2237,7 @@ discard block |
||
2237 | 2237 | |
2238 | 2238 | $tmpentry = array( |
2239 | 2239 | 'enabled'=>isModEnabled('projet'), |
2240 | - 'perms'=>$user->hasRight('projet', 'lire'), |
|
2240 | + 'perms'=>$user->hasRight('projet', 'lire'), |
|
2241 | 2241 | 'module'=>'projet' |
2242 | 2242 | ); |
2243 | 2243 | $listofmodulesforexternal = explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL); |
@@ -2255,8 +2255,8 @@ discard block |
||
2255 | 2255 | } |
2256 | 2256 | |
2257 | 2257 | // Project assigned to user |
2258 | - $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"')); |
|
2259 | - $newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->hasRight('projet', 'creer')); |
|
2258 | + $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"')); |
|
2259 | + $newmenu->add("/projet/card.php?leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, $user->hasRight('projet', 'creer')); |
|
2260 | 2260 | |
2261 | 2261 | if (empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { |
2262 | 2262 | $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'); |
@@ -2268,23 +2268,23 @@ discard block |
||
2268 | 2268 | $newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_usage_opportunity=1&search_status=99', $langs->trans("List"), 2, $showmode); |
2269 | 2269 | } |
2270 | 2270 | |
2271 | - $newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
|
2271 | + $newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
|
2272 | 2272 | |
2273 | 2273 | // Categories |
2274 | 2274 | if (isModEnabled('categorie')) { |
2275 | 2275 | $langs->load("categories"); |
2276 | - $newmenu->add("/categories/index.php?leftmenu=cat&type=6", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2276 | + $newmenu->add("/categories/index.php?leftmenu=cat&type=6", $langs->trans("Categories"), 1, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat'); |
|
2277 | 2277 | } |
2278 | 2278 | |
2279 | 2279 | if (empty($conf->global->PROJECT_HIDE_TASKS)) { |
2280 | 2280 | // Project affected to user |
2281 | - $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"')); |
|
2282 | - $newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->hasRight('projet', 'creer')); |
|
2283 | - $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')); |
|
2284 | - $newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
|
2281 | + $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"')); |
|
2282 | + $newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->hasRight('projet', 'creer')); |
|
2283 | + $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')); |
|
2284 | + $newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->hasRight('projet', 'lire')); |
|
2285 | 2285 | |
2286 | - $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"')); |
|
2287 | - $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')); |
|
2286 | + $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"')); |
|
2287 | + $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')); |
|
2288 | 2288 | } |
2289 | 2289 | } |
2290 | 2290 | } |
@@ -2342,47 +2342,47 @@ discard block |
||
2342 | 2342 | // Load translation files required by the page |
2343 | 2343 | $langs->loadLangs(array("holiday", "trips")); |
2344 | 2344 | |
2345 | - $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"')); |
|
2346 | - $newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->hasRight('holiday', 'write'), '', $mainmenu); |
|
2347 | - $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'); |
|
2348 | - $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("List"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu); |
|
2345 | + $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"')); |
|
2346 | + $newmenu->add("/holiday/card.php?mainmenu=hrm&leftmenu=holiday&action=create", $langs->trans("New"), 1, $user->hasRight('holiday', 'write'), '', $mainmenu); |
|
2347 | + $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'); |
|
2348 | + $newmenu->add("/holiday/list.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("List"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu); |
|
2349 | 2349 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "holiday") { |
2350 | - $newmenu->add("/holiday/list.php?search_status=1&mainmenu=hrm&leftmenu=holiday", $langs->trans("DraftCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2351 | - $newmenu->add("/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=holiday", $langs->trans("ToReviewCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2352 | - $newmenu->add("/holiday/list.php?search_status=3&mainmenu=hrm&leftmenu=holiday", $langs->trans("ApprovedCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2353 | - $newmenu->add("/holiday/list.php?search_status=4&mainmenu=hrm&leftmenu=holiday", $langs->trans("CancelCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2354 | - $newmenu->add("/holiday/list.php?search_status=5&mainmenu=hrm&leftmenu=holiday", $langs->trans("RefuseCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2350 | + $newmenu->add("/holiday/list.php?search_status=1&mainmenu=hrm&leftmenu=holiday", $langs->trans("DraftCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2351 | + $newmenu->add("/holiday/list.php?search_status=2&mainmenu=hrm&leftmenu=holiday", $langs->trans("ToReviewCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2352 | + $newmenu->add("/holiday/list.php?search_status=3&mainmenu=hrm&leftmenu=holiday", $langs->trans("ApprovedCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2353 | + $newmenu->add("/holiday/list.php?search_status=4&mainmenu=hrm&leftmenu=holiday", $langs->trans("CancelCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2354 | + $newmenu->add("/holiday/list.php?search_status=5&mainmenu=hrm&leftmenu=holiday", $langs->trans("RefuseCP"), 2, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2355 | 2355 | } |
2356 | - $newmenu->add("/holiday/define_holiday.php?mainmenu=hrm", $langs->trans("MenuConfCP"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2357 | - $newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->hasRight('holiday', 'readall'), '', $mainmenu, 'holiday_sm'); |
|
2358 | - $newmenu->add("/holiday/view_log.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuLogCP"), 1, $user->hasRight('holiday', 'define_holiday'), '', $mainmenu, 'holiday_sm'); |
|
2356 | + $newmenu->add("/holiday/define_holiday.php?mainmenu=hrm", $langs->trans("MenuConfCP"), 1, $user->hasRight('holiday', 'read'), '', $mainmenu, 'holiday_sm'); |
|
2357 | + $newmenu->add("/holiday/month_report.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuReportMonth"), 1, $user->hasRight('holiday', 'readall'), '', $mainmenu, 'holiday_sm'); |
|
2358 | + $newmenu->add("/holiday/view_log.php?mainmenu=hrm&leftmenu=holiday", $langs->trans("MenuLogCP"), 1, $user->hasRight('holiday', 'define_holiday'), '', $mainmenu, 'holiday_sm'); |
|
2359 | 2359 | } |
2360 | 2360 | |
2361 | 2361 | // Trips and expenses (old module) |
2362 | 2362 | if (isModEnabled('deplacement')) { |
2363 | 2363 | $langs->load("trips"); |
2364 | - $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"')); |
|
2365 | - $newmenu->add("/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('deplacement', 'creer')); |
|
2366 | - $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('deplacement', 'lire')); |
|
2367 | - $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('deplacement', 'lire')); |
|
2364 | + $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"')); |
|
2365 | + $newmenu->add("/compta/deplacement/card.php?action=create&leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('deplacement', 'creer')); |
|
2366 | + $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('deplacement', 'lire')); |
|
2367 | + $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('deplacement', 'lire')); |
|
2368 | 2368 | } |
2369 | 2369 | |
2370 | 2370 | // Expense report |
2371 | 2371 | if (isModEnabled('expensereport')) { |
2372 | 2372 | $langs->loadLangs(array("trips", "bills")); |
2373 | - $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"')); |
|
2374 | - $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('expensereport', 'creer')); |
|
2375 | - $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('expensereport', 'lire')); |
|
2373 | + $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"')); |
|
2374 | + $newmenu->add("/expensereport/card.php?action=create&leftmenu=expensereport&mainmenu=hrm", $langs->trans("New"), 1, $user->hasRight('expensereport', 'creer')); |
|
2375 | + $newmenu->add("/expensereport/list.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("List"), 1, $user->hasRight('expensereport', 'lire')); |
|
2376 | 2376 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "expensereport") { |
2377 | - $newmenu->add("/expensereport/list.php?search_status=0&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Draft"), 2, $user->hasRight('expensereport', 'lire')); |
|
2378 | - $newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Validated"), 2, $user->hasRight('expensereport', 'lire')); |
|
2379 | - $newmenu->add("/expensereport/list.php?search_status=5&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Approved"), 2, $user->hasRight('expensereport', 'lire')); |
|
2380 | - $newmenu->add("/expensereport/list.php?search_status=6&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Paid"), 2, $user->hasRight('expensereport', 'lire')); |
|
2381 | - $newmenu->add("/expensereport/list.php?search_status=4&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Canceled"), 2, $user->hasRight('expensereport', 'lire')); |
|
2382 | - $newmenu->add("/expensereport/list.php?search_status=99&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Refused"), 2, $user->hasRight('expensereport', 'lire')); |
|
2377 | + $newmenu->add("/expensereport/list.php?search_status=0&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Draft"), 2, $user->hasRight('expensereport', 'lire')); |
|
2378 | + $newmenu->add("/expensereport/list.php?search_status=2&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Validated"), 2, $user->hasRight('expensereport', 'lire')); |
|
2379 | + $newmenu->add("/expensereport/list.php?search_status=5&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Approved"), 2, $user->hasRight('expensereport', 'lire')); |
|
2380 | + $newmenu->add("/expensereport/list.php?search_status=6&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Paid"), 2, $user->hasRight('expensereport', 'lire')); |
|
2381 | + $newmenu->add("/expensereport/list.php?search_status=4&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Canceled"), 2, $user->hasRight('expensereport', 'lire')); |
|
2382 | + $newmenu->add("/expensereport/list.php?search_status=99&leftmenu=expensereport&mainmenu=hrm", $langs->trans("Refused"), 2, $user->hasRight('expensereport', 'lire')); |
|
2383 | 2383 | } |
2384 | - $newmenu->add("/expensereport/payment/list.php?leftmenu=expensereport_payments&mainmenu=hrm", $langs->trans("Payments"), 1, $user->hasRight('expensereport', 'lire')); |
|
2385 | - $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('expensereport', 'lire')); |
|
2384 | + $newmenu->add("/expensereport/payment/list.php?leftmenu=expensereport_payments&mainmenu=hrm", $langs->trans("Payments"), 1, $user->hasRight('expensereport', 'lire')); |
|
2385 | + $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", $langs->trans("Statistics"), 1, $user->hasRight('expensereport', 'lire')); |
|
2386 | 2386 | } |
2387 | 2387 | |
2388 | 2388 | if (isModEnabled('projet')) { |
@@ -2391,7 +2391,7 @@ discard block |
||
2391 | 2391 | |
2392 | 2392 | $search_project_user = GETPOST('search_project_user', 'int'); |
2393 | 2393 | |
2394 | - $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"')); |
|
2394 | + $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"')); |
|
2395 | 2395 | } |
2396 | 2396 | } |
2397 | 2397 | } |
@@ -2419,22 +2419,22 @@ discard block |
||
2419 | 2419 | } |
2420 | 2420 | |
2421 | 2421 | if (isModEnabled('mailing')) { |
2422 | - $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"')); |
|
2423 | - $newmenu->add("/comm/mailing/card.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->hasRight('mailing', 'creer')); |
|
2424 | - $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->hasRight('mailing', 'lire')); |
|
2422 | + $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"')); |
|
2423 | + $newmenu->add("/comm/mailing/card.php?leftmenu=mailing&action=create", $langs->trans("NewMailing"), 1, $user->hasRight('mailing', 'creer')); |
|
2424 | + $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->hasRight('mailing', 'lire')); |
|
2425 | 2425 | } |
2426 | 2426 | |
2427 | 2427 | if (isModEnabled('export')) { |
2428 | 2428 | $langs->load("exports"); |
2429 | - $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->hasRight('export', 'lire'), '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
2430 | - $newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->hasRight('export', 'creer')); |
|
2429 | + $newmenu->add("/exports/index.php?leftmenu=export", $langs->trans("FormatedExport"), 0, $user->hasRight('export', 'lire'), '', $mainmenu, 'export', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
2430 | + $newmenu->add("/exports/export.php?leftmenu=export", $langs->trans("NewExport"), 1, $user->hasRight('export', 'creer')); |
|
2431 | 2431 | //$newmenu->add("/exports/export.php?leftmenu=export",$langs->trans("List"),1, $user->hasRight('export', 'lire')); |
2432 | 2432 | } |
2433 | 2433 | |
2434 | 2434 | if (isModEnabled('import')) { |
2435 | 2435 | $langs->load("exports"); |
2436 | - $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->hasRight('import', 'run'), '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
2437 | - $newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->hasRight('import', 'run')); |
|
2436 | + $newmenu->add("/imports/index.php?leftmenu=import", $langs->trans("FormatedImport"), 0, $user->hasRight('import', 'run'), '', $mainmenu, 'import', 0, '', '', '', img_picto('', 'technic', 'class="paddingright pictofixedwidth"')); |
|
2437 | + $newmenu->add("/imports/import.php?leftmenu=import", $langs->trans("NewImport"), 1, $user->hasRight('import', 'run')); |
|
2438 | 2438 | } |
2439 | 2439 | } |
2440 | 2440 | } |
@@ -2472,7 +2472,7 @@ discard block |
||
2472 | 2472 | |
2473 | 2473 | $newmenu->add("/adherents/cartes/carte.php?leftmenu=export", $langs->trans("MembersCards"), 1, $user->hasRight('adherent', 'export')); |
2474 | 2474 | if (!empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && ($usemenuhider || empty($leftmenu) || $leftmenu == 'none' || $leftmenu == "members" || $leftmenu == "export")) { |
2475 | - $newmenu->add("/adherents/htpasswd.php?leftmenu=export", $langs->trans("Filehtpasswd"), 1, $user->hasRight('adherent', 'export')); |
|
2475 | + $newmenu->add("/adherents/htpasswd.php?leftmenu=export", $langs->trans("Filehtpasswd"), 1, $user->hasRight('adherent', 'export')); |
|
2476 | 2476 | } |
2477 | 2477 | |
2478 | 2478 | if (isModEnabled('categorie')) { |
@@ -107,13 +107,13 @@ |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
110 | - * Return array head with list of tabs to view object informations |
|
111 | - * |
|
112 | - * @param object $object Member |
|
113 | - * @param int $nbOfInvoices No of invoices |
|
114 | - * @param int $nbOfSalaryInvoice No of salary invoices |
|
115 | - * @return array head |
|
116 | - */ |
|
110 | + * Return array head with list of tabs to view object informations |
|
111 | + * |
|
112 | + * @param object $object Member |
|
113 | + * @param int $nbOfInvoices No of invoices |
|
114 | + * @param int $nbOfSalaryInvoice No of salary invoices |
|
115 | + * @return array head |
|
116 | + */ |
|
117 | 117 | function bon_prelevement_prepare_head(BonPrelevement $object, $nbOfInvoices, $nbOfSalaryInvoice) |
118 | 118 | { |
119 | 119 | global $langs, $conf; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | $pdfa = false; // PDF-1.3 |
183 | 183 | if (!empty($conf->global->PDF_USE_A)) { |
184 | - $pdfa = $conf->global->PDF_USE_A; // PDF/A-1 ou PDF/A-3 |
|
184 | + $pdfa = $conf->global->PDF_USE_A; // PDF/A-1 ou PDF/A-3 |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | if (class_exists('TCPDI')) { |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | $stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof6); |
537 | 537 | } |
538 | 538 | if (!empty($conf->global->PDF_ADD_MORE_AFTER_SOURCE_ADDRESS)) { |
539 | - $stringaddress .= ($stringaddress ? "\n" : '') . getDolGlobalString('PDF_ADD_MORE_AFTER_SOURCE_ADDRESS'); |
|
539 | + $stringaddress .= ($stringaddress ? "\n" : '').getDolGlobalString('PDF_ADD_MORE_AFTER_SOURCE_ADDRESS'); |
|
540 | 540 | } |
541 | 541 | } |
542 | 542 | |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | if ($usecontact && is_object($targetcontact) && getDolGlobalInt('MAIN_USE_COMPANY_NAME_OF_CONTACT')) { |
649 | 649 | $targetcontact->fetch_thirdparty(); |
650 | 650 | if (!empty($targetcontact->thirdparty->id) && $targetcontact->thirdparty->tva_intra) { |
651 | - $stringaddress .= ($stringaddress ? "\n" : '') . $outputlangs->transnoentities("VATIntraShort") . ': ' . $outputlangs->convToOutputCharset($targetcontact->thirdparty->tva_intra); |
|
651 | + $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($targetcontact->thirdparty->tva_intra); |
|
652 | 652 | } |
653 | 653 | } elseif ($targetcompany->tva_intra) { |
654 | 654 | $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($targetcompany->tva_intra); |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | |
730 | 730 | // Add a background image on document only if good setup of const |
731 | 731 | if (!empty($conf->global->MAIN_USE_BACKGROUND_ON_PDF) && ($conf->global->MAIN_USE_BACKGROUND_ON_PDF != '-1')) { // Warning, this option make TCPDF generation being crazy and some content disappeared behind the image |
732 | - $filepath = $conf->mycompany->dir_output.'/logos/' . getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF'); |
|
732 | + $filepath = $conf->mycompany->dir_output.'/logos/'.getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF'); |
|
733 | 733 | if (file_exists($filepath)) { |
734 | 734 | $pdf->SetAutoPageBreak(0, 0); // Disable auto pagebreak before adding image |
735 | 735 | if (getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF_ALPHA')) { $pdf->SetAlpha($conf->global->MAIN_USE_BACKGROUND_ON_PDF_ALPHA); } // Option for change opacity of background |
@@ -1144,7 +1144,7 @@ discard block |
||
1144 | 1144 | $line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof5); |
1145 | 1145 | } |
1146 | 1146 | // Prof Id 6 |
1147 | - if (!empty($fromcompany->idprof6) && $fromcompany->idprof6) { |
|
1147 | + if (!empty($fromcompany->idprof6) && $fromcompany->idprof6) { |
|
1148 | 1148 | $field = $outputlangs->transcountrynoentities("ProfId6", $fromcompany->country_code); |
1149 | 1149 | if (preg_match('/\((.*)\)/i', $field, $reg)) { |
1150 | 1150 | $field = $reg[1]; |
@@ -1152,7 +1152,7 @@ discard block |
||
1152 | 1152 | $line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof6); |
1153 | 1153 | } |
1154 | 1154 | // Prof Id 7 |
1155 | - if (!empty($fromcompany->idprof7) && $fromcompany->idprof7) { |
|
1155 | + if (!empty($fromcompany->idprof7) && $fromcompany->idprof7) { |
|
1156 | 1156 | $field = $outputlangs->transcountrynoentities("ProfId7", $fromcompany->country_code); |
1157 | 1157 | if (preg_match('/\((.*)\)/i', $field, $reg)) { |
1158 | 1158 | $field = $reg[1]; |
@@ -1160,7 +1160,7 @@ discard block |
||
1160 | 1160 | $line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof7); |
1161 | 1161 | } |
1162 | 1162 | // Prof Id 8 |
1163 | - if (!empty($fromcompany->idprof8) && $fromcompany->idprof8) { |
|
1163 | + if (!empty($fromcompany->idprof8) && $fromcompany->idprof8) { |
|
1164 | 1164 | $field = $outputlangs->transcountrynoentities("ProfId8", $fromcompany->country_code); |
1165 | 1165 | if (preg_match('/\((.*)\)/i', $field, $reg)) { |
1166 | 1166 | $field = $reg[1]; |
@@ -1168,7 +1168,7 @@ discard block |
||
1168 | 1168 | $line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof8); |
1169 | 1169 | } |
1170 | 1170 | // Prof Id 9 |
1171 | - if (!empty($fromcompany->idprof9) && $fromcompany->idprof9) { |
|
1171 | + if (!empty($fromcompany->idprof9) && $fromcompany->idprof9) { |
|
1172 | 1172 | $field = $outputlangs->transcountrynoentities("ProfId9", $fromcompany->country_code); |
1173 | 1173 | if (preg_match('/\((.*)\)/i', $field, $reg)) { |
1174 | 1174 | $field = $reg[1]; |
@@ -1176,7 +1176,7 @@ discard block |
||
1176 | 1176 | $line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof9); |
1177 | 1177 | } |
1178 | 1178 | // Prof Id 10 |
1179 | - if (!empty($fromcompany->idprof10) && $fromcompany->idprof10) { |
|
1179 | + if (!empty($fromcompany->idprof10) && $fromcompany->idprof10) { |
|
1180 | 1180 | $field = $outputlangs->transcountrynoentities("ProfId10", $fromcompany->country_code); |
1181 | 1181 | if (preg_match('/\((.*)\)/i', $field, $reg)) { |
1182 | 1182 | $field = $reg[1]; |
@@ -1184,7 +1184,7 @@ discard block |
||
1184 | 1184 | $line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof10); |
1185 | 1185 | } |
1186 | 1186 | // IntraCommunautary VAT |
1187 | - if (!empty($fromcompany->tva_intra) && $fromcompany->tva_intra != '') { |
|
1187 | + if (!empty($fromcompany->tva_intra) && $fromcompany->tva_intra != '') { |
|
1188 | 1188 | $line4 .= ($line4 ? " - " : "").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra); |
1189 | 1189 | } |
1190 | 1190 | |
@@ -1473,7 +1473,7 @@ discard block |
||
1473 | 1473 | $prodser = new Product($db); |
1474 | 1474 | |
1475 | 1475 | if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { |
1476 | - include_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; |
|
1476 | + include_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; |
|
1477 | 1477 | } |
1478 | 1478 | } |
1479 | 1479 | |
@@ -1548,15 +1548,13 @@ discard block |
||
1548 | 1548 | foreach ($tmparrayofsubproducts as $subprodval) { |
1549 | 1549 | $libelleproduitservice = dol_concatdesc(dol_concatdesc($libelleproduitservice, " * ".$subprodval[3]), |
1550 | 1550 | (!empty($qtyText) ? |
1551 | - $outputlangs->trans('Qty').':'.$qtyText.' x '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1].'= '.$outputlangs->trans('QtyTot').':'.$subprodval[1]*$qtyText: |
|
1552 | - $outputlangs->trans('Qty').' '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1])); |
|
1551 | + $outputlangs->trans('Qty').':'.$qtyText.' x '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1].'= '.$outputlangs->trans('QtyTot').':'.$subprodval[1] * $qtyText : $outputlangs->trans('Qty').' '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1])); |
|
1553 | 1552 | } |
1554 | 1553 | } else { |
1555 | 1554 | foreach ($tmparrayofsubproducts as $subprodval) { |
1556 | 1555 | $libelleproduitservice = dol_concatdesc(dol_concatdesc($libelleproduitservice, " * ".$subprodval[5].(($subprodval[5] && $subprodval[3]) ? ' - ' : '').$subprodval[3]), |
1557 | 1556 | (!empty($qtyText) ? |
1558 | - $outputlangs->trans('Qty').':'.$qtyText.' x '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1].'= '.$outputlangs->trans('QtyTot').':'.$subprodval[1]*$qtyText: |
|
1559 | - $outputlangs->trans('Qty').' '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1])); |
|
1557 | + $outputlangs->trans('Qty').':'.$qtyText.' x '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1].'= '.$outputlangs->trans('QtyTot').':'.$subprodval[1] * $qtyText : $outputlangs->trans('Qty').' '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1])); |
|
1560 | 1558 | } |
1561 | 1559 | } |
1562 | 1560 | } |
@@ -1658,11 +1656,11 @@ discard block |
||
1658 | 1656 | break; |
1659 | 1657 | |
1660 | 1658 | case 2: |
1661 | - $ref_prodserv = $productCustomerPrice->ref_customer . ' (' . $outputlangs->transnoentitiesnoconv('InternalRef') . ' ' . $ref_prodserv . ')'; |
|
1659 | + $ref_prodserv = $productCustomerPrice->ref_customer.' ('.$outputlangs->transnoentitiesnoconv('InternalRef').' '.$ref_prodserv.')'; |
|
1662 | 1660 | break; |
1663 | 1661 | |
1664 | 1662 | default: |
1665 | - $ref_prodserv = $ref_prodserv . ' (' . $outputlangs->transnoentitiesnoconv('RefCustomer') . ' ' . $productCustomerPrice->ref_customer . ')'; |
|
1663 | + $ref_prodserv = $ref_prodserv.' ('.$outputlangs->transnoentitiesnoconv('RefCustomer').' '.$productCustomerPrice->ref_customer.')'; |
|
1666 | 1664 | } |
1667 | 1665 | } |
1668 | 1666 | } |
@@ -2466,7 +2464,7 @@ discard block |
||
2466 | 2464 | if (count($objects) > 1 && count($objects) <= (getDolGlobalInt("MAXREFONDOC") ? getDolGlobalInt("MAXREFONDOC") : 10)) { |
2467 | 2465 | $object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("RefOrder").' :'); |
2468 | 2466 | foreach ($objects as $elementobject) { |
2469 | - $object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref).(empty($elementobject->ref_client) ?'' : ' ('.$elementobject->ref_client.')').(empty($elementobject->ref_supplier) ? '' : ' ('.$elementobject->ref_supplier.')').' '); |
|
2467 | + $object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref).(empty($elementobject->ref_client) ? '' : ' ('.$elementobject->ref_client.')').(empty($elementobject->ref_supplier) ? '' : ' ('.$elementobject->ref_supplier.')').' '); |
|
2470 | 2468 | $object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities("OrderDate").' : '.dol_print_date($elementobject->date, 'day', '', $outputlangs)); |
2471 | 2469 | } |
2472 | 2470 | } elseif (count($objects) == 1) { |
@@ -2516,7 +2514,7 @@ discard block |
||
2516 | 2514 | } |
2517 | 2515 | } |
2518 | 2516 | |
2519 | - if (! is_object($order)) { |
|
2517 | + if (!is_object($order)) { |
|
2520 | 2518 | $object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref)); |
2521 | 2519 | } else { |
2522 | 2520 | $object->note_public = dol_concatdesc($object->note_public, $outputlangs->convToOutputCharset($order->ref).($order->ref_client ? ' ('.$order->ref_client.')' : '')); |
@@ -2539,7 +2537,7 @@ discard block |
||
2539 | 2537 | } |
2540 | 2538 | } |
2541 | 2539 | |
2542 | - if (! is_object($order)) { |
|
2540 | + if (!is_object($order)) { |
|
2543 | 2541 | $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefSending"); |
2544 | 2542 | if (empty($linkedobjects[$objecttype]['ref_value'])) { |
2545 | 2543 | $linkedobjects[$objecttype]['ref_value'] = ''; |
@@ -2642,7 +2640,7 @@ discard block |
||
2642 | 2640 | if (isset($hookmanager->resArray['linetotalremise'])) { |
2643 | 2641 | return $hookmanager->resArray['linetotalremise']; |
2644 | 2642 | } else { |
2645 | - return (float) $hookmanager->resPrint; // For backward compatibility |
|
2643 | + return (float) $hookmanager->resPrint; // For backward compatibility |
|
2646 | 2644 | } |
2647 | 2645 | } |
2648 | 2646 | } |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public $revenuestamp; |
78 | 78 | |
79 | - public $totalpaid; // duplicate with sumpayed |
|
80 | - public $totaldeposits; // duplicate with sumdeposit |
|
81 | - public $totalcreditnotes; // duplicate with sumcreditnote |
|
79 | + public $totalpaid; // duplicate with sumpayed |
|
80 | + public $totaldeposits; // duplicate with sumdeposit |
|
81 | + public $totalcreditnotes; // duplicate with sumcreditnote |
|
82 | 82 | |
83 | 83 | public $sumpayed; |
84 | 84 | public $sumpayed_multicurrency; |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | $sharedentity = 'facture_fourn'; |
421 | 421 | } |
422 | 422 | |
423 | - $sql = "SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code".$field3 . $field4; |
|
423 | + $sql = "SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code".$field3.$field4; |
|
424 | 424 | $sql .= " FROM ".$this->db->prefix().$table." as pf, ".$this->db->prefix().$table2." as p, ".$this->db->prefix()."c_paiement as t"; |
425 | 425 | $sql .= " WHERE pf.".$field." = ".((int) $this->id); |
426 | 426 | $sql .= " AND pf.".$field2." = p.rowid"; |
@@ -660,8 +660,8 @@ discard block |
||
660 | 660 | public function getSubtypeLabel($table = '') |
661 | 661 | { |
662 | 662 | if ($table === 'facture' || $table === 'facture_fourn') { |
663 | - $sql = "SELECT s.label FROM " . MAIN_DB_PREFIX . $table . " AS f"; |
|
664 | - $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "c_invoice_subtype AS s ON f.subtype = s.rowid"; |
|
663 | + $sql = "SELECT s.label FROM ".MAIN_DB_PREFIX.$table." AS f"; |
|
664 | + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."c_invoice_subtype AS s ON f.subtype = s.rowid"; |
|
665 | 665 | $sql .= " WHERE f.ref = '".$this->db->escape($this->ref)."'"; |
666 | 666 | |
667 | 667 | $resql = $this->db->query($sql); |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | } |
675 | 675 | |
676 | 676 | if (!empty($subtypeLabel)) { |
677 | - print ' ' . $subtypeLabel; |
|
677 | + print ' '.$subtypeLabel; |
|
678 | 678 | } |
679 | 679 | } else { |
680 | 680 | dol_print_error($this->db); |
@@ -696,10 +696,10 @@ discard block |
||
696 | 696 | $effs = array(); |
697 | 697 | |
698 | 698 | $sql = "SELECT rowid, code, label as label"; |
699 | - $sql .= " FROM " . MAIN_DB_PREFIX . 'c_invoice_subtype'; |
|
699 | + $sql .= " FROM ".MAIN_DB_PREFIX.'c_invoice_subtype'; |
|
700 | 700 | $sql .= " WHERE active = 1 AND fk_country = ".((int) $mysoc->country_id)." AND entity IN(".getEntity('c_invoice_subtype').")"; |
701 | 701 | $sql .= " ORDER by rowid, code"; |
702 | - dol_syslog(get_class($this) . '::getArrayOfInvoiceSubtypes', LOG_DEBUG); |
|
702 | + dol_syslog(get_class($this).'::getArrayOfInvoiceSubtypes', LOG_DEBUG); |
|
703 | 703 | $resql = $this->db->query($sql); |
704 | 704 | if ($resql) { |
705 | 705 | $num = $this->db->num_rows($resql); |
@@ -1090,7 +1090,7 @@ discard block |
||
1090 | 1090 | if ($this->status > self::STATUS_DRAFT && $this->paye == 0) { |
1091 | 1091 | // Get the default payment mode for BAN payment of the third party |
1092 | 1092 | require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php'; |
1093 | - $bac = new CompanyBankAccount($this->db); // table societe_rib |
|
1093 | + $bac = new CompanyBankAccount($this->db); // table societe_rib |
|
1094 | 1094 | $result = $bac->fetch(0, $this->socid, 1, 'ban'); |
1095 | 1095 | if ($result <= 0 || empty($bac->id)) { |
1096 | 1096 | $this->error = $langs->trans("ThirdpartyHasNoDefaultBanAccount"); |
@@ -1104,12 +1104,12 @@ discard block |
||
1104 | 1104 | $sql .= " FROM ".$this->db->prefix()."prelevement_demande"; |
1105 | 1105 | $sql .= " WHERE rowid = ".((int) $did); |
1106 | 1106 | if ($type != 'bank-transfer' && $type != 'credit-transfer') { |
1107 | - $sql .= " AND fk_facture = ".((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1107 | + $sql .= " AND fk_facture = ".((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1108 | 1108 | } |
1109 | 1109 | if ($type != 'direct-debit') { |
1110 | - $sql .= " AND fk_facture_fourn = ".((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1110 | + $sql .= " AND fk_facture_fourn = ".((int) $this->id); // Add a protection to not pay another invoice than current one |
|
1111 | 1111 | } |
1112 | - $sql .= " AND traite = 0"; // To not process payment request that were already converted into a direct debit or credit transfer order (Note: fk_prelevement_bons is also empty when traite = 0) |
|
1112 | + $sql .= " AND traite = 0"; // To not process payment request that were already converted into a direct debit or credit transfer order (Note: fk_prelevement_bons is also empty when traite = 0) |
|
1113 | 1113 | |
1114 | 1114 | dol_syslog(get_class($this)."::makeStripeSepaRequest load requests to process", LOG_DEBUG); |
1115 | 1115 | $resql = $this->db->query($sql); |
@@ -1125,7 +1125,7 @@ discard block |
||
1125 | 1125 | |
1126 | 1126 | if (is_numeric($amount) && $amount != 0) { |
1127 | 1127 | require_once DOL_DOCUMENT_ROOT.'/societe/class/companypaymentmode.class.php'; |
1128 | - $companypaymentmode = new CompanyPaymentMode($this->db); // table societe_rib |
|
1128 | + $companypaymentmode = new CompanyPaymentMode($this->db); // table societe_rib |
|
1129 | 1129 | $companypaymentmode->fetch($bac->id); |
1130 | 1130 | |
1131 | 1131 | $this->stripechargedone = 0; |
@@ -1135,11 +1135,11 @@ discard block |
||
1135 | 1135 | |
1136 | 1136 | $currency = $conf->currency; |
1137 | 1137 | |
1138 | - $errorforinvoice = 0; // We reset the $errorforinvoice at each invoice loop |
|
1138 | + $errorforinvoice = 0; // We reset the $errorforinvoice at each invoice loop |
|
1139 | 1139 | |
1140 | 1140 | $this->fetch_thirdparty(); |
1141 | 1141 | |
1142 | - dol_syslog("--- Process payment request amount=".$amount." thirdparty_id=" . $this->thirdparty->id . ", thirdparty_name=" . $this->thirdparty->name . " ban id=" . $bac->id, LOG_DEBUG); |
|
1142 | + dol_syslog("--- Process payment request amount=".$amount." thirdparty_id=".$this->thirdparty->id.", thirdparty_name=".$this->thirdparty->name." ban id=".$bac->id, LOG_DEBUG); |
|
1143 | 1143 | |
1144 | 1144 | //$alreadypayed = $this->getSommePaiement(); |
1145 | 1145 | //$amount_credit_notes_included = $this->getSumCreditNotesUsed(); |
@@ -1154,7 +1154,7 @@ discard block |
||
1154 | 1154 | $amountstripe = $amountstripe * 100; |
1155 | 1155 | } |
1156 | 1156 | |
1157 | - $fk_bank_account = getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); // Bank account used for SEPA direct debit or credit transfer. Must be the Stripe account in Dolibarr. |
|
1157 | + $fk_bank_account = getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); // Bank account used for SEPA direct debit or credit transfer. Must be the Stripe account in Dolibarr. |
|
1158 | 1158 | if (!($fk_bank_account > 0)) { |
1159 | 1159 | $error++; |
1160 | 1160 | $errorforinvoice++; |
@@ -1210,42 +1210,42 @@ discard block |
||
1210 | 1210 | } |
1211 | 1211 | |
1212 | 1212 | //var_dump($companypaymentmode); |
1213 | - dol_syslog("We will try to pay with companypaymentmodeid=" . $companypaymentmode->id . " stripe_card_ref=" . $companypaymentmode->stripe_card_ref . " mode=" . $companypaymentmode->status, LOG_DEBUG); |
|
1213 | + dol_syslog("We will try to pay with companypaymentmodeid=".$companypaymentmode->id." stripe_card_ref=".$companypaymentmode->stripe_card_ref." mode=".$companypaymentmode->status, LOG_DEBUG); |
|
1214 | 1214 | |
1215 | 1215 | $thirdparty = new Societe($this->db); |
1216 | 1216 | $resultthirdparty = $thirdparty->fetch($this->socid); |
1217 | 1217 | |
1218 | - include_once DOL_DOCUMENT_ROOT . '/stripe/class/stripe.class.php'; // This include the include of htdocs/stripe/config.php |
|
1218 | + include_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; // This include the include of htdocs/stripe/config.php |
|
1219 | 1219 | // So it inits or erases the $stripearrayofkeysbyenv |
1220 | 1220 | $stripe = new Stripe($this->db); |
1221 | 1221 | |
1222 | 1222 | if (empty($savstripearrayofkeysbyenv)) $savstripearrayofkeysbyenv = $stripearrayofkeysbyenv; |
1223 | - dol_syslog("makeStripeSepaRequest Current Stripe environment is " . $stripearrayofkeysbyenv[$servicestatus]['publishable_key']); |
|
1223 | + dol_syslog("makeStripeSepaRequest Current Stripe environment is ".$stripearrayofkeysbyenv[$servicestatus]['publishable_key']); |
|
1224 | 1224 | dol_syslog("makeStripeSepaRequest Current Saved Stripe environment is ".$savstripearrayofkeysbyenv[$servicestatus]['publishable_key']); |
1225 | 1225 | |
1226 | 1226 | $foundalternativestripeaccount = ''; |
1227 | 1227 | |
1228 | 1228 | // Force stripe to another value (by default this value is empty) |
1229 | - if (! empty($forcestripe)) { |
|
1229 | + if (!empty($forcestripe)) { |
|
1230 | 1230 | dol_syslog("makeStripeSepaRequest A dedicated stripe account was forced, so we switch to it."); |
1231 | 1231 | |
1232 | 1232 | $tmparray = explode('@', $forcestripe); |
1233 | - if (! empty($tmparray[1])) { |
|
1233 | + if (!empty($tmparray[1])) { |
|
1234 | 1234 | $tmparray2 = explode(':', $tmparray[1]); |
1235 | - if (! empty($tmparray2[1])) { |
|
1235 | + if (!empty($tmparray2[1])) { |
|
1236 | 1236 | $stripearrayofkeysbyenv[$servicestatus]["publishable_key"] = $tmparray2[0]; |
1237 | 1237 | $stripearrayofkeysbyenv[$servicestatus]["secret_key"] = $tmparray2[1]; |
1238 | 1238 | |
1239 | 1239 | $stripearrayofkeys = $stripearrayofkeysbyenv[$servicestatus]; |
1240 | 1240 | \Stripe\Stripe::setApiKey($stripearrayofkeys['secret_key']); |
1241 | 1241 | |
1242 | - $foundalternativestripeaccount = $tmparray[0]; // Store the customer id |
|
1242 | + $foundalternativestripeaccount = $tmparray[0]; // Store the customer id |
|
1243 | 1243 | |
1244 | 1244 | dol_syslog("makeStripeSepaRequest We use now customer=".$foundalternativestripeaccount." publishable_key=".$stripearrayofkeys['publishable_key'], LOG_DEBUG); |
1245 | 1245 | } |
1246 | 1246 | } |
1247 | 1247 | |
1248 | - if (! $foundalternativestripeaccount) { |
|
1248 | + if (!$foundalternativestripeaccount) { |
|
1249 | 1249 | $stripearrayofkeysbyenv = $savstripearrayofkeysbyenv; |
1250 | 1250 | |
1251 | 1251 | $stripearrayofkeys = $savstripearrayofkeysbyenv[$servicestatus]; |
@@ -1260,7 +1260,7 @@ discard block |
||
1260 | 1260 | dol_syslog("makeStripeSepaRequest No dedicated Stripe Account requested, so we use global one, so ".$stripearrayofkeys['publishable_key'], LOG_DEBUG); |
1261 | 1261 | } |
1262 | 1262 | |
1263 | - $stripeacc = $stripe->getStripeAccount($service, $this->socid); // Get Stripe OAuth connect account if it exists (no network access here) |
|
1263 | + $stripeacc = $stripe->getStripeAccount($service, $this->socid); // Get Stripe OAuth connect account if it exists (no network access here) |
|
1264 | 1264 | |
1265 | 1265 | if ($foundalternativestripeaccount) { |
1266 | 1266 | if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage |
@@ -1270,7 +1270,7 @@ discard block |
||
1270 | 1270 | } |
1271 | 1271 | } else { |
1272 | 1272 | $customer = $stripe->customerStripe($thirdparty, $stripeacc, $servicestatus, 0); |
1273 | - if (empty($customer) && ! empty($stripe->error)) { |
|
1273 | + if (empty($customer) && !empty($stripe->error)) { |
|
1274 | 1274 | $this->errors[] = $stripe->error; |
1275 | 1275 | } |
1276 | 1276 | /*if (!empty($customer) && empty($customer->sources)) { |
@@ -1297,15 +1297,15 @@ discard block |
||
1297 | 1297 | } |
1298 | 1298 | |
1299 | 1299 | if ($stripecard) { // Can be src_... (for sepa) or pm_... (new card mode). Note that card_... (old card mode) should not happen here. |
1300 | - $FULLTAG = 'DID='.$did.'-INV=' . $this->id . '-CUS=' . $thirdparty->id; |
|
1301 | - $description = 'Stripe payment from makeStripeSepaRequest: ' . $FULLTAG . ' did='.$did.' ref=' . $this->ref; |
|
1300 | + $FULLTAG = 'DID='.$did.'-INV='.$this->id.'-CUS='.$thirdparty->id; |
|
1301 | + $description = 'Stripe payment from makeStripeSepaRequest: '.$FULLTAG.' did='.$did.' ref='.$this->ref; |
|
1302 | 1302 | |
1303 | 1303 | $stripefailurecode = ''; |
1304 | 1304 | $stripefailuremessage = ''; |
1305 | 1305 | $stripefailuredeclinecode = ''; |
1306 | 1306 | |
1307 | 1307 | // Using new SCA method |
1308 | - dol_syslog("* Create payment on SEPA " . $stripecard->id . ", amounttopay=" . $amounttopay . ", amountstripe=" . $amountstripe . ", FULLTAG=" . $FULLTAG, LOG_DEBUG); |
|
1308 | + dol_syslog("* Create payment on SEPA ".$stripecard->id.", amounttopay=".$amounttopay.", amountstripe=".$amountstripe.", FULLTAG=".$FULLTAG, LOG_DEBUG); |
|
1309 | 1309 | |
1310 | 1310 | // Create payment intent and charge payment (confirmnow = true) |
1311 | 1311 | $paymentintent = $stripe->getPaymentIntent($amounttopay, $currency, $FULLTAG, $description, $this, $customer->id, $stripeacc, $servicestatus, 0, 'automatic', true, $stripecard->id, 1, 1, $did); |
@@ -1326,7 +1326,7 @@ discard block |
||
1326 | 1326 | $charge->failure_message = $stripe->error; |
1327 | 1327 | $charge->failure_declinecode = $stripe->declinecode; |
1328 | 1328 | $stripefailurecode = $stripe->code; |
1329 | - $stripefailuremessage = 'Action required. Contact the support at ';// . $conf->global->SELLYOURSAAS_MAIN_EMAIL; |
|
1329 | + $stripefailuremessage = 'Action required. Contact the support at '; // . $conf->global->SELLYOURSAAS_MAIN_EMAIL; |
|
1330 | 1330 | $stripefailuredeclinecode = $stripe->declinecode; |
1331 | 1331 | } else { |
1332 | 1332 | dol_syslog(var_export($paymentintent, true), LOG_DEBUG); |
@@ -1347,7 +1347,7 @@ discard block |
||
1347 | 1347 | |
1348 | 1348 | // Return $charge = array('id'=>'ch_XXXX', 'status'=>'succeeded|pending|failed', 'failure_code'=>, 'failure_message'=>...) |
1349 | 1349 | if (empty($charge) || $charge->status == 'failed') { |
1350 | - dol_syslog('Failed to charge payment mode ' . $stripecard->id . ' stripefailurecode=' . $stripefailurecode . ' stripefailuremessage=' . $stripefailuremessage . ' stripefailuredeclinecode=' . $stripefailuredeclinecode, LOG_WARNING); |
|
1350 | + dol_syslog('Failed to charge payment mode '.$stripecard->id.' stripefailurecode='.$stripefailurecode.' stripefailuremessage='.$stripefailuremessage.' stripefailuredeclinecode='.$stripefailuredeclinecode, LOG_WARNING); |
|
1351 | 1351 | |
1352 | 1352 | // Save a stripe payment was in error |
1353 | 1353 | $this->stripechargeerror++; |
@@ -1360,8 +1360,8 @@ discard block |
||
1360 | 1360 | $errauthenticationmessage = $langs->trans("ErrSCAAuthentication"); |
1361 | 1361 | $errmsg = $errauthenticationmessage; |
1362 | 1362 | } elseif (in_array($stripefailuredeclinecode, ['insufficient_funds', 'generic_decline'])) { |
1363 | - $errmsg .= ': ' . $charge->failure_code; |
|
1364 | - $errmsg .= ($charge->failure_message ? ' - ' : '') . ' ' . $charge->failure_message; |
|
1363 | + $errmsg .= ': '.$charge->failure_code; |
|
1364 | + $errmsg .= ($charge->failure_message ? ' - ' : '').' '.$charge->failure_message; |
|
1365 | 1365 | if (empty($stripefailurecode)) { |
1366 | 1366 | $stripefailurecode = $charge->failure_code; |
1367 | 1367 | } |
@@ -1369,8 +1369,8 @@ discard block |
||
1369 | 1369 | $stripefailuremessage = $charge->failure_message; |
1370 | 1370 | } |
1371 | 1371 | } else { |
1372 | - $errmsg .= ': failure_code=' . $charge->failure_code; |
|
1373 | - $errmsg .= ($charge->failure_message ? ' - ' : '') . ' failure_message=' . $charge->failure_message; |
|
1372 | + $errmsg .= ': failure_code='.$charge->failure_code; |
|
1373 | + $errmsg .= ($charge->failure_message ? ' - ' : '').' failure_message='.$charge->failure_message; |
|
1374 | 1374 | if (empty($stripefailurecode)) { |
1375 | 1375 | $stripefailurecode = $charge->failure_code; |
1376 | 1376 | } |
@@ -1379,24 +1379,24 @@ discard block |
||
1379 | 1379 | } |
1380 | 1380 | } |
1381 | 1381 | } else { |
1382 | - $errmsg .= ': ' . $stripefailurecode . ' - ' . $stripefailuremessage; |
|
1383 | - $errmsg .= ($stripefailuredeclinecode ? ' - ' . $stripefailuredeclinecode : ''); |
|
1382 | + $errmsg .= ': '.$stripefailurecode.' - '.$stripefailuremessage; |
|
1383 | + $errmsg .= ($stripefailuredeclinecode ? ' - '.$stripefailuredeclinecode : ''); |
|
1384 | 1384 | } |
1385 | 1385 | |
1386 | - $description = 'Stripe payment ERROR from makeStripeSepaRequest: ' . $FULLTAG; |
|
1387 | - $postactionmessages[] = $errmsg . ' (' . $stripearrayofkeys['publishable_key'] . ')'; |
|
1386 | + $description = 'Stripe payment ERROR from makeStripeSepaRequest: '.$FULLTAG; |
|
1387 | + $postactionmessages[] = $errmsg.' ('.$stripearrayofkeys['publishable_key'].')'; |
|
1388 | 1388 | $this->errors[] = $errmsg; |
1389 | 1389 | } else { |
1390 | 1390 | dol_syslog('Successfuly request '.$type.' '.$stripecard->id); |
1391 | 1391 | |
1392 | - $postactionmessages[] = 'Success to request '.$type.' (' . $charge->id . ' with ' . $stripearrayofkeys['publishable_key'] . ')'; |
|
1392 | + $postactionmessages[] = 'Success to request '.$type.' ('.$charge->id.' with '.$stripearrayofkeys['publishable_key'].')'; |
|
1393 | 1393 | |
1394 | 1394 | // Save a stripe payment was done in realy life so later we will be able to force a commit on recorded payments |
1395 | 1395 | // even if in batch mode (method doTakePaymentStripe), we will always make all action in one transaction with a forced commit. |
1396 | 1396 | $this->stripechargedone++; |
1397 | 1397 | |
1398 | 1398 | // Default description used for label of event. Will be overwrite by another value later. |
1399 | - $description = 'Stripe payment request OK (' . $charge->id . ') from makeStripeSepaRequest: ' . $FULLTAG; |
|
1399 | + $description = 'Stripe payment request OK ('.$charge->id.') from makeStripeSepaRequest: '.$FULLTAG; |
|
1400 | 1400 | } |
1401 | 1401 | |
1402 | 1402 | $object = $this; |
@@ -1405,8 +1405,8 @@ discard block |
||
1405 | 1405 | if (empty($charge) || $charge->status == 'failed') { |
1406 | 1406 | $actioncode = 'PAYMENT_STRIPE_KO'; |
1407 | 1407 | $extraparams = $stripefailurecode; |
1408 | - $extraparams .= (($extraparams && $stripefailuremessage) ? ' - ' : '') . $stripefailuremessage; |
|
1409 | - $extraparams .= (($extraparams && $stripefailuredeclinecode) ? ' - ' : '') . $stripefailuredeclinecode; |
|
1408 | + $extraparams .= (($extraparams && $stripefailuremessage) ? ' - ' : '').$stripefailuremessage; |
|
1409 | + $extraparams .= (($extraparams && $stripefailuredeclinecode) ? ' - ' : '').$stripefailuredeclinecode; |
|
1410 | 1410 | } else { |
1411 | 1411 | $actioncode = 'PAYMENT_STRIPE_OK'; |
1412 | 1412 | $extraparams = ''; |
@@ -1414,13 +1414,13 @@ discard block |
||
1414 | 1414 | } else { |
1415 | 1415 | $error++; |
1416 | 1416 | $errorforinvoice++; |
1417 | - dol_syslog("No ban payment method found for this stripe customer " . $customer->id, LOG_WARNING); |
|
1418 | - $this->errors[] = 'Failed to get direct debit payment method for stripe customer = ' . $customer->id; |
|
1417 | + dol_syslog("No ban payment method found for this stripe customer ".$customer->id, LOG_WARNING); |
|
1418 | + $this->errors[] = 'Failed to get direct debit payment method for stripe customer = '.$customer->id; |
|
1419 | 1419 | |
1420 | 1420 | $description = 'Failed to find or use the payment mode - no ban defined for the thirdparty account'; |
1421 | 1421 | $stripefailurecode = 'BADPAYMENTMODE'; |
1422 | 1422 | $stripefailuremessage = 'Failed to find or use the payment mode - no ban defined for the thirdparty account'; |
1423 | - $postactionmessages[] = $description . ' (' . $stripearrayofkeys['publishable_key'] . ')'; |
|
1423 | + $postactionmessages[] = $description.' ('.$stripearrayofkeys['publishable_key'].')'; |
|
1424 | 1424 | |
1425 | 1425 | $object = $this; |
1426 | 1426 | |
@@ -1440,11 +1440,11 @@ discard block |
||
1440 | 1440 | } |
1441 | 1441 | } else { // Else of the if ($resultthirdparty > 0 && ! empty($customer)) { |
1442 | 1442 | if ($resultthirdparty <= 0) { |
1443 | - dol_syslog('SellYourSaasUtils Failed to load customer for thirdparty_id = ' . $thirdparty->id, LOG_WARNING); |
|
1444 | - $this->errors[] = 'Failed to load Stripe account for thirdparty_id = ' . $thirdparty->id; |
|
1443 | + dol_syslog('SellYourSaasUtils Failed to load customer for thirdparty_id = '.$thirdparty->id, LOG_WARNING); |
|
1444 | + $this->errors[] = 'Failed to load Stripe account for thirdparty_id = '.$thirdparty->id; |
|
1445 | 1445 | } else { // $customer stripe not found |
1446 | - dol_syslog('SellYourSaasUtils Failed to get Stripe customer id for thirdparty_id = ' . $thirdparty->id . " in mode " . $servicestatus . " in Stripe env " . $stripearrayofkeysbyenv[$servicestatus]['publishable_key'], LOG_WARNING); |
|
1447 | - $this->errors[] = 'Failed to get Stripe account id for thirdparty_id = ' . $thirdparty->id . " in mode " . $servicestatus . " in Stripe env " . $stripearrayofkeysbyenv[$servicestatus]['publishable_key']; |
|
1446 | + dol_syslog('SellYourSaasUtils Failed to get Stripe customer id for thirdparty_id = '.$thirdparty->id." in mode ".$servicestatus." in Stripe env ".$stripearrayofkeysbyenv[$servicestatus]['publishable_key'], LOG_WARNING); |
|
1447 | + $this->errors[] = 'Failed to get Stripe account id for thirdparty_id = '.$thirdparty->id." in mode ".$servicestatus." in Stripe env ".$stripearrayofkeysbyenv[$servicestatus]['publishable_key']; |
|
1448 | 1448 | } |
1449 | 1449 | $error++; |
1450 | 1450 | $errorforinvoice++; |
@@ -1461,24 +1461,24 @@ discard block |
||
1461 | 1461 | } |
1462 | 1462 | |
1463 | 1463 | if ($description) { |
1464 | - dol_syslog("* Record event for credit transfer or direct debit request result - " . $description); |
|
1464 | + dol_syslog("* Record event for credit transfer or direct debit request result - ".$description); |
|
1465 | 1465 | require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
1466 | 1466 | |
1467 | 1467 | // Insert record of payment (success or error) |
1468 | 1468 | $actioncomm = new ActionComm($this->db); |
1469 | 1469 | |
1470 | - $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) |
|
1471 | - $actioncomm->code = 'AC_' . $actioncode; |
|
1470 | + $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) |
|
1471 | + $actioncomm->code = 'AC_'.$actioncode; |
|
1472 | 1472 | $actioncomm->label = $description; |
1473 | 1473 | $actioncomm->note_private = join(",\n", $postactionmessages); |
1474 | 1474 | $actioncomm->fk_project = $this->fk_project; |
1475 | 1475 | $actioncomm->datep = $now; |
1476 | 1476 | $actioncomm->datef = $now; |
1477 | - $actioncomm->percentage = -1; // Not applicable |
|
1477 | + $actioncomm->percentage = -1; // Not applicable |
|
1478 | 1478 | $actioncomm->socid = $thirdparty->id; |
1479 | 1479 | $actioncomm->contactid = 0; |
1480 | - $actioncomm->authorid = $user->id; // User saving action |
|
1481 | - $actioncomm->userownerid = $user->id; // Owner of action |
|
1480 | + $actioncomm->authorid = $user->id; // User saving action |
|
1481 | + $actioncomm->userownerid = $user->id; // Owner of action |
|
1482 | 1482 | // Fields when action is a real email (content is already into note) |
1483 | 1483 | /*$actioncomm->email_msgid = $object->email_msgid; |
1484 | 1484 | $actioncomm->email_from = $object->email_from; |
@@ -1500,14 +1500,14 @@ discard block |
||
1500 | 1500 | } catch (Exception $e) { |
1501 | 1501 | $error++; |
1502 | 1502 | $errorforinvoice++; |
1503 | - dol_syslog('Error ' . $e->getMessage(), LOG_ERR); |
|
1504 | - $this->errors[] = 'Error ' . $e->getMessage(); |
|
1503 | + dol_syslog('Error '.$e->getMessage(), LOG_ERR); |
|
1504 | + $this->errors[] = 'Error '.$e->getMessage(); |
|
1505 | 1505 | } |
1506 | 1506 | } else { // If remain to pay is null |
1507 | 1507 | $error++; |
1508 | 1508 | $errorforinvoice++; |
1509 | - dol_syslog("Remain to pay is null for the invoice " . $this->id . " " . $this->ref . ". Why is the invoice not classified 'Paid' ?", LOG_WARNING); |
|
1510 | - $this->errors[] = "Remain to pay is null for the invoice " . $this->id . " " . $this->ref . ". Why is the invoice not classified 'Paid' ?"; |
|
1509 | + dol_syslog("Remain to pay is null for the invoice ".$this->id." ".$this->ref.". Why is the invoice not classified 'Paid' ?", LOG_WARNING); |
|
1510 | + $this->errors[] = "Remain to pay is null for the invoice ".$this->id." ".$this->ref.". Why is the invoice not classified 'Paid' ?"; |
|
1511 | 1511 | } |
1512 | 1512 | } |
1513 | 1513 | |
@@ -1647,10 +1647,10 @@ discard block |
||
1647 | 1647 | $s .= pack('C1', 3).pack('C1', strlen($datestring)).$datestring; |
1648 | 1648 | $s .= pack('C1', 4).pack('C1', strlen($pricewithtaxstring)).$pricewithtaxstring; |
1649 | 1649 | $s .= pack('C1', 5).pack('C1', strlen($pricetaxstring)).$pricetaxstring; |
1650 | - $s .= ''; // Hash of xml invoice |
|
1651 | - $s .= ''; // ecda signature |
|
1652 | - $s .= ''; // ecda public key |
|
1653 | - $s .= ''; // ecda signature of public key stamp |
|
1650 | + $s .= ''; // Hash of xml invoice |
|
1651 | + $s .= ''; // ecda signature |
|
1652 | + $s .= ''; // ecda public key |
|
1653 | + $s .= ''; // ecda signature of public key stamp |
|
1654 | 1654 | |
1655 | 1655 | $s = base64_encode($s); |
1656 | 1656 | |
@@ -1718,8 +1718,8 @@ discard block |
||
1718 | 1718 | $s .= "S\n"; |
1719 | 1719 | $s .= dol_trunc($bankaccount->proprio, 70, 'right', 'UTF-8', 1)."\n"; |
1720 | 1720 | $addresslinearray = explode("\n", $bankaccount->owner_address); |
1721 | - $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
1722 | - $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
1721 | + $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
1722 | + $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
1723 | 1723 | /*$s .= dol_trunc($mysoc->zip, 16, 'right', 'UTF-8', 1)."\n"; |
1724 | 1724 | $s .= dol_trunc($mysoc->town, 35, 'right', 'UTF-8', 1)."\n"; |
1725 | 1725 | $s .= dol_trunc($mysoc->country_code, 2, 'right', 'UTF-8', 1)."\n";*/ |
@@ -1727,8 +1727,8 @@ discard block |
||
1727 | 1727 | $s .= "S\n"; |
1728 | 1728 | $s .= dol_trunc($mysoc->name, 70, 'right', 'UTF-8', 1)."\n"; |
1729 | 1729 | $addresslinearray = explode("\n", $mysoc->address); |
1730 | - $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
1731 | - $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
1730 | + $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
1731 | + $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
1732 | 1732 | $s .= dol_trunc($mysoc->zip, 16, 'right', 'UTF-8', 1)."\n"; |
1733 | 1733 | $s .= dol_trunc($mysoc->town, 35, 'right', 'UTF-8', 1)."\n"; |
1734 | 1734 | $s .= dol_trunc($mysoc->country_code, 2, 'right', 'UTF-8', 1)."\n"; |
@@ -1748,14 +1748,14 @@ discard block |
||
1748 | 1748 | $s .= "S\n"; |
1749 | 1749 | $s .= dol_trunc($this->thirdparty->name, 70, 'right', 'UTF-8', 1)."\n"; |
1750 | 1750 | $addresslinearray = explode("\n", $this->thirdparty->address); |
1751 | - $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
1752 | - $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
1751 | + $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1)."\n"; // address line 1 |
|
1752 | + $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1)."\n"; // address line 2 |
|
1753 | 1753 | $s .= dol_trunc($this->thirdparty->zip, 16, 'right', 'UTF-8', 1)."\n"; |
1754 | 1754 | $s .= dol_trunc($this->thirdparty->town, 35, 'right', 'UTF-8', 1)."\n"; |
1755 | 1755 | $s .= dol_trunc($this->thirdparty->country_code, 2, 'right', 'UTF-8', 1)."\n"; |
1756 | 1756 | // ID of payment |
1757 | - $s .= "NON\n"; // NON or QRR |
|
1758 | - $s .= "\n"; // QR Code reference if previous field is QRR |
|
1757 | + $s .= "NON\n"; // NON or QRR |
|
1758 | + $s .= "\n"; // QR Code reference if previous field is QRR |
|
1759 | 1759 | // Free text |
1760 | 1760 | if ($complementaryinfo) { |
1761 | 1761 | $s .= $complementaryinfo."\n"; |
@@ -27,33 +27,33 @@ discard block |
||
27 | 27 | |
28 | 28 | // Load Dolibarr environment |
29 | 29 | require '../main.inc.php'; |
30 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; |
|
31 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
32 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
33 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; |
|
34 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; |
|
35 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; |
|
36 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; |
|
37 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
38 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; |
|
30 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
|
31 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
32 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
33 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/position.class.php'; |
|
34 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; |
|
35 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_position.lib.php'; |
|
36 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_job.lib.php'; |
|
37 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
38 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
|
39 | 39 | |
40 | 40 | |
41 | 41 | // Load translation files required by the page |
42 | 42 | $langs->loadLangs(array("hrm", "other", 'products')); |
43 | 43 | |
44 | -$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
44 | +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
45 | 45 | $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
46 | 46 | $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? |
47 | -$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
48 | -$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
49 | -$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
47 | +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
48 | +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
49 | +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
50 | 50 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'jobpositionlist'; // To manage different context of search |
51 | 51 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
52 | 52 | $backtopage = GETPOST('backtopage', 'alpha'); |
53 | 53 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
54 | 54 | |
55 | -$id = GETPOST('id', 'int'); |
|
56 | -$ref = GETPOST('ref', 'alpha'); |
|
55 | +$id = GETPOST('id', 'int'); |
|
56 | +$ref = GETPOST('ref', 'alpha'); |
|
57 | 57 | $fk_job = (GETPOSTISSET('fk_job') ? GETPOST('fk_job', 'int') : $id); |
58 | 58 | $fk_user = GETPOST('fk_user', 'int'); |
59 | 59 | //$start_date = date('Y-m-d', GETPOST('date_startyear', 'int').'-'.GETPOST('date_startmonth', 'int').'-'.GETPOST('date_startday', 'int')); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
65 | 65 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
66 | 66 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
67 | -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
67 | +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
68 | 68 | if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { |
69 | 69 | // If $page is not defined, or '' or -1 or if we click on clear filters |
70 | 70 | $page = 0; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $object = new Job($db); |
79 | 79 | $objectposition = new Position($db); |
80 | 80 | $extrafields = new ExtraFields($db); |
81 | -$diroutputmassaction = $conf->hrm->dir_output . '/temp/massgeneration/' . $user->id; |
|
81 | +$diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id; |
|
82 | 82 | $hookmanager->initHooks(array('jobpositioncard', 'globalcard')); // Note that conf->hooks_modules contains array |
83 | 83 | |
84 | 84 | |
@@ -90,8 +90,8 @@ discard block |
||
90 | 90 | |
91 | 91 | // Default sort order (if not yet defined by previous GETPOST) |
92 | 92 | if (!$sortfield) { |
93 | - reset($objectposition->fields); // Reset is required to avoid key() to return null. |
|
94 | - $sortfield = "t." . key($objectposition->fields); // Set here default search field. By default 1st field in definition. |
|
93 | + reset($objectposition->fields); // Reset is required to avoid key() to return null. |
|
94 | + $sortfield = "t.".key($objectposition->fields); // Set here default search field. By default 1st field in definition. |
|
95 | 95 | } |
96 | 96 | if (!$sortorder) { |
97 | 97 | $sortorder = "ASC"; |
@@ -101,12 +101,12 @@ discard block |
||
101 | 101 | $search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); |
102 | 102 | $search = array(); |
103 | 103 | foreach ($objectposition->fields as $key => $val) { |
104 | - if (GETPOST('search_' . $key, 'alpha') !== '') { |
|
105 | - $search[$key] = GETPOST('search_' . $key, 'alpha'); |
|
104 | + if (GETPOST('search_'.$key, 'alpha') !== '') { |
|
105 | + $search[$key] = GETPOST('search_'.$key, 'alpha'); |
|
106 | 106 | } |
107 | 107 | if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
108 | - $search[$key . '_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_' . $key . '_dtstartmonth', 'int'), GETPOST('search_' . $key . '_dtstartday', 'int'), GETPOST('search_' . $key . '_dtstartyear', 'int')); |
|
109 | - $search[$key . '_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_' . $key . '_dtendmonth', 'int'), GETPOST('search_' . $key . '_dtendday', 'int'), GETPOST('search_' . $key . '_dtendyear', 'int')); |
|
108 | + $search[$key.'_dtstart'] = dol_mktime(0, 0, 0, GETPOST('search_'.$key.'_dtstartmonth', 'int'), GETPOST('search_'.$key.'_dtstartday', 'int'), GETPOST('search_'.$key.'_dtstartyear', 'int')); |
|
109 | + $search[$key.'_dtend'] = dol_mktime(23, 59, 59, GETPOST('search_'.$key.'_dtendmonth', 'int'), GETPOST('search_'.$key.'_dtendday', 'int'), GETPOST('search_'.$key.'_dtendyear', 'int')); |
|
110 | 110 | } |
111 | 111 | } |
112 | 112 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $fieldstosearchall = array(); |
115 | 115 | foreach ($objectposition->fields as $key => $val) { |
116 | 116 | if (!empty($val['searchall'])) { |
117 | - $fieldstosearchall['t.' . $key] = $val['label']; |
|
117 | + $fieldstosearchall['t.'.$key] = $val['label']; |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | // If $val['visible']==0, then we never show the field |
125 | 125 | if (!empty($val['visible'])) { |
126 | 126 | $visible = (int) dol_eval($val['visible'], 1, 1, '1'); |
127 | - $arrayfields['t.' . $key] = array( |
|
127 | + $arrayfields['t.'.$key] = array( |
|
128 | 128 | 'label' => $val['label'], |
129 | 129 | 'checked' => (($visible < 0) ? 0 : 1), |
130 | 130 | 'enabled' => ($visible != 3 && dol_eval($val['enabled'], 1, 1, '1')), |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | } |
135 | 135 | } |
136 | 136 | // Extra fields |
137 | -include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
137 | +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
138 | 138 | |
139 | 139 | $objectposition->fields = dol_sort_array($objectposition->fields, 'position'); |
140 | 140 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
@@ -143,13 +143,13 @@ discard block |
||
143 | 143 | |
144 | 144 | |
145 | 145 | // Load object |
146 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. |
|
146 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. |
|
147 | 147 | |
148 | 148 | // Permissions |
149 | 149 | $permissiontoread = $user->rights->hrm->all->read; |
150 | 150 | $permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
151 | 151 | $permissiontodelete = $user->rights->hrm->all->delete; |
152 | -$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/position'; |
|
152 | +$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1].'/position'; |
|
153 | 153 | |
154 | 154 | // Security check (enable the most restrictive one) |
155 | 155 | //if ($user->socid > 0) accessforbidden(); |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $backurlforlist = dol_buildpath('/hrm/position_list.php', 1); |
180 | 180 | $idBacktoPage = GETPOST('fk_job', 'aZ09'); |
181 | 181 | if ($idBacktoPage > 0) { |
182 | - $backtopage = dol_buildpath('/hrm/position.php', 1) . '?id=' . $idBacktoPage; |
|
182 | + $backtopage = dol_buildpath('/hrm/position.php', 1).'?id='.$idBacktoPage; |
|
183 | 183 | } |
184 | 184 | if (empty($backtopage) || ($cancel && empty($id))) { |
185 | 185 | if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { |
@@ -187,9 +187,9 @@ discard block |
||
187 | 187 | $backtopage = $backurlforlist; |
188 | 188 | } else { |
189 | 189 | if ($fk_job > 0) { |
190 | - $backtopage = dol_buildpath('/hrm/position.php', 1) . '?fk_job=' . ($fk_job > 0 ? $fk_job : '__ID__'); |
|
190 | + $backtopage = dol_buildpath('/hrm/position.php', 1).'?fk_job='.($fk_job > 0 ? $fk_job : '__ID__'); |
|
191 | 191 | } else { |
192 | - $backtopage = dol_buildpath('/hrm/position_card.php', 1) . '?id=__ID__'; |
|
192 | + $backtopage = dol_buildpath('/hrm/position_card.php', 1).'?id=__ID__'; |
|
193 | 193 | } |
194 | 194 | } |
195 | 195 | } |
@@ -202,15 +202,15 @@ discard block |
||
202 | 202 | $object = new Position($db); |
203 | 203 | |
204 | 204 | // Selection of new fields |
205 | - include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
205 | + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
206 | 206 | |
207 | 207 | // Purge search criteria |
208 | 208 | if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers |
209 | 209 | foreach ($object->fields as $key => $val) { |
210 | 210 | $search[$key] = ''; |
211 | 211 | if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
212 | - $search[$key . '_dtstart'] = ''; |
|
213 | - $search[$key . '_dtend'] = ''; |
|
212 | + $search[$key.'_dtstart'] = ''; |
|
213 | + $search[$key.'_dtend'] = ''; |
|
214 | 214 | } |
215 | 215 | } |
216 | 216 | $toselect = array(); |
@@ -225,9 +225,9 @@ discard block |
||
225 | 225 | $objectclass = 'Position'; |
226 | 226 | $objectlabel = 'Position'; |
227 | 227 | $uploaddir = $conf->hrm->dir_output; |
228 | - include DOL_DOCUMENT_ROOT . '/core/actions_massactions.inc.php'; |
|
228 | + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; |
|
229 | 229 | |
230 | - include DOL_DOCUMENT_ROOT . '/core/actions_addupdatedelete.inc.php'; |
|
230 | + include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; |
|
231 | 231 | |
232 | 232 | $object = $job; |
233 | 233 | } |
@@ -249,29 +249,29 @@ discard block |
||
249 | 249 | $object = new Position($db); |
250 | 250 | // Fetch optionals attributes and labels |
251 | 251 | $extrafields->fetch_name_optionals_label($object->table_element); |
252 | - print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Position")), '', 'object_' . $object->picto); |
|
252 | + print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Position")), '', 'object_'.$object->picto); |
|
253 | 253 | |
254 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
255 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
254 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
255 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
256 | 256 | print '<input type="hidden" name="action" value="add">'; |
257 | 257 | if ($backtopage) { |
258 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
258 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
259 | 259 | } |
260 | 260 | if ($backtopageforcancel) { |
261 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
261 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | print dol_get_fiche_head(array(), ''); |
265 | 265 | |
266 | - print '<table class="border centpercent tableforfieldcreate">' . "\n"; |
|
266 | + print '<table class="border centpercent tableforfieldcreate">'."\n"; |
|
267 | 267 | |
268 | 268 | // Common attributes |
269 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php'; |
|
269 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; |
|
270 | 270 | |
271 | 271 | // Other attributes |
272 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php'; |
|
272 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
|
273 | 273 | |
274 | - print '</table>' . "\n"; |
|
274 | + print '</table>'."\n"; |
|
275 | 275 | |
276 | 276 | print dol_get_fiche_end(); |
277 | 277 | |
@@ -283,10 +283,10 @@ discard block |
||
283 | 283 | } |
284 | 284 | if ($job->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { |
285 | 285 | if ($backtopage) { |
286 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
286 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
287 | 287 | } |
288 | 288 | if ($backtopageforcancel) { |
289 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
289 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | // Part to show record |
@@ -299,10 +299,10 @@ discard block |
||
299 | 299 | |
300 | 300 | // Object card |
301 | 301 | // ------------------------------------------------------------ |
302 | - $linkback = '<a href="' . dol_buildpath('/hrm/position_list.php', 1) . '?restore_lastsearch_values=1' . (!empty($fk_job) ? '&fk_job=' . $fk_job : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
302 | + $linkback = '<a href="'.dol_buildpath('/hrm/position_list.php', 1).'?restore_lastsearch_values=1'.(!empty($fk_job) ? '&fk_job='.$fk_job : '').'">'.$langs->trans("BackToList").'</a>'; |
|
303 | 303 | |
304 | 304 | $morehtmlref = '<div class="refid">'; |
305 | - $morehtmlref.= $object->label; |
|
305 | + $morehtmlref .= $object->label; |
|
306 | 306 | $morehtmlref .= '</div>'; |
307 | 307 | |
308 | 308 | dol_banner_tab($object, 'fk_job', $linkback, 1, 'rowid', 'rowid', $morehtmlref); |
@@ -311,17 +311,17 @@ discard block |
||
311 | 311 | print '<div class="fichecenter">'; |
312 | 312 | print '<div class="fichehalfleft">'; |
313 | 313 | print '<div class="underbanner clearboth"></div>'; |
314 | - print '<table class="border centpercent tableforfield">' . "\n"; |
|
314 | + print '<table class="border centpercent tableforfield">'."\n"; |
|
315 | 315 | |
316 | 316 | // Common attributes |
317 | 317 | //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just before this field |
318 | 318 | //unset($object->fields['fk_project']); // Hide field already shown in banner |
319 | 319 | //unset($object->fields['fk_soc']); // Hide field already shown in banner |
320 | - $object->fields['label']['visible']=0; // Already in banner |
|
321 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; |
|
320 | + $object->fields['label']['visible'] = 0; // Already in banner |
|
321 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; |
|
322 | 322 | |
323 | 323 | // Other attributes. Fields from hook formObjectOptions and Extrafields. |
324 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
324 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
325 | 325 | |
326 | 326 | print '</table>'; |
327 | 327 | print '</div>'; |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | // Add fields from extrafields |
345 | 345 | if (!empty($extrafields->attributes[$object->table_element]['label'])) { |
346 | 346 | foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { |
347 | - $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef." . $key . " as options_" . $key . ', ' : ''); |
|
347 | + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key.', ' : ''); |
|
348 | 348 | } |
349 | 349 | } |
350 | 350 | // Add fields from hooks |
@@ -352,20 +352,20 @@ discard block |
||
352 | 352 | $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook |
353 | 353 | $sql .= $hookmanager->resPrint; |
354 | 354 | $sql = preg_replace('/,\s*$/', '', $sql); |
355 | - $sql .= " FROM " . MAIN_DB_PREFIX . $object->table_element . " as t"; |
|
355 | + $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; |
|
356 | 356 | if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
357 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . $object->table_element . "_extrafields as ef on (t.rowid = ef.fk_object)"; |
|
357 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; |
|
358 | 358 | } |
359 | 359 | // Add table from hooks |
360 | 360 | $parameters = array(); |
361 | 361 | $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook |
362 | 362 | $sql .= $hookmanager->resPrint; |
363 | 363 | if ($object->ismultientitymanaged == 1) { |
364 | - $sql .= " WHERE t.entity IN (" . getEntity($object->element) . ")"; |
|
364 | + $sql .= " WHERE t.entity IN (".getEntity($object->element).")"; |
|
365 | 365 | } else { |
366 | 366 | $sql .= " WHERE 1 = 1"; |
367 | 367 | } |
368 | - $sql .= " AND t.fk_job = " . ((int) $fk_job) . " "; |
|
368 | + $sql .= " AND t.fk_job = ".((int) $fk_job)." "; |
|
369 | 369 | |
370 | 370 | foreach ($search as $key => $val) { |
371 | 371 | if (array_key_exists($key, $object->fields)) { |
@@ -387,10 +387,10 @@ discard block |
||
387 | 387 | $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key); |
388 | 388 | if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { |
389 | 389 | if (preg_match('/_dtstart$/', $key)) { |
390 | - $sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'"; |
|
390 | + $sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'"; |
|
391 | 391 | } |
392 | 392 | if (preg_match('/_dtend$/', $key)) { |
393 | - $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; |
|
393 | + $sql .= " AND t.".$columnName." <= '".$db->idate($search[$key])."'"; |
|
394 | 394 | } |
395 | 395 | } |
396 | 396 | } |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | } |
402 | 402 | //$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear); |
403 | 403 | // Add where from extra fields |
404 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_sql.tpl.php'; |
|
404 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; |
|
405 | 405 | // Add where from hooks |
406 | 406 | $parameters = array(); |
407 | 407 | $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook |
@@ -440,15 +440,15 @@ discard block |
||
440 | 440 | if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) { |
441 | 441 | $obj = $db->fetch_object($resql); |
442 | 442 | $id = $obj->rowid; |
443 | - header("Location: " . dol_buildpath('/hrm/position.php', 1) . '?id=' . $id); |
|
443 | + header("Location: ".dol_buildpath('/hrm/position.php', 1).'?id='.$id); |
|
444 | 444 | exit; |
445 | 445 | } |
446 | 446 | |
447 | 447 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
448 | 448 | |
449 | - $param = 'fk_job=' . $fk_job; |
|
449 | + $param = 'fk_job='.$fk_job; |
|
450 | 450 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
451 | - $param .= '&contextpage=' . urlencode($contextpage); |
|
451 | + $param .= '&contextpage='.urlencode($contextpage); |
|
452 | 452 | } |
453 | 453 | if ($limit > 0 && $limit != $conf->liste_limit) { |
454 | 454 | $param .= '&limit='.((int) $limit); |
@@ -456,17 +456,17 @@ discard block |
||
456 | 456 | foreach ($search as $key => $val) { |
457 | 457 | if (is_array($search[$key]) && count($search[$key])) { |
458 | 458 | foreach ($search[$key] as $skey) { |
459 | - $param .= '&search_' . $key . '[]=' . urlencode($skey); |
|
459 | + $param .= '&search_'.$key.'[]='.urlencode($skey); |
|
460 | 460 | } |
461 | 461 | } else { |
462 | - $param .= '&search_' . $key . '=' . urlencode($search[$key]); |
|
462 | + $param .= '&search_'.$key.'='.urlencode($search[$key]); |
|
463 | 463 | } |
464 | 464 | } |
465 | 465 | if ($optioncss != '') { |
466 | - $param .= '&optioncss=' . urlencode($optioncss); |
|
466 | + $param .= '&optioncss='.urlencode($optioncss); |
|
467 | 467 | } |
468 | 468 | // Add $param from extra fields |
469 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_param.tpl.php'; |
|
469 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
|
470 | 470 | // Add $param from hooks |
471 | 471 | $parameters = array(); |
472 | 472 | $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook |
@@ -480,43 +480,43 @@ discard block |
||
480 | 480 | //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), |
481 | 481 | ); |
482 | 482 | if ($permissiontodelete) { |
483 | - $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"') . $langs->trans("Delete"); |
|
483 | + $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete"); |
|
484 | 484 | } |
485 | 485 | if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) { |
486 | 486 | $arrayofmassactions = array(); |
487 | 487 | } |
488 | 488 | $massactionbutton = $form->selectMassAction('', $arrayofmassactions); |
489 | 489 | |
490 | - print '<form method="POST" id="searchFormList" action="' . $_SERVER["PHP_SELF"] . '?fk_job=' . $fk_job . '">' . "\n"; |
|
490 | + print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'?fk_job='.$fk_job.'">'."\n"; |
|
491 | 491 | if ($optioncss != '') { |
492 | - print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; |
|
492 | + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
|
493 | 493 | } |
494 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
494 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
495 | 495 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
496 | 496 | print '<input type="hidden" name="action" value="list">'; |
497 | - print '<input type="hidden" name="massaction" value="' . $massaction . '">'; |
|
498 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
499 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
500 | - print '<input type="hidden" name="page" value="' . $page . '">'; |
|
501 | - print '<input type="hidden" name="contextpage" value="' . $contextpage . '">'; |
|
497 | + print '<input type="hidden" name="massaction" value="'.$massaction.'">'; |
|
498 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
499 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
500 | + print '<input type="hidden" name="page" value="'.$page.'">'; |
|
501 | + print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; |
|
502 | 502 | |
503 | 503 | $newcardbutton = ''; |
504 | 504 | $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/hrm/position.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']).'&fk_job='.((int) $fk_job), '', $permissiontoadd); |
505 | 505 | |
506 | - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_' . $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); |
|
506 | + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); |
|
507 | 507 | |
508 | 508 | // Add code for pre mass action (confirmation or email presend form) |
509 | 509 | $topicmail = "SendPositionRef"; |
510 | 510 | $modelmail = "position"; |
511 | 511 | $objecttmp = new Position($db); |
512 | - $trackid = 'xxxx' . $object->id; |
|
513 | - include DOL_DOCUMENT_ROOT . '/core/tpl/massactions_pre.tpl.php'; |
|
512 | + $trackid = 'xxxx'.$object->id; |
|
513 | + include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; |
|
514 | 514 | |
515 | 515 | if ($search_all) { |
516 | 516 | foreach ($fieldstosearchall as $key => $val) { |
517 | 517 | $fieldstosearchall[$key] = $langs->trans($val); |
518 | 518 | } |
519 | - print '<div class="divsearchfieldfilter">' . $langs->trans("FilterOnInto", $search_all) . join(', ', $fieldstosearchall) . '</div>'; |
|
519 | + print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'; |
|
520 | 520 | } |
521 | 521 | |
522 | 522 | $moreforfilter = ''; |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
544 | 544 | |
545 | 545 | print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table |
546 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
546 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
547 | 547 | |
548 | 548 | // Fields title search |
549 | 549 | // -------------------------------------------------------------------- |
@@ -551,35 +551,35 @@ discard block |
||
551 | 551 | foreach ($object->fields as $key => $val) { |
552 | 552 | $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); |
553 | 553 | if ($key == 'status') { |
554 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
554 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
555 | 555 | } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { |
556 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
556 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
557 | 557 | } elseif (in_array($val['type'], array('timestamp'))) { |
558 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap'; |
|
558 | + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; |
|
559 | 559 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
560 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
|
560 | + $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
|
561 | 561 | } |
562 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
563 | - print '<td class="liste_titre' . ($cssforfield ? ' ' . $cssforfield : '') . '">'; |
|
562 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
563 | + print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">'; |
|
564 | 564 | if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { |
565 | - print $form->selectarray('search_' . $key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); |
|
565 | + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); |
|
566 | 566 | } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { |
567 | 567 | print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', 'maxwidth125', 1); |
568 | 568 | } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
569 | - print '<input type="text" class="flat maxwidth75" name="search_' . $key . '" value="' . dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '') . '">'; |
|
569 | + print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(isset($search[$key]) ? $search[$key] : '').'">'; |
|
570 | 570 | } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { |
571 | 571 | print '<div class="nowrap">'; |
572 | - print $form->selectDate($search[$key . '_dtstart'] ? $search[$key . '_dtstart'] : '', "search_" . $key . "_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); |
|
572 | + print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); |
|
573 | 573 | print '</div>'; |
574 | 574 | print '<div class="nowrap">'; |
575 | - print $form->selectDate($search[$key . '_dtend'] ? $search[$key . '_dtend'] : '', "search_" . $key . "_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); |
|
575 | + print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); |
|
576 | 576 | print '</div>'; |
577 | 577 | } |
578 | 578 | print '</td>'; |
579 | 579 | } |
580 | 580 | } |
581 | 581 | // Extra fields |
582 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_input.tpl.php'; |
|
582 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; |
|
583 | 583 | |
584 | 584 | // Fields from hook |
585 | 585 | $parameters = array('arrayfields' => $arrayfields); |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | $searchpicto = $form->showFilterButtons(); |
591 | 591 | print $searchpicto; |
592 | 592 | print '</td>'; |
593 | - print '</tr>' . "\n"; |
|
593 | + print '</tr>'."\n"; |
|
594 | 594 | |
595 | 595 | |
596 | 596 | // Fields title label |
@@ -599,27 +599,27 @@ discard block |
||
599 | 599 | foreach ($object->fields as $key => $val) { |
600 | 600 | $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); |
601 | 601 | if ($key == 'status') { |
602 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
602 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
603 | 603 | } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { |
604 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
604 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
605 | 605 | } elseif (in_array($val['type'], array('timestamp'))) { |
606 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap'; |
|
606 | + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; |
|
607 | 607 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
608 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
|
608 | + $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
|
609 | 609 | } |
610 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
611 | - print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : '')) . "\n"; |
|
610 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
611 | + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; |
|
612 | 612 | } |
613 | 613 | } |
614 | 614 | // Extra fields |
615 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_title.tpl.php'; |
|
615 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; |
|
616 | 616 | // Hook fields |
617 | 617 | $parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder); |
618 | 618 | $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook |
619 | 619 | print $hookmanager->resPrint; |
620 | 620 | // Action column |
621 | - print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ') . "\n"; |
|
622 | - print '</tr>' . "\n"; |
|
621 | + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; |
|
622 | + print '</tr>'."\n"; |
|
623 | 623 | |
624 | 624 | // Detect if we need a fetch on each output line |
625 | 625 | $needToFetchEachLine = 0; |
@@ -651,24 +651,24 @@ discard block |
||
651 | 651 | foreach ($object->fields as $key => $val) { |
652 | 652 | $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); |
653 | 653 | if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { |
654 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
654 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
655 | 655 | } elseif ($key == 'status') { |
656 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'center'; |
|
656 | + $cssforfield .= ($cssforfield ? ' ' : '').'center'; |
|
657 | 657 | } |
658 | 658 | |
659 | 659 | if (in_array($val['type'], array('timestamp'))) { |
660 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap'; |
|
660 | + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; |
|
661 | 661 | } elseif ($key == 'ref') { |
662 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'nowrap'; |
|
662 | + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; |
|
663 | 663 | } |
664 | 664 | |
665 | 665 | if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) { |
666 | - $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
|
666 | + $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
|
667 | 667 | } |
668 | 668 | //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; |
669 | 669 | |
670 | - if (!empty($arrayfields['t.' . $key]['checked'])) { |
|
671 | - print '<td' . ($cssforfield ? ' class="' . $cssforfield . '"' : '') . '>'; |
|
670 | + if (!empty($arrayfields['t.'.$key]['checked'])) { |
|
671 | + print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '').'>'; |
|
672 | 672 | if ($key == 'status') { |
673 | 673 | print $object->getLibStatut(5); |
674 | 674 | } elseif ($key == 'rowid') { |
@@ -682,20 +682,20 @@ discard block |
||
682 | 682 | } |
683 | 683 | if (!empty($val['isameasure']) && $val['isameasure'] == 1) { |
684 | 684 | if (!$i) { |
685 | - $totalarray['pos'][$totalarray['nbfield']] = 't.' . $key; |
|
685 | + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; |
|
686 | 686 | } |
687 | 687 | if (!isset($totalarray['val'])) { |
688 | 688 | $totalarray['val'] = array(); |
689 | 689 | } |
690 | - if (!isset($totalarray['val']['t.' . $key])) { |
|
691 | - $totalarray['val']['t.' . $key] = 0; |
|
690 | + if (!isset($totalarray['val']['t.'.$key])) { |
|
691 | + $totalarray['val']['t.'.$key] = 0; |
|
692 | 692 | } |
693 | - $totalarray['val']['t.' . $key] += $object->$key; |
|
693 | + $totalarray['val']['t.'.$key] += $object->$key; |
|
694 | 694 | } |
695 | 695 | } |
696 | 696 | } |
697 | 697 | // Extra fields |
698 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_print_fields.tpl.php'; |
|
698 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; |
|
699 | 699 | // Fields from hook |
700 | 700 | $parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $obj, 'i' => $i, 'totalarray' => &$totalarray); |
701 | 701 | $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook |
@@ -707,20 +707,20 @@ discard block |
||
707 | 707 | if (in_array($object->id, $arrayofselected)) { |
708 | 708 | $selected = 1; |
709 | 709 | } |
710 | - print '<input id="cb' . $object->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $object->id . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
710 | + print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
711 | 711 | } |
712 | 712 | print '</td>'; |
713 | 713 | if (!$i) { |
714 | 714 | $totalarray['nbfield']++; |
715 | 715 | } |
716 | 716 | |
717 | - print '</tr>' . "\n"; |
|
717 | + print '</tr>'."\n"; |
|
718 | 718 | |
719 | 719 | $i++; |
720 | 720 | } |
721 | 721 | |
722 | 722 | // Show total line |
723 | - include DOL_DOCUMENT_ROOT . '/core/tpl/list_print_total.tpl.php'; |
|
723 | + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; |
|
724 | 724 | |
725 | 725 | // If no record found |
726 | 726 | if ($num == 0) { |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | $colspan++; |
731 | 731 | } |
732 | 732 | } |
733 | - print '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs->trans("NoRecordFound") . '</span></td></tr>'; |
|
733 | + print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>'; |
|
734 | 734 | } |
735 | 735 | |
736 | 736 | |
@@ -740,10 +740,10 @@ discard block |
||
740 | 740 | $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook |
741 | 741 | print $hookmanager->resPrint; |
742 | 742 | |
743 | - print '</table>' . "\n"; |
|
744 | - print '</div>' . "\n"; |
|
743 | + print '</table>'."\n"; |
|
744 | + print '</div>'."\n"; |
|
745 | 745 | |
746 | - print '</form>' . "\n"; |
|
746 | + print '</form>'."\n"; |
|
747 | 747 | |
748 | 748 | if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) { |
749 | 749 | $hidegeneratedfilelistifempty = 1; |
@@ -751,11 +751,11 @@ discard block |
||
751 | 751 | $hidegeneratedfilelistifempty = 0; |
752 | 752 | } |
753 | 753 | |
754 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
754 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
755 | 755 | $formfile = new FormFile($db); |
756 | 756 | |
757 | 757 | // Show list of available documents |
758 | - $urlsource = $_SERVER['PHP_SELF'] . '?sortfield=' . $sortfield . '&sortorder=' . $sortorder; |
|
758 | + $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; |
|
759 | 759 | $urlsource .= str_replace('&', '&', $param); |
760 | 760 | |
761 | 761 | $filedir = $diroutputmassaction; |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | if (getDolGlobalString('BOOKCAL_PUBLIC_INTERFACE_TOPIC')) { |
156 | 156 | print '<div class="clearboth"></div><strong>'.(getDolGlobalString('BOOKCAL_PUBLIC_INTERFACE_TOPIC') ? getDolGlobalString('BOOKCAL_PUBLIC_INTERFACE_TOPIC') : $langs->trans("BookCalSystem")).'</strong>'; |
157 | 157 | } |
158 | - if (empty($urllogo) && ! getDolGlobalString('BOOKCAL_PUBLIC_INTERFACE_TOPIC')) { |
|
158 | + if (empty($urllogo) && !getDolGlobalString('BOOKCAL_PUBLIC_INTERFACE_TOPIC')) { |
|
159 | 159 | print $mysoc->name; |
160 | 160 | } |
161 | 161 | print '</div>'; |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | $sql .= ") VALUES ("; |
258 | 258 | $sql .= (int) $actioncomm->id; |
259 | 259 | $sql .= ", 'socpeople'"; |
260 | - $sql .= ", ". (int) $contact->id; |
|
260 | + $sql .= ", ".(int) $contact->id; |
|
261 | 261 | $sql .= ", 0, 0, 0)"; |
262 | 262 | $resql = $db->query($sql); |
263 | 263 | if (!$resql) { |
@@ -499,8 +499,8 @@ discard block |
||
499 | 499 | $hoursavailabilities_start = $availability->startHour; |
500 | 500 | $hoursavailabilities_end = $availability->endHour; |
501 | 501 | $hoursavailabilities_duration = $availability->duration; |
502 | - for ($i=$hoursavailabilities_start; $i < $hoursavailabilities_end; $i++) { |
|
503 | - for ($j=0; $j < 60 ; $j += $hoursavailabilities_duration) { |
|
502 | + for ($i = $hoursavailabilities_start; $i < $hoursavailabilities_end; $i++) { |
|
503 | + for ($j = 0; $j < 60; $j += $hoursavailabilities_duration) { |
|
504 | 504 | $timestring = ($i < 10 ? '0'.$i : $i).':'.($j < 10 ? '0'.$j : $j); |
505 | 505 | $timestringid = ($i < 10 ? '0'.$i : $i).''.($j < 10 ? '0'.$j : $j); |
506 | 506 | print '<span id="'.$timestringid.'" data-availability="'.$availability->id.'" class="btnformbooking"><input type="submit" class="button" name="timebooking" value="'.$timestring.'"><br></span>'; |
@@ -299,10 +299,10 @@ discard block |
||
299 | 299 | if (!empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { |
300 | 300 | if ($tmpsource && $REF) { |
301 | 301 | // Use the source in the hash to avoid duplicates if the references are identical |
302 | - $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . $tmpsource.$REF, $SECUREKEY, '2'); |
|
302 | + $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').$tmpsource.$REF, $SECUREKEY, '2'); |
|
303 | 303 | // Do a second test for retro-compatibility (token may have been hashed with membersubscription in external module) |
304 | 304 | if ($tmpsource != $source) { |
305 | - $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . $source.$REF, $SECUREKEY, '2'); |
|
305 | + $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').$source.$REF, $SECUREKEY, '2'); |
|
306 | 306 | } |
307 | 307 | } else { |
308 | 308 | $tokenisok = dol_verifyHash($conf->global->PAYMENT_SECURITY_TOKEN, $SECUREKEY, '2'); |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | $tokenisok = ($conf->global->PAYMENT_SECURITY_TOKEN == $SECUREKEY); |
312 | 312 | } |
313 | 313 | |
314 | - if (! $tokenisok) { |
|
314 | + if (!$tokenisok) { |
|
315 | 315 | if (empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) { |
316 | 316 | $valid = false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility |
317 | 317 | } else { |
@@ -340,9 +340,9 @@ discard block |
||
340 | 340 | $paramcreditor = 'ONLINE_PAYMENT_CREDITOR'; |
341 | 341 | $paramcreditorlong = 'ONLINE_PAYMENT_CREDITOR_'.$suffix; |
342 | 342 | if (!empty($conf->global->$paramcreditorlong)) { |
343 | - $creditor = $conf->global->$paramcreditorlong; // use label long of the seller to show |
|
343 | + $creditor = $conf->global->$paramcreditorlong; // use label long of the seller to show |
|
344 | 344 | } elseif (!empty($conf->global->$paramcreditor)) { |
345 | - $creditor = $conf->global->$paramcreditor; // use label short of the seller to show |
|
345 | + $creditor = $conf->global->$paramcreditor; // use label short of the seller to show |
|
346 | 346 | } |
347 | 347 | |
348 | 348 | $mesg = ''; |
@@ -791,8 +791,8 @@ discard block |
||
791 | 791 | $remoteip = getUserRemoteIP(); |
792 | 792 | |
793 | 793 | $_SESSION["onlinetoken"] = $stripeToken; |
794 | - $_SESSION["FinalPaymentAmt"] = $amount; // amount really paid (coming from Stripe). Will be used for check in paymentok.php. |
|
795 | - $_SESSION["currencyCodeType"] = $currency; // currency really used for payment (coming from Stripe). Will be used for check in paymentok.php. |
|
794 | + $_SESSION["FinalPaymentAmt"] = $amount; // amount really paid (coming from Stripe). Will be used for check in paymentok.php. |
|
795 | + $_SESSION["currencyCodeType"] = $currency; // currency really used for payment (coming from Stripe). Will be used for check in paymentok.php. |
|
796 | 796 | $_SESSION["paymentType"] = ''; |
797 | 797 | $_SESSION['ipaddress'] = ($remoteip ? $remoteip : 'unknown'); // Payer ip |
798 | 798 | $_SESSION['payerID'] = is_object($customer) ? $customer->id : ''; |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | |
839 | 839 | $head = ''; |
840 | 840 | if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) { |
841 | - $head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'?lang='.(!empty($getpostlang) ? $getpostlang: $langs->defaultlang).'">'."\n"; |
|
841 | + $head = '<link rel="stylesheet" type="text/css" href="'.getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'?lang='.(!empty($getpostlang) ? $getpostlang : $langs->defaultlang).'">'."\n"; |
|
842 | 842 | } |
843 | 843 | |
844 | 844 | $conf->dol_hide_topmenu = 1; |
@@ -962,7 +962,7 @@ discard block |
||
962 | 962 | if (preg_match('/^\((.*)\)$/', $conf->global->PAYMENT_NEWFORM_TEXT, $reg)) { |
963 | 963 | $text .= $langs->trans($reg[1])."<br>\n"; |
964 | 964 | } else { |
965 | - $text .= getDolGlobalString('PAYMENT_NEWFORM_TEXT') . "<br>\n"; |
|
965 | + $text .= getDolGlobalString('PAYMENT_NEWFORM_TEXT')."<br>\n"; |
|
966 | 966 | } |
967 | 967 | $text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n"; |
968 | 968 | } |
@@ -1013,7 +1013,7 @@ discard block |
||
1013 | 1013 | // Currency |
1014 | 1014 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
1015 | 1015 | } else { |
1016 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1016 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1017 | 1017 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
1018 | 1018 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
1019 | 1019 | } |
@@ -1113,7 +1113,7 @@ discard block |
||
1113 | 1113 | // Currency |
1114 | 1114 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
1115 | 1115 | } else { |
1116 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1116 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1117 | 1117 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
1118 | 1118 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
1119 | 1119 | } |
@@ -1243,12 +1243,12 @@ discard block |
||
1243 | 1243 | print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">'; |
1244 | 1244 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
1245 | 1245 | } else { |
1246 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1246 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1247 | 1247 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
1248 | 1248 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
1249 | 1249 | } |
1250 | 1250 | } else { |
1251 | - print '<b class="amount">'.price($object->total_ttc, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1251 | + print '<b class="amount">'.price($object->total_ttc, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1252 | 1252 | } |
1253 | 1253 | print '<input type="hidden" name="currency" value="'.$currency.'">'; |
1254 | 1254 | print '</td></tr>'."\n"; |
@@ -1442,7 +1442,7 @@ discard block |
||
1442 | 1442 | // Currency |
1443 | 1443 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
1444 | 1444 | } else { |
1445 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1445 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1446 | 1446 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
1447 | 1447 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
1448 | 1448 | } |
@@ -1493,7 +1493,7 @@ discard block |
||
1493 | 1493 | if ($source == 'member' || $source == 'membersubscription') { |
1494 | 1494 | $newsource = 'member'; |
1495 | 1495 | |
1496 | - $tag=""; |
|
1496 | + $tag = ""; |
|
1497 | 1497 | $found = true; |
1498 | 1498 | $langs->load("members"); |
1499 | 1499 | |
@@ -1620,7 +1620,7 @@ discard block |
||
1620 | 1620 | // list member type |
1621 | 1621 | if (!$action) { |
1622 | 1622 | // Set amount for the subscription |
1623 | - $amount = (!empty($amountbytype[$member->typeid])) ? $amountbytype[$member->typeid] : $member->last_subscription_amount; |
|
1623 | + $amount = (!empty($amountbytype[$member->typeid])) ? $amountbytype[$member->typeid] : $member->last_subscription_amount; |
|
1624 | 1624 | |
1625 | 1625 | print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("NewSubscription"); |
1626 | 1626 | print '</td><td class="CTableRow2">'; |
@@ -1643,14 +1643,14 @@ discard block |
||
1643 | 1643 | print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount"); |
1644 | 1644 | // This place no longer allows amount edition |
1645 | 1645 | if (!empty($conf->global->MEMBER_EXT_URL_SUBSCRIPTION_INFO)) { |
1646 | - print ' - <a href="' . getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
1646 | + print ' - <a href="'.getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
1647 | 1647 | } |
1648 | 1648 | print '</td><td class="CTableRow2">'; |
1649 | 1649 | if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $amount) { |
1650 | 1650 | $amount = max(0, $conf->global->MEMBER_MIN_AMOUNT, $amount); |
1651 | 1651 | } |
1652 | 1652 | $caneditamount = $adht->caneditamount; |
1653 | - $minimumamount = empty($conf->global->MEMBER_MIN_AMOUNT)? $adht->amount : max($conf->global->MEMBER_MIN_AMOUNT, $adht->amount, $amount); |
|
1653 | + $minimumamount = empty($conf->global->MEMBER_MIN_AMOUNT) ? $adht->amount : max($conf->global->MEMBER_MIN_AMOUNT, $adht->amount, $amount); |
|
1654 | 1654 | |
1655 | 1655 | if ($caneditamount && $action != 'dopayment') { |
1656 | 1656 | if (GETPOSTISSET('newamount')) { |
@@ -1659,9 +1659,9 @@ discard block |
||
1659 | 1659 | print '<input type="text" class="width75" name="newamount" value="'.price($amount, 1, $langs, 1, -1, -1).'">'; |
1660 | 1660 | } |
1661 | 1661 | } else { |
1662 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1662 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1663 | 1663 | if ($minimumamount > $amount) { |
1664 | - print ' <span class="opacitymedium small">'. $langs->trans("AmountIsLowerToMinimumNotice", price($minimumamount, 1, $langs, 1, -1, -1, $currency)).'</span>'; |
|
1664 | + print ' <span class="opacitymedium small">'.$langs->trans("AmountIsLowerToMinimumNotice", price($minimumamount, 1, $langs, 1, -1, -1, $currency)).'</span>'; |
|
1665 | 1665 | } |
1666 | 1666 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
1667 | 1667 | } |
@@ -1780,7 +1780,7 @@ discard block |
||
1780 | 1780 | print ' ('.$langs->trans("ToComplete"); |
1781 | 1781 | } |
1782 | 1782 | if (!empty($conf->global->DONATION_EXT_URL_SUBSCRIPTION_INFO)) { |
1783 | - print ' - <a href="' . getDolGlobalString('DONATION_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
1783 | + print ' - <a href="'.getDolGlobalString('DONATION_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
1784 | 1784 | } |
1785 | 1785 | if (empty($conf->global->DONATION_NEWFORM_AMOUNT)) { |
1786 | 1786 | print ')'; |
@@ -1818,7 +1818,7 @@ discard block |
||
1818 | 1818 | $valtoshow = max($conf->global->DONATION_MIN_AMOUNT, $valtoshow); |
1819 | 1819 | $amount = $valtoshow; |
1820 | 1820 | } |
1821 | - print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1821 | + print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1822 | 1822 | print '<input type="hidden" name="amount" value="'.$valtoshow.'">'; |
1823 | 1823 | print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; |
1824 | 1824 | } |
@@ -1893,7 +1893,7 @@ discard block |
||
1893 | 1893 | print '</b>'; |
1894 | 1894 | print '</td></tr>'."\n"; |
1895 | 1895 | |
1896 | - if (! is_object($attendee->project)) { |
|
1896 | + if (!is_object($attendee->project)) { |
|
1897 | 1897 | $text = 'ErrorProjectNotFound'; |
1898 | 1898 | } else { |
1899 | 1899 | $text = $langs->trans("PaymentEvent").' - '.$attendee->project->title; |
@@ -1910,7 +1910,7 @@ discard block |
||
1910 | 1910 | print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount"); |
1911 | 1911 | print '</td><td class="CTableRow2">'; |
1912 | 1912 | $valtoshow = $amount; |
1913 | - print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1913 | + print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1914 | 1914 | print '<input type="hidden" name="amount" value="'.$valtoshow.'">'; |
1915 | 1915 | print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; |
1916 | 1916 | print '<input type="hidden" name="currency" value="'.$currency.'">'; |
@@ -1993,7 +1993,7 @@ discard block |
||
1993 | 1993 | print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount"); |
1994 | 1994 | print '</td><td class="CTableRow2">'; |
1995 | 1995 | $valtoshow = $amount; |
1996 | - print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1996 | + print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
1997 | 1997 | print '<input type="hidden" name="amount" value="'.$valtoshow.'">'; |
1998 | 1998 | print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; |
1999 | 1999 | print '<input type="hidden" name="currency" value="'.$currency.'">'; |
@@ -2230,7 +2230,7 @@ discard block |
||
2230 | 2230 | |
2231 | 2231 | //print '<br>'; |
2232 | 2232 | |
2233 | - print '<!-- Show Stripe form payment-form STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = ' . getDolGlobalString('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION').' STRIPE_USE_NEW_CHECKOUT = ' . getDolGlobalString('STRIPE_USE_NEW_CHECKOUT').' -->'."\n"; |
|
2233 | + print '<!-- Show Stripe form payment-form STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = '.getDolGlobalString('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION').' STRIPE_USE_NEW_CHECKOUT = '.getDolGlobalString('STRIPE_USE_NEW_CHECKOUT').' -->'."\n"; |
|
2234 | 2234 | print '<form action="'.$_SERVER['REQUEST_URI'].'" method="POST" id="payment-form">'."\n"; |
2235 | 2235 | |
2236 | 2236 | print '<input type="hidden" name="token" value="'.newToken().'">'."\n"; |