Ejemplo n.º 1
0
<?php

$resourceID = $_GET['resourceID'];
$resource = new Resource(new NamedArguments(array('primaryKey' => $resourceID)));
//used to get default currency
$config = new Configuration();
$enhancedCostFlag = $config->settings->enhancedCostHistory == 'Y' ? 1 : 0;
//get all currency for output in drop down
$currencyArray = array();
$currencyObj = new Currency();
$currencyArray = $currencyObj->allAsArray();
//get all Order Types for output in drop down
$orderTypeArray = array();
$orderTypeObj = new OrderType();
$orderTypeArray = $orderTypeObj->allAsArray();
//get all Cost Details for output in drop down
$costDetailsArray = array();
$costDetailsObj = new CostDetails();
$costDetailsArray = $costDetailsObj->allAsArray();
//get payments
$sanitizedInstance = array();
$instance = new ResourcePayment();
$paymentArray = array();
foreach ($resource->getResourcePayments() as $instance) {
    foreach (array_keys($instance->attributeNames) as $attributeName) {
        $sanitizedInstance[$attributeName] = $instance->{$attributeName};
    }
    $sanitizedInstance[$instance->primaryKeyName] = $instance->primaryKey;
    array_push($paymentArray, $sanitizedInstance);
}
// Table geometry is different if enhanced cost history is enabled
Ejemplo n.º 2
0
	<div class="row">
	<label>Component Name</label>
	<?php 
$this->widget('zii.widgets.jui.CJuiAutoComplete', array('model' => new Components(), 'attribute' => 'component_name', 'sourceUrl' => array('/seller/sellercomponents/cekcomponents'), 'options' => array('minLength' => '1', 'search' => 'js:function(event, ui){
                        $(\'#hospital_id\').val(-1);
                       }', 'select' => 'js:function(event, ui){
                        	document.getElementById(\'keterangan\').innerHTML = \'Code : \'+ui.item.code;
                        	document.getElementById(\'component_id\').value = ui.item.id;
                        }'), 'htmlOptions' => array('style' => 'height:25px;width:200px;padding:0px 5px;', 'class' => 'mf'), 'htmlOptions' => array('style' => 'width:50%;')));
?>
		<input type="hidden" name="component_id" id="component_id">
		</div>
	
	<div class="row">
	<b id="keterangan">
	</b></div>	
	
	<div class="row">
	<label>Sender Name</label>
		<input type="text" id="sender_name" name="sender_name" size="20">
	</div>

	<div class="row">	 
		<label>Type Order</label><br>
		<?php 
echo CHtml::dropDownList('type_order', '', CHtml::listData(OrderType::model()->findAll(), 'id', 'order_name'), array('empty' => '-- select order type --'));
?>
	</div><br>

</div>		
Ejemplo n.º 3
0
 function getOrderTypeSelect($select)
 {
     OrderType::init();
     return AHtml::getFilterSelect('type', 'Order Type', OrderType::$map, $select, false, '', 'value', 'value');
 }
Ejemplo n.º 4
0
 public function getOrderTypeAll()
 {
     $orderTypeAll = OrderType::model()->findAll("status=:status", array('status' => '1'));
     $orderTypeAll = CHtml::listData($orderTypeAll, 'id', 'name');
     return $orderTypeAll;
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = OrderType::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Ejemplo n.º 6
0
 public function equals(OrderType $element)
 {
     return $element->getValue() == $this->getValue();
 }
Ejemplo n.º 7
0
    <td><?php 
echo $form->textField($model, 'gid_server_id', array('size' => 6, 'maxlength' => 6));
?>
</td>
  </tr>
  <tr>
    <th>充值金额:</th>
    <td><?php 
echo $form->textField($model, 'price', array('size' => 11, 'maxlength' => 11));
?>
</td>
  </tr>
    <tr>
    <th>Pay 类型:</th>
    <td><?php 
echo $form->dropDownList($model, 'pay_type', CHtml::listData(OrderType::model()->findAll(), 'id', 'name'), array('class' => 'select'));
?>
</td>
  </tr>
  <tr>
    <th>是否支付:</th>
    <td><?php 
echo $form->dropDownList($model, 'pay', array('未支付', '已支付'), array('class' => 'select'));
?>
</td>
  </tr>
  <tr>
    <th>&nbsp;</th>
    <td><?php 
echo CHtml::submitButton($model->isNewRecord ? '确认添加' : '确认修改');
?>
Ejemplo n.º 8
0
<style>
<!--
#side_right input{
	width:40px;
}
#side_right select{
	width:60px;
}
-->
</style>
<div id="side_right">
<h2><strong>订单管理</strong></h2>
<h3><span class="title">编辑订单</span><span class="manage"><a href="javascript:void(0)"><img src="<?php 
echo Yii::app()->request->baseUrl;
?>
/system/images/delete.jpg" /></a></span></h3>

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'user-grid', 'dataProvider' => $model->search(), 'selectableRows' => 2, 'filter' => $model, 'template' => '{items}{pager}', 'cssFile' => false, 'pager' => array('class' => 'CLinkPager', 'cssFile' => false, 'header' => '', 'pageSize' => 3), 'columns' => array(array('class' => 'CCheckBoxColumn', 'name' => 'id'), array('name' => 'id', 'htmlOptions' => array('style' => 'width:20px;')), array('name' => 'order_number', 'header' => '订单编号', 'type' => 'raw', 'value' => 'CHtml::link($data->order_number,array(update,id=>$data->id))'), array('name' => 'mname', 'header' => '会员名'), array('name' => 'gid', 'header' => '游戏', 'value' => '$data->gameName->gname', 'filter' => CHtml::listData(Games::model()->findAll(), 'id', 'gname')), array('name' => 'gid_server_id', 'header' => '分区', 'value' => 'Games::model()->getGamesServerValue($data->gid,$data->gid_server_id)'), array('name' => 'price'), array('name' => 'pay_type', 'header' => '支付方式', 'filter' => CHtml::listData(OrderType::model()->findAll(), 'id', 'name'), 'value' => '$data->orderType->name'), array('name' => 'pay_time', 'header' => '支付时间', 'value' => 'Order::model()->getTime($data->pay_time)'), array('name' => 'pay', 'header' => '是否付款', 'filter' => Yii::app()->params["pay"], 'value' => 'Order::model()->getPayName($data->pay)'), array('header' => '编辑', 'class' => 'CButtonColumn'))));
?>
</div>
<!---------------side_right end---------------->
<?php 
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('user-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
<div class="search-form" style="display:none">
</div><!-- search-form -->