New: Can define of we want to use VAT or not for subscriptions
(foundation module). New: Can define a default choice for choice "More action when recording a subscription" (foundation module).
This commit is contained in:
parent
0fc17069c8
commit
baf6ccf654
@ -14,10 +14,13 @@ For users:
|
||||
- New: Can expand/collapse menus, categories and users list.
|
||||
- New: extra parameters are supported into ODT templates.
|
||||
- New: total per vat rate are available as tags for ODT templates.
|
||||
- New: Add more types for extra parameters (lists, phone, emails, checkbox, prices)
|
||||
- New: Add more types for extra parameters (lists, phone, emails, checkbox, prices).
|
||||
- New: Some part of interface use more CSS3 (ie: agenda)
|
||||
- New: [ task #707 ] Create option ProfIdx are mandatory to validate a invoice
|
||||
|
||||
- New: [ task #707 ] Create option ProfIdx are mandatory to validate a invoice.
|
||||
- New: Can define of we want to use VAT or not for subscriptions (foundation module).
|
||||
- New: Can define a default choice for choice "More action when recording
|
||||
a subscription" (foundation module).
|
||||
|
||||
For developers:
|
||||
- System of menu managers has been rewritten to reduce code to do same things.
|
||||
- An external module can force its theme.
|
||||
|
||||
@ -169,31 +169,54 @@ print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_S
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
print '</form>';
|
||||
|
||||
// Insertion cotisations dans compte financier
|
||||
// Insert subscription into bank account
|
||||
$var=!$var;
|
||||
print '<form action="adherent.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_BANK_USE">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("AddSubscriptionIntoAccount").'</td>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td>';
|
||||
print $form->selectyesno('constvalue',$conf->global->ADHERENT_BANK_USE,1);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right" colspan="2">';
|
||||
print $langs->trans("WarningModuleNotActive",$langs->transnoentities("Module85Name"));
|
||||
print '</td>';
|
||||
}
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MoreActionsOnSubscription").'</td>';
|
||||
$arraychoices=array('0'=>$langs->trans("None"));
|
||||
if (! empty($conf->banque->enabled)) $arraychoices['bankdirect']=$langs->trans("MoreActionBankDirect");
|
||||
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['invoiceonly']=$langs->trans("MoreActionInvoiceOnly");
|
||||
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['bankviainvoice']=$langs->trans("MoreActionBankViaInvoice");
|
||||
print '<td>';
|
||||
print $form->selectarray('constvalue',$arraychoices,$conf->global->ADHERENT_BANK_USE,0);
|
||||
print '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
print '</form>';
|
||||
|
||||
// Use vat for invoice creation
|
||||
if ($conf->facture->enabled)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<form action="adherent.php" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_VAT_FOR_SUBSCRIPTIONS">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("VATToUseForSubscriptions").'</td>';
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td>';
|
||||
print $form->selectarray('constvalue', 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><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right" colspan="2">';
|
||||
print $langs->trans("WarningModuleNotActive",$langs->transnoentities("Module85Name"));
|
||||
print '</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -362,7 +362,11 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $
|
||||
|
||||
// Add line to draft invoice
|
||||
$idprodsubscription=0;
|
||||
$vattouse=get_default_tva($mysoc, $customer, $idprodsubscription);
|
||||
$vattouse=0;
|
||||
if (isset($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) && $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS == 'defaultforfoundationcountry')
|
||||
{
|
||||
$vattouse=get_default_tva($mysoc, $mysoc, $idprodsubscription);
|
||||
}
|
||||
//print xx".$vattouse." - ".$mysoc." - ".$customer;exit;
|
||||
$result=$invoice->addline($invoice->id,$label,0,1,$vattouse,0,0,$idprodsubscription,0,$datecotisation,$datesubend,0,0,'','TTC',$cotisation,1);
|
||||
if ($result <= 0)
|
||||
@ -756,9 +760,9 @@ if ($rowid)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! empty($conf->global->ADHERENT_BANK_USE) && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled) && $object->fk_soc) $bankviainvoice=1;
|
||||
else if (! empty($conf->global->ADHERENT_BANK_USE) && ! empty($conf->banque->enabled)) $bankdirect=1;
|
||||
else if (empty($conf->global->ADHERENT_BANK_USE) && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled) && $object->fk_soc) $invoiceonly=1;
|
||||
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) && $object->fk_soc) $bankviainvoice=1;
|
||||
else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'bankdirect' && ! empty($conf->banque->enabled)) $bankdirect=1;
|
||||
else if (! empty($conf->global->ADHERENT_BANK_USE) && $conf->global->ADHERENT_BANK_USE == 'invoiceonly' && ! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled) && $object->fk_soc) $invoiceonly=1;
|
||||
}
|
||||
|
||||
print "\n\n<!-- Form add subscription -->\n";
|
||||
|
||||
@ -157,6 +157,7 @@ NoThirdPartyAssociatedToMember=No third party associated to this member
|
||||
ThirdPartyDolibarr=Dolibarr third party
|
||||
MembersAndSubscriptions= Members and Suscriptions
|
||||
MoreActions=Complementary action on recording
|
||||
MoreActionsOnSubscription=Complementary action, suggested by default when recording a subscription
|
||||
MoreActionBankDirect=Create a direct transaction record on account
|
||||
MoreActionBankViaInvoice=Create an invoice and payment on account
|
||||
MoreActionInvoiceOnly=Create an invoice with no payment
|
||||
@ -199,3 +200,5 @@ DOLIBARRFOUNDATION_PAYMENT_FORM=To make your subscription payment using a bank t
|
||||
ByProperties=By characteristics
|
||||
MembersStatisticsByProperties=Members statistics by characteristics
|
||||
MembersByNature=Members by nature
|
||||
VATToUseForSubscriptions=VAT rate to use for subscriptions
|
||||
NoVatOnSubscription=No TVA for subscriptions
|
||||
|
||||
@ -162,6 +162,7 @@ NoThirdPartyAssociatedToMember=Pas de tiers associé à cet adhérent
|
||||
ThirdPartyDolibarr=Tiers Dolibarr
|
||||
MembersAndSubscriptions= Adhérents et Adhésions
|
||||
MoreActions=Action complémentaire à l'enregistrement
|
||||
MoreActionsOnSubscription=Action complémentaire proposée par défaut à l'enregistrement de l'adhésion
|
||||
MoreActionBankDirect=Création transaction sur compte bancaire ou caisse directement
|
||||
MoreActionBankViaInvoice=Création facture avec paiement sur compte bancaire ou caisse
|
||||
MoreActionInvoiceOnly=Création facture sans paiement
|
||||
@ -204,3 +205,6 @@ DOLIBARRFOUNDATION_PAYMENT_FORM=Pour réaliser le paiement de votre cotisation p
|
||||
ByProperties=Par caractéristiques
|
||||
MembersStatisticsByProperties=Statistiques des adhérents par caractéristiques
|
||||
MembersByNature=Adhérents par nature
|
||||
VATToUseForSubscriptions=Taux de TVA pour les adhésions
|
||||
NoVatOnSubscription=Pas de TVA sur les adhésions
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user