Internal overhaul
This commit is contained in:
@@ -121,12 +121,9 @@ class Controller_Admin_Payment extends Controller_Payment {
|
||||
->type('stdin')
|
||||
->data('
|
||||
$(document).ready(function() {
|
||||
var nowTemp = new Date();
|
||||
var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
|
||||
|
||||
$("#date_payment_label").datepicker({
|
||||
autoclose : true,
|
||||
endDate : now,
|
||||
endDate : new Date(),
|
||||
format : "dd-mm-yyyy",
|
||||
todayBtn : true,
|
||||
}).on("hide",function(ev) {
|
||||
|
@@ -214,6 +214,22 @@ class Model_Payment extends ORM_OSB {
|
||||
|
||||
/** LIST FUNCTIONS **/
|
||||
|
||||
/**
|
||||
* Show recent payments for this account
|
||||
*/
|
||||
public function list_recent_table() {
|
||||
return Table::factory()
|
||||
->data($this->limit(10)->find_all())
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'date_payment'=>'Date',
|
||||
'checkout->display("name")'=>'Method',
|
||||
'total_amt'=>'Total',
|
||||
'balance(TRUE)'=>'Balance',
|
||||
'invoicelist()'=>'Invoices'
|
||||
));
|
||||
}
|
||||
|
||||
public function list_unapplied() {
|
||||
$pid = array();
|
||||
|
||||
@@ -232,32 +248,5 @@ class Model_Payment extends ORM_OSB {
|
||||
|
||||
return $this->where('id','IN',$pid)->order_by('account_id')->find_all();
|
||||
}
|
||||
|
||||
public function list_recent_table() {
|
||||
// @todo This should be in a config file.
|
||||
$css = '<style type="text/css">';
|
||||
$css .= 'table.box-left { border: 1px solid #AAAACC; margin-right: auto; }';
|
||||
$css .= 'tr.head { font-weight: bold; }';
|
||||
$css .= 'td.head { font-weight: bold; }';
|
||||
$css .= 'td.right { text-align: right; }';
|
||||
$css .= 'tr.odd { background-color: #FCFCFE; }';
|
||||
$css .= 'tr.even { background-color: #F6F6F8; }';
|
||||
$css .= '</style>';
|
||||
|
||||
return $css.Table::display(
|
||||
$this->limit(10)->find_all(),
|
||||
25,
|
||||
array(
|
||||
'id'=>array('label'=>'ID'),
|
||||
'date_payment'=>array('label'=>'Date'),
|
||||
'checkout->display("name")'=>array('label'=>'Method'),
|
||||
'total_amt'=>array('label'=>'Total','class'=>'right'),
|
||||
'balance(TRUE)'=>array('label'=>'Balance','class'=>'right'),
|
||||
'invoicelist()'=>array('label'=>'Invoices'),
|
||||
),
|
||||
array(
|
||||
'type'=>'list',
|
||||
));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user