Skip to content

Commit 233ab89

Browse files
committed
Fix the field cc invoice if in free mode
1 parent 0b30fd9 commit 233ab89

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

myaccount/tpl/myaccount.tpl.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717

18+
/**
19+
* @var Conf $conf
20+
* @var Translate $langs
21+
* @var Societe $mythirdpartyaccount
22+
*/
23+
1824
// Protection to avoid direct call of template
1925
if (empty($conf) || ! is_object($conf)) {
2026
print "Error, template page can't be called as URL";
@@ -254,14 +260,19 @@
254260
<input type="text" class="inline-block" value="'.$mythirdpartyaccount->array_options['options_lastname'].'" name="lastName">
255261
</div>
256262
</div>
257-
</div>
263+
</div>';
264+
265+
// Add input for the CC invoice
266+
if ($mythirdpartyaccount->array_options['options_checkboxnonprofitorga'] != 'nonprofit' || !getDolGlobalInt("SELLYOURSAAS_ENABLE_FREE_PAYMENT_MODE")) {
267+
print '
258268
<div class="form-group">
259269
<label>'.img_picto('', 'email', 'class="paddingright opacitymedium"').$form->textwithpicto($langs->trans("EmailCCInvoices"), $langs->trans("KeepEmptyToUseMainEmail"), 1, 'help', 'opacitymedium').'</label>
260270
<input type="text" class="form-control" value="'.(GETPOSTISSET('emailccinvoice') ? GETPOST('emailccinvoice') : $mythirdpartyaccount->array_options['options_emailccinvoice']).'" name="emailccinvoice">
261271
<input type="hidden" class="form-control" value="'.$mythirdpartyaccount->array_options['options_emailccinvoice'].'" name="oldemailccinvoice">
262272
</div>
263-
264273
';
274+
}
275+
265276
if (getDolGlobalString('SELLYOURSAAS_ENABLE_OPTINMESSAGES')) {
266277
print '
267278
<div class="form-group paddingtop">

0 commit comments

Comments
 (0)