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 ($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)
|
if (! $_POST["cotisation"] > 0)
|
||||||
{
|
{
|
||||||
$errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount"));
|
$errmsg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount"));
|
||||||
$action='addsubscription';
|
$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')
|
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"])
|
if ($_REQUEST["action"] == 'update' && ! $_POST["cancel"])
|
||||||
{
|
{
|
||||||
$datenaiss='';
|
$datenaiss='';
|
||||||
@ -789,35 +718,6 @@ if ($action == 'create')
|
|||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
print '<br>';
|
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 '<center><input type="submit" class="button" value="'.$langs->trans("AddMember").'"></center>';
|
||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|||||||
@ -95,9 +95,9 @@ if ($_POST["action"] == 'update')
|
|||||||
|
|
||||||
if ($_GET["action"] == 'delete')
|
if ($_GET["action"] == 'delete')
|
||||||
{
|
{
|
||||||
$adh = new Adherent($db);
|
$adht = new AdherentType($db);
|
||||||
$adh->delete($rowid);
|
$adht->delete($rowid);
|
||||||
Header("Location: liste.php");
|
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,9 +284,15 @@ if ($rowid > 0)
|
|||||||
print "<a class=\"butAction\" href=\"type.php?action=edit&rowid=".$adht->id."\">".$langs->trans("Edit")."</a>";
|
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>";
|
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>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,7 @@ ModuleFamilyFinancial=Financial Modules (Accountancy/Treasury)
|
|||||||
# Modules
|
# Modules
|
||||||
Module0Name=Users & groups
|
Module0Name=Users & groups
|
||||||
Module0Desc=Users and groups management
|
Module0Desc=Users and groups management
|
||||||
Module1Name=Companies
|
Module1Name=Third parties
|
||||||
Module1Desc=Companies and contacts' management
|
Module1Desc=Companies and contacts' management
|
||||||
Module2Name=Commercial
|
Module2Name=Commercial
|
||||||
Module2Desc=Commercial management
|
Module2Desc=Commercial management
|
||||||
|
|||||||
@ -6,6 +6,7 @@ EMailings=EMailings
|
|||||||
MailCard=EMailing card
|
MailCard=EMailing card
|
||||||
MailTargets=Targets
|
MailTargets=Targets
|
||||||
MailRecipients=Recipients
|
MailRecipients=Recipients
|
||||||
|
MailRecipient=Recipient
|
||||||
MailTitle=Title
|
MailTitle=Title
|
||||||
MailFrom=Sender
|
MailFrom=Sender
|
||||||
MailReply=Reply to
|
MailReply=Reply to
|
||||||
|
|||||||
@ -76,6 +76,7 @@ NewMemberType=New member type
|
|||||||
WelcomeEMail=Welcome e-mail
|
WelcomeEMail=Welcome e-mail
|
||||||
SubscriptionRequired=Subscription required
|
SubscriptionRequired=Subscription required
|
||||||
EditType=Edit member type
|
EditType=Edit member type
|
||||||
|
DeleteType=Delete
|
||||||
VoteAllowed=Vote allowed
|
VoteAllowed=Vote allowed
|
||||||
Physical=Physical
|
Physical=Physical
|
||||||
Moral=Moral
|
Moral=Moral
|
||||||
|
|||||||
@ -112,8 +112,8 @@ ModuleFamilyFinancial=Modules financiers (Compta/tr
|
|||||||
# Modules
|
# Modules
|
||||||
Module0Name=Utilisateurs & groupes
|
Module0Name=Utilisateurs & groupes
|
||||||
Module0Desc=Gestion des utilisateurs et groupes
|
Module0Desc=Gestion des utilisateurs et groupes
|
||||||
Module1Name=Sociétés
|
Module1Name=Tiers
|
||||||
Module1Desc=Gestion des sociétés et contacts
|
Module1Desc=Gestion des tiers (sociétés, particuliers) et contacts
|
||||||
Module2Name=Commercial
|
Module2Name=Commercial
|
||||||
Module2Desc=Gestion commerciale
|
Module2Desc=Gestion commerciale
|
||||||
Module10Name=Comptabilité
|
Module10Name=Comptabilité
|
||||||
|
|||||||
@ -6,6 +6,7 @@ EMailings=Mailings
|
|||||||
MailCard=Fiche mailing
|
MailCard=Fiche mailing
|
||||||
MailTargets=Destinataires
|
MailTargets=Destinataires
|
||||||
MailRecipients=Destinataires
|
MailRecipients=Destinataires
|
||||||
|
MailRecipient=Destinataire
|
||||||
MailTitle=Titre
|
MailTitle=Titre
|
||||||
MailFrom=Émetteur
|
MailFrom=Émetteur
|
||||||
MailReply=Réponse à
|
MailReply=Réponse à
|
||||||
|
|||||||
@ -76,6 +76,7 @@ NewMemberType=Nouveau type de membre
|
|||||||
WelcomeEMail=Email d'accueil
|
WelcomeEMail=Email d'accueil
|
||||||
SubscriptionRequired=Soumis à cotisation
|
SubscriptionRequired=Soumis à cotisation
|
||||||
EditType=Édition du type d'adhérent
|
EditType=Édition du type d'adhérent
|
||||||
|
DeleteType=Supprimer
|
||||||
VoteAllowed=Vote autorisé
|
VoteAllowed=Vote autorisé
|
||||||
Physical=Physique
|
Physical=Physique
|
||||||
Moral=Morale
|
Moral=Morale
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user