Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

template tweak
(1 viewing) (1) Guest
Support forum for customers who have purchased this product. Archive only, no new post can be added.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: template tweak

template tweak 12 years, 5 months ago #31620

Hello, my client wants the total tax to be displayed after "Extended total line" like in the image attached to this post. Is it possible to take tax variable from "extended total line", create new line and put the variable there? Could you please tell me which files to modify?

vattotal.jpg
The topic has been locked.

Re: template tweak 12 years, 5 months ago #31790

  • pama
  • OFFLINE
  • Posts: 489
Hello. File you must edit is administrator/components/com_vminvoice/helpers/invoicehelper.php

Around line 1291 place something like this:

$vatLine = $template[1];
$vatLine = InvoiceHelper::removeColumns($vatLine,$colsToDelete);
if ($leftOffset>0 && $labelColspan>0){ //make column wider straight to subtotal
$vatLine = InvoiceHelper::removeColumns($vatLine,range($leftOffset-1, $subtotalOffset -1));
$td = '<td align="left" colspan="'.$labelColspan.'">'.JText::_('Vat total').':</td>';
$vatLine = InvoiceHelper::addColumn($vatLine,$leftOffset-1, $td);
}

$totalTax = $this->subtotal_tax + $couponTaxAmount;

$vatLine = str_replace('{subtotal}',InvoiceCurrencyDisplay::getFullValue($totalTax, $this->currency),$vatLine);
$vatLine = preg_replace('#\{[\w ]+\}#Us','',$vatLine); //remove rest of tags

Then find line cca 1393 and after

$code.= VMI_NL.InvoiceHelper::setColumnWidths($totalLine,$colWidths);

place

$code.= VMI_NL.InvoiceHelper::setColumnWidths($vatLine,$colWidths);

Also turn off "Extended Total Line" in Invoce Items Configuration.

Note after each component update you will have to probably edit code again, because file is rewrited.
Another solution would be paid customization (1 hour), which will make this option permanent.
Regards.
ARTIO Support Team
The topic has been locked.

Re: template tweak 12 years, 5 months ago #31802

Thanks a lot, worked just fine. I edited invoicehtml.php not invoicehelper.php
The topic has been locked.
  • Page:
  • 1
Přihlášení uživatele Prázdný