Skip to content

Commit 0b30fd9

Browse files
committed
Fix message
1 parent 547ad2c commit 0b30fd9

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

class/sellyoursaasutils.class.php

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3429,13 +3429,24 @@ private function doSuspendInstances($mode, $noapachereload = 0, $maxnbofinstance
34293429
$contractprocessed[$object->id]=$object->ref;
34303430

34313431
// Send an email to warn customer of suspension
3432-
if ($mode == 'test') {
3433-
$labeltemplate = 'CustomerAccountSuspendedTrial';
3434-
}
3435-
if ($mode == 'paid') {
3436-
$labeltemplate = 'CustomerAccountSuspended';
3432+
3433+
if ($object->thirdparty->array_options['options_checkboxnonprofitorga'] == 'nonprofit' && getDolGlobalInt("SELLYOURSAAS_ENABLE_FREE_PAYMENT_MODE")) {
3434+
if ($mode == 'test') {
3435+
$labeltemplate = 'CustomerAccountSuspendedTrialFreeInstance';
3436+
}
3437+
if ($mode == 'paid') {
3438+
$labeltemplate = 'CustomerAccountSuspended'; // TODO When this case occurs ? Do we have to use another mesaage key ?
3439+
}
3440+
} else {
3441+
if ($mode == 'test') {
3442+
$labeltemplate = 'CustomerAccountSuspendedTrial';
3443+
}
3444+
if ($mode == 'paid') {
3445+
$labeltemplate = 'CustomerAccountSuspended';
3446+
}
34373447
}
34383448

3449+
34393450
dol_syslog("Now we will send an email to customer id=".$object->thirdparty->id." with label ".$labeltemplate);
34403451

34413452
// Send deployment email

0 commit comments

Comments
 (0)