示例#1
0
?>
</div><div class="inpval inval<?php 
echo $model['Saleid'];
?>
"><input type="text" class="product-width" id="rsvcount<?php 
echo $model['Saleid'];
?>
" value="<?php 
echo $model['ReserveCount'];
?>
"></div></td>
                            <td><div class="actualval acval<?php 
echo $model['Saleid'];
?>
" ><?php 
echo $model['SaleInd'];
?>
</div><div class="inpval inval<?php 
echo $model['Saleid'];
?>
"><?php 
echo Html::activeDropDownList($model, 'SaleInd', ArrayHelper::map(SaleIndicators::find()->all(), 'indicatorCode', 'indicatorCode'), ['id' => 'saleInd' . $model['Saleid']]);
?>
</div></td>
                            
                            
                           
                          </tr>
                          
                          <?php 
$this->registerJs("\n\t\t\n\t\t\$('.save_iconnew').on('click',  function(){\n\t\tvar saleId = \$(this).attr('saleid');\n\t\tvar productId = \$('#productId'+saleId).val();\n\t\tvar brand = \$('#brand'+saleId).val();\n\t\tvar quntity = \$('#quntity'+saleId).val();\n\t\tvar uom = \$('#uom'+saleId).val();\n\t\tvar altqty = \$('#altqty'+saleId).val();\n\t\tvar altuom = \$('#altuom'+saleId).val();\n\t\tvar unitprice = \$('#unitprice'+saleId).val();\n\t\tvar saleprice = \$('#saleprice'+saleId).val();\n\t\tvar priceunit = \$('#priceunit'+saleId).val();\n\t\tvar strdate = \$('#strdate'+saleId).val();\n\t\tvar enddate = \$('#enddate'+saleId).val();\n\t\tvar rsvcount = \$('#rsvcount'+saleId).val();\n\t\tvar saleInd = \$('#saleInd'+saleId).val();\n\t\tvar categoryId = \$('#categoryId'+saleId).val();\n\t\t//console.log(saleId);\n\t\t//console.log(categoryId);\n\t\t//return false;\n\t\t\$.ajax({\n        url: 'updateajax',\n        type: 'get',\n        data: {productId:productId,brand:brand,quntity:quntity,uom:uom,altqty:altqty,altuom:altuom,unitprice:unitprice,saleprice:saleprice,priceunit:priceunit,strdate:strdate,enddate:enddate,rsvcount:rsvcount,saleInd:saleInd,categoryId:categoryId,saleId:saleId},\n        success: function (response) {\n\t\t//return false;\n\t\twindow.location = 'allproducts';\n        }\n    });\n});\n\t\t\n\t\t\$('.delete_icon').on('click',  function(){\n\t\tvar saleId = \$(this).attr('saleid');\n\t\tvar answer = confirm ('Are you sure you want to delete from the database?');\nif (answer)\n{\n     \n\n\t\t\$.ajax({\n        url: 'deleteajax',\n        type: 'get',\n        data: {saleId:saleId},\n        success: function (response) {\n\t\t//return false;\n\t\twindow.location = 'allproducts';\n        }\n    });\n\t\t\n}\n\t\t\n\t\t\n});\n\t\t\n\t\t\$('.chkcls').on('click',  function(){\n\t\tvar i=0;\n\t\t \$('input[name=\"storeIds\"]:checked').each(function() {\n          i++;\n\t\t});\n\t\tif(i > 1)\n\t\t{\n\t\t\$('.editcls').show();\n\t\t\$('.deletecls').show();\n\t\t}\n\t\telse\n\t\t{\n\t\t\$('.editcls').hide();\n\t\t\$('.deletecls').hide();\n\t\t}\n\t\t\n\t\t\n});\n\t\t\n\t\t\n\t\t\$('.edit_iconnew').on('click',  function(){\n\t\t\n\t\t\$('.actualval').show();\n\t\t\$('.inpval').hide();\n\t\tvar saleId = \$(this).attr('saleid');\n\t\t\$('#saicon'+saleId).show();\n\t\t\$('#edicon'+saleId).hide();\n\t\t\$('.inval'+saleId).show();\n\t\t\$('.acval'+saleId).hide();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n});\n\t\t\n\t\t\n\n\n\t\t", View::POS_READY, 'my-options');
示例#2
0
 /**
  * Finds the SaleIndicators model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return SaleIndicators the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = SaleIndicators::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.');
     }
 }
示例#3
0
文件: _form.php 项目: ewwgit/eptri
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']);
?>
                              </div>
					</div>
				<!--row 4end-->

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

					
				</div>
				<!--row 5end-->

				<div class="row">
					<!--row 6-->
					<div class="col-md-4">