Ejemplo n.º 1
0
 public function searchPrevContainer()
 {
     $criteria = new CDbCriteria();
     //$criteria->compare('t.ecnt_container_nr', $this->ecnt_container_nr);
     $criteria->condition = "ecnt_datetime < '" . $this->ecnt_datetime . "' and t.ecnt_container_nr ='" . $this->ecnt_container_nr . "'";
     $criteria->order = "ecnt_datetime DESC";
     $criteria->limit = 1;
     return EcntContainer::model()->find($criteria);
 }
Ejemplo n.º 2
0
<div class="table-header">
    <i class="icon-road"></i>
<?php 
echo Yii::t('EdifactDataModule.model', 'On The Way');
?>
</div>

    <?php 
if (!empty($grid_error)) {
    ?>
    <div class="alert alert-error"><?php 
    echo $grid_error;
    ?>
</div>
    <?php 
}
if (!empty($grid_warning)) {
    ?>
    <div class="alert alert-warning"><?php 
    echo $grid_warning;
    ?>
</div>
    <?php 
}
//if (!empty($modelMain->ecerErrors)) {
// render grid view
$model = EcntContainer::model();
$this->widget('TbGridView', array('id' => 'ecnt-way-grid', 'dataProvider' => $model->searchOnTheWay(), 'template' => '{summary}{items}', 'summaryText' => '&nbsp;', 'htmlOptions' => array('class' => 'rel-grid-view'), 'columns' => array(array('name' => 'ecnt_terminal', 'type' => 'raw', 'value' => 'Chtml::tag("span" , array("class" => $data->getTerminalClass() ), $data->ecnt_terminal)'), array('name' => 'ecnt_transport_id'), array('name' => 'ecnt_container_nr'), array('name' => 'ecnt_datetime'), array('name' => 'ecnt_move_code', 'value' => '$data->getEnumColumnLabel("ecnt_move_code")'), array('name' => 'ecnt_iso_type'), array('class' => 'editable.EditableColumn', 'name' => 'ecnt_notes', 'editable' => array('type' => 'textarea', 'url' => $this->createUrl('/edifactdata/ecntContainer/editableSaver'))), array('class' => 'TbButtonColumn', 'buttons' => array('view' => array('visible' => 'TRUE'), 'update' => array('visible' => 'FALSE'), 'delete' => array('visible' => 'FALSE')), 'viewButtonUrl' => 'Yii::app()->controller->createUrl("ecntContainer/view", array("ecnt_id" => $data->ecnt_id))', 'viewButtonOptions' => array('data-toggle' => 'tooltip')))));
//}
Yii::endProfile('ecnt_on_the_way.view.grid');
Ejemplo n.º 3
0
 public function attributeLabels()
 {
     return array_merge(parent::attributeLabels(), EcntContainer::model()->attributeLabels());
 }
Ejemplo n.º 4
0
 public function loadModel($id)
 {
     $m = EcntContainer::model();
     // apply scope, if available
     $scopes = $m->scopes();
     if (isset($scopes[$this->scope])) {
         $m->{$this->scope}();
     }
     $model = $m->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, Yii::t('EdifactDataModule.crud', 'The requested page does not exist.'));
     }
     return $model;
 }