From 2ddef9ffd9ba458f4a35825b166ac7f26b7ffda0 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sat, 18 Apr 2015 19:08:44 +0200 Subject: [PATCH] Alert when oustanding amount excedeed --- htdocs/comm/card.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 05fa2048e8f..81e8b396963 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -406,9 +406,15 @@ if ($id > 0) $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) : '')); // display amount and link to unpaid bill - $outstandigBills = $object->get_OutstandingBill(); - if ($outstandigBills != 0) - print " (".$langs->trans("CurrentOutstandingBill")." ".price($outstandigBills, '', $langs, 0, 0, -1, $conf->currency).')'; + $outstandingBills = $object->get_OutstandingBill(); + if ($outstandingBills != 0) { + print ' ('.$langs->trans("CurrentOutstandingBill"); + print ' '; + print price($outstandingBills, '', $langs, 0, -1, -1, $conf->currency); + print ''; + if ($outstandingBills > $object->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached")); + print ')'; + } print ''; print ''; }