diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 2e26e3709ed..3d1885799c3 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -71,7 +71,6 @@ $adht = new AdherentType($db); $extrafields->fetch_name_optionals_label($object->table_element); $errmsg = ''; -$errmsgs = array(); $defaultdelay = 1; $defaultdelayunit = 'y'; @@ -687,20 +686,19 @@ if ($rowid > 0) $subscriptionstatic = new Subscription($db); $num = $db->num_rows($result); - $i = 0; print ''."\n"; print ''; print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.rowid', '', $param, '', $sortfield, $sortorder); - print ''; - print ''; - print ''; - print ''; - print ''; + print_liste_field_titre('DateCreation', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); + print_liste_field_titre('Type', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); + print_liste_field_titre('DateStart', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); + print_liste_field_titre('DateEnd', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); + print_liste_field_titre('Amount', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); if (!empty($conf->banque->enabled)) { - print ''; + print_liste_field_titre('Account', $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); } print "\n"; @@ -708,6 +706,7 @@ if ($rowid > 0) $adh = new Adherent($db); $adht = new AdherentType($db); + $i = 0; while ($i < $num) { $objp = $db->fetch_object($result); @@ -766,6 +765,13 @@ if ($rowid > 0) print ""; $i++; } + + if (empty($num)) { + $colspan = 6; + if (!empty($conf->banque->enabled)) $colspan++; + print ''; + } + print "
'.$langs->trans("DateCreation").''.$langs->trans("Type").''.$langs->trans("DateStart").''.$langs->trans("DateEnd").''.$langs->trans("Amount").''.$langs->trans("Account").'
'.$langs->trans("None").'
"; } else @@ -1002,7 +1008,7 @@ if ($rowid > 0) print $langs->trans("CreateDolibarrThirdParty"); print ')'; } - if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription", 0); + if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription", 0).''; if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) { $prodtmp = new Product($db); @@ -1027,7 +1033,7 @@ if ($rowid > 0) print $langs->trans("CreateDolibarrThirdParty"); print ')'; } - if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription", 0); + if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. '.$langs->trans("NoVatOnSubscription", 0).''; if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) { $prodtmp = new Product($db); @@ -1070,9 +1076,9 @@ if ($rowid > 0) } } - print ' '; + print ''; - print ''.$langs->trans("SendAcknowledgementByMail").''; + print ''.$langs->trans("SendAcknowledgementByMail").''; print ''; if (!$object->email) { @@ -1117,11 +1123,20 @@ if ($rowid > 0) $helpcontent .= ''.$langs->trans("MailFrom").': '.$conf->global->ADHERENT_MAIL_FROM.'
'."\n"; $helpcontent .= ''.$langs->trans("MailRecipient").': '.$object->email.'
'."\n"; $helpcontent .= ''.$langs->trans("MailTopic").':
'."\n"; - $helpcontent .= $subjecttosend."\n"; + if ($subjecttosend) { + $helpcontent .= $subjecttosend."\n"; + } else { + $langs->load("errors"); + $helpcontent .= ''.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Module310Name")).''."\n"; + } $helpcontent .= "
"; $helpcontent .= ''.$langs->trans("MailText").':
'; - $helpcontent .= dol_htmlentitiesbr($texttosend)."\n"; - + if ($texttosend) { + $helpcontent .= dol_htmlentitiesbr($texttosend)."\n"; + } else { + $langs->load("errors"); + $helpcontent .= ''.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Module310Name")).''."\n"; + } print $form->textwithpicto($tmp, $helpcontent, 1, 'help', '', 0, 2, 'helpemailtosend'); } print ''; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 92144f50934..765502075c2 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1052,7 +1052,7 @@ if ($action == 'create') $numproject = $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1); - print '   '.$langs->trans("AddProject").''; + print ' '; $urloption = '?action=create'; $url = dol_buildpath('comm/action/card.php', 2).$urloption;