04ebda2aaa
Improvements to NAVBAR, updates to StaticList methods, other minor items Enable product category rendering and other minor improvements Added ADSL-large category price plan
146 lines
4.8 KiB
PHP
146 lines
4.8 KiB
PHP
<!-- @todo NEED to translate this -->
|
|
<table class="box-left" border="0">
|
|
<tr>
|
|
<td style="vertical-align: top">
|
|
<table class="company_details" border="0">
|
|
<tr>
|
|
<td class="logo"><?php echo Company::instance()->logo(); ?></td>
|
|
<td class="address"><span class="company_name"><?php echo Company::instance()->name(); ?></span><br/><?php echo Company::instance()->address(); ?><br/><?php echo Company::instance()->contacts(); ?></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td> </td>
|
|
<td>
|
|
<table class="invoice_summary" border="0">
|
|
<tr>
|
|
<td>TAX INVOICE</td>
|
|
<td class="bold-right"><?php echo $io->id(); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Issue Date</td>
|
|
<td class="bold-right"><?php echo $io->display('date_orig'); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Due Date</td>
|
|
<td class="bold-right"><?php echo $io->display('due_date'); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Current Charges</td>
|
|
<td class="bold-right"><?php echo $io->total(TRUE); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Payments Received to Date</td>
|
|
<td class="bold-right"><?php echo $io->payments_total(TRUE); ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Total Charges Due This Invoice</td>
|
|
<td class="bold-right"><?php echo $io->due(TRUE); ?></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr><td class="spacer" colspan="3"> </td></tr>
|
|
<tr>
|
|
<td colspan="3">
|
|
<table class="box-full" border="0">
|
|
<tr>
|
|
<td class="head" colspan="4">Charges Detail:</td>
|
|
</tr>
|
|
<?php foreach ($io->items_service_periods() as $rs => $items) { ?>
|
|
<tr>
|
|
<td>+</td>
|
|
<?php if ($rs) { ?>
|
|
<td><?php echo StaticList_RecurSchedule::get($rs); ?></td>
|
|
<td colspan="1"><?php printf('%s Service(s)',count($items)); ?></td>
|
|
<?php } else { ?>
|
|
<td colspan="2">Other Items</td>
|
|
<?php } ?>
|
|
<td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td colspan="2">
|
|
<div id="detail_toggle_<?php echo $rs; ?>">
|
|
<table class="box-full" border="0">
|
|
<?php if ($items) { ?>
|
|
<?php foreach ($io->items_services($items) as $sid => $ito) { ?>
|
|
<?php $so = ORM::factory('Service',$sid); ?>
|
|
<!-- Product Information -->
|
|
<tr class="head">
|
|
<td><?php echo $so->id(); ?></td>
|
|
<td colspan="5"><?php echo $so->service_name(); ?> (<?php echo $so->product_id; ?>)</td>
|
|
<td class="right"><?php echo Currency::display($io->items_service_total($so->id));?></td>
|
|
</tr>
|
|
<!-- End Product Information -->
|
|
|
|
<?php foreach ($io->items_service($sid) as $ito) { ?>
|
|
<!-- Product Sub Information -->
|
|
<tr>
|
|
<td> </td>
|
|
<td><?php echo $ito->trannum();?></td>
|
|
<td><?php echo $ito->name();?></td>
|
|
<td><?php echo $ito->detail();?></td>
|
|
<td><?php echo $ito->period();?></td>
|
|
<td class="right"><?php echo Currency::display($ito->subtotal());?> </td>
|
|
</tr>
|
|
<!-- End Product Sub Information -->
|
|
|
|
<?php if ($ito->discount_amt) { ?>
|
|
<tr>
|
|
<td colspan="4"> </td>
|
|
<td><?php echo _('Discounts'); ?></td>
|
|
<td class="right">(<?php echo Currency::display($io->items_service_discount($so->id));?>)</td>
|
|
</tr>
|
|
<?php } ?>
|
|
<!-- Product Sub Items Tax -->
|
|
<tr>
|
|
<td colspan="4"> </td>
|
|
<td><?php echo _('Taxes'); ?></td>
|
|
<td class="right"><?php echo Currency::display($io->items_service_tax($so->id));?> </td>
|
|
</tr>
|
|
<!-- Product End Sub Items Tax -->
|
|
<?php } ?>
|
|
<?php } ?>
|
|
<?php } ?>
|
|
</table>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php } ?>
|
|
<tr>
|
|
<td class="head" colspan="3">Sub Total of Items:</td>
|
|
<td class="bold-right"><?php echo $io->subtotal(TRUE); ?> </td>
|
|
</tr>
|
|
<?php if ($io->total_discounts()) { ?>
|
|
<tr>
|
|
<td class="head" colspan="3">Discounts:</td>
|
|
<td class="bold-right">(<?php echo $io->total_discounts(TRUE); ?>)</td>
|
|
</tr>
|
|
<?php } ?>
|
|
<tr>
|
|
<td class="head" colspan="4">Taxes Included:</td>
|
|
</tr>
|
|
<?php
|
|
foreach ($io->tax_summary() as $tid => $amount) {
|
|
$m = ORM::factory('Tax',$tid);
|
|
?>
|
|
<tr>
|
|
<td> </td>
|
|
<td colspan="2"><?php echo $m->description; ?></td>
|
|
<td class="bold-right"><?php echo Currency::display($amount); ?> </td>
|
|
</tr>
|
|
<?php }?>
|
|
<!-- @todo Add discounts -->
|
|
<tr>
|
|
<td class="head" colspan="3">Total This Invoice:</td>
|
|
<td class="bold-right"><?php echo $io->total(TRUE); ?> </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="head" colspan="3">Total Outstanding This Account:</td>
|
|
<td class="bold-right"><?php echo $io->account->invoices_due_total(NULL,TRUE); ?> </td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|