Fixed reports
This commit is contained in:
miroman-afk
2023-05-02 15:21:54 +03:00
parent 70120653f7
commit fb46c8e739
78 changed files with 21233 additions and 1892 deletions

View File

@@ -30,6 +30,22 @@ class GETClientInfo extends HRCCommand implements HRCCommandInterface
$orders_sum_current = ShiftOnlineOrders::where('client_code', $client_guid)->where('is_returned', 0)->where('is_deleted', 0)->sum('full_sum');
$orders_count = $orders_count_exchange + $orders_count_current;
$orders_sum = $orders_sum_exchange + $orders_sum_current;
$barcode = Client::getBarcode($client_guid);
if ($client['is_special_price'] == 0) {
$special_price = false;
} else {
$special_price = true;
}
if ($client['is_employee'] == 0) {
$employee = false;
} else {
$employee = true;
}
if ($client['is_block'] == 0) {
$is_block = false;
} else {
$is_block = true;
}
$result = array(
'id' => $client['id'],
'name' => $client['name'],
@@ -41,6 +57,10 @@ class GETClientInfo extends HRCCommand implements HRCCommandInterface
'order_sum' => round($orders_sum, 2),
'presale' => $presale,
'bonus' => intval($bonus),
'barcode' => $barcode,
'special_price' => $special_price,
'employee' => $employee,
'is_block' => $is_block,
)
);
return [