Fix amount for some language on public payment page
This commit is contained in:
parent
77151bd560
commit
0796bc45b1
@ -869,7 +869,7 @@ if (!$source)
|
|||||||
print '</td><td class="CTableRow'.($var ? '1' : '2').'">';
|
print '</td><td class="CTableRow'.($var ? '1' : '2').'">';
|
||||||
if (empty($amount) || !is_numeric($amount))
|
if (empty($amount) || !is_numeric($amount))
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
||||||
} else {
|
} else {
|
||||||
print '<b>'.price($amount).'</b>';
|
print '<b>'.price($amount).'</b>';
|
||||||
@ -915,7 +915,7 @@ if ($source == 'order')
|
|||||||
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
|
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
|
||||||
{
|
{
|
||||||
$amount = $order->total_ttc;
|
$amount = $order->total_ttc;
|
||||||
if (GETPOST("amount", 'int')) $amount = GETPOST("amount", 'int');
|
if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha');
|
||||||
$amount = price2num($amount);
|
$amount = price2num($amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -961,7 +961,7 @@ if ($source == 'order')
|
|||||||
print '</td><td class="CTableRow'.($var ? '1' : '2').'">';
|
print '</td><td class="CTableRow'.($var ? '1' : '2').'">';
|
||||||
if (empty($amount) || !is_numeric($amount))
|
if (empty($amount) || !is_numeric($amount))
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
||||||
} else {
|
} else {
|
||||||
print '<b>'.price($amount).'</b>';
|
print '<b>'.price($amount).'</b>';
|
||||||
@ -1033,7 +1033,7 @@ if ($source == 'invoice')
|
|||||||
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
|
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()));
|
$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);
|
$amount = price2num($amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1082,7 +1082,7 @@ if ($source == 'invoice')
|
|||||||
} elseif (empty($object->paye)) {
|
} elseif (empty($object->paye)) {
|
||||||
if (empty($amount) || !is_numeric($amount))
|
if (empty($amount) || !is_numeric($amount))
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
||||||
} else {
|
} else {
|
||||||
print '<b>'.price($amount).'</b>';
|
print '<b>'.price($amount).'</b>';
|
||||||
@ -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);
|
$amount = price2num($amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1286,7 +1286,7 @@ if ($source == 'contractline')
|
|||||||
print '</td><td class="CTableRow'.($var ? '1' : '2').'">';
|
print '</td><td class="CTableRow'.($var ? '1' : '2').'">';
|
||||||
if (empty($amount) || !is_numeric($amount))
|
if (empty($amount) || !is_numeric($amount))
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">';
|
||||||
} else {
|
} else {
|
||||||
print '<b>'.price($amount).'</b>';
|
print '<b>'.price($amount).'</b>';
|
||||||
@ -1359,8 +1359,8 @@ if ($source == 'membersubscription')
|
|||||||
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
|
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
|
||||||
{
|
{
|
||||||
$amount = $subscription->total_ttc;
|
$amount = $subscription->total_ttc;
|
||||||
if (GETPOST("amount", 'int')) $amount = GETPOST("amount", 'int');
|
if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha');
|
||||||
$amount = price2num($amount);
|
$amount = price2num($amount, 'MT');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GETPOST('fulltag', 'alpha')) {
|
if (GETPOST('fulltag', 'alpha')) {
|
||||||
@ -1448,8 +1448,8 @@ if ($source == 'membersubscription')
|
|||||||
{
|
{
|
||||||
//$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT');
|
//$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT');
|
||||||
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
|
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
|
||||||
print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'"'.(empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT)?' disabled':' ').'>';
|
||||||
} else {
|
} else {
|
||||||
$valtoshow = $amount;
|
$valtoshow = $amount;
|
||||||
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
|
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
|
if ($action != 'dopayment') // Do not change amount if we just click on first dopayment
|
||||||
{
|
{
|
||||||
$amount = $subscription->total_ttc;
|
$amount = $subscription->total_ttc;
|
||||||
if (GETPOST("amount", 'int')) $amount = GETPOST("amount", 'int');
|
if (GETPOST("amount", 'alpha')) $amount = GETPOST("amount", 'alpha');
|
||||||
$amount = price2num($amount);
|
$amount = price2num($amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1587,7 +1587,7 @@ if ($source == 'donation')
|
|||||||
{
|
{
|
||||||
//$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT');
|
//$valtoshow=price2num(GETPOST("newamount",'alpha'),'MT');
|
||||||
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
|
if (!empty($conf->global->MEMBER_MIN_AMOUNT) && $valtoshow) $valtoshow = max($conf->global->MEMBER_MIN_AMOUNT, $valtoshow);
|
||||||
print '<input type="hidden" name="amount" value="'.GETPOST("amount", 'int').'">';
|
print '<input type="hidden" name="amount" value="'.price2num(GETPOST("amount", 'alpha'), 'MT').'">';
|
||||||
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">';
|
print '<input class="flat maxwidth75" type="text" name="newamount" value="'.$valtoshow.'">';
|
||||||
} else {
|
} else {
|
||||||
$valtoshow = $amount;
|
$valtoshow = $amount;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user