示例#1
0
echo Yii::t('translation', 'Invoices Management');
?>
</h1>

<?php 
echo CHtml::link(Yii::t('translation', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php 
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->

<?php 
$cmsFormater = new CmsFormatter();
$total_amount = $cmsFormater->formatPrice(FiInvoice::getTotalAmountGst());
$this->widget('zii.widgets.grid.CGridView', array('id' => 'fi-invoice-grid', 'dataProvider' => $model->searchMixed(), 'enableSorting' => true, 'afterAjaxUpdate' => 'function(id, data){ fixTargetBlank();  fnUpdateLink(); }', 'template' => "<div class='item_b'>Total Amount: {$total_amount}</div>{summary}{items}{pager}", 'columns' => array(array('header' => 'S/N', 'type' => 'raw', 'value' => '$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)', 'headerHtmlOptions' => array('width' => '30px', 'style' => 'text-align:center;'), 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Invoice No', 'name' => 'invoice_no'), array('header' => 'Invoice Date', 'name' => 'created_date', 'type' => 'date', 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Transaction No', 'name' => 'transactions_no'), array('header' => 'Property Address', 'name' => 'property_address', 'type' => 'raw'), array('header' => 'Total Amount Due Gst', 'name' => 'total_amount_due_gst'), array('header' => 'Status', 'name' => 'status'), array('header' => 'Receipt', 'name' => 'receipt', 'type' => 'raw', 'htmlOptions' => array('style' => 'text-align:center;')), array('header' => 'Actions', 'class' => 'CButtonColumn', 'template' => '{view}{update}{delete}', 'buttons' => array('view' => array('url' => '$data["viewUrl"]'), 'update' => array('visible' => 'isset($data["updateUrl"])', 'url' => '$data["updateUrl"]'), 'delete' => array('visible' => 'isset($data["deleteUrl"])', 'url' => '$data["deleteUrl"]'))))));
?>

<script type="text/javascript" src="<?php 
echo Yii::app()->theme->baseUrl;
?>
/admin/colorbox/jquery.colorbox-min.js"></script>    
<link rel="stylesheet" href="<?php 
echo Yii::app()->theme->baseUrl;
?>
/admin/css/colorbox.css" />
<script>
    $(function(){
        fnUpdateLink();        
    });