Beispiel #1
0
/* @var $this yii\web\View */
/* @var $model backend\models\Saleorderinvoice */
$this->title = $model->invoiceno;
$this->params['breadcrumbs'][] = ['label' => 'Saleorderinvoices', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
  <?php 
$invline = new \backend\models\Saleorderinvoiceline();
?>
<div class="saleorderinvoice-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a('Update', ['update', 'id' => $model->recid], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('Delete', ['delete', 'id' => $model->recid], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['invoiceno', ['attribute' => 'invoicedate', 'value' => Yii::$app->formatter->asDate($model->invoicedate, 'dd-MM-yyyy')], ['attribute' => 'invcurrency', 'value' => $model->invcurrency ? $model->currencyname->currencycode : ''], 'invcurrencyrate', ['attribute' => 'customerid', 'value' => $model->customerid ? $model->customername->Cus_Name : ''], ['attribute' => 'totalqty', 'value' => number_format($invline->Ordersum($model->recid)) . " Pcs"], ['attribute' => 'totalamt', 'value' => number_format($invline->Usdsum($model->recid)) . " " . $model->currencyname->currencycode], ['attribute' => 'totalthb', 'value' => $model->currencyname->currencycode != 'THB' ? number_format($invline->Usdsum($model->recid) * $model->invcurrencyrate) . " THB" : number_format($invline->Thbsum($model->recid)) . " " . $model->currencyname->currencycode], 'createdate']]);
?>

</div>
Beispiel #2
0
                    <h5>
                <?php 
        echo number_format($invorline->usdsum($model->recid), 2) . ' ' . $model->currencyname->currencycode;
        ?>
                    </h5>
                         </div>
            </div>
              <?php 
        //elseif($model->currencyname->currencycode == "THB"):
        ?>
            <div class="col-sm-4">
                 <div style="color: white;text-align: right;">
                    <h5>
                 <?php 
        if ($model->currencyname->currencycode != "THB") {
            echo number_format($invorline->Usdsum($model->recid) * $model->invcurrencyrate) . ' ' . 'THB';
        } else {
            echo number_format($invorline->thbsum($model->recid), 2) . ' ' . 'THB';
        }
        ?>
                    </h5>
                 </div>
            </div>
      <?php 
    }
    ?>
            <?php 
}
?>
        </div>