<?php

$this->breadcrumbs = array('Supplier');
?>

<div class="page-header">
	<h1>
		<?php 
echo CHtml::image(Yii::app()->request->baseUrl . '/images/icon/lorrygreen.png');
?>
		Data Supplier
	</h1>
</div>

<?php 
$this->widget('bootstrap.widgets.BootGridView', array('id' => 'p-product-grid', 'dataProvider' => cSupplier::model()->search(), 'itemsCssClass' => 'table table-striped table-bordered', 'template' => '{items}{pager}', 'columns' => array(array('name' => 'company_name', 'type' => 'raw', 'value' => 'CHtml::link($data->company_name,Yii::app()->createUrl("/m2/mAccpayable/viewSupplier",array("id"=>$data->id)))'), 'pic', 'address', 'city', 'status_id', array('header' => 'Total PO', 'value' => 'vPorder::model()->count("supplier_id = ".$data->id)', 'htmlOptions' => array('style' => 'text-align: right; padding-right: 5px;')), array('header' => 'Amount', 'value' => 'vPorder::model()->hutangPerSupplier($data->id)', 'htmlOptions' => array('style' => 'text-align: right; padding-right: 5px;')), array('header' => 'Payment', 'value' => 'vPorder::model()->paymentPerSupplier($data->id)', 'htmlOptions' => array('style' => 'text-align: right; padding-right: 5px;')), array('header' => 'Balance', 'value' => 'vPorder::model()->balancePerSupplier($data->id)', 'htmlOptions' => array('style' => 'text-align: right; padding-right: 5px;')))));
		'htmlOptions'=>array(
				
		),
));
?>
</div>
</div>
*/
?>

<?php 
//echo $form->dropDownListRow($model,'budgetcomp_id',tAccount::purchasingAccount());
?>

<?php 
echo $form->dropDownListRow($model, 'supplier_id', cSupplier::items());
?>

<?php 
echo $form->textAreaRow($model, 'remark', array('rows' => 2, 'class' => 'span5'));
?>

<a id="copylink" href="#" rel=".row">Add Row</a>

<table class="appendo-gii" id="copylink">
	<thead>
		<tr>
			<th>Budget</th>
			<th>Desc</th>
			<th>Qty</th>
			<th>Amount</th>
 public function loadModelSupplier($id)
 {
     $model = cSupplier::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
<?php

$this->breadcrumbs = array('Supplier' => array('index'), $model->company_name);
$this->menu = array(array('label' => 'Home AP', 'url' => array('/mAccpayable/')), array('label' => 'Home Supplier', 'url' => array('/mAccpayable/indexSupplier')));
$this->menu1 = cSupplier::getTopUpdated();
$this->menu2 = cSupplier::getTopCreated();
?>

<div class="page-header">
	<h1>
		<?php 
echo CHtml::image(Yii::app()->request->baseUrl . '/images/icon/lorrygreen.png');
?>
		<?php 
echo $model->company_name;
?>
	</h1>
</div>

<?php 
$this->widget('bootstrap.widgets.BootTabbable', array('type' => 'tabs', 'tabs' => array(array('label' => 'AP State', 'content' => $this->renderPartial("_tabState", array("model" => $model), true)), array('label' => 'Detail', 'content' => $this->renderPartial("_tabDetail", array("model" => $model), true)))));