/**
  * Lists all models.
  */
 public function actionIndex()
 {
     parent::actionIndex();
     $purchasingorg = new Purchasingorg('search');
     $purchasingorg->unsetAttributes();
     // clear any default values
     if (isset($_GET['Purchasingorg'])) {
         $purchasingorg->attributes = $_GET['Purchasingorg'];
     }
     $paymentmethod = new Paymentmethod('search');
     $paymentmethod->unsetAttributes();
     // clear any default values
     if (isset($_GET['Paymentmethod'])) {
         $paymentmethod->attributes = $_GET['Paymentmethod'];
     }
     $purchasinggroup = new Purchasinggroup('search');
     $purchasinggroup->unsetAttributes();
     // clear any default values
     if (isset($_GET['Purchasinggroup'])) {
         $purchasinggroup->attributes = $_GET['Purchasinggroup'];
     }
     $supplier = new Supplier('search');
     $supplier->unsetAttributes();
     // clear any default values
     if (isset($_GET['Supplier'])) {
         $supplier->attributes = $_GET['Supplier'];
     }
     $podetail = new Podetail('search');
     $podetail->unsetAttributes();
     // clear any default values
     if (isset($_GET['Podetail'])) {
         $podetail->attributes = $_GET['Podetail'];
     }
     $product = new Prmaterial('search');
     $product->unsetAttributes();
     // clear any default values
     if (isset($_GET['Prmaterial'])) {
         $product->attributes = $_GET['Prmaterial'];
     }
     $unitofmeasure = new Unitofmeasure('search');
     $unitofmeasure->unsetAttributes();
     // clear any default values
     if (isset($_GET['Unitofmeasure'])) {
         $unitofmeasure->attributes = $_GET['Unitofmeasure'];
     }
     $currency = new Currency('search');
     $currency->unsetAttributes();
     // clear any default values
     if (isset($_GET['Currency'])) {
         $currency->attributes = $_GET['Currency'];
     }
     $sloc = new Sloc('search');
     $sloc->unsetAttributes();
     // clear any default values
     if (isset($_GET['Sloc'])) {
         $sloc->attributes = $_GET['Sloc'];
     }
     $tax = new Tax('search');
     $tax->unsetAttributes();
     // clear any default values
     if (isset($_GET['Tax'])) {
         $tax->attributes = $_GET['Tax'];
     }
     $model = new Poheader('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Poheader'])) {
         $model->attributes = $_GET['Poheader'];
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $this->render('index', array('model' => $model, 'purchasingorg' => $purchasingorg, 'purchasinggroup' => $purchasinggroup, 'paymentmethod' => $paymentmethod, 'supplier' => $supplier, 'podetail' => $podetail, 'product' => $product, 'unitofmeasure' => $unitofmeasure, 'currency' => $currency, 'sloc' => $sloc, 'tax' => $tax, 'podetail' => $podetail));
 }
예제 #2
0
echo $form->error($model, 'invoicedate');
?>
        </div>
		</td>
		<td>
		<?php 
echo $form->labelEx($model, 'addressbookid');
?>
    <?php 
echo $form->hiddenField($model, 'addressbookid');
?>
    <input type="text" name="customername" id="customername" readonly >
    <?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'customer_dialog', 'options' => array('title' => Yii::t('app', 'Supplier'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true)));
$supplier = new Supplier('searchwfstatus');
$supplier->unsetAttributes();
// clear any default values
if (isset($_GET['Supplier'])) {
    $supplier->attributes = $_GET['Supplier'];
}
$this->widget('zii.widgets.grid.CGridView', array('id' => 'customer-grid', 'dataProvider' => $supplier->searchwstatus(), 'filter' => $supplier, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("V",
          array("name" => "send_absstatus",
          "id" => "send_absstatus",
          "onClick" => "$(\\"#customer_dialog\\").dialog(\\"close\\"); $(\\"#customername\\").val(\\"$data->fullname\\"); 
		  $(\\"#Invoice_addressbookid\\").val(\\"$data->addressbookid\\");"))'), array('name' => 'addressbookid', 'visible' => false, 'value' => '$data->addressbookid', 'htmlOptions' => array('width' => '1%')), 'fullname')));
$this->endWidget('zii.widgets.jui.CJuiDialog');
echo CHtml::Button('...', array('onclick' => '$("#customer_dialog").dialog("open"); return false;'));
?>
    <?php 
echo $form->error($model, 'addressbookid');
?>
예제 #3
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Supplier('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Supplier'])) {
         $model->attributes = $_GET['Supplier'];
     }
     $this->render('admin', array('model' => $model));
 }
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     parent::actionIndex();
     $this->lookupdata();
     $model = new Supplier('searchwstatus');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Supplier'])) {
         $model->attributes = $_GET['Supplier'];
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $this->render('index', array('model' => $model, 'supplieraddress' => $this->supplieraddress, 'suppliercontact' => $this->suppliercontact, 'acchutang' => $this->acchutang));
 }
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     if (Yii::app()->user->checkAccess('supplier.index') || Yii::app()->user->checkAccess('supplier.create') || Yii::app()->user->checkAccess('supplier.update') || Yii::app()->user->checkAccess('supplier.delete')) {
         $model = new Supplier('search');
         $model->unsetAttributes();
         // clear any default values
         if (isset($_GET['Supplier'])) {
             $model->attributes = $_GET['Supplier'];
         }
         $this->render('admin', array('model' => $model));
     } else {
         throw new CHttpException(403, 'You are not authorized to perform this action');
     }
 }
 /**
  * Lists all models.
  */
 public function actionIndex()
 {
     parent::actionIndex();
     $supplier = new Supplier('searchwstatus');
     $supplier->unsetAttributes();
     // clear any default values
     if (isset($_GET['Supplier'])) {
         $supplier->attributes = $_GET['Supplier'];
     }
     $product = new Product('searchwstatus');
     $product->unsetAttributes();
     // clear any default values
     if (isset($_GET['Product'])) {
         $product->attributes = $_GET['Product'];
     }
     $purchasinggroup = new Purchasinggroup('searchwstatus');
     $purchasinggroup->unsetAttributes();
     // clear any default values
     if (isset($_GET['Purchasinggroup'])) {
         $purchasinggroup->attributes = $_GET['Purchasinggroup'];
     }
     $currency = new Currency('searchwstatus');
     $currency->unsetAttributes();
     // clear any default values
     if (isset($_GET['Currency'])) {
         $currency->attributes = $_GET['Currency'];
     }
     $model = new Purchinforec('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Purchinforec'])) {
         $model->attributes = $_GET['Purchinforec'];
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $this->render('index', array('model' => $model, 'supplier' => $supplier, 'product' => $product, 'purchasinggroup' => $purchasinggroup, 'currency' => $currency));
 }
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Supplier('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Supplier'])) {
         $model->attributes = $_GET['Supplier'];
     }
     if ($this->isExportRequest()) {
         $this->exportCSV($model->search(), array('suppliertype.name', 'add1', 'add2', 'pincode', 'city', 'state', 'country', 'website', 'phone_no', 'comment', 'tax', 'email', 'documentFileName', 'documentFileType', 'vcardFileName', 'vcardFileType'));
     }
     $this->render('admin', array('model' => $model));
 }
예제 #8
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     if (Yii::app()->user->checkAccess('supplier.index') || Yii::app()->user->checkAccess('supplier.create') || Yii::app()->user->checkAccess('supplier.update') || Yii::app()->user->checkAccess('supplier.delete')) {
         $model = new Supplier('search');
         $model->unsetAttributes();
         // clear any default values
         if (isset($_GET['Supplier'])) {
             $model->attributes = $_GET['Supplier'];
         }
         if (isset($_GET['pageSize'])) {
             Yii::app()->user->setState('supplierPageSize', (int) $_GET['pageSize']);
             unset($_GET['pageSize']);
         }
         if (isset($_GET['archivedSupplier'])) {
             Yii::app()->user->setState('archived_supplier', $_GET['archivedSupplier']);
             unset($_GET['archivedSupplier']);
         }
         $model->supplier_archived = Yii::app()->user->getState('archived_supplier', Yii::app()->params['defaultArchived']);
         $this->render('admin', array('model' => $model));
     } else {
         throw new CHttpException(403, 'You are not authorized to perform this action');
     }
 }