diff --git a/backend/app/Services/Application/Handlers/Order/Payment/Stripe/CreatePaymentIntentHandler.php b/backend/app/Services/Application/Handlers/Order/Payment/Stripe/CreatePaymentIntentHandler.php index d2ede8109..4247cb345 100644 --- a/backend/app/Services/Application/Handlers/Order/Payment/Stripe/CreatePaymentIntentHandler.php +++ b/backend/app/Services/Application/Handlers/Order/Payment/Stripe/CreatePaymentIntentHandler.php @@ -128,9 +128,9 @@ public function handle(string $orderShortId): CreatePaymentIntentResponseDTO StripePaymentDomainObjectAbstract::ORDER_ID => $order->getId(), StripePaymentDomainObjectAbstract::PAYMENT_INTENT_ID => $paymentIntent->paymentIntentId, StripePaymentDomainObjectAbstract::CONNECTED_ACCOUNT_ID => $stripeAccountId, - StripePaymentDomainObjectAbstract::APPLICATION_FEE_GROSS => $applicationFeeData->grossApplicationFee?->toMinorUnit(), - StripePaymentDomainObjectAbstract::APPLICATION_FEE_NET => $applicationFeeData->netApplicationFee?->toMinorUnit(), - StripePaymentDomainObjectAbstract::APPLICATION_FEE_VAT => $applicationFeeData->applicationFeeVatAmount?->toMinorUnit(), + StripePaymentDomainObjectAbstract::APPLICATION_FEE_GROSS => $applicationFeeData?->grossApplicationFee?->toMinorUnit() ?? 0, + StripePaymentDomainObjectAbstract::APPLICATION_FEE_NET => $applicationFeeData?->netApplicationFee?->toMinorUnit() ?? 0, + StripePaymentDomainObjectAbstract::APPLICATION_FEE_VAT => $applicationFeeData?->applicationFeeVatAmount?->toMinorUnit() ?? 0, StripePaymentDomainObjectAbstract::CURRENCY => strtoupper($order->getCurrency()), StripePaymentDomainObjectAbstract::STRIPE_PLATFORM => $stripePlatform?->value, ]); diff --git a/backend/app/Services/Domain/Report/AbstractOrganizerReportService.php b/backend/app/Services/Domain/Report/AbstractOrganizerReportService.php index 8dad78a95..2595ae039 100644 --- a/backend/app/Services/Domain/Report/AbstractOrganizerReportService.php +++ b/backend/app/Services/Domain/Report/AbstractOrganizerReportService.php @@ -31,8 +31,8 @@ public function generateReport( $timezone = $organizer->getTimezone(); $endDate = $endDate - ? $endDate->copy()->setTimezone($timezone)->startOfDay() - : now($timezone)->startOfDay(); + ? $endDate->copy()->setTimezone($timezone)->endOfDay() + : now($timezone)->endOfDay(); $startDate = $startDate ? $startDate->copy()->setTimezone($timezone)->startOfDay() : $endDate->copy()->subDays(30)->startOfDay(); diff --git a/backend/app/Services/Domain/Report/AbstractReportService.php b/backend/app/Services/Domain/Report/AbstractReportService.php index d30fc007c..5ff76bfdb 100644 --- a/backend/app/Services/Domain/Report/AbstractReportService.php +++ b/backend/app/Services/Domain/Report/AbstractReportService.php @@ -24,8 +24,9 @@ public function generateReport(int $eventId, ?Carbon $startDate = null, ?Carbon $timezone = $event->getTimezone(); $endDate = $endDate - ? $endDate->copy()->setTimezone($timezone)->startOfDay() - : now($timezone)->startOfDay(); + ? $endDate->copy()->setTimezone($timezone)->endOfDay() + : now($timezone)->endOfDay(); + $startDate = $startDate ? $startDate->copy()->setTimezone($timezone)->startOfDay() : $endDate->copy()->subDays(30)->startOfDay(); diff --git a/backend/tests/Unit/Jobs/Vat/ValidateVatNumberJobTest.php b/backend/tests/Unit/Jobs/Vat/ValidateVatNumberJobTest.php index 056469f65..1a91aa356 100644 --- a/backend/tests/Unit/Jobs/Vat/ValidateVatNumberJobTest.php +++ b/backend/tests/Unit/Jobs/Vat/ValidateVatNumberJobTest.php @@ -1,6 +1,6 @@