v.2.27
Fixed reports
This commit is contained in:
@@ -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 [
|
||||
|
||||
Reference in New Issue
Block a user