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

#221 [QuickCreation] add: add const + check statut #256

Conversation

evarisk-francois
Copy link
Contributor

No description provided.

@evarisk-francois evarisk-francois self-assigned this Jun 28, 2024
@evarisk-francois evarisk-francois requested review from evarisk-micka and removed request for nicolas-eoxia June 28, 2024 07:46
@evarisk-francois evarisk-francois added the Enhancement New feature or request label Jun 28, 2024
@@ -81,7 +81,7 @@
$project->opp_amount = price2num(GETPOST('opp_amount', 'int'));
$project->date_c = dol_now();
$project->date_start = dol_now();
$project->statut = 1;
$project->statut = getDolGlobalInt('EASYCRM_PWA_CLOSE_PROJECT_WHEN_OPPORTUNITY_ZERO') > 0 ? 2 : 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il faut éviter d'écrire les valeurs en dur lorsqu'il s'agit de constante
Regarder les constantes de projet pour faire le fix
Il manque un check sur opp_percent

@@ -218,6 +218,9 @@ public function __construct($db)
$i++ => ['EASYCRM_EVENT_DESCRIPTION_VISIBLE', 'integer', 1, '', 0, 'current'],
$i++ => ['EASYCRM_EVENT_CATEGORIES_VISIBLE', 'integer', 1, '', 0, 'current'],

// CONST PWA
$i++ => ['EASYCRM_PWA_CLOSE_PROJECT_WHEN_OPPORTUNITY_ZERO', 'integer', 1, '', 0, 'current'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ici il faut pas set la conf a 1 c'est un comportement spécifique que l'utilisateur peut configurer

@nicolas-eoxia nicolas-eoxia merged commit 5401969 into Eoxia:develop Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 Enhancement New feature or request
2 participants