92 lines
2.6 KiB
PHP
92 lines
2.6 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="<?php echo trans('cldr'); ?>">
|
|
<head>
|
|
<title><?php echo trans('sales_by_client'); ?></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('sales_by_client'); ?><br/>
|
|
<small><?php echo $from_date . ' - ' . $to_date ?></small>
|
|
</h3>
|
|
|
|
<table class="table table-striped table-condensed no-margin">
|
|
<tr>
|
|
<th><?php echo trans('client'); ?></th>
|
|
<th class="amount"><?php echo trans('invoice_count'); ?></th>
|
|
<th class="amount"><?php echo trans('sales'); ?></th>
|
|
<th class="amount"><?php echo trans('Total Tax'); ?></th>
|
|
<th class="amount"><?php echo trans('sales_with_tax'); ?></th>
|
|
</tr>
|
|
<?php
|
|
$tr1=0;
|
|
$tr2=0;
|
|
$tr3=0;
|
|
$tr4=0;
|
|
foreach ($results as $result) { ?>
|
|
<tr>
|
|
<td><?php _htmlsc(format_client($result)); ?></td>
|
|
<td class="amount"><?php
|
|
$tr1= $tr1 + $result->invoice_count;
|
|
echo $result->invoice_count; ?></td>
|
|
<td class="amount"><?php
|
|
$tr2= $tr2 + $result->sales;
|
|
echo format_currency($result->sales); ?></td>
|
|
<td class="amount"><?php
|
|
$tr3= $tr3 + ($result->sales_with_tax - $result->sales);
|
|
echo format_currency($result->sales_with_tax - $result->sales); ?></td>
|
|
<td class="amount"><?php
|
|
$tr4= $tr4 + $result->sales_with_tax;
|
|
echo format_currency($result->sales_with_tax); ?></td>
|
|
</tr>
|
|
<?php } ?>
|
|
<tr>
|
|
<td style="text-align:center;"><strong>Total</strong></td>
|
|
<td class="amount"><strong>
|
|
<?php
|
|
{
|
|
echo ($tr1);
|
|
|
|
}
|
|
?>
|
|
</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>
|
|
|
|
|
|
|
|
</tr>
|
|
</table>
|
|
|
|
</body>
|
|
</html>
|