| ' . $rowNum . ' |
' . $esc($item['description'] ?? '')
. ($subDesc ? ' ' . $esc($subDesc) . ' ' : '') . ' |
' . $formatNum(floatval($item['quantity']) ?: 1, 0)
. (!empty(trim($item['unit'] ?? '')) ? ' / ' . $esc(trim($item['unit'])) : '') . ' |
' . $formatCurrency($item['unit_price'] ?? 0) . ' |
' . $formatCurrency($lineTotal) . ' |
';
}
$totalsHtml = '';
if ($vatMode === 'standard') {
$totalsHtml .= '
' . $esc($t('subtotal')) . ':
' . $formatCurrency($subtotal) . '
' . $esc($t('vat')) . ' (' . intval($vatRate) . '%):
' . $formatCurrency($vatAmount) . '
';
}
$totalsHtml .= ''
. $esc($t('exchange_rate')) . ': ' . $formatNum($exchangeRate, 4) . '
';
}
$scopeHtml = '';
if ($hasScopeContent) {
$scopeHtml .= '';
$scopeHtml .= '
';
foreach ($sections as $section) {
$title = $sectionTitle($section);
$content = trim($section['content'] ?? '');
if (!$title && !$content) {
continue;
}
$scopeHtml .= '
';
if ($title) {
$scopeHtml .= '
' . $esc($title) . '
';
}
if ($content) {
$scopeHtml .= '
' . $cleanQuillHtml($content) . '
';
}
$scopeHtml .= '
';
}
$scopeHtml .= '
';
}
$custLinesHtml = '';
foreach ($cust['lines'] as $line) {
$custLinesHtml .= '' . $esc($line) . '
';
}
$suppLinesHtml = '';
foreach ($supp['lines'] as $line) {
$suppLinesHtml .= '' . $esc($line) . '
';
}
$pageLabel = $t('page');
$ofLabel = $t('of');
$quotationNumber = $esc($quotation['quotation_number'] ?? '');
// ---------------------------------------------------------------------------
// Build final HTML
// ---------------------------------------------------------------------------
$html = '