-
Notifications
You must be signed in to change notification settings - Fork 10
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
#221 [QuickCreation] add: add const + check statut #256
Conversation
@@ -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; |
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.
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
core/modules/modEasyCRM.class.php
Outdated
@@ -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'], |
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.
Ici il faut pas set la conf a 1 c'est un comportement spécifique que l'utilisateur peut configurer
No description provided.