$products = ArrayHelper::map(Products1c::find()->select(['id', 'name'])
->where(['id' => $data['product_guid']])->all(), 'id', 'name');
- return $products[$data['product_guid']] ?? '';
+ return ($products[$data['product_guid']] ?? '') . ' (' . ($data['retail_price'] ?? '') . ' руб.)';
},
],
-// [
-// 'attribute' => 'group_label',
-// 'label' => 'Название группы',
-// 'value' => function($data) {
-// return ProductsClass::getHints()[$data['group_label']] ?? '';
-// },
-// ],
[
- 'attribute' => 'retail_price',
- 'label' => 'Розничная цена, руб',
- 'value' => function($data) {
- return $data['retail_price'] ?? '';
- },
- ],
- [
- 'attribute' => 'self_cost',
- 'label' => 'Себестоимость, руб',
-// 'footer' => array_sum(array_column($shiftTransfer->shiftRemains, 'self_cost')),
- 'pageSummary' => true,
- 'value' => function($data) {
- return $data['self_cost'] ?? '';
- },
- ],
- [
- 'attribute' => 'remains_summ',
- 'label' => 'Сумма остатков (недостача или излишек), руб',
+ 'attribute' => 'remains_1c',
+ 'label' => 'Остатки по 1с, шт',
'pageSummary' => true,
-// 'footer' => array_sum(array_column($shiftTransfer->shiftRemains, 'remains_summ')),
'value' => function($data) {
- return $data['remains_summ'] ?? '';
+ return $data['remains_1c'] ?? '';
},
],
[
'attribute' => 'remains_count',
'label' => 'Фактические остатки кол-во, шт',
'pageSummary' => true,
-// 'footer' => array_sum(array_column($shiftTransfer->shiftRemains, 'remains_count')),
'value' => function($data) {
return $data['remains_count'] ?? '';
},
'attribute' => 'fact_and_1c_diff',
'label' => 'Разница факт и по программе 1с, шт',
'pageSummary' => true,
-// 'footer' => array_sum(array_column($shiftTransfer->shiftRemains, 'fact_and_1c_diff')),
'value' => function($data) {
return $data['fact_and_1c_diff'] ?? '';
},
],
[
- 'attribute' => 'remains_1c',
- 'label' => 'Ð\9eÑ\81Ñ\82аÑ\82ки по 1Ñ\81, Ñ\88Ñ\82',
+ 'attribute' => 'remains_summ',
+ 'label' => 'СÑ\83мма оÑ\81Ñ\82аÑ\82ков (недоÑ\81Ñ\82аÑ\87а или излиÑ\88ек), Ñ\80Ñ\83б',
'pageSummary' => true,
-// 'footer' => array_sum(array_column($shiftTransfer->shiftRemains, 'remains_1c')),
'value' => function($data) {
- return $data['remains_1c'] ?? '';
+ return $data['remains_summ'] ?? '';
+ },
+ ],
+ [
+ 'attribute' => 'self_cost',
+ 'label' => 'Себестоимость, руб',
+ 'pageSummary' => true,
+ 'value' => function($data) {
+ return $data['self_cost'] ?? '';
},
],
-// [
-// 'attribute' => 'type',
-// 'value' => function ($model) {
-// return $model->type === \yii_app\records\ShiftRemains::ARCHIVE_RECORD ? 'Архивная запись' : 'Временная запись';
-// }
-// ],
],
'layout' => '{items}',
'showPageSummary' => true,