Merge pull request #2649 from atm-maxime/develop
Alert when oustanding amount excedeed
This commit is contained in:
commit
6e136616c6
@ -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")." <a href='".DOL_URL_ROOT."/compta/facture/list.php?socid=".$object->id."&search_status=1'>".price($outstandigBills, '', $langs, 0, 0, -1, $conf->currency).'</a>)';
|
||||
$outstandingBills = $object->get_OutstandingBill();
|
||||
if ($outstandingBills != 0) {
|
||||
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 ')';
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -1966,12 +1966,12 @@ if ($action == 'create')
|
||||
print $soc->getNomUrl(1);
|
||||
print '<input type="hidden" name="socid" value="' . $soc->id . '">';
|
||||
// Outstanding Bill
|
||||
$outstandigBills = $soc->get_OutstandingBill();
|
||||
$outstandingBills = $soc->get_OutstandingBill();
|
||||
print ' (' . $langs->trans('CurrentOutstandingBill') . ': ';
|
||||
print price($outstandigBills, '', $langs, 0, 0, -1, $conf->currency);
|
||||
print price($outstandingBills, '', $langs, 0, 0, -1, $conf->currency);
|
||||
if ($soc->outstanding_limit != '')
|
||||
{
|
||||
if ($outstandigBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached"));
|
||||
if ($outstandingBills > $soc->outstanding_limit) print img_warning($langs->trans("OutstandingBillReached"));
|
||||
print ' / ' . price($soc->outstanding_limit, '', $langs, 0, 0, -1, $conf->currency);
|
||||
}
|
||||
print ')';
|
||||
@ -2832,11 +2832,11 @@ if ($action == 'create')
|
||||
print ' ';
|
||||
print '(<a href="' . DOL_URL_ROOT . '/compta/facture/list.php?socid=' . $object->socid . '">' . $langs->trans('OtherBills') . '</a>';
|
||||
// Outstanding Bill
|
||||
$outstandigBills = $soc->get_OutstandingBill();
|
||||
$outstandingBills = $soc->get_OutstandingBill();
|
||||
print ' - ' . $langs->trans('CurrentOutstandingBill') . ': ';
|
||||
print price($outstandigBills, '', $langs, 0, 0, - 1, $conf->currency);
|
||||
print price($outstandingBills, '', $langs, 0, 0, - 1, $conf->currency);
|
||||
if ($soc->outstanding_limit != '') {
|
||||
if ($outstandigBills > $soc->outstanding_limit)
|
||||
if ($outstandingBills > $soc->outstanding_limit)
|
||||
print img_warning($langs->trans("OutstandingBillReached"));
|
||||
print ' / ' . price($soc->outstanding_limit);
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ if (empty($usemargins)) $usemargins=0;
|
||||
<?php } ?>
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo vatrate($line->tva_tx,'%',$line->info_bits); ?></td>
|
||||
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo price($line->pu_ht); ?></td>
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo price($line->subprice); ?></td>
|
||||
|
||||
<?php if ($inputalsopricewithtax) { ?>
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?><?php echo (isset($line->pu_ttc)?price($line->pu_ttc):price($line->subprice)); ?></td>
|
||||
|
||||
@ -424,7 +424,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
// Bouton Enregistrer
|
||||
if ($action != 'add_paiement')
|
||||
{
|
||||
print '<<br><div class="center"><input type="checkbox" checked="checked" name="closepaidinvoices"> '.$langs->trans("ClosePaidInvoicesAutomatically");
|
||||
print '<br><div class="center"><input type="checkbox" checked="checked" name="closepaidinvoices"> '.$langs->trans("ClosePaidInvoicesAutomatically");
|
||||
print '<br><input type="submit" class="button" value="'.$langs->trans('Save').'"></div>';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user