コード例 #1
0
ファイル: _form.php プロジェクト: ewwgit/eptri
echo $form->field($model, 'UnitPrice')->textInput(['maxlength' => true]);
?>
                              </div>
					</div>
					</div>
				</div>
				<!--row 3end-->

				<div class="row">
					<!--row 4-->

					<div class="col-md-4">
						<div class="form-group">
							
							<?php 
echo $form->field($model, 'PriceUnit')->dropDownList(ArrayHelper::map(PriceUnits::find()->all(), 'priceUnitName', 'priceUnitName'), ['prompt' => 'Price Unit']);
?>
						</div>
						</div>
					<div class="col-md-4">
						<div class="form-group">
                                <?php 
echo $form->field($model, 'ReserveCount')->textInput(['maxlength' => true]);
?>
                              </div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
                                
                                <?php 
echo $form->field($model, 'SaleInd')->dropDownList(ArrayHelper::map(SaleIndicators::find()->all(), 'indicatorCode', 'indicatorCode'), ['prompt' => 'Sale Indicators']);
コード例 #2
0
?>
" value="<?php 
echo $model['SalePrice'];
?>
"></div></td>
                            <td><div class="actualval acval<?php 
echo $model['Saleid'];
?>
" ><?php 
echo $model['PriceUnit'];
?>
</div><div class="inpval inval<?php 
echo $model['Saleid'];
?>
"><?php 
echo Html::activeDropDownList($model, 'PriceUnit', ArrayHelper::map(PriceUnits::find()->all(), 'priceUnitName', 'priceUnitName'), ['id' => 'priceunit' . $model['Saleid']]);
?>
</div></td>
                            <td><div class="actualval acval<?php 
echo $model['Saleid'];
?>
" ><?php 
echo $model['StartDate'];
?>
</div><div class="inpval inval<?php 
echo $model['Saleid'];
?>
"><?php 
echo DatePicker::widget(['name' => 'dp_1', 'type' => DatePicker::TYPE_INPUT, 'value' => $model['StartDate'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-m-dd'], 'options' => ['id' => 'strdate' . $model['Saleid'], 'style' => 'width: 75px;']]);
?>
</div></td>
コード例 #3
0
ファイル: PriceunitsController.php プロジェクト: ewwgit/eptri
 /**
  * Finds the PriceUnits model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return PriceUnits the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = PriceUnits::findOne($id)) !== null) {
         $admincreatedModel = AdminMaster::findOne($model->createdBy);
         $adminupdatedModel = AdminMaster::findOne($model->updatedBy);
         $model->createdBy = $admincreatedModel->username;
         $model->updatedBy = $adminupdatedModel->username;
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }