Fix: We allow to add credit not higher than invoice amount.

This commit is contained in:
Laurent Destailleur 2012-03-15 22:51:02 +01:00
parent 1f0cddc464
commit bc94ec9cd6
2 changed files with 25 additions and 24 deletions

View File

@ -2371,7 +2371,8 @@ else
{ {
// Remise dispo de type avoir // Remise dispo de type avoir
if (! $absolute_discount) print '<br>'; if (! $absolute_discount) print '<br>';
$form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, $resteapayer); //$form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, $resteapayer);
$form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0); // We must allow credit not even if amount is higher
} }
} }
if (! $absolute_discount && ! $absolute_creditnote) if (! $absolute_discount && ! $absolute_creditnote)

View File

@ -2575,7 +2575,7 @@ class Form
* @param string $more More string to add * @param string $more More string to add
* @return void * @return void
*/ */
function form_remise_dispo($page, $selected='', $htmlname='remise_id',$socid, $amount, $filter='', $maxvalue=0, $more='') function form_remise_dispo($page, $selected='', $htmlname='remise_id', $socid, $amount, $filter='', $maxvalue=0, $more='')
{ {
global $conf,$langs; global $conf,$langs;
if ($htmlname != "none") if ($htmlname != "none")