@@ -155,12 +155,12 @@ discard block |
||
155 | 155 | $messagewarning .= '</div>'; |
156 | 156 | |
157 | 157 | if ($result <= 0 && $edituser->error == 'USERNOTFOUND') { |
158 | - usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
158 | + usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
159 | 159 | $message .= $messagewarning; |
160 | 160 | $username = ''; |
161 | 161 | } else { |
162 | 162 | if (empty($edituser->email)) { |
163 | - usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
163 | + usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
164 | 164 | $message .= $messagewarning; |
165 | 165 | } else { |
166 | 166 | $newpassword = $edituser->setPassword($user, '', 1); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | } |
200 | 200 | |
201 | 201 | // Title |
202 | -$title = $appli; // $title is used in .tpl file |
|
202 | +$title = $appli; // $title is used in .tpl file |
|
203 | 203 | |
204 | 204 | // Select templates dir |
205 | 205 | $template_dir = ''; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | |
46 | 46 | // If not defined, we select menu "home" |
47 | -$_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ? GETPOST('mainmenu', 'aZ09') : 'home'; // Keep this ? |
|
47 | +$_GET['mainmenu'] = GETPOST('mainmenu', 'aZ09') ? GETPOST('mainmenu', 'aZ09') : 'home'; // Keep this ? |
|
48 | 48 | $action = GETPOST('action', 'aZ09'); |
49 | 49 | |
50 | 50 | $hookmanager->initHooks(array('index')); |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | } |
233 | 233 | |
234 | 234 | // Number of supplier proposals open (expired) |
235 | - if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('supplier_proposal', 'lire')) { |
|
235 | + if (isModEnabled('supplier_proposal') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('supplier_proposal', 'lire')) { |
|
236 | 236 | $langs->load("supplier_proposal"); |
237 | 237 | include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; |
238 | 238 | $board = new SupplierProposal($db); |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | } |
243 | 243 | |
244 | 244 | // Number of sales orders |
245 | - if (isModEnabled('order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('commande', 'lire')) { |
|
245 | + if (isModEnabled('order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CUSTOMER') && $user->hasRight('commande', 'lire')) { |
|
246 | 246 | include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; |
247 | 247 | $board = new Commande($db); |
248 | 248 | // Number of customer orders to be shipped (validated and in progress) |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | } |
257 | 257 | |
258 | 258 | // Number of suppliers orders |
259 | - if (isModEnabled('supplier_order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'commande', 'lire')) { |
|
259 | + if (isModEnabled('supplier_order') && !getDolGlobalString('MAIN_DISABLE_BLOCK_SUPPLIER') && $user->hasRight('fournisseur', 'commande', 'lire')) { |
|
260 | 260 | include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; |
261 | 261 | $board = new CommandeFournisseur($db); |
262 | 262 | $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | } |
265 | 265 | |
266 | 266 | // Number of contract / services enabled (delayed) |
267 | - if (isModEnabled('contract') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight('contrat', 'lire')) { |
|
267 | + if (isModEnabled('contract') && !getDolGlobalString('MAIN_DISABLE_BLOCK_CONTRACT') && $user->hasRight('contrat', 'lire')) { |
|
268 | 268 | include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; |
269 | 269 | $board = new Contrat($db); |
270 | 270 | $dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive"); |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | } |
274 | 274 | |
275 | 275 | // Number of tickets open |
276 | - if (isModEnabled('ticket') && !getDolGlobalString('MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight('ticket', 'read')) { |
|
276 | + if (isModEnabled('ticket') && !getDolGlobalString('MAIN_DISABLE_BLOCK_TICKET') && $user->hasRight('ticket', 'read')) { |
|
277 | 277 | include_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php'; |
278 | 278 | $board = new Ticket($db); |
279 | 279 | $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | } |
297 | 297 | |
298 | 298 | // Number of transactions to conciliate |
299 | - if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
299 | + if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
300 | 300 | include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; |
301 | 301 | $board = new Account($db); |
302 | 302 | $nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate |
@@ -307,26 +307,26 @@ discard block |
||
307 | 307 | |
308 | 308 | |
309 | 309 | // Number of cheque to send |
310 | - if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
310 | + if (isModEnabled('bank') && !getDolGlobalString('MAIN_DISABLE_BLOCK_BANK') && $user->hasRight('banque', 'lire') && !$user->socid) { |
|
311 | 311 | if (!getDolGlobalString('BANK_DISABLE_CHECK_DEPOSIT')) { |
312 | - include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php'; |
|
312 | + include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; |
|
313 | 313 | $board = new RemiseCheque($db); |
314 | 314 | $dashboardlines[$board->element] = $board->load_board($user); |
315 | 315 | } |
316 | 316 | if (isModEnabled('prelevement')) { |
317 | 317 | include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; |
318 | 318 | $board = new BonPrelevement($db); |
319 | - $dashboardlines[$board->element . '_direct_debit'] = $board->load_board($user, 'direct_debit'); |
|
319 | + $dashboardlines[$board->element.'_direct_debit'] = $board->load_board($user, 'direct_debit'); |
|
320 | 320 | } |
321 | 321 | if (isModEnabled('paymentbybanktransfer')) { |
322 | 322 | include_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; |
323 | 323 | $board = new BonPrelevement($db); |
324 | - $dashboardlines[$board->element . '_credit_transfer'] = $board->load_board($user, 'credit_transfer'); |
|
324 | + $dashboardlines[$board->element.'_credit_transfer'] = $board->load_board($user, 'credit_transfer'); |
|
325 | 325 | } |
326 | 326 | } |
327 | 327 | |
328 | 328 | // Number of foundation members |
329 | - if (isModEnabled('member') && !getDolGlobalString('MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight('adherent', 'lire') && !$user->socid) { |
|
329 | + if (isModEnabled('member') && !getDolGlobalString('MAIN_DISABLE_BLOCK_ADHERENT') && $user->hasRight('adherent', 'lire') && !$user->socid) { |
|
330 | 330 | include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; |
331 | 331 | $board = new Adherent($db); |
332 | 332 | $dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift'); |
@@ -334,21 +334,21 @@ discard block |
||
334 | 334 | } |
335 | 335 | |
336 | 336 | // Number of expense reports to approve |
337 | - if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'approve')) { |
|
337 | + if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'approve')) { |
|
338 | 338 | include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; |
339 | 339 | $board = new ExpenseReport($db); |
340 | 340 | $dashboardlines[$board->element.'_toapprove'] = $board->load_board($user, 'toapprove'); |
341 | 341 | } |
342 | 342 | |
343 | 343 | // Number of expense reports to pay |
344 | - if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'to_paid')) { |
|
344 | + if (isModEnabled('expensereport') && !getDolGlobalString('MAIN_DISABLE_BLOCK_EXPENSEREPORT') && $user->hasRight('expensereport', 'to_paid')) { |
|
345 | 345 | include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; |
346 | 346 | $board = new ExpenseReport($db); |
347 | 347 | $dashboardlines[$board->element.'_topay'] = $board->load_board($user, 'topay'); |
348 | 348 | } |
349 | 349 | |
350 | 350 | // Number of holidays to approve |
351 | - if (isModEnabled('holiday') && !getDolGlobalString('MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight('holiday', 'approve')) { |
|
351 | + if (isModEnabled('holiday') && !getDolGlobalString('MAIN_DISABLE_BLOCK_HOLIDAY') && $user->hasRight('holiday', 'approve')) { |
|
352 | 352 | include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; |
353 | 353 | $board = new Holiday($db); |
354 | 354 | $dashboardlines[$board->element] = $board->load_board($user); |
@@ -609,9 +609,9 @@ discard block |
||
609 | 609 | |
610 | 610 | $dateOrder = ''; |
611 | 611 | if ($board->id == 'mo') { |
612 | - $dateOrder = $langs->trans("DateToday") . " > " . $langs->trans("DateReference"); |
|
612 | + $dateOrder = $langs->trans("DateToday")." > ".$langs->trans("DateReference"); |
|
613 | 613 | } else { |
614 | - $dateOrder = $langs->trans("DateReference") . " > " . $langs->trans("DateToday"); |
|
614 | + $dateOrder = $langs->trans("DateReference")." > ".$langs->trans("DateToday"); |
|
615 | 615 | } |
616 | 616 | $warningDelay = ceil(empty($board->warning_delay) ? 0 : $board->warning_delay); |
617 | 617 | $sign = ''; |
@@ -619,7 +619,7 @@ discard block |
||
619 | 619 | $sign = '+'; |
620 | 620 | } |
621 | 621 | |
622 | - $textLateTitle .= " (" . $langs->trans("Late") . " = $dateOrder $sign$warningDelay " . $langs->trans("days") . ")"; |
|
622 | + $textLateTitle .= " (".$langs->trans("Late")." = $dateOrder $sign$warningDelay ".$langs->trans("days").")"; |
|
623 | 623 | |
624 | 624 | if ($board->id == 'bank_account') { |
625 | 625 | $textLateTitle .= '<br><span class="opacitymedium">'.$langs->trans("IfYouDontReconcileDisableProperty", $langs->transnoentitiesnoconv("Conciliable")).'</span>'; |
@@ -92,14 +92,14 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | // General $Variables |
95 | -$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility |
|
95 | +$id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('facid')); // For backward compatibility |
|
96 | 96 | $ref = GETPOST('ref', 'alpha'); |
97 | 97 | $socid = GETPOSTINT('socid'); |
98 | 98 | $action = GETPOST('action', 'aZ09'); |
99 | 99 | $confirm = GETPOST('confirm', 'alpha'); |
100 | 100 | $cancel = GETPOST('cancel', 'alpha'); |
101 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
102 | -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
101 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
102 | +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
103 | 103 | $lineid = GETPOSTINT('lineid'); |
104 | 104 | $userid = GETPOSTINT('userid'); |
105 | 105 | $search_ref = GETPOST('sf_ref', 'alpha') ? GETPOST('sf_ref', 'alpha') : GETPOST('search_ref', 'alpha'); |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | setEventMessages('', $warningMsgLineList, 'warnings'); |
276 | 276 | } |
277 | 277 | |
278 | - header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result); |
|
278 | + header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$result); |
|
279 | 279 | exit(); |
280 | 280 | } else { |
281 | 281 | $langs->load("errors"); |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | // Validation |
402 | 402 | $object->fetch($id); |
403 | 403 | |
404 | - if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life |
|
404 | + if ((preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) && // empty should not happened, but when it occurs, the test save life |
|
405 | 405 | getDolGlobalString('FAC_FORCE_DATE_VALIDATION') // If option enabled, we force invoice date |
406 | 406 | ) { |
407 | 407 | $object->date = dol_now(); |
@@ -834,8 +834,8 @@ discard block |
||
834 | 834 | // We check if invoice has payments |
835 | 835 | $totalpaid = 0; |
836 | 836 | $sql = 'SELECT pf.amount'; |
837 | - $sql .= ' FROM ' . MAIN_DB_PREFIX . 'paiement_facture as pf'; |
|
838 | - $sql .= ' WHERE pf.fk_facture = ' . ((int) $object->id); |
|
837 | + $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf'; |
|
838 | + $sql .= ' WHERE pf.fk_facture = '.((int) $object->id); |
|
839 | 839 | |
840 | 840 | $result = $db->query($sql); |
841 | 841 | if ($result) { |
@@ -911,7 +911,7 @@ discard block |
||
911 | 911 | $tempTva->datev = $object->date; |
912 | 912 | $tempTva->datep = $object->date; |
913 | 913 | $tempTva->amount = $amount; |
914 | - $tempTva->label = $langs->trans('WithholdingTax') . ' - ' . $object->ref; |
|
914 | + $tempTva->label = $langs->trans('WithholdingTax').' - '.$object->ref; |
|
915 | 915 | //$tempTva->paye = 1; |
916 | 916 | $valid = $tempTva->getIdForLabel($tempTva->label); |
917 | 917 | if (!$valid) { |
@@ -939,7 +939,7 @@ discard block |
||
939 | 939 | if ($result < 0) { |
940 | 940 | setEventMessages($object->error, $object->errors, 'errors'); |
941 | 941 | } else { |
942 | - $object->fetch($object->id); // Reload properties |
|
942 | + $object->fetch($object->id); // Reload properties |
|
943 | 943 | } |
944 | 944 | } |
945 | 945 | } else { |
@@ -955,7 +955,7 @@ discard block |
||
955 | 955 | if ($result < 0) { |
956 | 956 | setEventMessages($object->error, $object->errors, 'errors'); |
957 | 957 | } else { |
958 | - $object->fetch($object->id); // Reload properties |
|
958 | + $object->fetch($object->id); // Reload properties |
|
959 | 959 | } |
960 | 960 | } else { |
961 | 961 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); |
@@ -1156,7 +1156,7 @@ discard block |
||
1156 | 1156 | // Set invoice as paid |
1157 | 1157 | $result = $object->setPaid($user); |
1158 | 1158 | if ($result >= 0) { |
1159 | - $object->fetch($object->id); // Reload properties |
|
1159 | + $object->fetch($object->id); // Reload properties |
|
1160 | 1160 | $db->commit(); |
1161 | 1161 | } else { |
1162 | 1162 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -1207,7 +1207,7 @@ discard block |
||
1207 | 1207 | $error++; |
1208 | 1208 | } |
1209 | 1209 | |
1210 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
1210 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
1211 | 1211 | $date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver'); |
1212 | 1212 | |
1213 | 1213 | // Replacement invoice |
@@ -1239,7 +1239,7 @@ discard block |
||
1239 | 1239 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
1240 | 1240 | $object->ref_client = GETPOST('ref_client', 'alphanohtml'); |
1241 | 1241 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
1242 | - $object->model_pdf = GETPOST('model', 'alphanohtml'); |
|
1242 | + $object->model_pdf = GETPOST('model', 'alphanohtml'); |
|
1243 | 1243 | $object->fk_project = GETPOSTINT('projectid'); |
1244 | 1244 | $object->cond_reglement_id = GETPOSTINT('cond_reglement_id'); |
1245 | 1245 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
@@ -1300,9 +1300,9 @@ discard block |
||
1300 | 1300 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
1301 | 1301 | $object->ref_client = GETPOST('ref_client', 'alphanohtml'); |
1302 | 1302 | $object->ref_customer = GETPOST('ref_client', 'alphanohtml'); |
1303 | - $object->model_pdf = GETPOST('model'); |
|
1303 | + $object->model_pdf = GETPOST('model'); |
|
1304 | 1304 | $object->fk_project = GETPOSTINT('projectid'); |
1305 | - $object->cond_reglement_id = 0; // No payment term for a credit note |
|
1305 | + $object->cond_reglement_id = 0; // No payment term for a credit note |
|
1306 | 1306 | $object->mode_reglement_id = GETPOSTINT('mode_reglement_id'); |
1307 | 1307 | $object->fk_account = GETPOSTINT('fk_account'); |
1308 | 1308 | //$object->remise_absolue = price2num(GETPOST('remise_absolue'), 'MU'); |
@@ -1625,7 +1625,7 @@ discard block |
||
1625 | 1625 | $object->note_public = trim(GETPOST('note_public', 'restricthtml')); |
1626 | 1626 | $object->note_private = trim(GETPOST('note_private', 'restricthtml')); |
1627 | 1627 | $object->ref_client = GETPOST('ref_client'); |
1628 | - $object->ref_customer = GETPOST('ref_client'); |
|
1628 | + $object->ref_customer = GETPOST('ref_client'); |
|
1629 | 1629 | $object->model_pdf = GETPOST('model'); |
1630 | 1630 | $object->fk_project = GETPOSTINT('projectid'); |
1631 | 1631 | $object->cond_reglement_id = (GETPOSTINT('type') == 3 ? 1 : GETPOST('cond_reglement_id')); |
@@ -1689,7 +1689,7 @@ discard block |
||
1689 | 1689 | $element = $subelement = 'expedition'; |
1690 | 1690 | } |
1691 | 1691 | |
1692 | - $object->origin = $origin; // deprecated |
|
1692 | + $object->origin = $origin; // deprecated |
|
1693 | 1693 | $object->origin_type = $origin; |
1694 | 1694 | $object->origin_id = $originid; |
1695 | 1695 | |
@@ -1724,7 +1724,7 @@ discard block |
||
1724 | 1724 | dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines or deposit lines"); |
1725 | 1725 | $result = $srcobject->fetch($object->origin_id); |
1726 | 1726 | |
1727 | - $i = -1; // Ensure initialised for static analysis, but with invalid idx. |
|
1727 | + $i = -1; // Ensure initialised for static analysis, but with invalid idx. |
|
1728 | 1728 | // If deposit invoice - down payment with 1 line (fixed amount or percent) |
1729 | 1729 | if (GETPOST('type') == Facture::TYPE_DEPOSIT && in_array($typeamount, array('amount', 'variable'))) { |
1730 | 1730 | // Define the array $amountdeposit |
@@ -2142,7 +2142,7 @@ discard block |
||
2142 | 2142 | if (!empty($origin) && !empty($originid)) { |
2143 | 2143 | include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; |
2144 | 2144 | |
2145 | - $object->origin = $origin; // deprecated |
|
2145 | + $object->origin = $origin; // deprecated |
|
2146 | 2146 | $object->origin_type = $origin; |
2147 | 2147 | $object->origin_id = $originid; |
2148 | 2148 | |
@@ -2168,7 +2168,7 @@ discard block |
||
2168 | 2168 | $line->fk_prev_id = $line->id; |
2169 | 2169 | $line->fetch_optionals(); |
2170 | 2170 | if (getDolGlobalInt('INVOICE_USE_SITUATION') == 2) { |
2171 | - $line->situation_percent = 0; // New situation percent must be 0 (No cumulative) |
|
2171 | + $line->situation_percent = 0; // New situation percent must be 0 (No cumulative) |
|
2172 | 2172 | } else { |
2173 | 2173 | $line->situation_percent = $line->get_prev_progress($object->id); // get good progress including credit note |
2174 | 2174 | } |
@@ -2285,7 +2285,7 @@ discard block |
||
2285 | 2285 | } else { |
2286 | 2286 | $db->rollback(); |
2287 | 2287 | $action = 'create'; |
2288 | - $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
2288 | + $_GET["origin"] = $_POST["origin"]; // Keep GET and POST here ? |
|
2289 | 2289 | $_GET["originid"] = $_POST["originid"]; // Keep GET and POST here ? |
2290 | 2290 | setEventMessages($object->error, $object->errors, 'errors'); |
2291 | 2291 | } |
@@ -2751,7 +2751,7 @@ discard block |
||
2751 | 2751 | */ |
2752 | 2752 | |
2753 | 2753 | // Margin |
2754 | - $fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOST('fournprice'.$predef) : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
2754 | + $fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOST('fournprice'.$predef) : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
2755 | 2755 | $buyingprice = price2num(GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''); // If buying_price is '0', we must keep this value |
2756 | 2756 | |
2757 | 2757 | |
@@ -2887,7 +2887,7 @@ discard block |
||
2887 | 2887 | if ($prod->price_min > $line->subprice) { |
2888 | 2888 | $price_subprice = price($line->subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
2889 | 2889 | $price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto'); |
2890 | - setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings'); |
|
2890 | + setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings'); |
|
2891 | 2891 | } else { |
2892 | 2892 | setEventMessages($prod->error, $prod->errors, 'errors'); |
2893 | 2893 | } |
@@ -3038,7 +3038,7 @@ discard block |
||
3038 | 3038 | $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty); |
3039 | 3039 | |
3040 | 3040 | // Add buying price |
3041 | - $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
3041 | + $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
3042 | 3042 | $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we must keep this value |
3043 | 3043 | |
3044 | 3044 | // Prepare a price equivalent for minimum price check |
@@ -3081,7 +3081,7 @@ discard block |
||
3081 | 3081 | // Define special_code for special lines |
3082 | 3082 | $special_code = GETPOSTINT('special_code'); |
3083 | 3083 | if ($special_code == 3) { |
3084 | - $special_code = 0; // Options should not exists on invoices |
|
3084 | + $special_code = 0; // Options should not exists on invoices |
|
3085 | 3085 | } |
3086 | 3086 | |
3087 | 3087 | $line = new FactureLigne($db); |
@@ -3535,7 +3535,7 @@ discard block |
||
3535 | 3535 | |
3536 | 3536 | |
3537 | 3537 | if ($action == 'update_extras' && $permissiontoeditextra) { |
3538 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
3538 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
3539 | 3539 | |
3540 | 3540 | $attribute_name = GETPOST('attribute', 'aZ09'); |
3541 | 3541 | |
@@ -3652,7 +3652,7 @@ discard block |
||
3652 | 3652 | $fk_account = GETPOSTINT('fk_account'); |
3653 | 3653 | |
3654 | 3654 | // Load objectsrc |
3655 | - $objectsrc = null; // Initialise |
|
3655 | + $objectsrc = null; // Initialise |
|
3656 | 3656 | //$remise_absolue = 0; |
3657 | 3657 | if (!empty($origin) && !empty($originid)) { |
3658 | 3658 | // Parse element/subelement (ex: project_task) |
@@ -3663,7 +3663,7 @@ discard block |
||
3663 | 3663 | $subelement = $regs[2]; |
3664 | 3664 | } |
3665 | 3665 | |
3666 | - $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
3666 | + $dateinvoice = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); // If we enter the 02 january, we need to save the 02 january for server |
|
3667 | 3667 | $date_pointoftax = dol_mktime(0, 0, 0, GETPOSTINT('date_pointoftaxmonth'), GETPOSTINT('date_pointoftaxday'), GETPOSTINT('date_pointoftaxyear'), 'tzserver'); |
3668 | 3668 | |
3669 | 3669 | if ($element == 'project') { |
@@ -3741,8 +3741,8 @@ discard block |
||
3741 | 3741 | $fk_account = (!empty($expesrc->fk_account) ? $expesrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0)); |
3742 | 3742 | |
3743 | 3743 | if (isModEnabled('multicurrency')) { |
3744 | - $currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code)); |
|
3745 | - $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
3744 | + $currency_code = (!empty($expesrc->multicurrency_code) ? $expesrc->multicurrency_code : (!empty($soc->multicurrency_code) ? $soc->multicurrency_code : $objectsrc->multicurrency_code)); |
|
3745 | + $currency_tx = (!empty($expesrc->multicurrency_tx) ? $expesrc->multicurrency_tx : (!empty($soc->multicurrency_tx) ? $soc->multicurrency_tx : $objectsrc->multicurrency_tx)); |
|
3746 | 3746 | } |
3747 | 3747 | |
3748 | 3748 | // replicate input reason |
@@ -3842,7 +3842,7 @@ discard block |
||
3842 | 3842 | print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST" id="formtocreate" name="formtocreate">'; |
3843 | 3843 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
3844 | 3844 | print '<input type="hidden" name="action" id="formtocreateaction" value="add">'; |
3845 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
3845 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
3846 | 3846 | if ($soc->id > 0) { |
3847 | 3847 | print '<input type="hidden" name="socid" value="'.$soc->id.'">'."\n"; |
3848 | 3848 | } |
@@ -4024,7 +4024,7 @@ discard block |
||
4024 | 4024 | print $form->selectarray('typestandard', $arraylist, GETPOST('typestandard', 'aZ09'), 0, 0, 0, '', 1); |
4025 | 4025 | print '</td>';*/ |
4026 | 4026 | if (!getDolGlobalInt('INVOICE_DEPOSIT_INVOICE_ONLY_SAME_LINES')) { |
4027 | - print '<span class="opacitymedium marginleftonly">' . $langs->trans('PercentOfOriginalObject') . '</span>:<input class="right" placeholder="100%" type="text" id="valuestandardinvoice" name="valuestandardinvoice" size="3" value="' . (GETPOSTISSET('valuestandardinvoice') ? GETPOST('valuestandardinvoice', 'alpha') : '100%') . '"/>'; |
|
4027 | + print '<span class="opacitymedium marginleftonly">'.$langs->trans('PercentOfOriginalObject').'</span>:<input class="right" placeholder="100%" type="text" id="valuestandardinvoice" name="valuestandardinvoice" size="3" value="'.(GETPOSTISSET('valuestandardinvoice') ? GETPOST('valuestandardinvoice', 'alpha') : '100%').'"/>'; |
|
4028 | 4028 | } |
4029 | 4029 | } |
4030 | 4030 | print '</div></div>'."\n"; |
@@ -4378,8 +4378,8 @@ discard block |
||
4378 | 4378 | if ($socid > 0) { |
4379 | 4379 | print '<tr><td>'.$langs->trans('DiscountStillRemaining').'</td><td colspan="2">'; |
4380 | 4380 | |
4381 | - $thirdparty = $soc; // used by object_discounts.tpl.php |
|
4382 | - $discount_type = 0; // used by object_discounts.tpl.php |
|
4381 | + $thirdparty = $soc; // used by object_discounts.tpl.php |
|
4382 | + $discount_type = 0; // used by object_discounts.tpl.php |
|
4383 | 4383 | $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid'))); |
4384 | 4384 | include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; |
4385 | 4385 | |
@@ -4420,7 +4420,7 @@ discard block |
||
4420 | 4420 | if (empty($retained_warranty)) { |
4421 | 4421 | if ($objectsrc !== null && property_exists($objectsrc, 'retained_warranty') && !empty($objectsrc->retained_warranty)) { // use previous situation value |
4422 | 4422 | // Facture->retained_warranty (does not exist on Expedition) |
4423 | - $retained_warranty = $objectsrc->retained_warranty; // @phan-suppress-current-line PhanUndeclaredProperty |
|
4423 | + $retained_warranty = $objectsrc->retained_warranty; // @phan-suppress-current-line PhanUndeclaredProperty |
|
4424 | 4424 | } |
4425 | 4425 | } |
4426 | 4426 | $retained_warranty_js_default = !empty($retained_warranty) ? $retained_warranty : getDolGlobalString('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT'); |
@@ -4919,7 +4919,7 @@ discard block |
||
4919 | 4919 | $nbMandated = 0; |
4920 | 4920 | foreach ($object->lines as $line) { |
4921 | 4921 | $res = $line->fetch_product(); |
4922 | - if ($res > 0) { |
|
4922 | + if ($res > 0) { |
|
4923 | 4923 | if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
4924 | 4924 | $nbMandated++; |
4925 | 4925 | break; |
@@ -5162,7 +5162,7 @@ discard block |
||
5162 | 5162 | } |
5163 | 5163 | // Ref customer |
5164 | 5164 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string', '', 0, 1); |
5165 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
5165 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, (int) $usercancreate, 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
5166 | 5166 | // Thirdparty |
5167 | 5167 | $morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'customer'); |
5168 | 5168 | if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { |
@@ -5294,7 +5294,7 @@ discard block |
||
5294 | 5294 | print '</td><td class="valuefield fieldname_type">'; |
5295 | 5295 | print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" name="formposinfo">'; |
5296 | 5296 | print '<input type="hidden" name="action" value="setposinfo">'; |
5297 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
5297 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
5298 | 5298 | if ($action == 'editposinfo') { |
5299 | 5299 | print '<input type="text" class="maxwidth150" name="posmodule" placeholder="'.$langs->trans("POSModule").'" value="'.$object->module_source.'"> '; |
5300 | 5300 | print '<input type="text" class="maxwidth100" name="posterminal" placeholder="'.$langs->trans("Terminal").'" value="'.$object->pos_source.'">'; |
@@ -5620,45 +5620,45 @@ discard block |
||
5620 | 5620 | } |
5621 | 5621 | print '<tr>'; |
5622 | 5622 | // Amount HT |
5623 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
5624 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5623 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
5624 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5625 | 5625 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5626 | 5626 | // Multicurrency Amount HT |
5627 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5627 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5628 | 5628 | } |
5629 | 5629 | print '</tr>'; |
5630 | 5630 | |
5631 | 5631 | print '<tr>'; |
5632 | 5632 | // Amount VAT |
5633 | - print '<td>' . $langs->trans('AmountVAT') . '</td>'; |
|
5634 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5633 | + print '<td>'.$langs->trans('AmountVAT').'</td>'; |
|
5634 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5635 | 5635 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5636 | 5636 | // Multicurrency Amount VAT |
5637 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5637 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5638 | 5638 | } |
5639 | 5639 | print '</tr>'; |
5640 | 5640 | |
5641 | 5641 | // Amount Local Taxes |
5642 | 5642 | if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) { |
5643 | 5643 | print '<tr>'; |
5644 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
5645 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5644 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
5645 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5646 | 5646 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5647 | 5647 | $object->multicurrency_total_localtax1 = (float) price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT'); |
5648 | 5648 | |
5649 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5649 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5650 | 5650 | } |
5651 | 5651 | print '</tr>'; |
5652 | 5652 | } |
5653 | 5653 | |
5654 | 5654 | if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) { |
5655 | 5655 | print '<tr>'; |
5656 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
5657 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5656 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
5657 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5658 | 5658 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5659 | 5659 | $object->multicurrency_total_localtax2 = (float) price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT'); |
5660 | 5660 | |
5661 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5661 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5662 | 5662 | } |
5663 | 5663 | print '</tr>'; |
5664 | 5664 | } |
@@ -5718,11 +5718,11 @@ discard block |
||
5718 | 5718 | |
5719 | 5719 | print '<tr>'; |
5720 | 5720 | // Amount TTC |
5721 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
5722 | - print '<td class="nowraponall amountcard right">' . price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
5721 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
5722 | + print '<td class="nowraponall amountcard right">'.price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
5723 | 5723 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
5724 | 5724 | // Multicurrency Amount TTC |
5725 | - print '<td class="nowrap amountcard right">' . price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
5725 | + print '<td class="nowrap amountcard right">'.price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
5726 | 5726 | } |
5727 | 5727 | print '</tr>'; |
5728 | 5728 | |
@@ -6293,7 +6293,7 @@ discard block |
||
6293 | 6293 | if (isModEnabled('subtotals')) { |
6294 | 6294 | include DOL_DOCUMENT_ROOT.'/core/tpl/subtotal_ajaxrow.tpl.php'; |
6295 | 6295 | } else { |
6296 | - include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; |
|
6296 | + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; |
|
6297 | 6297 | } |
6298 | 6298 | } |
6299 | 6299 | |
@@ -6356,10 +6356,10 @@ discard block |
||
6356 | 6356 | if (!$objectidnext && $object->is_last_in_cycle()) { |
6357 | 6357 | if ($usercanunvalidate) { |
6358 | 6358 | unset($params['attr']['title']); |
6359 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=modif&token=' . newToken(), '', true, $params); |
|
6359 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', true, $params); |
|
6360 | 6360 | } else { |
6361 | 6361 | $params['attr']['title'] = $langs->trans('NotEnoughPermissions'); |
6362 | - print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'] . '?facid=' . $object->id . '&action=modif&token=' . newToken(), '', false, $params); |
|
6362 | + print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER['PHP_SELF'].'?facid='.$object->id.'&action=modif&token='.newToken(), '', false, $params); |
|
6363 | 6363 | } |
6364 | 6364 | } elseif (!$object->is_last_in_cycle()) { |
6365 | 6365 | $params['attr']['title'] = $langs->trans('NotLastInCycle'); |
@@ -6400,7 +6400,7 @@ discard block |
||
6400 | 6400 | $langs->load("contracts"); |
6401 | 6401 | |
6402 | 6402 | if ($usercancreatecontract) { |
6403 | - print '<a class="butAction" href="' . DOL_URL_ROOT . '/contrat/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid . '">' . $langs->trans('AddContract') . '</a>'; |
|
6403 | + print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans('AddContract').'</a>'; |
|
6404 | 6404 | } |
6405 | 6405 | } |
6406 | 6406 | } |
@@ -6650,7 +6650,7 @@ discard block |
||
6650 | 6650 | if ($usercandelete || ($usercancreate && $isErasable == 1)) { // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions) |
6651 | 6651 | $enableDelete = false; |
6652 | 6652 | $deleteHref = '#'; |
6653 | - if ($isErasable > 0 && ! $objectidnext) { |
|
6653 | + if ($isErasable > 0 && !$objectidnext) { |
|
6654 | 6654 | $deleteHref = $_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=delete&token='.newToken(); |
6655 | 6655 | $enableDelete = true; |
6656 | 6656 | } |