-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API CONTRACT specific for CliNetworks Koesio #512
API CONTRACT specific for CliNetworks Koesio #512
Conversation
Merger cette PR : #513 Avant celle-ci |
@@ -1945,7 +1945,7 @@ | |||
if ($objp->fk_product > 0) { | |||
$product = new Product($db); | |||
$product->fetch($objp->fk_product); | |||
$dateactend = dol_time_plus_duree(time(), $product->duration_value, $product->duration_unit); | |||
$dateactend = dol_time_plus_duree(time(), $product->duration_value ?: 0, $product->duration_unit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Est-ce que ce fix-là n'irait pas dans la 17.0 standard ? J'imagine qu'il permet d'éviter un warning ?
@@ -20,6 +20,11 @@ | |||
use Luracast\Restler\RestException; | |||
|
|||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; | |||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; | |||
|
|||
dol_include_once('/contact/class/contact.class.php'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En principe, ce dol_include_once
est inutile puisqu'il y a un require_once
pour la même classe deux lignes plus haut.
dol_include_once('/contact/class/contact.class.php'); |
dol_include_once('/clinetworks/class/koesioresource.class.php'); | ||
dol_include_once('/koesiosite/class/societesite.class.php'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Est-ce qu'il y a une solution alternative à l'inclusion de fichiers de modules externes ?
Le spé client dans Dolibarr doit être évité le plus possible, et quand on en a une, on doit tout faire pour faciliter les montées de version futures, donc avoir le moins de diff possible et baliser ce diff avec des commentaires du style /* SPE CLIENT */ /* END SPE CLIENT */
ainsi que, idéalement (même si en pratique on en voit très peu), des commentaires qui expliquent ce qui nous a obligés à mettre du spé dans Dolibarr.
No description provided.