Skip to content

Commit

Permalink
altro fix consegne veloci
Browse files Browse the repository at this point in the history
  • Loading branch information
madbob committed Dec 30, 2024
1 parent fbc11b5 commit 69c318d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions code/app/Services/FastBookingsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ public function fastShipping($deliverer, $aggregate, $users = null)
if ($grand_total != 0) {
$booking->generateReceipt();

$meta_id = inlineId($booking->user);

$meta = $users[$meta_id] ?? [
$meta = $users[$book->user_id] ?? [
'date' => date('Y-m-d'),
'method' => $default_payment_method,
];
Expand Down
4 changes: 4 additions & 0 deletions code/tests/Services/FastBookingsServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ public function test_fast_shipping_filtered()

$this->nextRound();
$order = app()->make('OrdersService')->show($this->sample_order->id);
$found = false;

foreach ($order->bookings as $booking) {
if (in_array($booking->user_id, $users)) {
$found = true;
$this->assertEquals($booking->status, 'shipped');
$this->assertNotNull($booking->payment);

Expand All @@ -85,6 +87,8 @@ public function test_fast_shipping_filtered()
$this->assertNull($booking->payment);
}
}

$this->assertTrue($found);
}

/*
Expand Down

0 comments on commit 69c318d

Please sign in to comment.