示例#1
0
    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 
echo "ห้างหุ้นส่วนจํากัด ตงตง ทรานสปอร์ต";
示例#2
0
</table>

<b>รายจ่าย</b>
<table class="table table-bordered" style="width: 100%;" cellpadding="1" cellspacing="0">
    <thead>
        <tr>
            <th style="text-align:center; width: 5%;">#</th>
            <th>รายการ</th>
            <th style="text-align:center; width: 15%;">ราคา</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td style=" text-align: center;">1</td>
            <td>ค่าจ้างขน <?php 
echo $affiliated->find()->where(['company_id' => $model->company_id])->one()['company'];
?>
</td>
            <td style=" text-align: right;"><?php 
echo number_format($model->price_affiliated, 2);
?>
</td>
        </tr>
    </tbody>
    <tfoot>
        <tr style="font-weight: bold;">
            <td colspan="2" style="text-align:center;"><b>รวม</b></td>
            <td style="text-align: right;"><b><?php 
echo number_format($model->price_affiliated, 2);
?>
</b></td>
示例#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>