Ejemplo n.º 1
0
<style type="text/css">
    body{color: #666666; font-size: 12px;}
    table tr td{ border-left: #000000 solid 1px; border-bottom: #000000 solid 1px; padding: 5px;}
    table tr th{ border-left: #000000 solid 1px; border-bottom: #000000 solid 1px;  border-top: #000000 solid 1px; padding: 5px; text-align: left; font-weight: bold;}
    table{ border-right: #000000 solid 1px;}
    table tr th p{ margin-bottom: 10px;}
    #line{ color: #FFF; font-size: 5px;}
</style>
<?php 
use yii\helpers\Url;
$affiliated = new app\models\Affiliated();
$truck_model = new \app\models\AffiliatedTruck();
$config = new \app\models\Config_system();
//$driver = new app\models\Driver();
$customer_model = new \app\models\Customer();
$changwat_model = new app\models\Changwat();
$producttype_model = new app\models\ProductType();
?>
<h3>
    สรุปรายรับ - รายจ่าย รหัสปฏิบัติงาน <?php 
echo $order_id;
?>
</h3>
<?php 
$employer = $customer_model->find()->where(['cus_id' => $model->employer])->one();
?>
<b>ผู้ว่าจ้าง :</b> <?php 
echo $employer['company'];
?>
  <br/>
<b>ที่อยู่ : </b> <?php 
Ejemplo n.º 2
0
    #set_page{ font-size: 12px; color: #ff0000;}
    .form-control{font-size: 12px; /*color: #0000ff;*/}
    .input-group-addon{font-size: 12px; color: #ff0000;}
</style>
<?php 
use yii\helpers\Html;
//use yii\widgets\DetailView;
use kartik\date\DatePicker;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $model app\models\OrdersTransport */
$this->title = $model->order_id;
$this->params['breadcrumbs'][] = ['label' => 'ใบสั่งงาน(จ้างบริษัทรถร่วม)', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
$truck_model = new \app\models\AffiliatedTruck();
$config = new \app\models\Config_system();
$driver = new app\models\Driver();
$customer_model = new \app\models\Customer();
$changwat_model = new app\models\Changwat();
$order_model = new \app\models\OrdersTransportAffiliated();
?>

<script type="text/javascript">
    function chkNumber(ele) {
        var vchar = String.fromCharCode(event.keyCode);
        if ((vchar < '0' || vchar > '9') && (vchar != '.'))
            return false;
        //ele.onKeyPress = vchar;
    }
</script>
Ejemplo n.º 3
0
?>
    </p>

    <?php 
$columns = [['class' => 'yii\\grid\\SerialColumn'], 'order_id', ['class' => '\\kartik\\grid\\DataColumn', 'attribute' => 'order_date_start', 'label' => 'วันที่ไป', 'hAlign' => 'center', 'width' => '10%', 'format' => 'raw', 'mergeHeader' => true, 'value' => function ($model) {
    $config = new \app\models\Config_system();
    return $config->thaidate($model->order_date_start);
}], ['class' => '\\kartik\\grid\\DataColumn', 'attribute' => 'order_date_end', 'label' => 'วันที่กลับ', 'hAlign' => 'center', 'width' => '10%', 'format' => 'raw', 'mergeHeader' => true, 'value' => function ($model) {
    $config = new \app\models\Config_system();
    return $config->thaidate($model->order_date_end);
}], ['class' => '\\kartik\\grid\\DataColumn', 'attribute' => 'truck1', 'label' => 'ทะเบียนรถ', 'mergeHeader' => true, 'value' => function ($model) {
    $truck = new app\models\AffiliatedTruck();
    $tr = $truck->find()->where(['id' => $model->truck1])->one();
    return $tr['license_plate'];
}], ['class' => '\\kartik\\grid\\DataColumn', 'attribute' => 'truck2', 'label' => 'ทะเบียน(พ่วง)', 'mergeHeader' => true, 'value' => function ($model) {
    $truck = new app\models\AffiliatedTruck();
    $tr = $truck->find()->where(['id' => $model->truck2])->one();
    return $tr['license_plate'];
}], ['class' => '\\kartik\\grid\\DataColumn', 'attribute' => 'driver1', 'label' => 'คนขับ1', 'mergeHeader' => true], ['class' => '\\kartik\\grid\\DataColumn', 'attribute' => 'driver2', 'label' => 'คนขับ2', 'mergeHeader' => true], ['class' => '\\kartik\\grid\\DataColumn', 'attribute' => 'flag', 'label' => 'สถานะ', 'format' => 'raw', 'mergeHeader' => true, 'value' => function ($model) {
    if ($model->flag == 1) {
        $status = "<font style='color:green;'>จ่ายเงินแล้ว</font>";
    } else {
        $status = "<font style='color:red;'>ค้างจ่าย</font>";
    }
    return $status;
}], ['class' => 'kartik\\grid\\ActionColumn', 'header' => 'ตัวเลือก', 'viewOptions' => ['title' => 'ดูข้อมูล', 'data-toggle' => 'tooltip'], 'updateOptions' => ['title' => 'แก้ไข', 'data-toggle' => 'tooltip'], 'deleteOptions' => ['title' => 'ลบ', 'data-toggle' => 'tooltip'], 'headerOptions' => ['class' => 'kartik-sheet-style']]];
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => $columns, 'containerOptions' => ['style' => 'overflow: auto'], 'headerRowOptions' => ['class' => 'kartik-sheet-style'], 'filterRowOptions' => ['class' => 'kartik-sheet-style'], 'responsive' => true, 'persistResize' => false, 'pjax' => true, 'panel' => ['type' => GridView::TYPE_PRIMARY, 'heading' => "<i class='fa fa-book'></i> " . $this->title]]);
?>

</div>
Ejemplo n.º 4
0
function Affiliated_truck($truck_id = null)
{
    $Affiliated = new \app\models\AffiliatedTruck();
    $result = $Affiliated->find()->where(['id' => $truck_id])->one();
    return $result['license_plate'];
}