Fix right alignment for amount column using inline CSS
Fixed: - Replaced class='right' with style='text-align: right;' for all amount columns - Applied to header, data rows, subtotals, and grand total - This ensures proper right alignment regardless of Dolibarr CSS classes - All monetary values now display consistently right-aligned The inline CSS approach guarantees the alignment works across different Dolibarr themes and configurations.
This commit is contained in:
parent
51f43c911f
commit
0bcbc3eac5
@ -83,7 +83,7 @@ echo '<table class="noborder centpercent">';
|
||||
echo '<tr class="liste_titre">';
|
||||
echo '<th>' . $langs->trans("AccountCode") . '</th>';
|
||||
echo '<th>' . $langs->trans("AccountLabel") . '</th>';
|
||||
echo '<th class="right">' . $langs->trans("Amount") . '</th>';
|
||||
echo '<th style="text-align: right;">' . $langs->trans("Amount") . '</th>';
|
||||
echo '<th>' . $langs->trans("MappingType") . '</th>';
|
||||
echo '</tr>';
|
||||
|
||||
@ -111,7 +111,7 @@ if (!empty($base_accounts)) {
|
||||
echo '<tr class="oddeven">';
|
||||
echo '<td><strong>' . $account['account_code'] . '</strong></td>';
|
||||
echo '<td>' . $account['account_label'] . '</td>';
|
||||
echo '<td class="right">' . price($account['base_amount']) . '</td>';
|
||||
echo '<td style="text-align: right;">' . price($account['base_amount']) . '</td>';
|
||||
echo '<td>' . $account['mapping_type'] . '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
@ -119,7 +119,7 @@ if (!empty($base_accounts)) {
|
||||
// Subtotal for BASE accounts
|
||||
echo '<tr class="liste_titre">';
|
||||
echo '<td colspan="2"><strong>' . $langs->trans("SubtotalBaseAccounts") . '</strong></td>';
|
||||
echo '<td class="right"><strong>' . price($total_base_base) . '</strong></td>';
|
||||
echo '<td style="text-align: right;"><strong>' . price($total_base_base) . '</strong></td>';
|
||||
echo '<td></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
@ -138,7 +138,7 @@ if (!empty($vat_accounts)) {
|
||||
echo '<tr class="oddeven">';
|
||||
echo '<td><strong>' . $account['account_code'] . '</strong></td>';
|
||||
echo '<td>' . $account['account_label'] . '</td>';
|
||||
echo '<td class="right">' . price($account['vat_amount']) . '</td>';
|
||||
echo '<td style="text-align: right;">' . price($account['vat_amount']) . '</td>';
|
||||
echo '<td>' . $account['mapping_type'] . '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
@ -146,7 +146,7 @@ if (!empty($vat_accounts)) {
|
||||
// Subtotal for VAT accounts
|
||||
echo '<tr class="liste_titre">';
|
||||
echo '<td colspan="2"><strong>' . $langs->trans("SubtotalVATAccounts") . '</strong></td>';
|
||||
echo '<td class="right"><strong>' . price($total_vat_vat) . '</strong></td>';
|
||||
echo '<td style="text-align: right;"><strong>' . price($total_vat_vat) . '</strong></td>';
|
||||
echo '<td></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
@ -160,7 +160,7 @@ foreach ($other_accounts as $account) {
|
||||
echo '<tr class="oddeven">';
|
||||
echo '<td><strong>' . $account['account_code'] . '</strong></td>';
|
||||
echo '<td>' . $account['account_label'] . '</td>';
|
||||
echo '<td class="right">' . price($account['vat_amount']) . '</td>';
|
||||
echo '<td style="text-align: right;">' . price($account['vat_amount']) . '</td>';
|
||||
echo '<td>' . $account['mapping_type'] . '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
@ -170,7 +170,7 @@ $final_total_vat = $total_vat_base + $total_vat_vat + $total_vat_other;
|
||||
|
||||
echo '<tr class="liste_titre">';
|
||||
echo '<td colspan="2"><strong>' . $langs->trans("GrandTotal") . '</strong></td>';
|
||||
echo '<td class="right"><strong>' . price($final_total_vat) . '</strong></td>';
|
||||
echo '<td style="text-align: right;"><strong>' . price($final_total_vat) . '</strong></td>';
|
||||
echo '<td></td>';
|
||||
echo '</tr>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user