Skip to content

Commit

Permalink
fix sintassi
Browse files Browse the repository at this point in the history
  • Loading branch information
madbob committed Oct 3, 2023
1 parent 037a059 commit 2b100a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/app/Http/Controllers/StatisticsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private function getSummary($start, $end, $type, $target)
})->join('bookings', 'booked_products.booking_id', '=', 'bookings.id')->join('orders', 'bookings.order_id', '=', 'orders.id')->groupBy('orders.supplier_id');

if ($type == 'all') {
$data_for_suppliers_query->selectRaw('orders.supplier_id, SUM(price * booked_products.quantity) as price')->join('products', 'booked_products.product_id', '=', 'products.id');
$data_for_suppliers_query->selectRaw('orders.supplier_id, SUM(products.price * booked_products.quantity) as price')->join('products', 'booked_products.product_id', '=', 'products.id');
}
else {
$data_for_suppliers_query->selectRaw('orders.supplier_id, SUM(final_price) as price');
Expand Down
2 changes: 1 addition & 1 deletion code/app/Printers/Concerns/Summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function formatSummary($order, $document, $fields, $status, $shipping_
if ($shipping_place && $shipping_place == 'all_by_place') {
$places = Delivery::orderBy('name', 'asc')->get();
foreach($places as $place) {
$table = $this->formatSummaryShipping($order, $document, $fields, $internal_offsets, $place->id);
$table = $this->formatSummaryShipping($order, $fields, $internal_offsets, $place->id);
if ($table) {
$document->append(new Header($place->printableName()));
$document->append($table);
Expand Down

0 comments on commit 2b100a5

Please sign in to comment.