Skip to content
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

Conversation

atm-irvine
Copy link

No description provided.

@atm-irvine
Copy link
Author

Merger cette PR : #513

Avant celle-ci

atm-lena
atm-lena previously approved these changes Sep 18, 2024
@@ -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);

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');

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.

Suggested change
dol_include_once('/contact/class/contact.class.php');

Comment on lines +26 to +27
dol_include_once('/clinetworks/class/koesioresource.class.php');
dol_include_once('/koesiosite/class/societesite.class.php');

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.

@atm-irvine atm-irvine closed this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants