mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 19:18:22 +01:00
add new rule
This commit is contained in:
@@ -71,9 +71,7 @@ if ($action == 'updateall')
|
||||
{
|
||||
setEventMessages('ErrorFailedToSaveDate', null, 'errors');
|
||||
$db->rollback();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
setEventMessages('RecordModifiedSuccessfully', null, 'mesgs');
|
||||
$db->commit();
|
||||
}
|
||||
@@ -101,9 +99,7 @@ if ($action == 'update' || $action == 'add')
|
||||
if (!$error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
@@ -199,9 +195,7 @@ if ($conf->facture->enabled)
|
||||
print '<td>';
|
||||
print $form->selectarray('ADHERENT_VAT_FOR_SUBSCRIPTIONS', array('0'=>$langs->trans("NoVatOnSubscription"), 'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) ? '0' : $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0);
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<td class="right">';
|
||||
print $langs->trans("WarningModuleNotActive", $langs->transnoentities("Module85Name"));
|
||||
print '</td>';
|
||||
@@ -234,12 +228,12 @@ print '<br>';
|
||||
*/
|
||||
$constantes = array(
|
||||
'ADHERENT_CARD_TYPE',
|
||||
// 'ADHERENT_CARD_BACKGROUND',
|
||||
//'ADHERENT_CARD_BACKGROUND',
|
||||
'ADHERENT_CARD_HEADER_TEXT',
|
||||
'ADHERENT_CARD_TEXT',
|
||||
'ADHERENT_CARD_TEXT_RIGHT',
|
||||
'ADHERENT_CARD_FOOTER_TEXT'
|
||||
);
|
||||
);
|
||||
|
||||
print load_fiche_titre($langs->trans("MembersCards"), '', '');
|
||||
|
||||
|
||||
@@ -74,9 +74,7 @@ if ($action == 'updateall')
|
||||
{
|
||||
setEventMessages('ErrorFailedToSaveDate', null, 'errors');
|
||||
$db->rollback();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
setEventMessages('RecordModifiedSuccessfully', null, 'mesgs');
|
||||
$db->commit();
|
||||
}
|
||||
@@ -102,8 +100,7 @@ if ($action == 'update' || $action == 'add')
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,16 +61,16 @@ if ($action == 'update')
|
||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_EDITAMOUNT", $editamount, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE", $payonline, 'chaine', 0, '', $conf->entity);
|
||||
if ($forcetype < 0) $res = dolibarr_del_const($db, "MEMBER_NEWFORM_FORCETYPE", $conf->entity);
|
||||
else $res = dolibarr_set_const($db, "MEMBER_NEWFORM_FORCETYPE", $forcetype, 'chaine', 0, '', $conf->entity);
|
||||
else {
|
||||
$res = dolibarr_set_const($db, "MEMBER_NEWFORM_FORCETYPE", $forcetype, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
if (!$res > 0) $error++;
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
@@ -145,9 +145,7 @@ if (empty($conf->global->MEMBER_ENABLE_PUBLIC))
|
||||
$enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setMEMBER_ENABLE_PUBLIC&value=1'.$param.'">';
|
||||
$enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
$enabledisablehtml .= '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Button on, click to disable
|
||||
$enabledisablehtml .= '<a class="reposition valignmiddle" href="'.$_SERVER["PHP_SELF"].'?action=setMEMBER_ENABLE_PUBLIC&value=0'.$param.'">';
|
||||
$enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on');
|
||||
|
||||
@@ -53,9 +53,7 @@ if (GETPOST('actioncode', 'array'))
|
||||
{
|
||||
$actioncode = GETPOST('actioncode', 'array', 3);
|
||||
if (!count($actioncode)) $actioncode = '0';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
|
||||
}
|
||||
$search_agenda_label = GETPOST('search_agenda_label');
|
||||
|
||||
@@ -118,9 +118,7 @@ abstract class ActionsAdherentCardCommon
|
||||
{
|
||||
$this->tpl['company'] = $objsoc->getNomUrl(1);
|
||||
$this->tpl['company_id'] = $objsoc->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->tpl['company'] = $form->select_company($this->object->socid, 'socid', '', 1);
|
||||
}
|
||||
|
||||
@@ -190,9 +188,7 @@ abstract class ActionsAdherentCardCommon
|
||||
|
||||
$objsoc->fetch($this->object->socid);
|
||||
$this->tpl['company'] = $objsoc->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->tpl['company'] = $langs->trans("AdherentNotLinkedToThirdParty");
|
||||
}
|
||||
|
||||
@@ -273,9 +269,7 @@ abstract class ActionsAdherentCardCommon
|
||||
|
||||
$this->object->country_code = $obj->code;
|
||||
$this->object->country = $langs->trans("Country".$obj->code) ? $langs->trans("Country".$obj->code) : $obj->libelle;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,9 +105,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
|
||||
$this->tpl['actionstodo'] = show_actions_todo($conf, $langs, $db, $objsoc, $this->object, 1);
|
||||
|
||||
$this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Confirm delete contact
|
||||
if ($action == 'delete' && $user->rights->adherent->supprimer)
|
||||
{
|
||||
|
||||
@@ -209,9 +209,7 @@ if (empty($reshook))
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans($nuser->error), null, 'errors');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
@@ -231,9 +229,7 @@ if (empty($reshook))
|
||||
setEventMessages($langs->trans($company->error), null, 'errors');
|
||||
setEventMessages($company->error, $company->errors, 'errors');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
@@ -376,21 +372,15 @@ if (empty($reshook))
|
||||
if (!dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1, 0, $_FILES['photo']['error']) > 0)
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Create thumbs
|
||||
$object->addThumbs($newfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
setEventMessages("ErrorBadImageFormat", null, 'errors');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
switch ($_FILES['photo']['error'])
|
||||
{
|
||||
case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini
|
||||
@@ -412,15 +402,11 @@ if (empty($reshook))
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$action = 'edit';
|
||||
}
|
||||
}
|
||||
@@ -527,8 +513,7 @@ if (empty($reshook))
|
||||
if (empty($login)) {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login")), null, 'errors');
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$db->escape($login)."'";
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
@@ -588,9 +573,7 @@ if (empty($reshook))
|
||||
$rowid = $object->id;
|
||||
$id = $object->id;
|
||||
$action = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$db->rollback();
|
||||
|
||||
if ($object->error) {
|
||||
@@ -616,15 +599,11 @@ if (empty($reshook))
|
||||
{
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
header("Location: list.php");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$errmesg = $object->error;
|
||||
}
|
||||
}
|
||||
@@ -689,9 +668,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$error++;
|
||||
if ($object->error) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
@@ -703,9 +680,7 @@ if (empty($reshook))
|
||||
if (!$error)
|
||||
{
|
||||
$db->commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$db->rollback();
|
||||
}
|
||||
$action = '';
|
||||
@@ -770,9 +745,7 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$error++;
|
||||
|
||||
if ($object->error) {
|
||||
@@ -857,9 +830,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
}
|
||||
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
|
||||
$objcanvas->display_canvas($action); // Show template
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// -----------------------------------------
|
||||
// When used in standard mode
|
||||
// -----------------------------------------
|
||||
@@ -1027,9 +998,7 @@ else
|
||||
if ($object->country_id)
|
||||
{
|
||||
print $formcompany->select_state(GETPOST('state_id', 'int') ?GETPOST('state_id', 'int') : $object->state_id, $object->country_code);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print $countrynotdefined;
|
||||
}
|
||||
print '</td></tr>';
|
||||
@@ -1084,9 +1053,7 @@ else
|
||||
if (!empty($backtopage))
|
||||
{
|
||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans('Cancel').'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<input type="button" class="button" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">';
|
||||
}
|
||||
print '</div>';
|
||||
@@ -1123,9 +1090,7 @@ else
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
$object->country_id = $obj->rowid;
|
||||
@@ -1204,9 +1169,7 @@ else
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print $form->selectarray("typeid", $adht->liste_array(), (GETPOSTISSET("typeid") ?GETPOST("typeid", 'int') : $object->typeid));
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print $adht->getNomUrl(1);
|
||||
print '<input type="hidden" name="typeid" value="'.$object->typeid.'">';
|
||||
}
|
||||
@@ -1334,9 +1297,7 @@ else
|
||||
$company = new Societe($db);
|
||||
$result = $company->fetch($object->socid);
|
||||
print $company->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print $langs->trans("NoThirdPartyAssociatedToMember");
|
||||
}
|
||||
print '</td></tr>';
|
||||
@@ -1432,9 +1393,7 @@ else
|
||||
{
|
||||
$companyname = $object->company;
|
||||
if (!empty($fullname)) $companyalias = $fullname;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$companyname = $fullname;
|
||||
if (!empty($object->company)) $companyalias = $object->company;
|
||||
}
|
||||
@@ -1629,8 +1588,7 @@ else
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Password").'</td><td>'.preg_replace('/./i', '*', $object->pass);
|
||||
if ($object->pass) print preg_replace('/./i', '*', $object->pass);
|
||||
else
|
||||
{
|
||||
else {
|
||||
if ($user->admin) print $langs->trans("Crypted").': '.$object->pass_indatabase_crypted;
|
||||
else print $langs->trans("Hidden");
|
||||
}
|
||||
@@ -1651,9 +1609,7 @@ else
|
||||
if ($object->hasDelay()) {
|
||||
print " ".img_warning($langs->trans("Late"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if ($object->need_subscription == 0)
|
||||
{
|
||||
print $langs->trans("SubscriptionNotNeeded");
|
||||
@@ -1662,9 +1618,7 @@ else
|
||||
{
|
||||
print $langs->trans("SubscriptionNotRecorded");
|
||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated
|
||||
}
|
||||
@@ -1691,17 +1645,12 @@ else
|
||||
print '</td>';
|
||||
print '<td class="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr></table></form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($object->socid)
|
||||
{
|
||||
} else {
|
||||
if ($object->socid) {
|
||||
$company = new Societe($db);
|
||||
$result = $company->fetch($object->socid);
|
||||
print $company->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print $langs->trans("NoThirdPartyAssociatedToMember");
|
||||
}
|
||||
}
|
||||
@@ -1716,14 +1665,13 @@ else
|
||||
if ($action == 'editlogin')
|
||||
{
|
||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'userid', '');
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if ($object->user_id)
|
||||
{
|
||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'none');
|
||||
} else {
|
||||
print $langs->trans("NoDolibarrAccess");
|
||||
}
|
||||
else print $langs->trans("NoDolibarrAccess");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -1803,9 +1751,7 @@ else
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?rowid='.$id.'&action=edit">'.$langs->trans("Modify")."</a></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Modify").'</font></div>';
|
||||
}
|
||||
|
||||
@@ -1815,9 +1761,7 @@ else
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?rowid='.$id.'&action=valid">'.$langs->trans("Validate")."</a></div>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Validate").'</font></div>';
|
||||
}
|
||||
}
|
||||
@@ -1828,9 +1772,7 @@ else
|
||||
if ($user->rights->adherent->creer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?rowid='.$id.'&action=valid">'.$langs->trans("Reenable")."</a></div>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Reenable")."</font></div>";
|
||||
}
|
||||
}
|
||||
@@ -1841,9 +1783,7 @@ else
|
||||
if ($user->rights->adherent->supprimer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?rowid='.$id.'&action=resign">'.$langs->trans("Resiliate")."</a></div>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Resiliate")."</font></div>";
|
||||
}
|
||||
}
|
||||
@@ -1855,9 +1795,7 @@ else
|
||||
{
|
||||
if ($object->statut != -1) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_thirdparty">'.$langs->trans("CreateDolibarrThirdParty").'</a></div>';
|
||||
else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("CreateDolibarrThirdParty")."</font></div>";
|
||||
}
|
||||
}
|
||||
@@ -1869,9 +1807,7 @@ else
|
||||
{
|
||||
if ($object->statut != -1) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_user">'.$langs->trans("CreateDolibarrLogin").'</a></div>';
|
||||
else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrLogin").'</a></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("CreateDolibarrLogin")."</font></div>";
|
||||
}
|
||||
}
|
||||
@@ -1880,9 +1816,7 @@ else
|
||||
if ($user->rights->adherent->supprimer)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?rowid='.$object->id.'&action=delete">'.$langs->trans("Delete")."</a></div>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><font class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Delete")."</font></div>";
|
||||
}
|
||||
|
||||
|
||||
@@ -162,9 +162,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg)
|
||||
'photo'=>$objp->photo
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$arrayofmembers[] = array(
|
||||
'textleft'=>$textleft,
|
||||
'textheader'=>$textheader,
|
||||
@@ -226,9 +224,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg)
|
||||
{
|
||||
dol_print_error('', $result);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
@@ -1282,10 +1282,11 @@ class Adherent extends CommonObject
|
||||
|
||||
$this->country_id = $obj->country_id;
|
||||
$this->country_code = $obj->country_code;
|
||||
if ($langs->trans("Country".$obj->country_code) != "Country".$obj->country_code)
|
||||
if ($langs->trans("Country".$obj->country_code) != "Country".$obj->country_code) {
|
||||
$this->country = $langs->transnoentitiesnoconv("Country".$obj->country_code);
|
||||
else
|
||||
} else {
|
||||
$this->country = $obj->country;
|
||||
}
|
||||
|
||||
$this->phone = $obj->phone;
|
||||
$this->phone_perso = $obj->phone_perso;
|
||||
@@ -2037,12 +2038,13 @@ class Adherent extends CommonObject
|
||||
if ($withpictoimg > -2 && $withpictoimg != 2) {
|
||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result .= '<span class="nopadding valignmiddle'.((!isset($this->statut) || $this->statut) ? '' : ' strikefordisabled').
|
||||
($morecss ? ' usertext'.$morecss : '').'">';
|
||||
if ($mode == 'login')
|
||||
if ($mode == 'login') {
|
||||
$result .= dol_trunc($this->login, $maxlen);
|
||||
elseif ($mode == 'ref')
|
||||
} elseif ($mode == 'ref') {
|
||||
$result .= $this->id;
|
||||
else
|
||||
} else {
|
||||
$result .= $this->getFullName($langs, '', ($mode == 'firstname' ? 2 : -1), $maxlen);
|
||||
}
|
||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result .= '</span>';
|
||||
}
|
||||
if ($withpictoimg) $result .= '</div>';
|
||||
@@ -2803,10 +2805,11 @@ class Adherent extends CommonObject
|
||||
$listofids .= ', ...';
|
||||
break;
|
||||
}
|
||||
if (empty($listofids))
|
||||
if (empty($listofids)) {
|
||||
$listofids .= ' [';
|
||||
else
|
||||
} else {
|
||||
$listofids .= ', ';
|
||||
}
|
||||
$listofids .= $idmember;
|
||||
$i++;
|
||||
}
|
||||
@@ -2823,10 +2826,11 @@ class Adherent extends CommonObject
|
||||
$listofids .= ', ...';
|
||||
break;
|
||||
}
|
||||
if (empty($listofids))
|
||||
if (empty($listofids)) {
|
||||
$listofids .= ' [';
|
||||
else
|
||||
} else {
|
||||
$listofids .= ', ';
|
||||
}
|
||||
$listofids .= $idmember;
|
||||
$i++;
|
||||
}
|
||||
|
||||
@@ -146,9 +146,7 @@ class AdherentType extends CommonObject
|
||||
$this->multilangs["$obj->lang"]["email"] = $obj->email;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->error = "Error: ".$this->db->lasterror()." - ".$sql;
|
||||
return -1;
|
||||
}
|
||||
@@ -184,9 +182,7 @@ class AdherentType extends CommonObject
|
||||
$sql2 .= " label='".$this->db->escape($this->label)."',";
|
||||
$sql2 .= " description='".$this->db->escape($this->description)."'";
|
||||
$sql2 .= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description";
|
||||
$sql2 .= ")";
|
||||
$sql2 .= " VALUES(".$this->id.",'".$this->db->escape($key)."','".$this->db->escape($this->label)."',";
|
||||
@@ -214,9 +210,7 @@ class AdherentType extends CommonObject
|
||||
$sql2 .= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',";
|
||||
$sql2 .= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'";
|
||||
$sql2 .= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description";
|
||||
$sql2 .= ")";
|
||||
$sql2 .= " VALUES(".$this->id.",'".$this->db->escape($key)."','".$this->db->escape($this->multilangs["$key"]["label"])."',";
|
||||
@@ -231,9 +225,7 @@ class AdherentType extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// language is not current language and we didn't provide a multilang description for this language
|
||||
}
|
||||
}
|
||||
@@ -274,9 +266,7 @@ class AdherentType extends CommonObject
|
||||
}
|
||||
// End call triggers
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
dol_syslog(get_class($this).'::delMultiLangs error='.$this->error, LOG_ERR);
|
||||
return -1;
|
||||
@@ -336,16 +326,12 @@ class AdherentType extends CommonObject
|
||||
{
|
||||
$this->db->commit();
|
||||
return $this->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR);
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
@@ -418,16 +404,12 @@ class AdherentType extends CommonObject
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
dol_syslog(get_class($this)."::update ".$this->error, LOG_ERR);
|
||||
return -$error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
@@ -458,9 +440,7 @@ class AdherentType extends CommonObject
|
||||
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->db->rollback();
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
@@ -511,9 +491,7 @@ class AdherentType extends CommonObject
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
@@ -552,9 +530,7 @@ class AdherentType extends CommonObject
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print $this->db->error();
|
||||
}
|
||||
return $adherenttypes;
|
||||
@@ -608,9 +584,7 @@ class AdherentType extends CommonObject
|
||||
$this->members = $ret;
|
||||
|
||||
return $ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -239,9 +239,7 @@ class Members extends DolibarrApi
|
||||
if ($member->update(DolibarrApiAccess::$user) >= 0)
|
||||
{
|
||||
return $this->get($id);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
throw new RestException(500, $member->error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,9 +207,7 @@ class MembersTypes extends DolibarrApi
|
||||
if ($membertype->update(DolibarrApiAccess::$user) >= 0)
|
||||
{
|
||||
return $this->get($id);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
throw new RestException(500, $membertype->error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,9 +196,7 @@ class Subscriptions extends DolibarrApi
|
||||
if ($subscription->update(DolibarrApiAccess::$user) > 0)
|
||||
{
|
||||
return $this->get($id);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
throw new RestException(500, $subscription->error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,14 +232,10 @@ class Subscription extends CommonObject
|
||||
$this->note = $obj->note;
|
||||
$this->fk_bank = $obj->fk_bank;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
@@ -286,9 +282,7 @@ class Subscription extends CommonObject
|
||||
if ($result < 0) { $error++; } //Do also here what you must do to rollback action if trigger fail
|
||||
// End call triggers
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$error++;
|
||||
$this->error = $this->db->lasterror();
|
||||
}
|
||||
@@ -355,28 +349,20 @@ class Subscription extends CommonObject
|
||||
{
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->error = $accountline->error;
|
||||
$this->db->rollback();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->db->commit();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$this->db->commit();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$error++;
|
||||
$this->error = $this->db->lasterror();
|
||||
}
|
||||
@@ -488,9 +474,7 @@ class Subscription extends CommonObject
|
||||
}
|
||||
|
||||
$this->db->free($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,14 +158,10 @@ if ($id > 0)
|
||||
$param = '&id='.$object->id;
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
|
||||
print "<br><br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
print $langs->trans("ErrorRecordNotFound");
|
||||
}
|
||||
|
||||
@@ -79,9 +79,7 @@ if ($resql)
|
||||
$i++;
|
||||
}
|
||||
print "<hr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
@@ -331,9 +331,7 @@ if ($resql)
|
||||
$staticmember->fk_soc = $obj->fk_soc;
|
||||
$staticmember->fetch_thirdparty();
|
||||
$staticmember->name = $staticmember->thirdparty->name;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$staticmember->name = $obj->company;
|
||||
}
|
||||
$staticmember->ref = $staticmember->getFullName($langs);
|
||||
@@ -349,9 +347,7 @@ if ($resql)
|
||||
}
|
||||
print "</table></div>";
|
||||
print "<br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
@@ -411,9 +407,7 @@ if ($resql)
|
||||
}
|
||||
print "</table></div>";
|
||||
print "<br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
@@ -176,9 +176,7 @@ if ($result > 0)
|
||||
{
|
||||
$langs->load("errors");
|
||||
print '<tr class="oddeven"><td colspan="2"><font class="error">'.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Member")).'</font></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$records = $ldap->getAttribute($dn, $search);
|
||||
|
||||
//print_r($records);
|
||||
@@ -189,23 +187,17 @@ if ($result > 0)
|
||||
if (!is_array($records))
|
||||
{
|
||||
print '<tr class="oddeven"><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$result = show_ldap_content($records, 0, $records['count'], true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<tr class="oddeven"><td colspan="2">'.$langs->trans("LDAPRecordNotFound").' (dn='.$dn.' - search='.$search.')</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
$ldap->unbind();
|
||||
$ldap->close();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
setEventMessages($ldap->error, $ldap->errors, 'errors');
|
||||
}
|
||||
|
||||
|
||||
@@ -214,9 +214,7 @@ if (empty($reshook))
|
||||
if ($result < 0 && !count($tmpmember->errors))
|
||||
{
|
||||
setEventMessages($tmpmember->error, $tmpmember->errors, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if ($result > 0) $nbclose++;
|
||||
}
|
||||
}
|
||||
@@ -226,9 +224,7 @@ if (empty($reshook))
|
||||
setEventMessages($langs->trans("XMembersClosed", $nbclose), null, 'mesgs');
|
||||
|
||||
$db->commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
@@ -858,17 +854,13 @@ while ($i < min($num, $limit))
|
||||
print " ".img_warning($langs->trans("SubscriptionLate").$textlate);
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<td class="nowrap left">';
|
||||
if ($obj->subscription == 'yes')
|
||||
{
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
if ($obj->statut > 0) print " ".img_warning();
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@@ -93,9 +93,7 @@ if ($resql)
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
@@ -106,13 +104,10 @@ dol_fiche_head($head, 'statsbyproperties', $langs->trans("Statistics"), -1, 'use
|
||||
|
||||
|
||||
// Print title
|
||||
if (!count($data))
|
||||
{
|
||||
if (!count($data)) {
|
||||
print $langs->trans("NoValidatedMemberYet").'<br>';
|
||||
print '<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print $langs->trans("MembersByNature").'<br>';
|
||||
print '<br>';
|
||||
}
|
||||
|
||||
@@ -200,9 +200,7 @@ if ($mode)
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
@@ -218,15 +216,12 @@ if ($mode && !count($data))
|
||||
{
|
||||
print $langs->trans("NoValidatedMemberYet").'<br>';
|
||||
print '<br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if ($mode == 'memberbycountry') print $langs->trans("MembersByCountryDesc").'<br>';
|
||||
elseif ($mode == 'memberbystate') print $langs->trans("MembersByStateDesc").'<br>';
|
||||
elseif ($mode == 'memberbytown') print $langs->trans("MembersByTownDesc").'<br>';
|
||||
elseif ($mode == 'memberbyregion') print $langs->trans("MembersByRegion").'<br>'; //+
|
||||
else
|
||||
{
|
||||
else {
|
||||
print $langs->trans("MembersStatisticsDesc").'<br>';
|
||||
print '<br>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?mode=memberbycountry">'.$langs->trans("MembersStatisticsByCountries").'</a><br>';
|
||||
|
||||
@@ -128,13 +128,11 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
|
||||
$langs->load("errors");
|
||||
setEventMessages($company->error, $company->errors, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$action = 'addsubscription';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
@@ -276,8 +274,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
$error++;
|
||||
$action = 'addsubscription';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if (!empty($conf->banque->enabled) && $_POST["paymentsave"] != 'none')
|
||||
{
|
||||
if ($_POST["subscription"])
|
||||
@@ -286,8 +283,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
if ($_POST["paymentsave"] != 'invoiceonly' && !$_POST["operation"]) $errmsg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode"));
|
||||
if ($_POST["paymentsave"] != 'invoiceonly' && !($_POST["accountid"] > 0)) $errmsg = $langs->trans("ErrorFieldRequired", $langs->transnoentities("FinancialAccount"));
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if ($_POST["accountid"]) $errmsg = $langs->trans("ErrorDoNotProvideAccountsIfNullAmount");
|
||||
}
|
||||
if ($errmsg)
|
||||
@@ -323,8 +319,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
$error++;
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
// If an invoice was created, it is into $object->invoice
|
||||
}
|
||||
}
|
||||
@@ -333,8 +328,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
{
|
||||
$db->commit();
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$db->rollback();
|
||||
$action = 'addsubscription';
|
||||
}
|
||||
@@ -403,13 +397,11 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
$errmsg = $object->error;
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
setEventMessages($langs->trans("EmailSentToMember", $object->email), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
setEventMessages($langs->trans("NoEmailSentToMember"), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
@@ -548,15 +540,13 @@ if ($rowid > 0)
|
||||
print " ".img_warning($langs->trans("Late"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if (!$adht->subscription)
|
||||
{
|
||||
print $langs->trans("SubscriptionNotRecorded");
|
||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Display a delay picto only if it is not a draft and is not canceled
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print $langs->trans("SubscriptionNotReceived");
|
||||
if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Display a delay picto only if it is not a draft and is not canceled
|
||||
}
|
||||
@@ -587,16 +577,14 @@ if ($rowid > 0)
|
||||
print '<td class="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr></table></form>';
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if ($object->fk_soc)
|
||||
{
|
||||
$company = new Societe($db);
|
||||
$result = $company->fetch($object->fk_soc);
|
||||
print $company->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
print $langs->trans("NoThirdPartyAssociatedToMember");
|
||||
}
|
||||
}
|
||||
@@ -623,8 +611,7 @@ if ($rowid > 0)
|
||||
{
|
||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'userid', '');
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
if ($object->user_id)
|
||||
{
|
||||
$form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id, $object->user_id, 'none');
|
||||
@@ -755,9 +742,7 @@ if ($rowid > 0)
|
||||
|
||||
$accountstatic->ref = $objp->ref;
|
||||
print $accountstatic->getNomUrl(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print ' ';
|
||||
}
|
||||
print '</td>';
|
||||
@@ -773,9 +758,7 @@ if ($rowid > 0)
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
@@ -814,9 +797,7 @@ if ($rowid > 0)
|
||||
if (GETPOST('paymentsave') == 'bankdirect') $bankdirect = 1;
|
||||
if (GETPOST('paymentsave') == 'invoiceonly') $invoiceonly = 1;
|
||||
if (GETPOST('paymentsave') == 'bankviainvoice') $bankviainvoice = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankviainvoice' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) $bankviainvoice = 1;
|
||||
elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && !empty($conf->banque->enabled)) $bankdirect = 1;
|
||||
elseif (!empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && !empty($conf->banque->enabled) && !empty($conf->societe->enabled) && !empty($conf->facture->enabled)) $invoiceonly = 1;
|
||||
@@ -870,9 +851,7 @@ if ($rowid > 0)
|
||||
{
|
||||
$companyname = $object->company;
|
||||
if (!empty($fullname)) $companyalias = $fullname;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$companyname = $fullname;
|
||||
if (!empty($object->company)) $companyalias = $object->company;
|
||||
}
|
||||
@@ -999,8 +978,7 @@ if ($rowid > 0)
|
||||
//if (empty($object->fk_soc)) print ' disabled';
|
||||
print '> '.$langs->trans("MoreActionInvoiceOnly");
|
||||
if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
||||
else
|
||||
{
|
||||
else {
|
||||
print ' (';
|
||||
if (empty($object->fk_soc)) print img_warning($langs->trans("NoThirdPartyAssociatedToMember"));
|
||||
print $langs->trans("NoThirdPartyAssociatedToMember");
|
||||
@@ -1009,8 +987,7 @@ if ($rowid > 0)
|
||||
print '</a>)';
|
||||
}
|
||||
if (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) || $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS != 'defaultforfoundationcountry') print '. <span class="opacitymedium">'.$langs->trans("NoVatOnSubscription", 0).'</span>';
|
||||
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled)))
|
||||
{
|
||||
if (!empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) && (!empty($conf->product->enabled) || !empty($conf->service->enabled))) {
|
||||
$prodtmp = new Product($db);
|
||||
$prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
|
||||
print '. '.$langs->transnoentitiesnoconv("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS", $prodtmp->getNomUrl(1)); // must use noentitiesnoconv to avoid to encode html into getNomUrl of product
|
||||
@@ -1024,8 +1001,7 @@ if ($rowid > 0)
|
||||
//if (empty($object->fk_soc)) print ' disabled';
|
||||
print '> '.$langs->trans("MoreActionBankViaInvoice");
|
||||
if ($object->fk_soc) print ' ('.$langs->trans("ThirdParty").': '.$company->getNomUrl(1).')';
|
||||
else
|
||||
{
|
||||
else {
|
||||
print ' (';
|
||||
if (empty($object->fk_soc)) print img_warning($langs->trans("NoThirdPartyAssociatedToMember"));
|
||||
print $langs->trans("NoThirdPartyAssociatedToMember");
|
||||
@@ -1083,9 +1059,7 @@ if ($rowid > 0)
|
||||
if (!$object->email)
|
||||
{
|
||||
print $langs->trans("NoEMail");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$adht = new AdherentType($db);
|
||||
$adht->fetch($object->typeid);
|
||||
|
||||
@@ -1158,9 +1132,7 @@ if ($rowid > 0)
|
||||
|
||||
//print '</td></tr>';
|
||||
//print '</table>';
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
print $langs->trans("ErrorRecordNotFound");
|
||||
}
|
||||
|
||||
@@ -85,9 +85,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'update' && !$cance
|
||||
if ($accountline->rappro)
|
||||
{
|
||||
$errmsg = $langs->trans("SubscriptionLinkedToConciliatedTransaction");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$accountline->datev = dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']);
|
||||
$accountline->dateo = dol_mktime($_POST['datesubhour'], $_POST['datesubmin'], 0, $_POST['datesubmonth'], $_POST['datesubday'], $_POST['datesubyear']);
|
||||
$accountline->amount = $_POST["amount"];
|
||||
@@ -116,17 +114,13 @@ if ($user->rights->adherent->cotisation->creer && $action == 'update' && !$cance
|
||||
|
||||
header("Location: card.php?rowid=".$object->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$db->rollback();
|
||||
|
||||
if ($object->error)
|
||||
{
|
||||
$errmsg = $object->error;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
foreach ($object->errors as $error)
|
||||
{
|
||||
if ($errmsg) $errmsg .= '<br>';
|
||||
@@ -135,9 +129,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'update' && !$cance
|
||||
}
|
||||
$action = '';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
@@ -151,9 +143,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->adherent-
|
||||
{
|
||||
header("Location: ".DOL_URL_ROOT."/adherents/card.php?rowid=".$object->fk_adherent);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$mesg = $adh->error;
|
||||
}
|
||||
}
|
||||
@@ -248,9 +238,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
$bankline = new AccountLine($db);
|
||||
$result = $bankline->fetch($object->fk_bank);
|
||||
print $bankline->getNomUrl(1, 0, 'showall');
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print $langs->trans("NoneF");
|
||||
}
|
||||
print '</td></tr>';
|
||||
@@ -355,9 +343,7 @@ if ($rowid && $action != 'edit')
|
||||
$bankline = new AccountLine($db);
|
||||
$result = $bankline->fetch($object->fk_bank);
|
||||
print $bankline->getNomUrl(1, 0, 'showall');
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print $langs->trans("NoneF");
|
||||
}
|
||||
print '</td></tr>';
|
||||
@@ -382,9 +368,7 @@ if ($rowid && $action != 'edit')
|
||||
if (!$bankline->rappro)
|
||||
{
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"]."?rowid=".$object->id."&action=edit\">".$langs->trans("Modify")."</a></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" title="'.$langs->trans("BankLineConciliated")."\" href=\"#\">".$langs->trans("Modify")."</a></div>";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4047,8 +4047,8 @@ function dol_print_error($db = '', $error = '', $errors = null)
|
||||
}
|
||||
|
||||
if (empty($dolibarr_main_prod)) print $out;
|
||||
else // This should not happen, except if there is a bug somewhere. Enabled and check log in such case.
|
||||
{
|
||||
else {
|
||||
// This should not happen, except if there is a bug somewhere. Enabled and check log in such case.
|
||||
print 'This website or feature is currently temporarly not available.<br><br>This may be due to a maintenance operation. Current status of operation are on next line...<br><br>'."\n";
|
||||
$langs->load("errors");
|
||||
print $langs->trans("DolibarrHasDetectedError").'. ';
|
||||
|
||||
Reference in New Issue
Block a user