Fix courrent outstanding amount not visible
This commit is contained in:
parent
040a643ee9
commit
bdba8f1f38
@ -410,17 +410,19 @@ if ($id > 0)
|
||||
print '</td><td colspan="3">';
|
||||
$limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount';
|
||||
print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
|
||||
if (empty($object->outstanding_limit)) print $langs->trans("NoLimit");
|
||||
// display amount and link to unpaid bill
|
||||
$outstandingBills = $object->get_OutstandingBill();
|
||||
if ($outstandingBills != 0)
|
||||
print ' (' . $langs->trans('CurrentOutstandingBill') . ': ';
|
||||
print price($outstandingBills, '', $langs, 0, 0, - 1, $conf->currency);
|
||||
if ($object->outstanding_limit != '')
|
||||
{
|
||||
print ' ('.$langs->trans("CurrentOutstandingBill");
|
||||
print ' <a href="'.DOL_URL_ROOT.'/compta/facture/list.php?socid='.$object->id.'&search_status=1">';
|
||||
print price($outstandingBills, '', $langs, 0, -1, -1, $conf->currency);
|
||||
print '</a>';
|
||||
if ($outstandingBills > $object->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached"));
|
||||
print ')';
|
||||
if ($outstandingBills > $object->outstanding_limit)
|
||||
print img_warning($langs->trans("OutstandingBillReached"));
|
||||
//print ' / ' . price($soc->outstanding_limit);
|
||||
}
|
||||
print ')';
|
||||
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -2502,7 +2502,9 @@ if ($action == 'create')
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
} else if ($id > 0 || ! empty($ref)) {
|
||||
}
|
||||
else if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
/*
|
||||
* Show object in view mode
|
||||
*/
|
||||
@ -2522,7 +2524,8 @@ if ($action == 'create')
|
||||
$result = $object->fetch_thirdparty();
|
||||
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($object->socid);
|
||||
$result=$soc->fetch($object->socid);
|
||||
if ($result < 0) dol_print_error($db);
|
||||
$selleruserevenustamp = $mysoc->useRevenueStamp();
|
||||
|
||||
$totalpaye = $object->getSommePaiement();
|
||||
@ -2857,7 +2860,8 @@ if ($action == 'create')
|
||||
$outstandingBills = $soc->get_OutstandingBill();
|
||||
print ' - ' . $langs->trans('CurrentOutstandingBill') . ': ';
|
||||
print price($outstandingBills, '', $langs, 0, 0, - 1, $conf->currency);
|
||||
if ($soc->outstanding_limit != '') {
|
||||
if ($soc->outstanding_limit != '')
|
||||
{
|
||||
if ($outstandingBills > $soc->outstanding_limit)
|
||||
print img_warning($langs->trans("OutstandingBillReached"));
|
||||
print ' / ' . price($soc->outstanding_limit);
|
||||
@ -2946,7 +2950,8 @@ if ($action == 'create')
|
||||
} else
|
||||
print '. ';
|
||||
}
|
||||
if ($absolute_creditnote > 0) {
|
||||
if ($absolute_creditnote > 0)
|
||||
{
|
||||
// If validated, we show link "add credit note to payment"
|
||||
if ($object->statut != 1 || $object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) {
|
||||
if ($object->statut == 0 && $object->type != Facture::TYPE_DEPOSIT) {
|
||||
|
||||
@ -504,7 +504,7 @@ function show_projects($conf,$langs,$db,$object,$backtopage='')
|
||||
$projecttmp = new Project($db);
|
||||
|
||||
$i=0;
|
||||
$var=false;
|
||||
$var=true;
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user