@@ -373,8 +373,8 @@ discard block |
||
373 | 373 | /** |
374 | 374 | * Shipment on process |
375 | 375 | */ |
376 | - const STATUS_SHIPMENTONPROCESS = 2; // We set this status when a shipment is validated |
|
377 | - const STATUS_ACCEPTED = 2; // For backward compatibility. Use key STATUS_SHIPMENTONPROCESS instead. |
|
376 | + const STATUS_SHIPMENTONPROCESS = 2; // We set this status when a shipment is validated |
|
377 | + const STATUS_ACCEPTED = 2; // For backward compatibility. Use key STATUS_SHIPMENTONPROCESS instead. |
|
378 | 378 | |
379 | 379 | /** |
380 | 380 | * Closed (Sent, billed or not) |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | if (getDolGlobalString('COMMANDE_ADDON')) { |
408 | 408 | $mybool = false; |
409 | 409 | |
410 | - $file = getDolGlobalString('COMMANDE_ADDON') . ".php"; |
|
410 | + $file = getDolGlobalString('COMMANDE_ADDON').".php"; |
|
411 | 411 | $classname = getDolGlobalString('COMMANDE_ADDON'); |
412 | 412 | |
413 | 413 | // Include file with class |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | // Set new ref and current status |
591 | 591 | if (!$error) { |
592 | 592 | $this->ref = $num; |
593 | - $this->statut = self::STATUS_VALIDATED; // deprecated |
|
593 | + $this->statut = self::STATUS_VALIDATED; // deprecated |
|
594 | 594 | $this->status = self::STATUS_VALIDATED; |
595 | 595 | } |
596 | 596 | |
@@ -1212,7 +1212,7 @@ discard block |
||
1212 | 1212 | if ($objsoc->fetch($socid) > 0) { |
1213 | 1213 | $this->socid = $objsoc->id; |
1214 | 1214 | $this->cond_reglement_id = (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); |
1215 | - $this->deposit_percent = (!empty($objsoc->deposit_percent) ? $objsoc->deposit_percent : 0); |
|
1215 | + $this->deposit_percent = (!empty($objsoc->deposit_percent) ? $objsoc->deposit_percent : 0); |
|
1216 | 1216 | $this->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); |
1217 | 1217 | $this->fk_project = 0; |
1218 | 1218 | $this->fk_delivery_address = 0; |
@@ -1303,8 +1303,8 @@ discard block |
||
1303 | 1303 | { |
1304 | 1304 | global $conf, $hookmanager; |
1305 | 1305 | |
1306 | - require_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php'; |
|
1307 | - require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; |
|
1306 | + require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; |
|
1307 | + require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
|
1308 | 1308 | |
1309 | 1309 | $error = 0; |
1310 | 1310 | |
@@ -1336,7 +1336,7 @@ discard block |
||
1336 | 1336 | $line->fk_parent_line = $object->lines[$i]->fk_parent_line; |
1337 | 1337 | $line->fk_unit = $object->lines[$i]->fk_unit; |
1338 | 1338 | |
1339 | - $line->date_start = $object->lines[$i]->date_start; |
|
1339 | + $line->date_start = $object->lines[$i]->date_start; |
|
1340 | 1340 | $line->date_end = $object->lines[$i]->date_end; |
1341 | 1341 | |
1342 | 1342 | $line->fk_fournprice = $object->lines[$i]->fk_fournprice; |
@@ -3566,15 +3566,15 @@ discard block |
||
3566 | 3566 | //$sql.= " AND c.fk_statut IN (1,2,3) AND c.facture = 0"; |
3567 | 3567 | if ($mode == 'toship') { |
3568 | 3568 | // An order to ship is an open order (validated or in progress) |
3569 | - $sql .= " AND c.fk_statut IN (" . self::STATUS_VALIDATED . "," . self::STATUS_SHIPMENTONPROCESS . ")"; |
|
3569 | + $sql .= " AND c.fk_statut IN (".self::STATUS_VALIDATED.",".self::STATUS_SHIPMENTONPROCESS.")"; |
|
3570 | 3570 | } |
3571 | 3571 | if ($mode == 'tobill') { |
3572 | 3572 | // An order to bill is an order not already billed |
3573 | - $sql .= " AND c.fk_statut IN (" . self::STATUS_VALIDATED . "," . self::STATUS_SHIPMENTONPROCESS . ", " . self::STATUS_CLOSED . ") AND c.facture = 0"; |
|
3573 | + $sql .= " AND c.fk_statut IN (".self::STATUS_VALIDATED.",".self::STATUS_SHIPMENTONPROCESS.", ".self::STATUS_CLOSED.") AND c.facture = 0"; |
|
3574 | 3574 | } |
3575 | 3575 | if ($mode == 'shippedtobill') { |
3576 | 3576 | // An order shipped and to bill is a delivered order not already billed |
3577 | - $sql .= " AND c.fk_statut IN (" . self::STATUS_CLOSED . ") AND c.facture = 0"; |
|
3577 | + $sql .= " AND c.fk_statut IN (".self::STATUS_CLOSED.") AND c.facture = 0"; |
|
3578 | 3578 | } |
3579 | 3579 | if ($user->socid) { |
3580 | 3580 | $sql .= " AND c.fk_soc = ".((int) $user->socid); |
@@ -3900,7 +3900,7 @@ discard block |
||
3900 | 3900 | } |
3901 | 3901 | |
3902 | 3902 | global $action; |
3903 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
3903 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
3904 | 3904 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
3905 | 3905 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
3906 | 3906 | if ($reshook > 0) { |
@@ -4303,7 +4303,7 @@ discard block |
||
4303 | 4303 | $objp = $this->db->fetch_object($result); |
4304 | 4304 | |
4305 | 4305 | if (!$objp) { |
4306 | - $this->error = 'OrderLine with id '. $rowid .' not found sql='.$sql; |
|
4306 | + $this->error = 'OrderLine with id '.$rowid.' not found sql='.$sql; |
|
4307 | 4307 | return 0; |
4308 | 4308 | } |
4309 | 4309 | |
@@ -4388,8 +4388,8 @@ discard block |
||
4388 | 4388 | // check if order line is not in a shipment line before deleting |
4389 | 4389 | $sqlCheckShipmentLine = "SELECT"; |
4390 | 4390 | $sqlCheckShipmentLine .= " ed.rowid"; |
4391 | - $sqlCheckShipmentLine .= " FROM " . MAIN_DB_PREFIX . "expeditiondet ed"; |
|
4392 | - $sqlCheckShipmentLine .= " WHERE ed.fk_elementdet = " . ((int) $this->id); |
|
4391 | + $sqlCheckShipmentLine .= " FROM ".MAIN_DB_PREFIX."expeditiondet ed"; |
|
4392 | + $sqlCheckShipmentLine .= " WHERE ed.fk_elementdet = ".((int) $this->id); |
|
4393 | 4393 | |
4394 | 4394 | $resqlCheckShipmentLine = $this->db->query($sqlCheckShipmentLine); |
4395 | 4395 | if (!$resqlCheckShipmentLine) { |
@@ -4402,13 +4402,13 @@ discard block |
||
4402 | 4402 | if ($num > 0) { |
4403 | 4403 | $error++; |
4404 | 4404 | $objCheckShipmentLine = $this->db->fetch_object($resqlCheckShipmentLine); |
4405 | - $this->error = $langs->trans('ErrorRecordAlreadyExists') . ' : ' . $langs->trans('ShipmentLine') . ' ' . $objCheckShipmentLine->rowid; |
|
4405 | + $this->error = $langs->trans('ErrorRecordAlreadyExists').' : '.$langs->trans('ShipmentLine').' '.$objCheckShipmentLine->rowid; |
|
4406 | 4406 | $this->errors[] = $this->error; |
4407 | 4407 | } |
4408 | 4408 | $this->db->free($resqlCheckShipmentLine); |
4409 | 4409 | } |
4410 | 4410 | if ($error) { |
4411 | - dol_syslog(__METHOD__ . 'Error ; ' . $this->error, LOG_ERR); |
|
4411 | + dol_syslog(__METHOD__.'Error ; '.$this->error, LOG_ERR); |
|
4412 | 4412 | return -1; |
4413 | 4413 | } |
4414 | 4414 | |
@@ -4424,7 +4424,7 @@ discard block |
||
4424 | 4424 | } |
4425 | 4425 | |
4426 | 4426 | if (!$error) { |
4427 | - $sql = 'DELETE FROM ' . MAIN_DB_PREFIX . "commandedet WHERE rowid = " . ((int) $this->id); |
|
4427 | + $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commandedet WHERE rowid = ".((int) $this->id); |
|
4428 | 4428 | |
4429 | 4429 | dol_syslog("OrderLine::delete", LOG_DEBUG); |
4430 | 4430 | $resql = $this->db->query($sql); |
@@ -4439,7 +4439,7 @@ discard block |
||
4439 | 4439 | $result = $this->deleteExtraFields(); |
4440 | 4440 | if ($result < 0) { |
4441 | 4441 | $error++; |
4442 | - dol_syslog(get_class($this) . "::delete error -4 " . $this->error, LOG_ERR); |
|
4442 | + dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); |
|
4443 | 4443 | } |
4444 | 4444 | } |
4445 | 4445 | |
@@ -4449,8 +4449,8 @@ discard block |
||
4449 | 4449 | } |
4450 | 4450 | |
4451 | 4451 | foreach ($this->errors as $errmsg) { |
4452 | - dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR); |
|
4453 | - $this->error .= ($this->error ? ', ' . $errmsg : $errmsg); |
|
4452 | + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); |
|
4453 | + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); |
|
4454 | 4454 | } |
4455 | 4455 | $this->db->rollback(); |
4456 | 4456 | return -1 * $error; |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | </a> |
632 | 632 | |
633 | 633 | <!-- Made with [OSS Insight](https://ossinsight.io/) --> |
634 | -END; |
|
634 | +end; |
|
635 | 635 | |
636 | 636 | $html .= '</section>'."\n"; |
637 | 637 | |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | |
669 | 669 | <!-- Made with [OSS Insight](https://ossinsight.io/) --> |
670 | 670 | |
671 | -END; |
|
671 | +end; |
|
672 | 672 | |
673 | 673 | |
674 | 674 | $html .= '<!-- '; |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | <a href="https://github.com/Dolibarr/dolibarr/graphs/contributors"><img src="https://camo.githubusercontent.com/a641a400eef38e00a93b572dcfc30d13ceaaeefbca951d09ed9189142d20cf62/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f646f6c69626172722f636f6e7472696275746f72732e7376673f77696474683d38393026627574746f6e3d66616c7365" alt="Dolibarr" data-canonical-src="https://opencollective.com/dolibarr/contributors.svg?width=890&button=false" style="max-width: 100%;"></a> |
696 | 696 | </center> |
697 | 697 | <br> |
698 | -END; |
|
698 | +end; |
|
699 | 699 | |
700 | 700 | /* |
701 | 701 | $html .= <<<END |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | </a> |
725 | 725 | |
726 | 726 | <!-- Made with [OSS Insight](https://ossinsight.io/) --> |
727 | -END; |
|
727 | +end; |
|
728 | 728 | |
729 | 729 | $html .= '</div>'; |
730 | 730 |