v.2.34
Обновлены округления Добавлены миграции
This commit is contained in:
@@ -614,7 +614,7 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
|
||||
|
||||
foreach ($actionsResult as $actionResult) {
|
||||
foreach ($actionResult->deletedActions as $item) {
|
||||
$count = round(Base::toFloat($item['value']), 2);
|
||||
$count = round(Base::toFloat($item['value']), 3);
|
||||
$who = Staff::getName(intval($item['who']));
|
||||
$time = $item['time'];
|
||||
$reason = Reasons::getName(intval($item['reason']));
|
||||
@@ -713,7 +713,7 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
|
||||
$orders = [];
|
||||
foreach ($actionsResult as $actionResult) {
|
||||
foreach ($actionResult->deletedActions as $item) {
|
||||
$count = round(Base::toFloat($item['value']), 2);
|
||||
$count = round(Base::toFloat($item['value']), 3);
|
||||
$who = Staff::getName(intval($item['who']));
|
||||
$time = $item['time'];
|
||||
$reason = Reasons::getName(intval($item['reason']));
|
||||
@@ -1059,7 +1059,7 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
|
||||
'message' => 'Отчет по реализации',
|
||||
'printers' => $result,
|
||||
'ret_prints' => $ret_result,
|
||||
'total_count' => round($total_count, 2),
|
||||
'total_count' => round($total_count, 3),
|
||||
'total_sum' => round($total_sum, 2)
|
||||
);
|
||||
}
|
||||
@@ -1199,7 +1199,7 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
|
||||
'message' => 'Отчет по реализации',
|
||||
'printers' => $result,
|
||||
'ret_prints' => $ret_result,
|
||||
'total_count' => round($total_count, 2),
|
||||
'total_count' => round($total_count, 3),
|
||||
'total_sum' => round($total_sum, 2)
|
||||
);
|
||||
}
|
||||
@@ -2174,10 +2174,9 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
|
||||
->where('order_position', $item['code'])
|
||||
->get();
|
||||
$create_count = 0;
|
||||
|
||||
foreach ($create_actions as $create_action) {
|
||||
$create_count += Base::toFloat($create_action['value']);
|
||||
if ($create_count <= $item['count']) {
|
||||
if ($create_count <= $item['count'] || count($create_actions) == 1) {
|
||||
$realPrice = $item['real_price'] * $item['count'] * $item['cof'];
|
||||
$salePrice = $item['sale_price'] * $item['count'];
|
||||
if ($realPrice > 0) {
|
||||
@@ -2190,7 +2189,11 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
|
||||
$item_dishes_code = $item['dishes_code'];
|
||||
$item_order_code = $item['order_code'];
|
||||
$item_units_id = $item['units_id'];
|
||||
$item_count = Base::toFloat($create_action['value']);
|
||||
if (count($create_actions) == 1) {
|
||||
$item_count = $item['count'];
|
||||
} else {
|
||||
$item_count = Base::toFloat($create_action['value']);
|
||||
}
|
||||
$item_cof = $item['cof'];
|
||||
$item_real_price = $item['real_price'];
|
||||
$item_sale_price = $item['sale_price'];
|
||||
@@ -2221,9 +2224,9 @@ class GETDataReport extends HRCCommand implements HRCCommandInterface
|
||||
'item_units_name' => Units::getName($item_units_id),
|
||||
'item_cof' => floatval($item_cof),
|
||||
'item_count' => $item_count,
|
||||
'item_real_price' => floatval($item_real_price),
|
||||
'item_sale_price' => floatval($item_sale_price),
|
||||
'item_special_price' => floatval($item_special_price),
|
||||
'item_real_price' => floatval($item_count * $item_real_price),
|
||||
'item_sale_price' => floatval($item_count * $item_sale_price),
|
||||
'item_special_price' => floatval($item_count * $item_special_price),
|
||||
'item_cash' => $item_cash,
|
||||
'item_credit' => $item_credit,
|
||||
'item_presale' => $item_presale,
|
||||
|
||||
Reference in New Issue
Block a user