Skip to content

Commit

Permalink
piccolo fix per importazione consegne da csv
Browse files Browse the repository at this point in the history
  • Loading branch information
madbob committed Dec 17, 2024
1 parent 16773d6 commit 7282c3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 0 additions & 2 deletions code/app/Delivery.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ private static function sortByPlace($bookings)

return $ret;
}]);

return $bookings;
}

public static function sortBookingsByShippingPlace($bookings, $shipping_place)
Expand Down
15 changes: 8 additions & 7 deletions code/app/Importers/CSV/Deliveries.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,14 @@ public function select($request)

if ($target_user) {
$booking = $service->handleBookingUpdate($datarow, $user, $target_order, $target_user, true);

$data[] = $datarow;
$bookings[] = (object) [
'user_id' => $target_user->id,
'user_name' => $target_user->printableName(),
'total' => $booking->getValue('effective', true),
];
if ($booking) {
$data[] = $datarow;
$bookings[] = (object) [
'user_id' => $target_user->id,
'user_name' => $target_user->printableName(),
'total' => $booking->getValue('effective', true),
];
}
}
}
catch (\Exception $e) {
Expand Down

0 comments on commit 7282c3e

Please sign in to comment.