Poprawka pdf

This commit is contained in:
Flatlogic Bot 2026-01-09 13:10:51 +00:00
parent 99fda694d1
commit a2e42219b7
2 changed files with 53 additions and 2 deletions

View File

@ -15656,3 +15656,52 @@ Client price query executed. Found: {"price_net":"1056.91","price_gross":"1300.0
Found client price. Net: 1056.91, Gross: 1300 Found client price. Net: 1056.91, Gross: 1300
FINAL: Returning Net: 1056.91, Gross: 1300 FINAL: Returning Net: 1056.91, Gross: 1300
--- ---
---
START getEffectivePrice for product 1, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"1111.00","price_gross":"1366.53"}
Found product price. Net: 1111, Gross: 1366.53
FINAL: Returning Net: 1111, Gross: 1366.53
---
---
START getEffectivePrice for product 2, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"1318.05","price_gross":"1621.20"}
Found product price. Net: 1318.05, Gross: 1621.2
FINAL: Returning Net: 1318.05, Gross: 1621.2
---
---
START getEffectivePrice for product 3, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
Found product price. Net: 9.95, Gross: 12.24
FINAL: Returning Net: 9.95, Gross: 12.24
---
---
START getEffectivePrice for product 4, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"9.95","price_gross":"12.24"}
Found product price. Net: 9.95, Gross: 12.24
FINAL: Returning Net: 9.95, Gross: 12.24
---
---
START getEffectivePrice for product 5, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"68.00","price_gross":"83.64"}
Found product price. Net: 68, Gross: 83.64
FINAL: Returning Net: 68, Gross: 83.64
---
---
START getEffectivePrice for product 6, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"171.60","price_gross":"211.07"}
Found product price. Net: 171.6, Gross: 211.07
FINAL: Returning Net: 171.6, Gross: 211.07
---
---
START getEffectivePrice for product 7, client
Client price not found or not set, falling back to product price.
Product price query executed. Found: {"price_net":"233.20","price_gross":"286.84"}
Found product price. Net: 233.2, Gross: 286.84
FINAL: Returning Net: 233.2, Gross: 286.84
---

View File

@ -66,7 +66,8 @@ $pdf->Cell(0, 10, t('pdf_client') . ': ' . $order['client_name'], 0, 1);
$pdf->Cell(0, 10, t('pdf_email') . ': ' . $order['client_email'], 0, 1); $pdf->Cell(0, 10, t('pdf_email') . ': ' . $order['client_email'], 0, 1);
$pdf->Cell(0, 10, t('status') . ': ' . t_status($order['status']), 0, 1); $pdf->Cell(0, 10, t('status') . ': ' . t_status($order['status']), 0, 1);
$pdf->Cell(0, 10, t('payment_method') . ': ' . t_status($order['payment_method']), 0, 1); $pdf->Cell(0, 10, t('payment_method') . ': ' . t_status($order['payment_method']), 0, 1);
$pdf->Cell(0, 10, t('total_gross') . ': ' . format_money($order['total_amount'], $_SESSION['lang'] ?? 'pl', db()), 0, 1); $total_label = $order['client_language'] === 'en' ? t('total_amount') : t('total_gross');
$pdf->Cell(0, 10, $total_label . ': ' . format_money($order['total_amount'], $_SESSION['lang'] ?? 'pl', db()), 0, 1);
$pdf->MultiCell(0, 10, t('notes') . ': ' . $order['notes'], 0, 1); $pdf->MultiCell(0, 10, t('notes') . ': ' . $order['notes'], 0, 1);
$pdf->Cell(0, 10, t('pdf_created_at') . ': ' . $order['created_at'], 0, 1); $pdf->Cell(0, 10, t('pdf_created_at') . ': ' . $order['created_at'], 0, 1);
@ -76,12 +77,13 @@ $pdf->SetFont('DejaVu', 'B', 12);
$lineHeight = 5; $lineHeight = 5;
// Headers // Headers
$total_header_label = $order['client_language'] === 'en' ? t('total_net') : t('total_gross');
$headers = [ $headers = [
['width' => 70, 'text' => t('product')], ['width' => 70, 'text' => t('product')],
['width' => 30, 'text' => t('quantity')], ['width' => 30, 'text' => t('quantity')],
['width' => 30, 'text' => t('unit_price_net')], ['width' => 30, 'text' => t('unit_price_net')],
['width' => 30, 'text' => t('unit_price_gross')], ['width' => 30, 'text' => t('unit_price_gross')],
['width' => 30, 'text' => t('total_gross')], ['width' => 30, 'text' => $total_header_label],
]; ];
$padding = 2; $padding = 2;