\n";
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index f7a87e9bf0c..40394a36062 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -1494,7 +1494,7 @@ class Adherent extends CommonObject
*
* @return int rowid of record added, <0 if KO
*/
- public function subscription($date, $amount, $accountid = 0, $operation = '', $label = '', $num_chq = '', $emetteur_nom = '', $emetteur_banque = '', $datesubend = 0, $fk_type = NULL)
+ public function subscription($date, $amount, $accountid = 0, $operation = '', $label = '', $num_chq = '', $emetteur_nom = '', $emetteur_banque = '', $datesubend = 0, $fk_type = null)
{
global $conf, $langs, $user;
diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index d55a8add8ea..f665556d3d2 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -1437,38 +1437,38 @@ if ($source == 'membersubscription') {
$_GET['newamount'] = $member->last_subscription_amount;
}
}
-
+
if ($member->type) {
- // Last member type
- print '
'.$langs->trans("LastMemberType");
- print '
'.dol_escape_htmltag($member->type);
- print "
"."\n";
+ // Last member type
+ print '
'.$langs->trans("LastMemberType");
+ print '
'.dol_escape_htmltag($member->type);
+ print "
"."\n";
}
-
+
if (!empty($conf->global->MEMBER_SUBSCRIPTION_AMOUNT_BY_TYPE)) {
- // Amount by member type
- $amountbytype = json_decode($conf->global->MEMBER_SUBSCRIPTION_AMOUNT_BY_TYPE, true);
- // Set the member type
- $member->typeid = (int)(GETPOSTISSET("typeid") ? GETPOST("typeid", 'int') : $member->typeid);
- // If we change the type of membership, we set also label of new type
- $member->type = dol_getIdFromCode($db, $member->typeid, 'adherent_type', 'rowid', 'libelle');
- // Set amount for the subscription
- $amount = $amountbytype[$member->typeid] ? $amountbytype[$member->typeid] : $member->last_subscription_amount;
- // list member type
- require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
- $adht = new AdherentType($db);
- if( !$action){
- $form = new Form($db); // so wecan call method selectarray
- print '
"."\n";
- }
+ // Amount by member type
+ $amountbytype = json_decode($conf->global->MEMBER_SUBSCRIPTION_AMOUNT_BY_TYPE, true);
+ // Set the member type
+ $member->typeid = (int) (GETPOSTISSET("typeid") ? GETPOST("typeid", 'int') : $member->typeid);
+ // If we change the type of membership, we set also label of new type
+ $member->type = dol_getIdFromCode($db, $member->typeid, 'adherent_type', 'rowid', 'libelle');
+ // Set amount for the subscription
+ $amount = $amountbytype[$member->typeid] ? $amountbytype[$member->typeid] : $member->last_subscription_amount;
+ // list member type
+ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
+ $adht = new AdherentType($db);
+ if ( !$action) {
+ $form = new Form($db); // so wecan call method selectarray
+ print '