Improved ADSL Billing Review

This commit is contained in:
Deon George
2013-10-08 13:34:56 +11:00
parent ab3735914b
commit 638d123739
15 changed files with 367 additions and 248 deletions

View File

@@ -0,0 +1,31 @@
<table class="table table-striped table-condensed table-hover" id="list-table">
<thead><tr>
<th>Service</th>
<th>Supplier Plan</th>
<th>Contract Start</th>
<th>Contract End</th>
<th>Supplier Cost</th>
<th>Invoiced</th>
<th>Extras</th>
</tr></thead>
<tbody>
<?php foreach ($aso->services(TRUE) as $so) : ?>
<?php $p = $so->plugin(); $po = $p->product(); $service_number = $p->service_number; ?>
<tr class="<?php echo $o->charge($service_number) == $po->adsl_supplier_plan->total() ? '' : 'error'; ?>">
<td><?php echo $service_number; ?></td>
<td><?php echo $po->adsl_supplier_plan->name().($p->provided_adsl_plan_id ? '*' : ''); ?></td>
<td><?php echo $p->contract_date_start(TRUE); ?></td>
<td><?php echo $p->contract_date_end(TRUE); ?></td>
<td><?php echo Currency::display($po->adsl_supplier_plan->total()); ?></td>
<td><?php echo Currency::display($o->charge($service_number)); ?></td>
<td><?php echo Currency::display($o->excess($service_number)); ?></td>
</tr>
<?php endforeach ?>
<tr class="info"><td colspan="5">&nbsp;</td><td><?php echo $o->total(TRUE); ?></td><td>&nbsp;</td></tr>
</tbody>
</table>

View File

@@ -0,0 +1,12 @@
<div class="row">
<div class="span9 offset1">
<fieldset>
<legend>Exetel VISP Billing</legend>
<?php echo Form::hidden('sid',$_POST['sid']); ?>
<?php echo Form::file('csv',array('label'=>'Invoice File','required')); ?>
</fieldset>
<?php echo Form::button('submit','Submit',array('class'=>'btn btn-primary')); ?>
</div> <!-- /span -->
</div> <!-- /row -->

View File

@@ -0,0 +1,21 @@
<table class="table table-striped table-condensed table-hover" id="list-table">
<thead><tr>
<th>Service</th>
<th>Cost</th>
<th>Extras</th>
<th>Line</th>
</tr></thead>
<tbody>
<?php foreach ($o->exception() as $service => $line) : ?>
<tr class="warn">
<td><?php echo $service ? $service : 'unknown'; ?></td>
<td><?php echo isset($line['cost']) ? $line['cost'] : 'unknown'; ?></td>
<td><?php echo isset($line['excess']) ? $line['excess'] : 0; ?></td>
<td><?php echo isset($line['info']) ? $line['info'] : ''; ?></td>
</tr>
<?php endforeach ?>
</tbody>
</table>

View File

@@ -1,11 +0,0 @@
<tr class="<?php echo $i ? 'odd' : 'even'; ?>">
<td><?php echo $service->plugin()->display('service_number'); ?></td>
<td><?php echo $plan->adsl_supplier_plan->name().($planoverride ? '*' : ''); ?></td>
<td><?php echo $service->plugin()->contract_date_start(TRUE); ?></td>
<td><?php echo $service->plugin()->contract_date_end(TRUE); ?></td>
<td><?php echo Currency::display($plan->adsl_supplier_plan->base_cost); ?></td>
<td><?php echo Currency::display($plan->adsl_supplier_plan->base_cost+$plan->adsl_supplier_plan->tax()); ?></td>
<td><input type="checkbox" <?php echo $checked; ?> onchange="paid(this);"/></td>
<td><input type="text" name="payment[<?php echo $service->plugin()->service_number; ?>]" value="<?php echo $amount; ?>" id="p<?php echo $service->plugin()->id; ?>" size="8"/></td>
<td><?php echo $excess ? sprintf('(%s)',$excess) : '&nbsp'; ?></td>
</tr>

View File

@@ -1,4 +0,0 @@
<tr class="head">
<td colspan="7">&nbsp;</td>
<td><?php echo $total; ?></td>
</tr>

View File

@@ -1,7 +0,0 @@
<script type="text/javascript" >
<!--
function paid(form) {
alert(form);
}
//-->
</script>

View File

@@ -1,10 +0,0 @@
<tr class="<?php echo $i ? 'odd' : 'even'; ?>">
<td><?php echo $service->plugin()->display('service_number'); ?></td>
<td><?php echo $plan->adsl_supplier_plan->name().($planoverride ? '*' : ''); ?></td>
<td><?php echo $service->plugin()->contract_date_start(); ?></td>
<td><?php echo $service->plugin()->contract_date_end(); ?></td>
<td><?php echo Currency::display($service->product->plugin()->adsl_supplier_plan->base_cost); ?></td>
<td><?php echo Currency::display($service->product->plugin()->adsl_supplier_plan->base_cost+$service->product->plugin()->adsl_supplier_plan->tax()); ?></td>
<td><?php echo $amount; ?></td>
<td><?php echo $service->product->plugin()->adsl_supplier_plan->base_cost+$service->product->plugin()->adsl_supplier_plan->tax()-$amount; ?></td>
</tr>

View File

@@ -1,6 +0,0 @@
<tr class="<?php echo $i ? 'odd' : 'even'; ?>">
<td><?php echo $service; ?></td>
<td><?php echo empty($item['info']) ? '&nbsp;' : $item['info']; ?></td>
<td><?php echo empty($item['cost']) ? '&nbsp;' : $item['cost']; ?></td>
<td><?php echo empty($item['credit']) ? '&nbsp;' : $item['credit']; ?></td>
</tr>