Skip to content

Commit 06bc448

Browse files
authored
Merge pull request #443 from Hystepik/fix-freemode-confirmation
Fix freemode instance confirmation process
2 parents 85b4790 + a4e86c6 commit 06bc448

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

myaccount/tpl/action_create_recinvoice_after_payment_creation.tpl.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,17 @@
461461
setEventMessages($sellyoursaasutils->error, $sellyoursaasutils->errors, 'errors');
462462
}
463463
}
464+
465+
// Activate all lines of a contract if freemode is enabled
466+
if (!$error && $isfreemodeenabled) {
467+
dol_syslog("--- Now we activate contact lines of contract".$contract->id." for freemode instance", LOG_DEBUG, 0);
468+
469+
$result = $contract->activateAll($user);
470+
if ($result <= 0) {
471+
$error++;
472+
setEventMessages($sellyoursaasutils->error, $sellyoursaasutils->errors, 'errors');
473+
}
474+
}
464475
}
465476
if (! $error && !$thirdpartyhadalreadyapaymentmode) {
466477
$comment = 'Execute remote script on '.$contract->ref.' after the creation of a first payment method';

0 commit comments

Comments
 (0)