diff --git a/views/order/print.php b/views/order/print.php index c973f91..de6fa4b 100755 --- a/views/order/print.php +++ b/views/order/print.php @@ -38,6 +38,7 @@ use yii\widgets\DetailView; [ 'attribute' => 'user.username', 'label' => \Yii::t('app', 'Client Username'), + 'value' => $order->user?$order->user->username:$order->name, ], [ 'attribute' => 'email', @@ -68,6 +69,10 @@ use yii\widgets\DetailView; 'value' => $order->declaration?:null, ], [ + 'attribute' => 'consignment', + 'value' => $order->consignment?:null, + ], + [ 'attribute' => 'stock', 'value' => $order->stock?:null, ], @@ -85,7 +90,17 @@ use yii\widgets\DetailView; ], [ 'attribute' => 'shipping_by', - 'value' => $order->shipping_by?:null, + 'value' => $order->shipping_by?function() use($order) { + switch ($order->shipping_by) { + case 1: + return 'Отправитель'; + break; + case 2: + return 'Получатель'; + break; + } + return null; + }:null, ], [ 'attribute' => 'city', -- libgit2 0.21.4