Internal overhaul

This commit is contained in:
Deon George
2013-11-28 17:41:34 +11:00
parent 0ed5e5163d
commit f8a5b153cf
91 changed files with 1570 additions and 1619 deletions

View File

@@ -10,6 +10,17 @@
* @license http://dev.osbill.net/license.html
*/
class Task_Invoice_Remindoverdue1 extends Minion_Task {
// @todo This should be moved to somewhere else
private $_css = '
<style type="text/css">
table.box-left { border: 1px solid #AAAACC; margin-right: auto; }
tr.head { font-weight: bold; }
td.head { font-weight: bold; }
td.right { text-align: right; }
tr.odd { background-color: #FCFCFE; }
tr.even { background-color: #F6F6F8; }
</style>';
protected function remind_overdue($notice=1) {
$action = array();
@@ -44,7 +55,7 @@ class Task_Invoice_Remindoverdue1 extends Minion_Task {
'INV_NUM'=>$io->refnum(),
'INV_URL'=>URL::site(URL::link('user','invoice/view/'.$io->id),'http'),
'LATE_FEE'=>'5.50', // @todo This should come from a config file.
'PAYMENTS_TABLE'=>$io->account->payment->list_recent_table(),
'PAYMENTS_TABLE'=>$this->_css.$io->account->payment->list_recent_table(),
'SITE_NAME'=>Company::instance()->name(),
);

View File

@@ -1,43 +1,43 @@
<div class="row">
<div class="span11">
<div class="span5">
<div class="row">
<table>
<tr>
<td style="vertical-align: top"><?php echo HTML::image('http://www.gth.bgo.co/logo-blue'); ?></td>
<td style="text-align: right; font-weight: bold">
<?php echo Company::instance()->name(); ?><br/>
<?php echo Company::instance()->taxid(); ?><br/>
<br/>
<?php echo Company::instance()->address(); ?><br/>
<br/>
<?php echo Company::instance()->contacts(); ?>
</td>
</tr>
</table>
</div> <!-- /row -->
</div> <!-- /span -->
<div class="span5">
<table>
<tr>
<td style="vertical-align: top"><?php echo HTML::image('http://www.gth.bgo.co/logo-blue'); ?></td>
<td style="text-align: right; font-weight: bold">
<?php echo Company::instance()->name(); ?><br/>
<?php echo Company::instance()->taxid(); ?><br/>
<br/>
<?php echo Company::instance()->address(); ?><br/>
<br/>
<?php echo Company::instance()->contacts(); ?>
</td>
</tr>
</table>
</div> <!-- /span -->
<div class="span5">
<div class="row">
<div class="dl-horizontal pull-right">
<dt>Tax Invoice</dt>
<dd><?php echo $o->id(); ?></dd>
<dt>Issue Date</dt>
<dd><?php echo $o->display('date_orig'); ?></dd>
<dt>Due Date</dt>
<dd><?php echo $o->display('due_date'); ?></dd>
<dt>Current Charges</dt>
<dd><?php echo $o->total_charges(TRUE); ?></dd>
<dt>Payments Received</dt>
<dd><?php echo $o->payments_total(TRUE); ?></dd>
<dt>Credits Applied</dt>
<dd><?php echo $o->total_credits(TRUE); ?></dd>
<dt>Still Due</dt>
<dd><?php echo $o->due(TRUE); ?></dd>
</div>
</div> <!-- /row -->
</div> <!-- /span -->
<div class="span5">
<div class="dl-horizontal pull-right">
<dt>Tax Invoice</dt>
<dd><?php echo $o->id(); ?></dd>
<dt>Issue Date</dt>
<dd><?php echo $o->display('date_orig'); ?></dd>
<dt>Due Date</dt>
<dd><?php echo $o->display('due_date'); ?></dd>
<dt>Current Charges</dt>
<dd><?php echo $o->total_charges(TRUE); ?></dd>
<dt>Payments Received</dt>
<dd><?php echo $o->payments_total(TRUE); ?></dd>
<dt>Credits Applied</dt>
<dd><?php echo $o->total_credits(TRUE); ?></dd>
<dt>Still Due</dt>
<dd><?php echo $o->due(TRUE); ?></dd>
</div>
</div> <!-- /span -->
</div>
@@ -46,67 +46,60 @@
<h4>Charge Details</h4>
<?php echo Invoice::instance($o)->render('html','body'); ?>
</div> <!-- /span -->
</div>
<div class="row">
<div class="span11">
<div class="span5">
<div class="row">
<h5>Reminder Details</h5>
<div class="dl-horizontal pull-left">
<?php foreach ($o->reminders() as $eto) : ?>
<dt><?php echo $o->reminders($eto->name,TRUE); ?></dt>
<dd><?php echo $eto->name(); ?></dd>
<?php endforeach ?>
</div>
</div> <!-- /row -->
</div> <!-- /span -->
<div class="span5">
<h5>Reminder Details</h5>
<div class="span5">
<div class="row">
<div class="dl-horizontal pull-right">
<!-- Sub Total -->
<dt>Sub Total</dt>
<dd><?php echo $o->subtotal(TRUE); ?></dd>
<!-- END Invoice Sub Total -->
<div class="dl-horizontal pull-left">
<?php foreach ($o->reminders() as $eto) : ?>
<dt><?php echo $o->reminders($eto->name,TRUE); ?></dt>
<dd><?php echo $eto->name(); ?></dd>
<?php endforeach ?>
</div>
</div> <!-- /span -->
<!-- Invoice Credits -->
<?php if ($o->total_credits()) : ?>
<dt>Credits</dt>
<dd><?php echo $o->total_credits(TRUE); ?></dd>
<?php endif ?>
<!-- END Invoice Credits -->
<div class="span5">
<div class="dl-horizontal pull-right">
<!-- Sub Total -->
<dt>Sub Total</dt>
<dd><?php echo $o->subtotal(TRUE); ?></dd>
<!-- END Invoice Sub Total -->
<!-- Invoice Discounts Total -->
<?php if ($o->total_discounts()) : ?>
<dt>Discounts</dt>
<dd><?php echo $o->total_discounts(TRUE); ?></dd>
<?php endif ?>
<!-- END Invoice Discounts Total -->
<!-- Invoice Credits -->
<?php if ($o->total_credits()) : ?>
<dt>Credits</dt>
<dd><?php echo $o->total_credits(TRUE); ?></dd>
<?php endif ?>
<!-- END Invoice Credits -->
<!-- Invoice Taxes Total -->
<dt>Taxes Included:</dt>
<?php foreach ($o->tax_summary() as $tid => $amount) :
$m = ORM::factory('Tax',$tid); ?>
<dd><?php printf('%s (%s)',Currency::display($amount),$m->description); ?><dd>
<?php endforeach ?>
<!-- END Invoice Taxes Total -->
<!-- Invoice Discounts Total -->
<?php if ($o->total_discounts()) : ?>
<dt>Discounts</dt>
<dd><?php echo $o->total_discounts(TRUE); ?></dd>
<?php endif ?>
<!-- END Invoice Discounts Total -->
<!-- Invoice Total -->
<dt>Total Invoice:</dt>
<dd><?php echo $o->total(TRUE); ?></dd>
<!-- END Invoice Total -->
<!-- Invoice Taxes Total -->
<dt>Taxes Included:</dt>
<?php foreach ($o->tax_summary() as $tid => $amount) :
$m = ORM::factory('Tax',$tid); ?>
<dd><?php printf('%s (%s)',Currency::display($amount),$m->description); ?><dd>
<?php endforeach ?>
<!-- END Invoice Taxes Total -->
<!-- Account Total Due -->
<dt>Account Due:</dt>
<dd><?php echo $o->account->invoices_due_total(NULL,TRUE); ?></dd>
<!-- END Account Total Due -->
<!-- Invoice Total -->
<dt>Total Invoice:</dt>
<dd><?php echo $o->total(TRUE); ?></dd>
<!-- END Invoice Total -->
</div>
</div> <!-- /row -->
</div> <!-- /span -->
<!-- Account Total Due -->
<dt>Account Due:</dt>
<dd><?php echo $o->account->invoices_due_total(NULL,TRUE); ?></dd>
<!-- END Account Total Due -->
</div>
</div> <!-- /span -->
</div>