/var/www/vhosts/nabawater/backend/views/admin-order-report
Edit: /var/www/vhosts/nabawater/backend/views/admin-order-report/index.php (7348B)
title = 'Admin Earnings';
$columns = [
['class' => \yii\grid\SerialColumn::class],
'order_number',
[
'attribute' => 'Order Total',
'value' => function (Order $model) {
return Com::moneyFormat($model->order_total);
}
],
[
'attribute' => 'Item Total',
'value' => function (Order $model) {
return Com::moneyFormat($model->item_total);
}
],
[
'attribute' => 'Tax',
'value' => 'vat'
],
[
'attribute' => 'Admin commission',
'value' => function (Order $model) {
return Com::moneyFormat($model->admin_commission);
}
],
[
'attribute' => 'Delivery Fee',
'value' => function (Order $model) {
return Com::moneyFormat($model->delivery_fee);
}
],
[
'attribute' => 'Coupon Discount',
'value' => function (Order $model) {
return Com::moneyFormat($model->coupon_offer_value);
}
],
// [
// 'attribute' => 'total_discount_value',
// 'value' => function (Order $model) {
// if ($model->total_discount_value != '') {
// return Com::moneyFormat($model->total_discount_value);
// } else {
// return '-';
// }
// }
// ],
[
'attribute' => 'Driver TurnOver',
'value' => function (Order $model) {
return Com::moneyFormat($model->delivery_fee);
}
],
[
'attribute' => 'Vendor Profit',
'value' => function (Order $model) {
return Com::moneyFormat($model->vendor_profit);
}
],
[
'class' => \yii\grid\ActionColumn::className(),
'header' => Yii::t('backend', 'Actions'),
'template' => '{view}{assign}{track}',
'buttons' => [
'view' => function ($url, $model, $key) {
return Html::a('
' ,'javascript:;',
[
'data-toggle' => 'tooltip',
'class' => 'quick-view'
]);
},
]
],
];
?>
= yii::t('backend','Total Orders') ?>
= $total_order ?>
= yii::t('backend','Total Earnings') ?>
= Com::setPriceFormat($total_earnings['total_admin_profit']) ?>
= yii::t('backend','Restaurant Earnings') ?>
= Com::setPriceFormat($total_earnings['total_vendor_profit']) ?>
= yii::t('backend','Delivery Associate TurnOver') ?>
= Com::setPriceFormat($total_earnings['total_delivery_profit']) ?>
= $this->title ?>
= Html::a(
'Export',
['export'],
['class' => 'btn btn-info btn-sm']
) ?>
= $this->render('_search', ['model' => $searchModel]) ?>
= CGridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => $columns,
'hideFilterRow' => true,
]); ?>