Skip to content

Commit

Permalink
Fix error when exporting Edenred transactions. Fixes #4762.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsegura committed Nov 28, 2024
1 parent fedfbac commit 24058e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Controller/Utils/RestaurantTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -1635,15 +1635,15 @@ public function edenredTransactionsAction(
];

$records = [];
foreach ($hash[$exported] as $payment) {
foreach ($hash[$exported] as $order) {

$order = $payment->getOrder();
$edenredPayment = $order->getLastPaymentByMethod('EDENRED', PaymentInterface::STATE_COMPLETED);

$records[] = [
$order->getNumber(),
$order->getShippingTimeRange()->getLower()->format('Y-m-d'),
$numberFormatter->format($order->getTotal() / 100),
$numberFormatter->format($payment->getAmountForMethod('EDENRED') / 100),
$numberFormatter->format($edenredPayment->getAmount() / 100),
$numberFormatter->format($order->getFeeTotal() / 100),
];
}
Expand Down

0 comments on commit 24058e5

Please sign in to comment.