riainvoice/application/views/reports/invoice_aging.php
2023-05-27 19:26:12 +05:30

107 lines
3.5 KiB
PHP

<!DOCTYPE html>
<html lang="<?php echo trans('cldr'); ?>">
<head>
<title><?php echo trans('invoice_aging'); ?></title>
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/<?php echo get_setting('system_theme', 'invoiceplane'); ?>/css/reports.css" type="text/css">
</head>
<body>
<h3 class="report_title"><?php echo trans('invoice_aging'); ?></h3>
<table class="table table-striped table-condensed no-margin">
<thead>
<tr>
<th><?php echo trans('client'); ?></th>
<th class="amount"><?php echo trans('Invoice Aging 1-30'); ?></th>
<th class="amount"><?php echo trans('Invoice Aging 31-60'); ?></th>
<th class="amount"><?php echo trans('Invoice Aging 61-90'); ?></th>
<th class="amount"><?php echo trans('Invoice Aging Above 90'); ?></th>
<th class="amount"><?php echo trans('total'); ?></th>
</tr>
</thead>
<tbody>
<?php
$tr1=0;
$tr2=0;
$tr3=0;
$tr4=0;
$trb=0;
foreach ($results as $result) { ?>
<tr>
<td><?php _htmlsc(format_client($result)); ?></td>
<td class="amount"><?php
$tr1= $tr1 + $result->range_1;
echo format_currency($result->range_1); ?></td>
<td class="amount"><?php
$tr2= $tr2 + $result->range_2;
echo format_currency($result->range_2); ?></td>
<td class="amount"><?php
$tr3= $tr3 + $result->range_3;
echo format_currency($result->range_3); ?></td>
<td class="amount"><?php
$tr4= $tr4 + $result->range_4;
echo format_currency($result->range_4); ?></td>
<td class="amount"><?php
$trb= $trb + $result->total_balance;
echo format_currency($result->total_balance); ?></td>
</tr>
<?php } ?>
<tr>
<td style="text-align:center;"><strong>Total</strong></td>
<td class="amount"><strong>
<?php
{
echo format_currency($tr1,2,'.','');
}
?>
</strong>
</td>
<td class="amount"><strong>
<?php
{
echo format_currency($tr2,2,'.','');
}
?>
</strong>
</td>
<td class="amount">
<strong>
<?php
{
echo format_currency($tr3,2,'.','');
}
?>
</strong>
</td>
<td class="amount">
<strong>
<?php
{
echo format_currency($tr4,2,'.','');
}
?>
</strong>
</td>
<td class="amount">
<strong>
<?php
{
echo format_currency($trb,2,'.','');
}
?>
</strong>
</td>
</tr>
</tbody>
</table>
</body>
</html>