So it's time I contributed something to this magnificent project. I have made some code changes to make the invoice multilingual.
in YOUR_ADMIN_FOLDER\includes\super_invoice find rule 268
PHP Code:
<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
$display_title = $order->totals[$i]['title'];
echo ' <tr>' . "\n" .
' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $display_title . '</td>' . "\n" .
' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" .
' </tr>' . "\n";
$order_total = $order->totals[$i]['text'];
}
echo ' <tr>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><strong>Amount Paid:</strong></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($so->amount_applied) . '</strong></td>' . "\n" .
' </tr>' . "\n";
echo ' <tr>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><strong>Balance Due:</strong></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($so->balance_due) . '</strong></td>' . "\n" .
' </tr>' . "\n";
?>
and replace with:
PHP Code:
<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
$display_title = $order->totals[$i]['title'];
echo ' <tr>' . "\n" .
' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Text">' . $display_title . '</td>' . "\n" .
' <td align="right" class="'. str_replace('_', '-', $order->totals[$i]['class']) . '-Amount">' . $order->totals[$i]['text'] . '</td>' . "\n" .
' </tr>' . "\n";
$order_total = $order->totals[$i]['text'];
}
echo ' <tr>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><strong>'. ENTRY_AMOUNT_APPLIED.'</strong></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($so->amount_applied) . '</strong></td>' . "\n" .
' </tr>' . "\n";
echo ' <tr>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><strong>'. ENTRY_BALANCE_DUE.'</strong></td>' . "\n" .
' <td class="dataTableContent" align="right" valign="top"><strong>' . $currencies->format($so->balance_due) . '</strong></td>' . "\n" .
' </tr>' . "\n";
?>
In the language file YOUR_ADMIN_FOLDER\includes\languages\YOUR_LANGUAGE\super_invoice.php add two defines
PHP Code:
define('ENTRY_AMOUNT_APPLIED', 'Amount Applied:');
define('ENTRY_BALANCE_DUE', 'Balance Due:');
Bookmarks