@@ -67,7 +67,7 @@ |
||
67 | 67 | $action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'); |
68 | 68 | $cancel = GETPOST('cancel', 'alpha'); |
69 | 69 | $backtopage = GETPOST('backtopage', 'alpha'); |
70 | -$confirm = GETPOST('confirm'); |
|
70 | +$confirm = GETPOST('confirm'); |
|
71 | 71 | $socid = GETPOST('socid', 'int') ?GETPOST('socid', 'int') : GETPOST('id', 'int'); |
72 | 72 | |
73 | 73 | if ($user->socid) { |
@@ -52,10 +52,10 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | // Sort & Order fields |
55 | -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; |
|
55 | +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; |
|
56 | 56 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
57 | 57 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
58 | -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
58 | +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
59 | 59 | $optioncss = GETPOST('optioncss', 'alpha'); |
60 | 60 | |
61 | 61 | if (empty($page) || $page == -1) { |
@@ -39,21 +39,21 @@ |
||
39 | 39 | |
40 | 40 | |
41 | 41 | // Get parameters |
42 | -$action = GETPOST('action', 'aZ09'); |
|
43 | -$confirm = GETPOST('confirm'); |
|
44 | -$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); |
|
45 | -$ref = GETPOST('ref', 'alpha'); |
|
42 | +$action = GETPOST('action', 'aZ09'); |
|
43 | +$confirm = GETPOST('confirm'); |
|
44 | +$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); |
|
45 | +$ref = GETPOST('ref', 'alpha'); |
|
46 | 46 | |
47 | -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
47 | +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
48 | 48 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
49 | 49 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
50 | -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
50 | +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
51 | 51 | |
52 | 52 | if (empty($page) || $page == -1) { |
53 | 53 | $page = 0; |
54 | 54 | } // If $page is not defined, or '' or -1 |
55 | 55 | |
56 | -$offset = $limit * $page; |
|
56 | +$offset = $limit * $page; |
|
57 | 57 | $pageprev = $page - 1; |
58 | 58 | $pagenext = $page + 1; |
59 | 59 |
@@ -95,7 +95,7 @@ |
||
95 | 95 | */ |
96 | 96 | |
97 | 97 | $parameters = array('id'=>$id); |
98 | -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
98 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
99 | 99 | if ($reshook < 0) { |
100 | 100 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
101 | 101 | } |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | $month_current = dol_print_date(dol_now(), '%m'); |
99 | 99 | $year_start = $year; |
100 | 100 | } |
101 | -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
102 | -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
101 | +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
102 | +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
103 | 103 | // Quarter |
104 | 104 | if (empty($date_start) || empty($date_end)) { // We define date_start and date_end |
105 | 105 | $q = GETPOST("q", "int"); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | $headerparams = array_merge($commonparams, $headerparams); |
209 | 209 | $tableparams = array_merge($commonparams, $tableparams); |
210 | 210 | |
211 | -$paramslink=""; |
|
211 | +$paramslink = ""; |
|
212 | 212 | foreach ($allparams as $key => $value) { |
213 | 213 | $paramslink .= '&'.$key.'='.$value; |
214 | 214 | } |
@@ -231,8 +231,8 @@ discard block |
||
231 | 231 | $modecompta = "RECETTES-DEPENSES"; |
232 | 232 | } |
233 | 233 | |
234 | -$exportlink=""; |
|
235 | -$namelink=""; |
|
234 | +$exportlink = ""; |
|
235 | +$namelink = ""; |
|
236 | 236 | |
237 | 237 | // Show report header |
238 | 238 | if ($modecompta == "CREANCES-DETTES") { |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | $month_current = dol_print_date(dol_now(), '%m'); |
54 | 54 | $year_start = $year; |
55 | 55 | } |
56 | -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
57 | -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
56 | +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
57 | +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
58 | 58 | |
59 | 59 | // Quarter |
60 | 60 | $q = ''; |
@@ -158,8 +158,8 @@ discard block |
||
158 | 158 | |
159 | 159 | llxHeader('', $langs->trans("TurnoverReport"), '', '', 0, 0, '', '', $morequerystring); |
160 | 160 | |
161 | -$exportlink=""; |
|
162 | -$namelink=""; |
|
161 | +$exportlink = ""; |
|
162 | +$namelink = ""; |
|
163 | 163 | //print load_fiche_titre($langs->trans("VAT"),""); |
164 | 164 | |
165 | 165 | //$fsearch.='<br>'; |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | $month_current = dol_print_date(dol_now(), '%m'); |
80 | 80 | $year_start = $year; |
81 | 81 | } |
82 | -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
83 | -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
82 | +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
83 | +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
84 | 84 | // Quarter |
85 | 85 | if (empty($date_start) || empty($date_end)) { // We define date_start and date_end |
86 | 86 | $q = GETPOST("q") ?GETPOST("q") : 0; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $headerparams = array_merge($commonparams, $headerparams); |
166 | 166 | $tableparams = array_merge($commonparams, $tableparams); |
167 | 167 | |
168 | -$paramslink=""; |
|
168 | +$paramslink = ""; |
|
169 | 169 | foreach ($allparams as $key => $value) { |
170 | 170 | $paramslink .= '&'.$key.'='.$value; |
171 | 171 | } |
@@ -186,8 +186,8 @@ discard block |
||
186 | 186 | $modecompta = "RECETTES-DEPENSES"; |
187 | 187 | } |
188 | 188 | |
189 | -$exportlink=""; |
|
190 | -$namelink=""; |
|
189 | +$exportlink = ""; |
|
190 | +$namelink = ""; |
|
191 | 191 | |
192 | 192 | // Show report header |
193 | 193 | if ($modecompta == "CREANCES-DETTES") { |
@@ -48,8 +48,12 @@ discard block |
||
48 | 48 | $offset = $limit * $page; |
49 | 49 | $pageprev = $page - 1; |
50 | 50 | $pagenext = $page + 1; |
51 | -if (!$sortorder) $sortorder = "ASC"; |
|
52 | -if (!$sortfield) $sortfield = "name"; |
|
51 | +if (!$sortorder) { |
|
52 | + $sortorder = "ASC"; |
|
53 | +} |
|
54 | +if (!$sortfield) { |
|
55 | + $sortfield = "name"; |
|
56 | +} |
|
53 | 57 | //if (! $sortfield) $sortfield="position_name"; |
54 | 58 | |
55 | 59 | // Initialize technical objects |
@@ -64,7 +68,9 @@ discard block |
||
64 | 68 | include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
65 | 69 | |
66 | 70 | //if ($id > 0 || !empty($ref)) $upload_dir = $conf->stocktransfer->multidir_output[$object->entity?$object->entity:$conf->entity] . "/stocktransfer/" . dol_sanitizeFileName($object->id); |
67 | -if ($id > 0 || !empty($ref)) $upload_dir = $conf->stocktransfer->multidir_output[$object->entity ? $object->entity : $conf->entity]."/stocktransfer/".dol_sanitizeFileName($object->ref); |
|
71 | +if ($id > 0 || !empty($ref)) { |
|
72 | + $upload_dir = $conf->stocktransfer->multidir_output[$object->entity ? $object->entity : $conf->entity]."/stocktransfer/".dol_sanitizeFileName($object->ref); |
|
73 | +} |
|
68 | 74 | |
69 | 75 | // Security check - Protection if external user |
70 | 76 | //if ($user->socid > 0) accessforbidden(); |
@@ -898,8 +898,12 @@ discard block |
||
898 | 898 | print dol_get_fiche_head(null, '', '', 0); |
899 | 899 | |
900 | 900 | $rowspan = 4; |
901 | - if (isModEnabled('project')) $rowspan++; |
|
902 | - if ($object->fk_account > 0) $rowspan++; |
|
901 | + if (isModEnabled('project')) { |
|
902 | + $rowspan++; |
|
903 | + } |
|
904 | + if ($object->fk_account > 0) { |
|
905 | + $rowspan++; |
|
906 | + } |
|
903 | 907 | |
904 | 908 | print '<table class="border centpercent">'; |
905 | 909 | |
@@ -1576,9 +1580,12 @@ discard block |
||
1576 | 1580 | |
1577 | 1581 | $parameters = array(); |
1578 | 1582 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
1579 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
1580 | - if (empty($reshook)) |
|
1581 | - global $senderissupplier; |
|
1583 | + if ($reshook < 0) { |
|
1584 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
1585 | + } |
|
1586 | + if (empty($reshook)) { |
|
1587 | + global $senderissupplier; |
|
1588 | + } |
|
1582 | 1589 | $senderissupplier = 2; |
1583 | 1590 | $object->formAddObjectLine(0, $object->thirdparty, $mysoc); // No date selector for template invoice |
1584 | 1591 | } |
@@ -32,17 +32,17 @@ discard block |
||
32 | 32 | |
33 | 33 | // Load Dolibarr environment |
34 | 34 | require '../../main.inc.php'; |
35 | -require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture-rec.class.php'; |
|
36 | -require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.product.class.php'; |
|
37 | -require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
38 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; |
|
35 | +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture-rec.class.php'; |
|
36 | +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; |
|
37 | +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
38 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; |
|
39 | 39 | if (isModEnabled('project')) { |
40 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
40 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
41 | 41 | } |
42 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
43 | -require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
44 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/invoice.lib.php'; |
|
45 | -require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; |
|
42 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
43 | +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
44 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; |
|
45 | +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
|
46 | 46 | |
47 | 47 | // Load translation files required by the page |
48 | 48 | $langs->loadLangs(array('bills', 'companies', 'compta', 'admin', 'other', 'products', 'banks', 'suppliers')); |
@@ -81,10 +81,10 @@ discard block |
||
81 | 81 | $page = 0; |
82 | 82 | } // If $page is not defined, or '' or -1 |
83 | 83 | $offset = $limit * $page; |
84 | -if (! $sortorder) { |
|
84 | +if (!$sortorder) { |
|
85 | 85 | $sortorder = 'DESC'; |
86 | 86 | } |
87 | -if (! $sortfield) { |
|
87 | +if (!$sortfield) { |
|
88 | 88 | $sortfield = 'f.titre'; |
89 | 89 | } |
90 | 90 | $pageprev = $page - 1; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $object = new FactureFournisseurRec($db); |
94 | 94 | if (($id > 0 || $title) && $action != 'create' && $action != 'add') { |
95 | 95 | $ret = $object->fetch($id, $title); |
96 | - if (! $ret) { |
|
96 | + if (!$ret) { |
|
97 | 97 | setEventMessages($langs->trans("ErrorRecordNotFound"), null, 'errors'); |
98 | 98 | } |
99 | 99 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $action = 'list'; |
139 | 139 | $massaction = ''; |
140 | 140 | } |
141 | -if (! GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { |
|
141 | +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { |
|
142 | 142 | $massaction = ''; |
143 | 143 | } |
144 | 144 | |
@@ -154,18 +154,18 @@ discard block |
||
154 | 154 | } |
155 | 155 | |
156 | 156 | // Selection of new fields |
157 | - include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
157 | + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
158 | 158 | |
159 | 159 | // Set note |
160 | - include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be include, not include_once |
|
160 | + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once |
|
161 | 161 | |
162 | - include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be include, not include_once |
|
162 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once |
|
163 | 163 | |
164 | - include DOL_DOCUMENT_ROOT . '/core/actions_lineupdown.inc.php'; // Must be include, not include_once |
|
164 | + include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once |
|
165 | 165 | |
166 | 166 | // Create predefined invoice |
167 | 167 | if ($action == 'add') { |
168 | - if (! GETPOST('title', 'alphanohtml')) { |
|
168 | + if (!GETPOST('title', 'alphanohtml')) { |
|
169 | 169 | setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->trans("Title")), null, 'errors'); |
170 | 170 | $action = "create"; |
171 | 171 | $error++; |
@@ -188,10 +188,10 @@ discard block |
||
188 | 188 | } |
189 | 189 | } |
190 | 190 | |
191 | - if (! $error) { |
|
191 | + if (!$error) { |
|
192 | 192 | $object->titre = GETPOST('title', 'alphanohtml'); // deprecated |
193 | 193 | $object->title = GETPOST('title', 'alphanohtml'); |
194 | - $object->libelle = GETPOST('libelle', 'alpha'); // deprecated |
|
194 | + $object->libelle = GETPOST('libelle', 'alpha'); // deprecated |
|
195 | 195 | $object->label = GETPOST('libelle', 'alpha'); |
196 | 196 | $object->fk_project = GETPOST('projectid', 'int'); |
197 | 197 | $object->ref_supplier = GETPOST('ref_supplier', 'alphanohtml'); |
@@ -237,10 +237,10 @@ discard block |
||
237 | 237 | $action = "create"; |
238 | 238 | } |
239 | 239 | |
240 | - if (! $error) { |
|
240 | + if (!$error) { |
|
241 | 241 | $db->commit(); |
242 | 242 | |
243 | - header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $object->id); |
|
243 | + header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$object->id); |
|
244 | 244 | exit; |
245 | 245 | } else { |
246 | 246 | $db->rollback(); |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | if ($action == 'confirm_deleteinvoice' && $confirm == 'yes' && ($user->hasRight("fournisseur", "facture", "supprimer") || $user->hasRight("supplier_invoice", "supprimer"))) { |
258 | 258 | $object->delete($user); |
259 | 259 | |
260 | - header('Location: ' . DOL_URL_ROOT . '/fourn/facture/list-rec.php'); |
|
260 | + header('Location: '.DOL_URL_ROOT.'/fourn/facture/list-rec.php'); |
|
261 | 261 | exit; |
262 | 262 | } |
263 | 263 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | $result = $object->setValueFrom('titre', $title, '', null, 'text', '', $user); |
288 | 288 | |
289 | 289 | if ($result > 0) { |
290 | - $object->titre = $title; // deprecated |
|
290 | + $object->titre = $title; // deprecated |
|
291 | 291 | $object->title = $title; |
292 | 292 | $object->ref = $object->title; |
293 | 293 | } else { |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | $error++; |
335 | 335 | } |
336 | 336 | |
337 | - if (! $error) { |
|
337 | + if (!$error) { |
|
338 | 338 | $db->commit(); |
339 | 339 | } else { |
340 | 340 | $db->rollback(); |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | $error++; |
352 | 352 | } |
353 | 353 | |
354 | - if (! $error) { |
|
354 | + if (!$error) { |
|
355 | 355 | $db->commit(); |
356 | 356 | } else { |
357 | 357 | $db->rollback(); |
@@ -410,7 +410,7 @@ discard block |
||
410 | 410 | $error++; |
411 | 411 | } |
412 | 412 | |
413 | - if (! $error) { |
|
413 | + if (!$error) { |
|
414 | 414 | $result = $object->insertExtraFields('BILLREC_MODIFY'); |
415 | 415 | if ($result < 0) { |
416 | 416 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -439,8 +439,8 @@ discard block |
||
439 | 439 | $tva_tx = ''; |
440 | 440 | } |
441 | 441 | |
442 | - $qty = price2num(GETPOST('qty' . $predef, 'alpha'), 'MS', 2); |
|
443 | - $remise_percent = price2num(GETPOST('remise_percent' . $predef), '', 2); |
|
442 | + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2); |
|
443 | + $remise_percent = price2num(GETPOST('remise_percent'.$predef), '', 2); |
|
444 | 444 | |
445 | 445 | // Extrafields |
446 | 446 | $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | if (is_array($extralabelsline)) { |
450 | 450 | // Get extra fields |
451 | 451 | foreach ($extralabelsline as $key => $value) { |
452 | - unset($_POST["options_" . $key . $predef]); |
|
452 | + unset($_POST["options_".$key.$predef]); |
|
453 | 453 | } |
454 | 454 | } |
455 | 455 | |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Type')), null, 'errors'); |
462 | 462 | $error++; |
463 | 463 | } |
464 | - if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && (! ($price_ht >= 0) || $price_ht == '')) { // Unit price can be 0 but not '' |
|
464 | + if ($prod_entry_mode == 'free' && (empty($idprod) || $idprod < 0) && (!($price_ht >= 0) || $price_ht == '')) { // Unit price can be 0 but not '' |
|
465 | 465 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); |
466 | 466 | $error++; |
467 | 467 | } |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | } |
511 | 511 | } |
512 | 512 | |
513 | - if (! $error && ($qty >= 0) && (!empty($product_desc) || (!empty($idprod) && $idprod > 0))) { |
|
513 | + if (!$error && ($qty >= 0) && (!empty($product_desc) || (!empty($idprod) && $idprod > 0))) { |
|
514 | 514 | $ret = $object->fetch($id); |
515 | 515 | if ($ret < 0) { |
516 | 516 | dol_print_error($db, $object->error); |
@@ -519,8 +519,8 @@ discard block |
||
519 | 519 | $ret = $object->fetch_thirdparty(); |
520 | 520 | |
521 | 521 | // Clean parameters |
522 | - $date_start = dol_mktime(GETPOST('date_start' . $predef . 'hour'), GETPOST('date_start' . $predef . 'min'), GETPOST('date_start' . $predef . 'sec'), GETPOST('date_start' . $predef . 'month'), GETPOST('date_start' . $predef . 'day'), GETPOST('date_start' . $predef . 'year')); |
|
523 | - $date_end = dol_mktime(GETPOST('date_end' . $predef . 'hour'), GETPOST('date_end' . $predef . 'min'), GETPOST('date_end' . $predef . 'sec'), GETPOST('date_end' . $predef . 'month'), GETPOST('date_end' . $predef . 'day'), GETPOST('date_end' . $predef . 'year')); |
|
522 | + $date_start = dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year')); |
|
523 | + $date_end = dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year')); |
|
524 | 524 | $price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT'); |
525 | 525 | |
526 | 526 | // Define special_code for special lines |
@@ -617,23 +617,23 @@ discard block |
||
617 | 617 | $outputlangs->load('products'); |
618 | 618 | } |
619 | 619 | if (!empty($prod->customcode)) { |
620 | - $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode; |
|
620 | + $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; |
|
621 | 621 | } |
622 | 622 | if (!empty($prod->customcode) && !empty($prod->country_code)) { |
623 | 623 | $tmptxt .= ' - '; |
624 | 624 | } |
625 | 625 | if (!empty($prod->country_code)) { |
626 | - $tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $outputlangs, 0); |
|
626 | + $tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, 0, $db, $outputlangs, 0); |
|
627 | 627 | } |
628 | 628 | } else { |
629 | 629 | if (!empty($prod->customcode)) { |
630 | - $tmptxt .= $langs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode; |
|
630 | + $tmptxt .= $langs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode; |
|
631 | 631 | } |
632 | 632 | if (!empty($prod->customcode) && !empty($prod->country_code)) { |
633 | 633 | $tmptxt .= ' - '; |
634 | 634 | } |
635 | 635 | if (!empty($prod->country_code)) { |
636 | - $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, 0, $db, $langs, 0); |
|
636 | + $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, 0, $db, $langs, 0); |
|
637 | 637 | } |
638 | 638 | } |
639 | 639 | $tmptxt .= ')'; |
@@ -659,8 +659,8 @@ discard block |
||
659 | 659 | $date_end_fill = !empty(GETPOST('date_end_fill', 'int')) ? GETPOST('date_end_fill', 'int') : null; |
660 | 660 | |
661 | 661 | // Margin |
662 | - $fournprice = price2num(GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : ''); |
|
663 | - $buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we must keep this value |
|
662 | + $fournprice = price2num(GETPOST('fournprice'.$predef) ? GETPOST('fournprice'.$predef) : ''); |
|
663 | + $buyingprice = price2num(GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''); // If buying_price is '0', we must keep this value |
|
664 | 664 | |
665 | 665 | // Local Taxes |
666 | 666 | $localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty, $mysoc, $tva_npr); |
@@ -726,8 +726,8 @@ discard block |
||
726 | 726 | $action = ''; |
727 | 727 | } |
728 | 728 | } |
729 | - } elseif ($action == 'updateline' && $usercancreate && ! GETPOST('cancel', 'alpha')) { |
|
730 | - if (! $object->fetch($id) > 0) { |
|
729 | + } elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) { |
|
730 | + if (!$object->fetch($id) > 0) { |
|
731 | 731 | dol_print_error($db); |
732 | 732 | } |
733 | 733 | $object->fetch_thirdparty(); |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | $objectline->array_options = $array_options; |
763 | 763 | $result = $objectline->insertExtraFields(); |
764 | 764 | if ($result < 0) { |
765 | - setEventMessages($langs->trans('Error') . $result, null, 'errors'); |
|
765 | + setEventMessages($langs->trans('Error').$result, null, 'errors'); |
|
766 | 766 | } |
767 | 767 | } |
768 | 768 | |
@@ -772,13 +772,13 @@ discard block |
||
772 | 772 | if (is_array($extralabelsline)) { |
773 | 773 | // Get extra fields |
774 | 774 | foreach ($extralabelsline as $key => $value) { |
775 | - unset($_POST["options_" . $key]); |
|
775 | + unset($_POST["options_".$key]); |
|
776 | 776 | } |
777 | 777 | } |
778 | 778 | |
779 | 779 | // Define special_code for special lines |
780 | 780 | $special_code = GETPOST('special_code', 'int'); |
781 | - if (! GETPOST('qty', 'alpha')) { |
|
781 | + if (!GETPOST('qty', 'alpha')) { |
|
782 | 782 | $special_code = 3; |
783 | 783 | } |
784 | 784 | |
@@ -824,7 +824,7 @@ discard block |
||
824 | 824 | $date_end_fill = !empty(GETPOST('date_end_fill', 'int')) ? GETPOST('date_end_fill', 'int') : 'NULL'; |
825 | 825 | |
826 | 826 | // Update line |
827 | - if (! $error) { |
|
827 | + if (!$error) { |
|
828 | 828 | $result = $object->updateline(GETPOST('lineid', 'int'), GETPOST('productid', 'int'), $ref_fourn, $label, $description, $pu_ht, $qty, $remise_percent, $vat_rate, $localtax1_rate, $localtax1_rate, 'HT', $type, $date_start_fill, $date_end_fill, $info_bits, $special_code, -1); |
829 | 829 | if ($result >= 0) { |
830 | 830 | $object->fetch($object->id); // Reload lines |
@@ -898,10 +898,10 @@ discard block |
||
898 | 898 | if ($object->fetch($id) > 0) { |
899 | 899 | $result = $object->fetch_lines(); |
900 | 900 | |
901 | - print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; |
|
902 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
901 | + print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; |
|
902 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
903 | 903 | print '<input type="hidden" name="action" value="add">'; |
904 | - print '<input type="hidden" name="facid" value="' . $object->id . '">'; |
|
904 | + print '<input type="hidden" name="facid" value="'.$object->id.'">'; |
|
905 | 905 | |
906 | 906 | print dol_get_fiche_head(null, '', '', 0); |
907 | 907 | |
@@ -914,17 +914,17 @@ discard block |
||
914 | 914 | $object->fetch_thirdparty(); |
915 | 915 | |
916 | 916 | // Title |
917 | - print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans("Title") . '</td><td>'; |
|
918 | - print '<input class="flat quatrevingtpercent" type="text" name="title" value="' . dol_escape_htmltag(GETPOST("title", 'alphanohtml')) . '" autofocus>'; |
|
917 | + print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("Title").'</td><td>'; |
|
918 | + print '<input class="flat quatrevingtpercent" type="text" name="title" value="'.dol_escape_htmltag(GETPOST("title", 'alphanohtml')).'" autofocus>'; |
|
919 | 919 | print '</td></tr>'; |
920 | 920 | |
921 | 921 | // Ref supplier |
922 | - print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans("RefSupplier") . '</td><td>'; |
|
923 | - print '<input class="flat maxwidth500" type="text" name="ref_supplier" value="' . $object->ref_supplier . '">'; |
|
922 | + print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans("RefSupplier").'</td><td>'; |
|
923 | + print '<input class="flat maxwidth500" type="text" name="ref_supplier" value="'.$object->ref_supplier.'">'; |
|
924 | 924 | print '</td></tr>'; |
925 | 925 | |
926 | 926 | // Third party |
927 | - print '<tr><td class="titlefieldcreate">' . $langs->trans("Customer") . '</td><td>' . $object->thirdparty->getNomUrl(1, 'customer') . '</td>'; |
|
927 | + print '<tr><td class="titlefieldcreate">'.$langs->trans("Customer").'</td><td>'.$object->thirdparty->getNomUrl(1, 'customer').'</td>'; |
|
928 | 928 | print '</tr>'; |
929 | 929 | |
930 | 930 | $note_public = GETPOSTISSET('note_public') ? GETPOST('note_public', 'restricthtml') : $object->note_public; |
@@ -933,30 +933,30 @@ discard block |
||
933 | 933 | // Help of substitution key |
934 | 934 | $substitutionarray = getCommonSubstitutionArray($langs, 2, null, $object); |
935 | 935 | |
936 | - $substitutionarray['__INVOICE_PREVIOUS_MONTH__'] = $langs->trans("PreviousMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($object->date, -1, 'm'), '%m') . ')'; |
|
937 | - $substitutionarray['__INVOICE_MONTH__'] = $langs->trans("MonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($object->date, '%m') . ')'; |
|
938 | - $substitutionarray['__INVOICE_NEXT_MONTH__'] = $langs->trans("NextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($object->date, 1, 'm'), '%m') . ')'; |
|
939 | - $substitutionarray['__INVOICE_PREVIOUS_MONTH_TEXT__'] = $langs->trans("TextPreviousMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($object->date, -1, 'm'), '%B') . ')'; |
|
940 | - $substitutionarray['__INVOICE_MONTH_TEXT__'] = $langs->trans("TextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($object->date, '%B') . ')'; |
|
941 | - $substitutionarray['__INVOICE_NEXT_MONTH_TEXT__'] = $langs->trans("TextNextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($object->date, 1, 'm'), '%B') . ')'; |
|
942 | - $substitutionarray['__INVOICE_PREVIOUS_YEAR__'] = $langs->trans("PreviousYearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($object->date, -1, 'y'), '%Y') . ')'; |
|
943 | - $substitutionarray['__INVOICE_YEAR__'] = $langs->trans("YearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($object->date, '%Y') . ')'; |
|
944 | - $substitutionarray['__INVOICE_NEXT_YEAR__'] = $langs->trans("NextYearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($object->date, 1, 'y'), '%Y') . ')'; |
|
936 | + $substitutionarray['__INVOICE_PREVIOUS_MONTH__'] = $langs->trans("PreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'm'), '%m').')'; |
|
937 | + $substitutionarray['__INVOICE_MONTH__'] = $langs->trans("MonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date, '%m').')'; |
|
938 | + $substitutionarray['__INVOICE_NEXT_MONTH__'] = $langs->trans("NextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'm'), '%m').')'; |
|
939 | + $substitutionarray['__INVOICE_PREVIOUS_MONTH_TEXT__'] = $langs->trans("TextPreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'm'), '%B').')'; |
|
940 | + $substitutionarray['__INVOICE_MONTH_TEXT__'] = $langs->trans("TextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date, '%B').')'; |
|
941 | + $substitutionarray['__INVOICE_NEXT_MONTH_TEXT__'] = $langs->trans("TextNextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'm'), '%B').')'; |
|
942 | + $substitutionarray['__INVOICE_PREVIOUS_YEAR__'] = $langs->trans("PreviousYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, -1, 'y'), '%Y').')'; |
|
943 | + $substitutionarray['__INVOICE_YEAR__'] = $langs->trans("YearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($object->date, '%Y').')'; |
|
944 | + $substitutionarray['__INVOICE_NEXT_YEAR__'] = $langs->trans("NextYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date, 1, 'y'), '%Y').')'; |
|
945 | 945 | // Only on template invoices |
946 | - $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($object->date_when, 'dayhour') . ')'; |
|
947 | - $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($object->date_when, $object->frequency, $object->unit_frequency), 'dayhour') . ')'; |
|
946 | + $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen").' ('.$langs->trans("Example").': '.dol_print_date($object->date_when, 'dayhour').')'; |
|
947 | + $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date_when, $object->frequency, $object->unit_frequency), 'dayhour').')'; |
|
948 | 948 | $substitutionarray['__INVOICE_COUNTER_CURRENT__'] = $langs->trans("Count"); |
949 | 949 | $substitutionarray['__INVOICE_COUNTER_MAX__'] = $langs->trans("MaxPeriodNumber"); |
950 | 950 | |
951 | - $htmltext = '<i>' . $langs->trans("FollowingConstantsWillBeSubstituted") . ':<br>'; |
|
951 | + $htmltext = '<i>'.$langs->trans("FollowingConstantsWillBeSubstituted").':<br>'; |
|
952 | 952 | foreach ($substitutionarray as $key => $val) { |
953 | - $htmltext .= $key . ' = ' . $langs->trans($val) . '<br>'; |
|
953 | + $htmltext .= $key.' = '.$langs->trans($val).'<br>'; |
|
954 | 954 | } |
955 | 955 | $htmltext .= '</i>'; |
956 | 956 | |
957 | 957 | // Label |
958 | - print '<tr><td class="titlefieldcreate">' . $langs->trans("Label") . '</td><td>'; |
|
959 | - print '<input class="flat quatrevingtpercent" type="text" name="libelle" value="' . $object->label . '">'; |
|
958 | + print '<tr><td class="titlefieldcreate">'.$langs->trans("Label").'</td><td>'; |
|
959 | + print '<input class="flat quatrevingtpercent" type="text" name="libelle" value="'.$object->label.'">'; |
|
960 | 960 | print '</td></tr>'; |
961 | 961 | |
962 | 962 | // Public note |
@@ -981,38 +981,38 @@ discard block |
||
981 | 981 | } |
982 | 982 | |
983 | 983 | // Author |
984 | - print "<tr><td>" . $langs->trans("Author") . "</td><td>" . $user->getFullName($langs) . "</td></tr>"; |
|
984 | + print "<tr><td>".$langs->trans("Author")."</td><td>".$user->getFullName($langs)."</td></tr>"; |
|
985 | 985 | |
986 | 986 | // Payment term |
987 | - print "<tr><td>" . $langs->trans("PaymentConditions") . "</td><td>"; |
|
988 | - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'none'); |
|
987 | + print "<tr><td>".$langs->trans("PaymentConditions")."</td><td>"; |
|
988 | + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none'); |
|
989 | 989 | print "</td></tr>"; |
990 | 990 | |
991 | 991 | // Payment mode |
992 | - print "<tr><td>" . $langs->trans("PaymentMode") . "</td><td>"; |
|
993 | - $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'none', '', 1); |
|
992 | + print "<tr><td>".$langs->trans("PaymentMode")."</td><td>"; |
|
993 | + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'none', '', 1); |
|
994 | 994 | print "</td></tr>"; |
995 | 995 | |
996 | 996 | // Project |
997 | 997 | if (isModEnabled('project') && is_object($object->thirdparty) && $object->thirdparty->id > 0) { |
998 | 998 | $projectid = GETPOST('projectid') ? GETPOST('projectid') : $object->fk_project; |
999 | 999 | $langs->load('projects'); |
1000 | - print '<tr><td>' . $langs->trans('Project') . '</td><td>'; |
|
1000 | + print '<tr><td>'.$langs->trans('Project').'</td><td>'; |
|
1001 | 1001 | $numprojet = $formproject->select_projects($object->thirdparty->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, ''); |
1002 | - print ' <a href="' . DOL_URL_ROOT . '/projet/card.php?socid=' . $object->thirdparty->id . '&action=create&status=1&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create&socid=' . $object->thirdparty->id . (!empty($id) ? '&id=' . $id : '')) . '">' . $langs->trans("AddProject") . '</a>'; |
|
1002 | + print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$object->thirdparty->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$object->thirdparty->id.(!empty($id) ? '&id='.$id : '')).'">'.$langs->trans("AddProject").'</a>'; |
|
1003 | 1003 | print '</td></tr>'; |
1004 | 1004 | } |
1005 | 1005 | |
1006 | 1006 | // Bank account |
1007 | 1007 | if ($object->fk_account > 0) { |
1008 | - print "<tr><td>" . $langs->trans('BankAccount') . "</td><td>"; |
|
1009 | - $form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_account, 'none'); |
|
1008 | + print "<tr><td>".$langs->trans('BankAccount')."</td><td>"; |
|
1009 | + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); |
|
1010 | 1010 | print "</td></tr>"; |
1011 | 1011 | } |
1012 | 1012 | |
1013 | 1013 | // Model pdf |
1014 | - print "<tr><td>" . $langs->trans('Model') . "</td><td>"; |
|
1015 | - include_once DOL_DOCUMENT_ROOT . '/core/modules/supplier_invoice/modules_facturefournisseur.php'; |
|
1014 | + print "<tr><td>".$langs->trans('Model')."</td><td>"; |
|
1015 | + include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_invoice/modules_facturefournisseur.php'; |
|
1016 | 1016 | $list = ModelePDFSuppliersInvoices::liste_modeles($db); |
1017 | 1017 | print $form->selectarray('modelpdf', $list, $conf->global->INVOICE_SUPPLIER_ADDON_PDF); |
1018 | 1018 | print "</td></tr>"; |
@@ -1023,7 +1023,7 @@ discard block |
||
1023 | 1023 | |
1024 | 1024 | // Autogeneration |
1025 | 1025 | $title = $langs->trans("Recurrence"); |
1026 | - print load_fiche_titre(img_picto('', 'recurring', 'class="pictofixedwidth"') . $title, '', ''); |
|
1026 | + print load_fiche_titre(img_picto('', 'recurring', 'class="pictofixedwidth"').$title, '', ''); |
|
1027 | 1027 | |
1028 | 1028 | print '<span class="opacitymedium">'.$langs->trans("ToCreateARecurringInvoiceGeneAuto", $langs->transnoentitiesnoconv('Module2300Name')).'</span><br><br>'; |
1029 | 1029 | |
@@ -1032,30 +1032,30 @@ discard block |
||
1032 | 1032 | print '<table class="border centpercent">'; |
1033 | 1033 | |
1034 | 1034 | // Frequency + unit |
1035 | - print '<tr><td class="titlefieldcreate">' . $form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency')) . "</td><td>"; |
|
1036 | - print "<input type='text' name='frequency' value='" . GETPOST('frequency', 'int') . "' size='4' /> " . $form->selectarray('unit_frequency', array('d' => $langs->trans('Day'), 'm' => $langs->trans('Month'), 'y' => $langs->trans('Year')), (GETPOST('unit_frequency') ? GETPOST('unit_frequency') : 'm')); |
|
1035 | + print '<tr><td class="titlefieldcreate">'.$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency'))."</td><td>"; |
|
1036 | + print "<input type='text' name='frequency' value='".GETPOST('frequency', 'int')."' size='4' /> ".$form->selectarray('unit_frequency', array('d' => $langs->trans('Day'), 'm' => $langs->trans('Month'), 'y' => $langs->trans('Year')), (GETPOST('unit_frequency') ? GETPOST('unit_frequency') : 'm')); |
|
1037 | 1037 | print "</td></tr>"; |
1038 | 1038 | |
1039 | 1039 | // Date next run |
1040 | - print "<tr><td>" . $langs->trans('NextDateToExecution') . "</td><td>"; |
|
1040 | + print "<tr><td>".$langs->trans('NextDateToExecution')."</td><td>"; |
|
1041 | 1041 | $date_next_execution = isset($date_next_execution) ? $date_next_execution : (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); |
1042 | 1042 | print $form->selectDate($date_next_execution, '', 1, 1, '', "add", 1, 1); |
1043 | 1043 | print "</td></tr>"; |
1044 | 1044 | |
1045 | 1045 | // Number max of generation |
1046 | - print "<tr><td>" . $langs->trans("MaxPeriodNumber") . "</td><td>"; |
|
1047 | - print '<input type="text" name="nb_gen_max" value="' . GETPOST('nb_gen_max') . '" size="5" />'; |
|
1046 | + print "<tr><td>".$langs->trans("MaxPeriodNumber")."</td><td>"; |
|
1047 | + print '<input type="text" name="nb_gen_max" value="'.GETPOST('nb_gen_max').'" size="5" />'; |
|
1048 | 1048 | print "</td></tr>"; |
1049 | 1049 | |
1050 | 1050 | // Auto validate the invoice |
1051 | - print "<tr><td>" . $langs->trans("StatusOfGeneratedInvoices") . "</td><td>"; |
|
1051 | + print "<tr><td>".$langs->trans("StatusOfGeneratedInvoices")."</td><td>"; |
|
1052 | 1052 | $select = array('0' => $langs->trans('BillStatusDraft'), '1' => $langs->trans('BillStatusValidated')); |
1053 | 1053 | print $form->selectarray('auto_validate', $select, GETPOST('auto_validate')); |
1054 | 1054 | print "</td></tr>"; |
1055 | 1055 | |
1056 | 1056 | // Auto generate document |
1057 | 1057 | if (getDolGlobalString('INVOICE_REC_CAN_DISABLE_DOCUMENT_FILE_GENERATION')) { |
1058 | - print "<tr><td>" . $langs->trans("StatusOfAutoGeneratedDocuments") . "</td><td>"; |
|
1058 | + print "<tr><td>".$langs->trans("StatusOfAutoGeneratedDocuments")."</td><td>"; |
|
1059 | 1059 | $select = array('0' => $langs->trans('DoNotGenerateDoc'), '1' => $langs->trans('AutoGenerateDoc')); |
1060 | 1060 | print $form->selectarray('generate_pdf', $select, GETPOST('generate_pdf')); |
1061 | 1061 | print "</td></tr>"; |
@@ -1098,7 +1098,7 @@ discard block |
||
1098 | 1098 | |
1099 | 1099 | print "</form>\n"; |
1100 | 1100 | } else { |
1101 | - dol_print_error('', "Error, no invoice " . $object->id); |
|
1101 | + dol_print_error('', "Error, no invoice ".$object->id); |
|
1102 | 1102 | } |
1103 | 1103 | } else { |
1104 | 1104 | /* |
@@ -1110,12 +1110,12 @@ discard block |
||
1110 | 1110 | |
1111 | 1111 | // Confirmation de la suppression d'une ligne produit |
1112 | 1112 | if ($action == 'ask_deleteline') { |
1113 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); |
|
1113 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); |
|
1114 | 1114 | } |
1115 | 1115 | |
1116 | 1116 | // Confirm delete of repeatable invoice |
1117 | 1117 | if ($action == 'ask_deleteinvoice') { |
1118 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteRepeatableInvoice'), $langs->trans('ConfirmDeleteRepeatableInvoice'), 'confirm_deleteinvoice', '', 'no', 1); |
|
1118 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteRepeatableInvoice'), $langs->trans('ConfirmDeleteRepeatableInvoice'), 'confirm_deleteinvoice', '', 'no', 1); |
|
1119 | 1119 | } |
1120 | 1120 | |
1121 | 1121 | print $formconfirm; |
@@ -1129,7 +1129,7 @@ discard block |
||
1129 | 1129 | |
1130 | 1130 | // Recurring invoice content |
1131 | 1131 | |
1132 | - $linkback = '<a href="' . DOL_URL_ROOT . '/fourn/facture/list-rec.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans('BackToList') . '</a>'; |
|
1132 | + $linkback = '<a href="'.DOL_URL_ROOT.'/fourn/facture/list-rec.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans('BackToList').'</a>'; |
|
1133 | 1133 | |
1134 | 1134 | $morehtmlref = ''; |
1135 | 1135 | if ($action != 'edittitle') { |
@@ -1142,33 +1142,33 @@ discard block |
||
1142 | 1142 | $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', 0, 1); |
1143 | 1143 | $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', null, null, '', 1); |
1144 | 1144 | // Thirdparty |
1145 | - $morehtmlref .= '<br>' . $langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); |
|
1145 | + $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); |
|
1146 | 1146 | |
1147 | 1147 | // Project |
1148 | 1148 | if (isModEnabled('project')) { |
1149 | 1149 | $langs->load('projects'); |
1150 | - $morehtmlref .= '<br>' . $langs->trans('Project') . ' '; |
|
1150 | + $morehtmlref .= '<br>'.$langs->trans('Project').' '; |
|
1151 | 1151 | if ($usercancreate) { |
1152 | 1152 | if ($action != 'classify') { |
1153 | - $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : '; |
|
1153 | + $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> : '; |
|
1154 | 1154 | } |
1155 | 1155 | if ($action == 'classify') { |
1156 | - $morehtmlref .= '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '">'; |
|
1156 | + $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; |
|
1157 | 1157 | $morehtmlref .= '<input type="hidden" name="action" value="classin">'; |
1158 | - $morehtmlref .= '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
1158 | + $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">'; |
|
1159 | 1159 | $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); |
1160 | - $morehtmlref .= '<input type="submit" class="button valignmiddle" value="' . $langs->trans("Modify") . '">'; |
|
1160 | + $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">'; |
|
1161 | 1161 | $morehtmlref .= '</form>'; |
1162 | 1162 | } else { |
1163 | - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300'); |
|
1163 | + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300'); |
|
1164 | 1164 | } |
1165 | 1165 | } else { |
1166 | 1166 | if (!empty($object->fk_project)) { |
1167 | 1167 | $project = new Project($db); |
1168 | 1168 | $project->fetch($object->fk_project); |
1169 | - $morehtmlref .= ' : ' . $project->getNomUrl(1); |
|
1169 | + $morehtmlref .= ' : '.$project->getNomUrl(1); |
|
1170 | 1170 | if ($project->title) { |
1171 | - $morehtmlref .= ' - ' . $project->title; |
|
1171 | + $morehtmlref .= ' - '.$project->title; |
|
1172 | 1172 | } |
1173 | 1173 | } else { |
1174 | 1174 | $morehtmlref .= ''; |
@@ -1187,34 +1187,34 @@ discard block |
||
1187 | 1187 | |
1188 | 1188 | print '<table class="border centpercent tableforfield">'; |
1189 | 1189 | |
1190 | - print '<tr><td class="titlefield">' . $langs->trans('Author') . '</td><td>'; |
|
1190 | + print '<tr><td class="titlefield">'.$langs->trans('Author').'</td><td>'; |
|
1191 | 1191 | print $author->getNomUrl(-1); |
1192 | 1192 | print "</td></tr>"; |
1193 | 1193 | |
1194 | 1194 | // Label |
1195 | 1195 | print '<tr>'; |
1196 | - print '<td>' . $form->editfieldkey("Label", 'libelle', $object->libelle, $object, $usercancreate) . '</td>'; |
|
1197 | - print '<td>' . $form->editfieldval("Label", 'libelle', $object->libelle, $object, $usercancreate) . '</td>'; |
|
1196 | + print '<td>'.$form->editfieldkey("Label", 'libelle', $object->libelle, $object, $usercancreate).'</td>'; |
|
1197 | + print '<td>'.$form->editfieldval("Label", 'libelle', $object->libelle, $object, $usercancreate).'</td>'; |
|
1198 | 1198 | print '</tr>'; |
1199 | 1199 | |
1200 | - print '<tr><td>' . $langs->trans('AmountHT') . '</td>'; |
|
1201 | - print '<td>' . price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
1200 | + print '<tr><td>'.$langs->trans('AmountHT').'</td>'; |
|
1201 | + print '<td>'.price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
1202 | 1202 | print '</tr>'; |
1203 | 1203 | |
1204 | - print '<tr><td>' . $langs->trans("AmountVAT") . '</td><td>' . price($object->total_tva, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
1204 | + print '<tr><td>'.$langs->trans("AmountVAT").'</td><td>'.price($object->total_tva, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
1205 | 1205 | print '</tr>'; |
1206 | 1206 | |
1207 | 1207 | // Amount Local Taxes |
1208 | 1208 | if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) { // Localtax1 |
1209 | - print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
1210 | - print '<td class="nowrap">' . price($object->total_localtax1, 1, '', 1, -1, -1, $conf->currency) . '</td></tr>'; |
|
1209 | + print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
1210 | + print '<td class="nowrap">'.price($object->total_localtax1, 1, '', 1, -1, -1, $conf->currency).'</td></tr>'; |
|
1211 | 1211 | } |
1212 | 1212 | if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) { // Localtax2 |
1213 | - print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
1214 | - print '<td class=nowrap">' . price($object->total_localtax2, 1, '', 1, -1, -1, $conf->currency) . '</td></tr>'; |
|
1213 | + print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
1214 | + print '<td class=nowrap">'.price($object->total_localtax2, 1, '', 1, -1, -1, $conf->currency).'</td></tr>'; |
|
1215 | 1215 | } |
1216 | 1216 | |
1217 | - print '<tr><td>' . $langs->trans("AmountTTC") . '</td><td colspan="3">' . price($object->total_ttc, '', $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
1217 | + print '<tr><td>'.$langs->trans("AmountTTC").'</td><td colspan="3">'.price($object->total_ttc, '', $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
1218 | 1218 | print '</tr>'; |
1219 | 1219 | |
1220 | 1220 | // Payment term |
@@ -1223,14 +1223,14 @@ discard block |
||
1223 | 1223 | print $langs->trans('PaymentConditionsShort'); |
1224 | 1224 | print '</td>'; |
1225 | 1225 | if ($action != 'editconditions' && $usercancreate) { |
1226 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&token=' . newToken() . '&facid=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>'; |
|
1226 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&token='.newToken().'&facid='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>'; |
|
1227 | 1227 | } |
1228 | 1228 | print '</tr></table>'; |
1229 | 1229 | print '</td><td>'; |
1230 | 1230 | if ($action == 'editconditions') { |
1231 | - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id'); |
|
1231 | + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id'); |
|
1232 | 1232 | } else { |
1233 | - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->cond_reglement_id, 'none'); |
|
1233 | + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'none'); |
|
1234 | 1234 | } |
1235 | 1235 | |
1236 | 1236 | print '</td></tr>'; |
@@ -1241,14 +1241,14 @@ discard block |
||
1241 | 1241 | print $langs->trans('PaymentMode'); |
1242 | 1242 | print '</td>'; |
1243 | 1243 | if ($action != 'editmode' && $usercancreate) { |
1244 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editmode&token=' . newToken() . '&facid=' . $object->id . '">' . img_edit($langs->trans('SetMode'), 1) . '</a></td>'; |
|
1244 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&token='.newToken().'&facid='.$object->id.'">'.img_edit($langs->trans('SetMode'), 1).'</a></td>'; |
|
1245 | 1245 | } |
1246 | 1246 | print '</tr></table>'; |
1247 | 1247 | print '</td><td>'; |
1248 | 1248 | if ($action == 'editmode') { |
1249 | - $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); |
|
1249 | + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); |
|
1250 | 1250 | } else { |
1251 | - $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->mode_reglement_id, 'none'); |
|
1251 | + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'none'); |
|
1252 | 1252 | } |
1253 | 1253 | print '</td></tr>'; |
1254 | 1254 | |
@@ -1261,12 +1261,12 @@ discard block |
||
1261 | 1261 | print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); |
1262 | 1262 | print '</td>'; |
1263 | 1263 | if ($usercancreate && $action != 'editmulticurrencycode' && $object->suspended == $object::STATUS_SUSPENDED) { |
1264 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencycode&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>'; |
|
1264 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencycode&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>'; |
|
1265 | 1265 | } |
1266 | 1266 | print '</tr></table>'; |
1267 | 1267 | print '</td><td>'; |
1268 | 1268 | $htmlname = (($usercancreate && $action == 'editmulticurrencycode') ? 'multicurrency_code' : 'none'); |
1269 | - $form->form_multicurrency_code($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_code, $htmlname); |
|
1269 | + $form->form_multicurrency_code($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_code, $htmlname); |
|
1270 | 1270 | print '</td></tr>'; |
1271 | 1271 | |
1272 | 1272 | // Multicurrency rate |
@@ -1277,7 +1277,7 @@ discard block |
||
1277 | 1277 | print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); |
1278 | 1278 | print '</td>'; |
1279 | 1279 | if ($usercancreate && $action != 'editmulticurrencyrate' && $object->suspended == $object::STATUS_SUSPENDED && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { |
1280 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editmulticurrencyrate&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . '</a></td>'; |
|
1280 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmulticurrencyrate&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1).'</a></td>'; |
|
1281 | 1281 | } |
1282 | 1282 | print '</tr></table>'; |
1283 | 1283 | print '</td><td>'; |
@@ -1285,12 +1285,12 @@ discard block |
||
1285 | 1285 | if ($action == 'actualizemulticurrencyrate') { |
1286 | 1286 | list($object->fk_multicurrency, $object->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($object->db, $object->multicurrency_code); |
1287 | 1287 | } |
1288 | - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, ($usercancreate ? 'multicurrency_tx' : 'none'), $object->multicurrency_code); |
|
1288 | + $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_tx, ($usercancreate ? 'multicurrency_tx' : 'none'), $object->multicurrency_code); |
|
1289 | 1289 | } else { |
1290 | - $form->form_multicurrency_rate($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); |
|
1290 | + $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$object->id, $object->multicurrency_tx, 'none', $object->multicurrency_code); |
|
1291 | 1291 | if ($object->statut == $object::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) { |
1292 | 1292 | print '<div class="inline-block"> '; |
1293 | - print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=actualizemulticurrencyrate">' . $langs->trans("ActualizeCurrency") . '</a>'; |
|
1293 | + print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=actualizemulticurrencyrate">'.$langs->trans("ActualizeCurrency").'</a>'; |
|
1294 | 1294 | print '</div>'; |
1295 | 1295 | } |
1296 | 1296 | } |
@@ -1306,24 +1306,24 @@ discard block |
||
1306 | 1306 | |
1307 | 1307 | $substitutionarray = getCommonSubstitutionArray($langs, 2, null, $object); |
1308 | 1308 | |
1309 | - $substitutionarray['__INVOICE_PREVIOUS_MONTH__'] = $langs->trans("PreviousMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'), '%m') . ')'; |
|
1310 | - $substitutionarray['__INVOICE_MONTH__'] = $langs->trans("MonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($dateexample, '%m') . ')'; |
|
1311 | - $substitutionarray['__INVOICE_NEXT_MONTH__'] = $langs->trans("NextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%m') . ')'; |
|
1312 | - $substitutionarray['__INVOICE_PREVIOUS_MONTH_TEXT__'] = $langs->trans("TextPreviousMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'), '%B') . ')'; |
|
1313 | - $substitutionarray['__INVOICE_MONTH_TEXT__'] = $langs->trans("TextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($dateexample, '%B') . ')'; |
|
1314 | - $substitutionarray['__INVOICE_NEXT_MONTH_TEXT__'] = $langs->trans("TextNextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%B') . ')'; |
|
1315 | - $substitutionarray['__INVOICE_PREVIOUS_YEAR__'] = $langs->trans("PreviousYearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, -1, 'y'), '%Y') . ')'; |
|
1316 | - $substitutionarray['__INVOICE_YEAR__'] = $langs->trans("YearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($dateexample, '%Y') . ')'; |
|
1317 | - $substitutionarray['__INVOICE_NEXT_YEAR__'] = $langs->trans("NextYearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, 1, 'y'), '%Y') . ')'; |
|
1309 | + $substitutionarray['__INVOICE_PREVIOUS_MONTH__'] = $langs->trans("PreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'), '%m').')'; |
|
1310 | + $substitutionarray['__INVOICE_MONTH__'] = $langs->trans("MonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample, '%m').')'; |
|
1311 | + $substitutionarray['__INVOICE_NEXT_MONTH__'] = $langs->trans("NextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%m').')'; |
|
1312 | + $substitutionarray['__INVOICE_PREVIOUS_MONTH_TEXT__'] = $langs->trans("TextPreviousMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'), '%B').')'; |
|
1313 | + $substitutionarray['__INVOICE_MONTH_TEXT__'] = $langs->trans("TextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample, '%B').')'; |
|
1314 | + $substitutionarray['__INVOICE_NEXT_MONTH_TEXT__'] = $langs->trans("TextNextMonthOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%B').')'; |
|
1315 | + $substitutionarray['__INVOICE_PREVIOUS_YEAR__'] = $langs->trans("PreviousYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, -1, 'y'), '%Y').')'; |
|
1316 | + $substitutionarray['__INVOICE_YEAR__'] = $langs->trans("YearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date($dateexample, '%Y').')'; |
|
1317 | + $substitutionarray['__INVOICE_NEXT_YEAR__'] = $langs->trans("NextYearOfInvoice").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($dateexample, 1, 'y'), '%Y').')'; |
|
1318 | 1318 | // Only on template invoices |
1319 | - $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(($object->date_when ? $object->date_when : dol_now()), 'dayhour') . ')'; |
|
1320 | - $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree(($object->date_when ? $object->date_when : dol_now()), $object->frequency, $object->unit_frequency), 'dayhour') . ')'; |
|
1319 | + $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen").' ('.$langs->trans("Example").': '.dol_print_date(($object->date_when ? $object->date_when : dol_now()), 'dayhour').')'; |
|
1320 | + $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree(($object->date_when ? $object->date_when : dol_now()), $object->frequency, $object->unit_frequency), 'dayhour').')'; |
|
1321 | 1321 | $substitutionarray['__INVOICE_COUNTER_CURRENT__'] = $object->nb_gen_done; |
1322 | 1322 | $substitutionarray['__INVOICE_COUNTER_MAX__'] = $object->nb_gen_max; |
1323 | 1323 | |
1324 | - $htmltext = '<i>' . $langs->trans("FollowingConstantsWillBeSubstituted") . ':<br>'; |
|
1324 | + $htmltext = '<i>'.$langs->trans("FollowingConstantsWillBeSubstituted").':<br>'; |
|
1325 | 1325 | foreach ($substitutionarray as $key => $val) { |
1326 | - $htmltext .= $key . ' = ' . $langs->trans($val) . '<br>'; |
|
1326 | + $htmltext .= $key.' = '.$langs->trans($val).'<br>'; |
|
1327 | 1327 | } |
1328 | 1328 | $htmltext .= '</i>'; |
1329 | 1329 | |
@@ -1331,7 +1331,7 @@ discard block |
||
1331 | 1331 | print '<tr><td>'; |
1332 | 1332 | print $form->editfieldkey($form->textwithpicto($langs->trans('NotePublic'), $htmltext, 1, 'help', '', 0, 2, 'notepublic'), 'note_public', $object->note_public, $object, $usercancreate); |
1333 | 1333 | print '</td><td class="wordbreak">'; |
1334 | - print $form->editfieldval($langs->trans("NotePublic"), 'note_public', $object->note_public, $object, $usercancreate, 'textarea:' . ROWS_4 . ':90%', '', null, null, '', 1); |
|
1334 | + print $form->editfieldval($langs->trans("NotePublic"), 'note_public', $object->note_public, $object, $usercancreate, 'textarea:'.ROWS_4.':90%', '', null, null, '', 1); |
|
1335 | 1335 | print '</td>'; |
1336 | 1336 | print '</tr>'; |
1337 | 1337 | |
@@ -1339,7 +1339,7 @@ discard block |
||
1339 | 1339 | print '<tr><td>'; |
1340 | 1340 | print $form->editfieldkey($form->textwithpicto($langs->trans("NotePrivate"), $htmltext, 1, 'help', '', 0, 2, 'noteprivate'), 'note_private', $object->note_private, $object, $usercancreate); |
1341 | 1341 | print '</td><td class="wordbreak">'; |
1342 | - print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $usercancreate, 'textarea:' . ROWS_4 . ':90%', '', null, null, '', 1); |
|
1342 | + print $form->editfieldval($langs->trans("NotePrivate"), 'note_private', $object->note_private, $object, $usercancreate, 'textarea:'.ROWS_4.':90%', '', null, null, '', 1); |
|
1343 | 1343 | print '</td>'; |
1344 | 1344 | print '</tr>'; |
1345 | 1345 | |
@@ -1349,14 +1349,14 @@ discard block |
||
1349 | 1349 | print $langs->trans('BankAccount'); |
1350 | 1350 | print '<td>'; |
1351 | 1351 | if ($action != 'editbankaccount' && $usercancreate && $object->statut == FactureFournisseurRec::STATUS_NOTSUSPENDED) { |
1352 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=editbankaccount&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetBankAccount'), 1) . '</a></td>'; |
|
1352 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=editbankaccount&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>'; |
|
1353 | 1353 | } |
1354 | 1354 | print '</tr></table>'; |
1355 | 1355 | print '</td><td>'; |
1356 | 1356 | if ($action == 'editbankaccount') { |
1357 | - $form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_account, 'fk_account', 1); |
|
1357 | + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); |
|
1358 | 1358 | } else { |
1359 | - $form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_account, 'none'); |
|
1359 | + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); |
|
1360 | 1360 | } |
1361 | 1361 | print "</td>"; |
1362 | 1362 | print '</tr>'; |
@@ -1367,18 +1367,18 @@ discard block |
||
1367 | 1367 | print $langs->trans('Model'); |
1368 | 1368 | print '<td>'; |
1369 | 1369 | if ($action != 'editmodelpdf' && $usercancreate && $object->statut == FactureFournisseurRec::STATUS_NOTSUSPENDED) { |
1370 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=editmodelpdf&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetModel'), 1) . '</a></td>'; |
|
1370 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=editmodelpdf&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetModel'), 1).'</a></td>'; |
|
1371 | 1371 | } |
1372 | 1372 | print '</tr></table>'; |
1373 | 1373 | print '</td><td>'; |
1374 | 1374 | if ($action == 'editmodelpdf') { |
1375 | - include_once DOL_DOCUMENT_ROOT . '/core/modules/supplier_invoice/modules_facturefournisseur.php'; |
|
1375 | + include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_invoice/modules_facturefournisseur.php'; |
|
1376 | 1376 | $list = array(); |
1377 | 1377 | $models = ModelePDFSuppliersInvoices::liste_modeles($db); |
1378 | 1378 | foreach ($models as $k => $model) { |
1379 | - $list[] = str_replace(':', '|', $k) . ':' . $model; |
|
1379 | + $list[] = str_replace(':', '|', $k).':'.$model; |
|
1380 | 1380 | } |
1381 | - $select = 'select;' . implode(',', $list); |
|
1381 | + $select = 'select;'.implode(',', $list); |
|
1382 | 1382 | //TODO : Droits |
1383 | 1383 | print $form->editfieldval($langs->trans('Model'), 'modelpdf', $object->model_pdf, $object, $usercancreate, $select); |
1384 | 1384 | } else { |
@@ -1389,7 +1389,7 @@ discard block |
||
1389 | 1389 | |
1390 | 1390 | // Other attributes |
1391 | 1391 | $cols = 2; |
1392 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
1392 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
1393 | 1393 | |
1394 | 1394 | print '</table>'; |
1395 | 1395 | |
@@ -1405,7 +1405,7 @@ discard block |
||
1405 | 1405 | |
1406 | 1406 | print '<table class="border centpercent tableforfield">'; |
1407 | 1407 | |
1408 | - print '<tr><td colspan="2">' . img_picto('', 'recurring', 'class="pictofixedwidth"') . $title . '</td></tr>'; |
|
1408 | + print '<tr><td colspan="2">'.img_picto('', 'recurring', 'class="pictofixedwidth"').$title.'</td></tr>'; |
|
1409 | 1409 | |
1410 | 1410 | // if "frequency" is empty or = 0, the reccurence is disabled |
1411 | 1411 | print '<tr><td style="width: 50%">'; |
@@ -1413,23 +1413,23 @@ discard block |
||
1413 | 1413 | print $langs->trans('Frequency'); |
1414 | 1414 | print '</td>'; |
1415 | 1415 | if ($action != 'editfrequency' && $usercancreate) { |
1416 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editfrequency&token=' . newToken() . '&facid=' . $object->id . '">' . img_edit($langs->trans('Edit'), 1) . '</a></td>'; |
|
1416 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editfrequency&token='.newToken().'&facid='.$object->id.'">'.img_edit($langs->trans('Edit'), 1).'</a></td>'; |
|
1417 | 1417 | } |
1418 | 1418 | print '</tr></table>'; |
1419 | 1419 | print '</td><td>'; |
1420 | 1420 | if ($action == 'editfrequency') { |
1421 | - print '<form method="post" action="' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '">'; |
|
1421 | + print '<form method="post" action="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'">'; |
|
1422 | 1422 | print '<input type="hidden" name="action" value="setfrequency">'; |
1423 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
1423 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
1424 | 1424 | print '<table class="nobordernopadding">'; |
1425 | 1425 | print '<tr><td>'; |
1426 | - print "<input type='text' name='frequency' value='" . $object->frequency . "' size='5' /> " . $form->selectarray('unit_frequency', array('d' => $langs->trans('Day'), 'm' => $langs->trans('Month'), 'y' => $langs->trans('Year')), ($object->unit_frequency ? $object->unit_frequency : 'm')); |
|
1426 | + print "<input type='text' name='frequency' value='".$object->frequency."' size='5' /> ".$form->selectarray('unit_frequency', array('d' => $langs->trans('Day'), 'm' => $langs->trans('Month'), 'y' => $langs->trans('Year')), ($object->unit_frequency ? $object->unit_frequency : 'm')); |
|
1427 | 1427 | print '</td>'; |
1428 | - print '<td class="left"><input type="submit" class="button button-edit" value="' . $langs->trans("Modify") . '"></td>'; |
|
1428 | + print '<td class="left"><input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'"></td>'; |
|
1429 | 1429 | print '</tr></table></form>'; |
1430 | 1430 | } else { |
1431 | 1431 | if ($object->frequency > 0) { |
1432 | - print $langs->trans('FrequencyPer_' . $object->unit_frequency, $object->frequency); |
|
1432 | + print $langs->trans('FrequencyPer_'.$object->unit_frequency, $object->frequency); |
|
1433 | 1433 | } else { |
1434 | 1434 | print $langs->trans("NotARecurringInvoiceTemplate"); |
1435 | 1435 | } |
@@ -1448,8 +1448,8 @@ discard block |
||
1448 | 1448 | print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $usercancreate, 'day', $object->date_when, null, '', '', 0, 'strikeIfMaxNbGenReached'); |
1449 | 1449 | } |
1450 | 1450 | //var_dump(dol_print_date($object->date_when+60, 'dayhour').' - '.dol_print_date($now, 'dayhour')); |
1451 | - if (! $object->isMaxNbGenReached()) { |
|
1452 | - if (! $object->suspended && $action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) { |
|
1451 | + if (!$object->isMaxNbGenReached()) { |
|
1452 | + if (!$object->suspended && $action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) { |
|
1453 | 1453 | print img_warning($langs->trans("Late")); |
1454 | 1454 | } |
1455 | 1455 | } else { |
@@ -1482,7 +1482,7 @@ discard block |
||
1482 | 1482 | print $langs->trans("StatusOfGeneratedInvoices"); |
1483 | 1483 | } |
1484 | 1484 | print '</td><td>'; |
1485 | - $select = 'select;0:' . $langs->trans('BillStatusDraft') . ',1:' . $langs->trans('BillStatusValidated'); |
|
1485 | + $select = 'select;0:'.$langs->trans('BillStatusDraft').',1:'.$langs->trans('BillStatusValidated'); |
|
1486 | 1486 | if ($action == 'auto_validate' || $object->frequency > 0) { |
1487 | 1487 | print $form->editfieldval($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $usercancreate, $select); |
1488 | 1488 | } |
@@ -1498,7 +1498,7 @@ discard block |
||
1498 | 1498 | } |
1499 | 1499 | print '</td>'; |
1500 | 1500 | print '<td>'; |
1501 | - $select = 'select;0:' . $langs->trans('DoNotGenerateDoc') . ',1:' . $langs->trans('AutogenerateDoc'); |
|
1501 | + $select = 'select;0:'.$langs->trans('DoNotGenerateDoc').',1:'.$langs->trans('AutogenerateDoc'); |
|
1502 | 1502 | if ($action == 'generate_pdf' || $object->frequency > 0) { |
1503 | 1503 | print $form->editfieldval($langs->trans("StatusOfGeneratedDocuments"), 'generate_pdf', $object->generate_pdf, $object, $usercancreate, $select); |
1504 | 1504 | } |
@@ -1522,7 +1522,7 @@ discard block |
||
1522 | 1522 | print '<table class="border centpercent tableforfield">'; |
1523 | 1523 | |
1524 | 1524 | // Nb of generation already done |
1525 | - print '<tr><td style="width: 50%">' . $langs->trans("NbOfGenerationDone") . '</td>'; |
|
1525 | + print '<tr><td style="width: 50%">'.$langs->trans("NbOfGenerationDone").'</td>'; |
|
1526 | 1526 | print '<td>'; |
1527 | 1527 | print $object->nb_gen_done ? $object->nb_gen_done : '0'; |
1528 | 1528 | print '</td>'; |
@@ -1547,15 +1547,15 @@ discard block |
||
1547 | 1547 | print '<div class="clearboth"></div><br>'; |
1548 | 1548 | |
1549 | 1549 | // Lines |
1550 | - print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '#add' : '#line_' . GETPOST('lineid', 'int')) . '" method="POST"> |
|
1551 | - <input type="hidden" name="token" value="' . newToken() . '"> |
|
1552 | - <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '"> |
|
1550 | + print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#add' : '#line_'.GETPOST('lineid', 'int')).'" method="POST"> |
|
1551 | + <input type="hidden" name="token" value="' . newToken().'"> |
|
1552 | + <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'"> |
|
1553 | 1553 | <input type="hidden" name="mode" value=""> |
1554 | - <input type="hidden" name="id" value="' . $object->id . '"> |
|
1554 | + <input type="hidden" name="id" value="' . $object->id.'"> |
|
1555 | 1555 | '; |
1556 | 1556 | |
1557 | 1557 | if (!empty($conf->use_javascript_ajax) && $object->statut == 0) { |
1558 | - include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; |
|
1558 | + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; |
|
1559 | 1559 | } |
1560 | 1560 | |
1561 | 1561 | print '<div class="div-table-responsive-no-min">'; |
@@ -1609,24 +1609,24 @@ discard block |
||
1609 | 1609 | if (empty($object->suspended)) { |
1610 | 1610 | if ($usercancreate) { |
1611 | 1611 | if (!empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) { |
1612 | - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . dol_escape_htmltag($langs->trans("MaxGenerationReached")) . '">' . $langs->trans("CreateBill") . '</a></div>'; |
|
1612 | + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("MaxGenerationReached")).'">'.$langs->trans("CreateBill").'</a></div>'; |
|
1613 | 1613 | } else { |
1614 | 1614 | if (empty($object->frequency) || $object->date_when <= $nowlasthour) { |
1615 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/fourn/facture/card.php?action=create&socid=' . $object->thirdparty->id . '&fac_rec=' . $object->id . '">' . $langs->trans("CreateBill") . '</a></div>'; |
|
1615 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/fourn/facture/card.php?action=create&socid='.$object->thirdparty->id.'&fac_rec='.$object->id.'">'.$langs->trans("CreateBill").'</a></div>'; |
|
1616 | 1616 | } else { |
1617 | - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . dol_escape_htmltag($langs->trans("DateIsNotEnough")) . '">' . $langs->trans("CreateBill") . '</a></div>'; |
|
1617 | + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("DateIsNotEnough")).'">'.$langs->trans("CreateBill").'</a></div>'; |
|
1618 | 1618 | } |
1619 | 1619 | } |
1620 | 1620 | } else { |
1621 | - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">' . $langs->trans("CreateBill") . '</a></div>'; |
|
1621 | + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans("CreateBill").'</a></div>'; |
|
1622 | 1622 | } |
1623 | 1623 | } |
1624 | 1624 | |
1625 | 1625 | if ($usercancreate) { |
1626 | 1626 | if (empty($object->suspended)) { |
1627 | - print '<div class="inline-block divButAction"><a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=disable&id=' . $object->id . '&token=' . newToken() . '">' . $langs->trans("Disable") . '</a></div>'; |
|
1627 | + print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=disable&id='.$object->id.'&token='.newToken().'">'.$langs->trans("Disable").'</a></div>'; |
|
1628 | 1628 | } else { |
1629 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=enable&id=' . $object->id . '&token=' . newToken() . '">' . $langs->trans("Enable") . '</a></div>'; |
|
1629 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=enable&id='.$object->id.'&token='.newToken().'">'.$langs->trans("Enable").'</a></div>'; |
|
1630 | 1630 | } |
1631 | 1631 | } |
1632 | 1632 |