Skip to content

Commit

Permalink
Fix ordering with voucher code
Browse files Browse the repository at this point in the history
ISSUE: CS-6519
  • Loading branch information
filipkojic committed Jan 28, 2025
1 parent 497fbf0 commit 7107412
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public function process(PaymentRequestBuilder $builder, StartTransactionRequestC
$articles = $this->articleRepository->getArticleQuery($item['additional_details']['articleID'])->getResult(
);
$article = $articles[0] ?? null;
$description = $item['additional_details']['description'] !== '' ? $item['additional_details']['description']
: $item['additional_details']['description_long'];

$lineItems[] = new LineItem(
$item['articleID'] ?? '',
Expand All @@ -69,8 +71,7 @@ public function process(PaymentRequestBuilder $builder, StartTransactionRequestC
$taxAmount * 100,
$taxPercentage * 100,
substr(
$item['additional_details']['description'] !== '' ? $item['additional_details']['description']
: $item['additional_details']['description_long'],
!empty($description) ? $description : $item['articlename'],
0,
124
),
Expand Down

0 comments on commit 7107412

Please sign in to comment.