New: Possibilit de saisir une adhsion sur un adhrent de type non soumis a cotisation. Dans ce cas, les champs montant sont supprims.
This commit is contained in:
parent
2be8142b44
commit
4f36789a4b
@ -65,6 +65,9 @@ if ($_POST["action"] == 'cotisation' && ! $_POST["cancel"])
|
||||
$adh->id = $rowid;
|
||||
$adh->fetch($rowid);
|
||||
|
||||
$adht = new AdherentType($db);
|
||||
$adht->fetch($adh->typeid);
|
||||
|
||||
$reday=$_POST["reday"];
|
||||
$remonth=$_POST["remonth"];
|
||||
$reyear=$_POST["reyear"];
|
||||
@ -86,17 +89,20 @@ if ($_POST["action"] == 'cotisation' && ! $_POST["cancel"])
|
||||
$action='addsubscription';
|
||||
}
|
||||
|
||||
if (! $_POST["cotisation"] > 0)
|
||||
{
|
||||
$errmsg=$langs->trans("ErrorFieldRequired",$langs->trans("Amount"));
|
||||
$action='addsubscription';
|
||||
}
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
if ($adht->cotisation)
|
||||
{
|
||||
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='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')
|
||||
@ -211,6 +217,7 @@ print "</div>\n";
|
||||
*/
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
// Lien nouvelle cotisation
|
||||
if ($action != 'addsubscription')
|
||||
{
|
||||
print "<a class=\"butAction\" href=\"card_subscriptions.php?rowid=$rowid&action=addsubscription\">".$langs->trans("NewSubscription")."</a>";
|
||||
@ -355,39 +362,41 @@ if ($action == 'addsubscription' && $user->rights->adherent->cotisation->creer)
|
||||
}
|
||||
print "</td></tr>";
|
||||
|
||||
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td><input type="text" name="cotisation" size="6" value="'.$_POST["cotisation"].'"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
if ($adht->cotisation)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("FinancialAccount").'</td><td>';
|
||||
$html->select_comptes($_POST["accountid"],'accountid',0,'',1);
|
||||
print "</td></tr>\n";
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td><input type="text" name="cotisation" size="6" value="'.$_POST["cotisation"].'"> '.$langs->trans("Currency".$conf->monnaie).'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("PaymentMode").'</td><td>';
|
||||
$html->select_types_paiements($_POST["operation"],'operation');
|
||||
print "</td></tr>\n";
|
||||
if ($conf->global->ADHERENT_BANK_USE)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("FinancialAccount").'</td><td>';
|
||||
$html->select_comptes($_POST["accountid"],'accountid',0,'',1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans('Numero');
|
||||
print ' <em>(Numéro chèque ou virement)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="num_chq" type="text" size="8" value="'.(empty($_POST['num_chq'])?'':$_POST['num_chq']).'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans("PaymentMode").'</td><td>';
|
||||
$html->select_types_paiements($_POST["operation"],'operation');
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td>'.$langs->trans('CheckTransmitter');
|
||||
print ' <em>(Emetteur du chèque)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="chqemetteur" size="32" type="text" value="'.(empty($_POST['chqemetteur'])?$facture->client->nom:$_POST['chqemetteur']).'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Numero');
|
||||
print ' <em>(Numéro chèque ou virement)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="num_chq" type="text" size="8" value="'.(empty($_POST['num_chq'])?'':$_POST['num_chq']).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Bank');
|
||||
print ' <em>(Banque du chèque)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="chqbank" size="32" type="text" value="'.(empty($_POST['chqbank'])?'':$_POST['chqbank']).'"></td></tr>';
|
||||
print '<tr><td>'.$langs->trans('CheckTransmitter');
|
||||
print ' <em>(Emetteur du chèque)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="chqemetteur" size="32" type="text" value="'.(empty($_POST['chqemetteur'])?$facture->client->nom:$_POST['chqemetteur']).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td><input name="label" type="text" size="32" value="'.$langs->trans("Subscription").' ';
|
||||
print strftime("%Y",($adh->datefin?$adh->datefin:time())).'" ></td></tr>';
|
||||
print '<tr><td>'.$langs->trans('Bank');
|
||||
print ' <em>(Banque du chèque)</em>'; // \todo a traduire
|
||||
print '</td>';
|
||||
print '<td><input name="chqbank" size="32" type="text" value="'.(empty($_POST['chqbank'])?'':$_POST['chqbank']).'"></td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Label").'</td>';
|
||||
print '<td><input name="label" type="text" size="32" value="'.$langs->trans("Subscription").' ';
|
||||
print strftime("%Y",($adh->datefin?$adh->datefin:time())).'" ></td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print '<tr><td>'.$langs->trans("SendAcknowledgementByMail").'</td>';
|
||||
print '<td><input name="sendmail" type="checkbox"'.($conf->global->ADHERENT_MAIL_COTIS?' checked="true"':'').'></td></tr>';
|
||||
|
||||
|
||||
@ -46,16 +46,16 @@ MemberStatusResiliated=Resiliated member
|
||||
MemberStatusResiliatedShort=Resiliated
|
||||
MembersStatusToValid=Draft members
|
||||
MembersStatusToValidShort=Draft members
|
||||
MembersStatusValidated=Members validated
|
||||
MembersStatusValidated=Validated members
|
||||
MembersStatusPayed=Subscription up to date
|
||||
MembersStatusPayedShort=Up to date
|
||||
MembersStatusNotPayed=Subscription out of date
|
||||
MembersStatusNotPayedShort=Out of date
|
||||
MembersStatusResiliated=Members resiliated
|
||||
MembersStatusResiliatedShort=Members resiliated
|
||||
MembersStatusResiliated=Resiliated members
|
||||
MembersStatusResiliatedShort=Resiliated members
|
||||
NewCotisation=New contribution
|
||||
EditMember=Edit member
|
||||
SubscriptionEndDate=Subscription end date
|
||||
SubscriptionEndDate=Subscription's end date
|
||||
NewAttribute=New attribut
|
||||
AttributeCode=Attribute code
|
||||
OptionalFieldsSetup=Optional fields setup
|
||||
@ -73,7 +73,7 @@ AddMember=Add member
|
||||
MemberType=Member type
|
||||
NoTypeDefinedGoToSetup=No member types defined. Go to setup - Members types
|
||||
NewMemberType=New member type
|
||||
WelcomeEMail=Welcome Email
|
||||
WelcomeEMail=Welcome e-mail
|
||||
SubscriptionRequired=Subscription required
|
||||
EditType=Edit member type
|
||||
VoteAllowed=Vote allowed
|
||||
@ -83,11 +83,11 @@ Reenable=Reenable
|
||||
ResiliateMember=Resiliate a member
|
||||
ConfirmResiliateMember=Are you sure you want to resiliate this member ?
|
||||
DeleteMember=Delete a member
|
||||
ConfirmDeleteMember=Are you sure you want to delete this member (Deleting a memeber will delete all his subscription) ?
|
||||
ConfirmDeleteMember=Are you sure you want to delete this member (Deleting a member will delete all his subscriptions) ?
|
||||
Filehtpasswd=htpasswd file
|
||||
ValidateMember=Validate a member
|
||||
ConfirmValidateMember=Are you sure you want to validate this member ?
|
||||
FollowingLinksArePublic=Following links ares opened pages not protected by any Dolibarr permission.
|
||||
FollowingLinksArePublic=The following links are open pages not protected by any Dolibarr permission.
|
||||
PublicMemberList=Public member list
|
||||
BlankSubscriptionForm=Subscription form
|
||||
MemberPublicLinks=Public links/pages
|
||||
@ -100,4 +100,6 @@ String=String
|
||||
Text=Text
|
||||
Int=Int
|
||||
Date=Date
|
||||
DateAndTime=Date and time
|
||||
DateAndTime=Date and time
|
||||
MemberNotOrNoMoreExpectedToSubscribe=Member not or no more expected to subscribe
|
||||
AddSubscription=Add subscription
|
||||
@ -12,8 +12,8 @@ MembersCards=Cartes des adh
|
||||
MembersList=Liste des adhérents
|
||||
MembersListToValid=Liste des adhérents brouillons (à valider)
|
||||
MembersListValid=Liste des adhérents valides
|
||||
MembersListUpToDate=Liste des adhérents valides à jour de cotisation
|
||||
MembersListNotUpToDate=Liste des adhérents valides non à jour de cotisation
|
||||
MembersListUpToDate=Liste des adhérents valides à jour d'adhésion
|
||||
MembersListNotUpToDate=Liste des adhérents valides non à jour d'adhésion
|
||||
MembersListResiliated=Liste des adhérents résiliés
|
||||
MembersListQualified=Liste des adhérents qualifiés
|
||||
MenuMembersToValidate=Adhérents brouillons
|
||||
@ -21,9 +21,9 @@ MenuMembersValidated=Adh
|
||||
MenuMembersUpToDate=Adhérents à jour
|
||||
MenuMembersNotUpToDate=Adhérents non à jour
|
||||
MenuMembersResiliated=Adhérents résiliés
|
||||
DateAbonment=Date cotisation
|
||||
DateSubscription=Date cotisation
|
||||
DateNextSubscription=Date prochaine cotisation
|
||||
DateAbonment=Date adhésion
|
||||
DateSubscription=Date adhésion
|
||||
DateNextSubscription=Date prochaine adhésion
|
||||
DateEndSubscription=Date fin adhésion
|
||||
EndSubscription=Fin adhésion
|
||||
NewMember=Nouvel adhérent
|
||||
@ -60,14 +60,14 @@ NewAttribute=Nouvel attribut
|
||||
AttributeCode=Code de l'attribut
|
||||
OptionalFieldsSetup=Configuration des champs optionnels
|
||||
MembersTypeSetup=Configuration des types d'adhérents
|
||||
NewSubscription=Nouvelle cotisation
|
||||
Subscription=Cotisation
|
||||
Subscriptions=Cotisations
|
||||
NewSubscription=Nouvelle adhésion
|
||||
Subscription=Adhésion
|
||||
Subscriptions=Adhésions
|
||||
SubscriptionLate=En retard
|
||||
SubscriptionNotReceived=Cotisation non reçue
|
||||
SubscriptionNotReceived=Adhésion non reçue
|
||||
SubscriptionLateShort=En retard
|
||||
SubscriptionNotReceivedShort=Non reçue
|
||||
ListOfSubscriptions=Liste des cotisations
|
||||
ListOfSubscriptions=Liste des adhésions
|
||||
SendCardByMail=Envoyer fiche
|
||||
AddMember=Ajouter adhérent
|
||||
MemberType=Type d'adhérent
|
||||
@ -101,3 +101,5 @@ Text=Texte long
|
||||
Int=Numérique
|
||||
Date=Date
|
||||
DateAndTime=Date et heure
|
||||
MemberNotOrNoMoreExpectedToSubscribe=Non soumis ou plus soumis à cotisation
|
||||
AddSubscription=Ajout adhésion
|
||||
|
||||
Loading…
Reference in New Issue
Block a user