<th data-type><?= $type ?></th>
<?php
$data = $categoryPlan[$type]['offline'];
- $p1 = $offline_sale <= 0 ? 0 : round( $data / $offline_sale, 2) * 100;
+ $p1 = $offline_sale <= 0 ? 0 : round( $data / $offline_sale, 4) * 100;
?>
<td data-p1-<?= $type ?> data-offline="<?= $offline_sale ?>" data-offline-type="<?= $type ?>"><?= Html::textInput('p1', number_format($p1, 2, '.', ''), ['type' => 'number', 'style' => 'max-width: 80px;', 'readonly' => !$isEditable, 'onchange' => 'editProcent(this);']) ?>%</td>
<td data-offline-type="<?= $type ?>"><?= Html::textInput('offline', number_format($categoryPlan[$type]['offline'], 0, '.', ''), ['type' => 'number', 'readonly' => true, ]) ?></td>
<?php
$data2 = $categoryPlan[$type]['internet_shop'];
- $p2 = $online_sale <= 0 ? 0 : round( $data2 / $online_sale, 2) * 100;
+ $p2 = $online_sale <= 0 ? 0 : round( $data2 / $online_sale, 4) * 100;
?>
<td data-p2-<?= $type ?> data-online="<?= $online_sale ?>" data-online-type="<?= $type ?>"><?= Html::textInput('p2', number_format($p2, 2, '.', ''), ['type' => 'number', 'style' => 'max-width: 80px;', 'readonly' => !$isEditable, 'onchange' => 'editProcent(this);']) ?>%</td>
<td data-online-type="<?= $type ?>"><?= Html::textInput('internet_shop', number_format($categoryPlan[$type]['internet_shop'], 0, '.', ''), ['type' => 'number', 'readonly' => true, ]) ?></td>
<?php //<td></td><td></td> ?>
<?php
$data4 = $categoryPlan[$type]['write_offs'];
- $p3 = $write_offs <= 0 ? 0 : round( $data4 / $write_offs, 2) * 100;
+ $p3 = $write_offs <= 0 ? 0 : round( $data4 / $write_offs, 4) * 100;
?>
<td data-p3-<?= $type ?> data-writeoffs="<?= $write_offs ?>" data-writeoffs-type="<?= $type ?>"><?= Html::textInput('p3', number_format($p3, 2, '.', ''), ['type' => 'number', 'style' => 'max-width: 80px;', 'readonly' => !$isEditable, 'onchange' => 'editProcent(this);']) ?>%</td>
<td data-writeoffs-type="<?= $type ?>"><?= Html::textInput('write_offs', number_format($categoryPlan[$type]['write_offs'], 0, '.', ''), ['type' => 'number', 'readonly' => true, ]) ?></td>