News:

Looking for documentation? Take a look on our wiki

Main Menu

Show subtotal in invoice

Started by untiponormale, November 22, 2015, 17:06:09 PM

Previous topic - Next topic

untiponormale

Hello,

I googled everywhere and searched in the forum but I still couldn't find an answer to an apparently trivial question.
I live in Italy and here we need to have invoices with clear distinction between:

Subtotal (or net price)
VAT (IVA, calculated as a percentage on the subtotal)
Total (Subtotal + IVA)

In other terms, we have to show the subtotal in all the invoices.

I am a Virtuemart 1.5 user for another website and I don't have any problem with that: the orders created show clearly the subtotal, the vat (calculated as a percentage on the sum of the products, shipping costs and payment fees) and the total. For the invoice I simply copy and paste the print view of the order and that's it.

However I found this simple task a lot trickier in the new VM3.
The orders view shows a Tax, Discount and Total columns, but there is not a subtotal column (or field) with the sum of the net prices.
This is a huge limitation for italian (and I suppose EU) users which needs to clearly show the subtotal sum.

Is it possible to implement this in some way?

I use VirtueMart 3.0.8

GJC Web Design

You should be on 3.0.12

all the sum totals are available in the invoice templates so study how they are coded and make an over rides to achieve what you want
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

untiponormale

Thanks for your reply.
Could you please tell me which files should I edit?
Thanks,

GJC Web Design

they are self explanatory... 

components\com_virtuemart\views\invoice\tmpl\....

and components\com_virtuemart\views\cart\tmpl\default_pricelist.php if in cart as well
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

AH

I use this for the net subtotal:-


<?php if ( VmConfig::get('show_tax')) { ?>
                    <td align="right" class="priceCol"><?php echo "<span  class='priceColor2'>".$this->currency->priceDisplay($item->product_tax,$this->currency,$qtt)."</span>" ?></td>
                    <?php // quorvia added net total ?>
                    <td align="right" class="priceCol"><?php echo "<span  class='priceColor2'>".$this->currency->priceDisplay($item->product_discountedPriceWithoutTax,$this->currency,$qtt)."</span>" ?></td>
                <?php ?>

Regards
A

Joomla 4.4.5
php 8.1