New: Bouton "Supprimer type"
This commit is contained in:
parent
69e92adef0
commit
d619eb975c
@ -93,18 +93,18 @@ if ($_POST["action"] == 'cotisation' && ! $_POST["cancel"])
|
||||
|
||||
if ($adht->cotisation)
|
||||
{
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
{
|
||||
if (! $_POST["label"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Label"));
|
||||
if (! $_POST["operation"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode"));
|
||||
if (! $_POST["accountid"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("FinancialAccount"));
|
||||
if ($errmsg) $action='addsubscription';
|
||||
}
|
||||
if (! $_POST["cotisation"] > 0)
|
||||
{
|
||||
$errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount"));
|
||||
$action='addsubscription';
|
||||
}
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
{
|
||||
if (! $_POST["accountid"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("FinancialAccount"));
|
||||
if (! $_POST["operation"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode"));
|
||||
if (! $_POST["label"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Label"));
|
||||
if ($errmsg) $action='addsubscription';
|
||||
}
|
||||
}
|
||||
|
||||
if ($action=='cotisation')
|
||||
|
||||
@ -69,77 +69,6 @@ if ($_POST["action"] == 'confirm_sendinfo' && $_POST["confirm"] == 'yes')
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if ($_POST["action"] == 'cotisation')
|
||||
{
|
||||
$adh->id = $rowid;
|
||||
$adh->fetch($rowid);
|
||||
|
||||
$reday=$_POST["reday"];
|
||||
$remonth=$_POST["remonth"];
|
||||
$reyear=$_POST["reyear"];
|
||||
if ($_POST["reyear"] && $_POST["remonth"] && $_POST["reday"])
|
||||
{
|
||||
$datecotisation=dolibarr_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]);
|
||||
}
|
||||
$cotisation=$_POST["cotisation"];
|
||||
|
||||
$accountid=$_POST["accountid"];
|
||||
$operation=$_POST["operation"];
|
||||
$label=$_POST["label"];
|
||||
$num_chq=$_POST["num_chq"];
|
||||
|
||||
|
||||
if (! $datecotisation)
|
||||
{
|
||||
$errmsg=$langs->trans("BadDateFormat");
|
||||
$action='';
|
||||
}
|
||||
|
||||
if (! $_POST["cotisation"] > 0)
|
||||
{
|
||||
$errmsg=$langs->trans("ErrorFieldRequired",$langs->trans("Amount"));
|
||||
$action='';
|
||||
}
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
{
|
||||
if (! $_POST["accountid"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->trans("FinancialAccount"));
|
||||
if (! $_POST["operation"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->trans("PaymentMode"));
|
||||
if (! $_POST["label"]) $errmsg=$langs->trans("ErrorFieldRequired",$langs->trans("Label"));
|
||||
if ($errmsg) $action='';
|
||||
}
|
||||
|
||||
if ($action)
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$crowid=$adh->cotisation($datecotisation, $cotisation, $accountid, $operation, $label, $num_chq);
|
||||
|
||||
if ($crowid > 0)
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
// Envoi mail
|
||||
if ($adh->email && $conf->global->ADHERENT_MAIL_COTIS)
|
||||
{
|
||||
$adh->send_an_email($adh->email,$conf->global->ADHERENT_MAIL_COTIS,$conf->global->ADHERENT_MAIL_COTIS_SUBJECT);
|
||||
}
|
||||
|
||||
$_POST["cotisation"]='';
|
||||
$_POST["accountid"]='';
|
||||
$_POST["operation"]='';
|
||||
$_POST["label"]='';
|
||||
$_POST["num_chq"]='';
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
dolibarr_print_error($db,$adh->error);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"])
|
||||
{
|
||||
$datenaiss='';
|
||||
@ -789,35 +718,6 @@ if ($action == 'create')
|
||||
print "</table>\n";
|
||||
print '<br>';
|
||||
|
||||
/*
|
||||
// Boite cotisations
|
||||
print '<table class="border" width="100%">';
|
||||
print "<tr><td>".$langs->trans("DateSubscription")."</td><td>\n";
|
||||
$htmls->select_date('','','','','','add');
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("PaymentMode").'</td><td>';
|
||||
$htmls->select_types_paiements('','operation');
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans("FinancialAccount").'</td><td>';
|
||||
$htmls->select_comptes('','accountid');
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans("Numero").'</td><td>';
|
||||
print '<input name="num_chq" type="text" size="6">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td><input name="label" type="text" size="50" value="'.$langs->trans("Subscription").' " ></td></tr>';
|
||||
}
|
||||
print '<tr><td>'.$langs->trans("Subscription").'</td><td><input type="text" name="cotisation" size="6"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||
|
||||
print "</table>\n";
|
||||
print '<br>';
|
||||
*/
|
||||
|
||||
print '<center><input type="submit" class="button" value="'.$langs->trans("AddMember").'"></center>';
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
@ -95,9 +95,9 @@ if ($_POST["action"] == 'update')
|
||||
|
||||
if ($_GET["action"] == 'delete')
|
||||
{
|
||||
$adh = new Adherent($db);
|
||||
$adh->delete($rowid);
|
||||
Header("Location: liste.php");
|
||||
$adht = new AdherentType($db);
|
||||
$adht->delete($rowid);
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -284,9 +284,15 @@ if ($rowid > 0)
|
||||
print "<a class=\"butAction\" href=\"type.php?action=edit&rowid=".$adht->id."\">".$langs->trans("Edit")."</a>";
|
||||
}
|
||||
|
||||
// Add member
|
||||
// Add
|
||||
print "<a class=\"butAction\" href=\"fiche.php?action=create&typeid=".$adht->id."\">".$langs->trans("AddMember")."</a>";
|
||||
|
||||
// Delete
|
||||
if ($user->rights->adherent->configurer)
|
||||
{
|
||||
print "<a class=\"butActionDelete\" href=\"type.php?action=delete&rowid=".$adht->id."\">".$langs->trans("DeleteType")."</a>";
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ ModuleFamilyFinancial=Financial Modules (Accountancy/Treasury)
|
||||
# Modules
|
||||
Module0Name=Users & groups
|
||||
Module0Desc=Users and groups management
|
||||
Module1Name=Companies
|
||||
Module1Name=Third parties
|
||||
Module1Desc=Companies and contacts' management
|
||||
Module2Name=Commercial
|
||||
Module2Desc=Commercial management
|
||||
|
||||
@ -6,6 +6,7 @@ EMailings=EMailings
|
||||
MailCard=EMailing card
|
||||
MailTargets=Targets
|
||||
MailRecipients=Recipients
|
||||
MailRecipient=Recipient
|
||||
MailTitle=Title
|
||||
MailFrom=Sender
|
||||
MailReply=Reply to
|
||||
|
||||
@ -76,6 +76,7 @@ NewMemberType=New member type
|
||||
WelcomeEMail=Welcome e-mail
|
||||
SubscriptionRequired=Subscription required
|
||||
EditType=Edit member type
|
||||
DeleteType=Delete
|
||||
VoteAllowed=Vote allowed
|
||||
Physical=Physical
|
||||
Moral=Moral
|
||||
|
||||
@ -112,8 +112,8 @@ ModuleFamilyFinancial=Modules financiers (Compta/tr
|
||||
# Modules
|
||||
Module0Name=Utilisateurs & groupes
|
||||
Module0Desc=Gestion des utilisateurs et groupes
|
||||
Module1Name=Sociétés
|
||||
Module1Desc=Gestion des sociétés et contacts
|
||||
Module1Name=Tiers
|
||||
Module1Desc=Gestion des tiers (sociétés, particuliers) et contacts
|
||||
Module2Name=Commercial
|
||||
Module2Desc=Gestion commerciale
|
||||
Module10Name=Comptabilité
|
||||
|
||||
@ -6,6 +6,7 @@ EMailings=Mailings
|
||||
MailCard=Fiche mailing
|
||||
MailTargets=Destinataires
|
||||
MailRecipients=Destinataires
|
||||
MailRecipient=Destinataire
|
||||
MailTitle=Titre
|
||||
MailFrom=Émetteur
|
||||
MailReply=Réponse à
|
||||
|
||||
@ -76,6 +76,7 @@ NewMemberType=Nouveau type de membre
|
||||
WelcomeEMail=Email d'accueil
|
||||
SubscriptionRequired=Soumis à cotisation
|
||||
EditType=Édition du type d'adhérent
|
||||
DeleteType=Supprimer
|
||||
VoteAllowed=Vote autorisé
|
||||
Physical=Physique
|
||||
Moral=Morale
|
||||
|
||||
Loading…
Reference in New Issue
Block a user