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