Skip to content

Commit e3b429b

Browse files
committed
More complete warning for mandataroy info not complete
1 parent 9a48e8f commit e3b429b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
## Unreleased
55

6+
* NEW Add Profid (SIRET) in company profile. Ask to fill it if mandatory (For France).
67
* NEW Remove automatically ending / in directory name in setup of package(this avoid errors and headach in setup phase)
78
* NEW Reorganize menu for reseller and module providers
89
* NEW Add option SELLYOURSAAS_DASHBOARD_OFF to disallow login/access to dashboard

myaccount/tpl/myaccount.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185

186186
print '<div class="form-group"><br>
187187
<label>'.$langs->transcountry("ProfId1Short", $mythirdpartyaccount->country_code).'</label> ';
188-
if ($mandatoryprofid && ! empty($mythirdpartyaccount->idprof1) && empty($mythirdpartyaccount->idprof1)) {
188+
if ($mandatoryprofid && empty($mythirdpartyaccount->idprof1)) {
189189
print img_warning($langs->trans("Mandatory"), '', 'hideifnoprof');
190190
}
191191

myaccount/tpl/support.tpl.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,12 @@
124124

125125
print '</div></div></div>';
126126
} else {
127-
// Define if mandatory contact info are set
127+
// Define if mandatory contact information are complete
128128
$mandatoryInfoAreNotSet = ((!empty($mythirdpartyaccount->tva_assuj) && empty($mythirdpartyaccount->tva_intra) && !getDolGlobalString('SELLYOURSAAS_ENABLE_FREE_PAYMENT_MODE'))
129129
|| empty($mythirdpartyaccount->array_options['options_firstname'])
130-
|| empty($mythirdpartyaccount->array_options['options_lastname']));
130+
|| empty($mythirdpartyaccount->array_options['options_lastname'])
131+
|| ($mythirdpartyaccount->country_code == 'FR' && empty($mythirdpartyaccount->idprof1))
132+
);
131133

132134
print '
133135
<div class="row" id="choosechannel">

0 commit comments

Comments
 (0)