Fix: price should not be used to compare amounts. Price is a formated

string, not an amount.
This commit is contained in:
Laurent Destailleur 2013-11-15 22:15:48 +01:00
parent c8f1a26d25
commit d0d9cce146
2 changed files with 18 additions and 17 deletions

View File

@ -2320,8 +2320,9 @@ if ($action == 'create')
print $langs->trans('OutstandingBill');
print '</td><td align=right>';
print price($outstandigBills);
if (price($outstandigBills)>price($soc->outstanding_limit)) print img_warning($langs->trans("OutstandingBillReached"));
print ' / '.price($soc->outstanding_limit).'</td>';
if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached"));
print ' / '.price($soc->outstanding_limit);
print '</td>';
print '</tr>';
}

View File

@ -2843,9 +2843,9 @@ class Societe extends CommonObject
}
/**
* return amount of bill not paid
* Return amount of bill not paid
*
* @return boolean Yes or no
* @return int Amount in debt for thirdparty
*/
function get_OutstandingBill()
{
@ -2873,9 +2873,9 @@ class Societe extends CommonObject
}
/**
* Return label of status customer is prospect/customer
* Return label of status customer is prospect/customer
*
* @return string Libelle
* @return string Label
*/
function getLibCustProspStatut()
{