diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index 8f3bb23a362..bda79d7d97d 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -869,7 +869,7 @@ if (!$source)
print '
';
if (empty($amount) || !is_numeric($amount))
{
- print '';
+ print '';
print '';
} else {
print ''.price($amount).'';
@@ -915,7 +915,7 @@ if ($source == 'order')
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
{
$amount = $order->total_ttc;
- if (GETPOST("amount", 'int')) $amount = GETPOST("amount", 'int');
+ if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha');
$amount = price2num($amount);
}
@@ -961,7 +961,7 @@ if ($source == 'order')
print ' | ';
if (empty($amount) || !is_numeric($amount))
{
- print '';
+ print '';
print '';
} else {
print ''.price($amount).'';
@@ -1033,7 +1033,7 @@ if ($source == 'invoice')
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
{
$amount = price2num($invoice->total_ttc - ($invoice->getSommePaiement() + $invoice->getSumCreditNotesUsed() + $invoice->getSumDepositsUsed()));
- if (GETPOST("amount", 'int')) $amount = GETPOST("amount", 'int');
+ if (GETPOST("amount", 'int')) $amount = GETPOST("amount", 'alpha');
$amount = price2num($amount);
}
@@ -1082,7 +1082,7 @@ if ($source == 'invoice')
} elseif (empty($object->paye)) {
if (empty($amount) || !is_numeric($amount))
{
- print '';
+ print '';
print '';
} else {
print ''.price($amount).'';
@@ -1198,7 +1198,7 @@ if ($source == 'contractline')
}
}
- if (GETPOST("amount", 'int')) $amount = GETPOST("amount", 'int');
+ if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha');
$amount = price2num($amount);
}
@@ -1286,7 +1286,7 @@ if ($source == 'contractline')
print ' | ';
if (empty($amount) || !is_numeric($amount))
{
- print '';
+ print '';
print '';
} else {
print ''.price($amount).'';
@@ -1359,8 +1359,8 @@ if ($source == 'membersubscription')
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
{
$amount = $subscription->total_ttc;
- if (GETPOST("amount", 'int')) $amount = GETPOST("amount", 'int');
- $amount = price2num($amount);
+ if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha');
+ $amount = price2num($amount, 'MT');
}
if (GETPOST('fulltag', 'alpha')) {
@@ -1448,8 +1448,8 @@ if ($source == 'membersubscription')
{
//$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT');
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
- print '';
- print '';
+ print '';
+ print 'global->MEMBER_NEWFORM_EDITAMOUNT)?' disabled':' ').'>';
} else {
$valtoshow = $amount;
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
@@ -1521,7 +1521,7 @@ if ($source == 'donation')
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
{
$amount = $subscription->total_ttc;
- if (GETPOST("amount", 'int')) $amount = GETPOST("amount", 'int');
+ if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha');
$amount = price2num($amount);
}
@@ -1587,7 +1587,7 @@ if ($source == 'donation')
{
//$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT');
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
- print '';
+ print '';
print '';
} else {
$valtoshow = $amount;
|