Exemple #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: normal;}
    table{ border-right: #000000 solid 1px;}
    table tr th p{ margin-bottom: 10px;}
</style>
<?php 
use yii\helpers\Url;
$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();
$affiliated_model = new app\models\Affiliated();
$affiliated = $affiliated_model->find()->where(['company_id' => $model->company_id])->one();
?>
<!--
    #ข้อมูลใบปฏิบัติงาน
    Comment By Kimniyom
-->

<div style="width:40%; position: fixed; right:0px; float: right; text-align: center; border: #000 solid 1px; padding-top: 2px;">
    <center>
        <img src="<?php 
echo Url::to('@web/web/images/logo.jpg', true);
?>
" width="80px;"/><br/>
        <div style="width:100%;">
            <h3><?php 
<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 
Exemple #3
0
use yii\helpers\Html;
//use yii\grid\GridView;
use kartik\grid\GridView;
use app\models\AffiliatedTruck;
/* @var $this yii\web\View */
/* @var $searchModel app\models\AffiliatedSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'บริษัทรถร่วม';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="box box-primary">

    <div class="box-header with-border">

        <div class="pull-right">
            <?php 
echo Html::a('<i class="fa fa-plus"></i> เพิ่มข้อมูลบริษัท', ['create'], ['class' => 'btn btn-success']);
?>
        </div>
    </div>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'company_id', 'company', 'tax_number', 'address:ntext', 'tel', ['class' => '\\kartik\\grid\\DataColumn', 'label' => 'จำนวนรถ', 'hAlign' => 'center', 'width' => '10%', 'format' => 'raw', 'mergeHeader' => true, 'value' => function ($model) {
    return AffiliatedTruck::find()->where(['company_id' => $model->company_id])->count();
}], ['class' => '\\kartik\\grid\\DataColumn', 'label' => 'จำนวนรอบ', 'hAlign' => 'center', 'format' => 'raw', 'mergeHeader' => true, 'value' => function ($model) {
    return app\models\Affiliated::find()->where(['company_id' => $model->company_id])->count();
}], ['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']]], 'containerOptions' => ['style' => 'overflow: auto'], 'headerRowOptions' => ['class' => 'kartik-sheet-style'], 'filterRowOptions' => ['class' => 'kartik-sheet-style'], 'responsive' => true, 'pjax' => true, 'panel' => ['type' => GridView::TYPE_DEFAULT, 'heading' => "<i class='fa fa-building'></i> " . $this->title]]);
?>

</div>