//echo Html::a('Справочник замен', Url::to(['/crud/product1c-replacement/index']));
-if (in_array($shiftTransfer->status_id, [ShiftTransfer::STATUS_ID_TRANSFER_ACTIONS, ShiftTransfer::STATUS_ID_INPUT_FACT_REMAINS])
- && Yii::$app->user->id === $shiftTransfer->end_shift_admin_id) {
-
+if (\yii_app\records\Admin::findOne(Yii::$app->user->id)->group_id == \yii_app\records\AdminGroup::GROUP_IT) {
echo Html::submitButton('Пересчитать таблицу замен', [
'class' => 'btn btn-primary float-right',
'name' => 'action',
[
'label' => 'Цена товара',
'attribute' => 'product_price',
+ 'value' => function($data) {
+ return number_format($data['product_price'] ?? '', 2, '.', ' ');
+ },
],
[
'label' => 'Сумма',
'attribute' => 'summ',
'pageSummary' => true,
+ 'value' => function($data) {
+ return number_format($data['summ'] ?? '', 2, '.', ' ');
+ },
'footer' => Html::tag('b', 'Недостача: ') . ' ' . Html::tag('b', number_format($writeOffsBalance, 2, '.', ' ')),
],
],
[
'label' => 'Цена товара',
'attribute' => 'product_price',
+ 'value' => function($data) {
+ return number_format($data['product_price'] ?? '', 2, '.', ' ');
+ },
],
[
'label' => 'Сумма',
'attribute' => 'summ',
'pageSummary' => true,
+ 'value' => function($data) {
+ return number_format($data['summ'] ?? '', 2, '.', ' ');
+ },
'footer' => Html::tag('b', 'Излишек: ') . ' ' . Html::tag('b', number_format($incomingBalance, 2, '.', ' ')),
],
],