News:

Support the VirtueMart project and become a member

Main Menu

Display Subtotal Without tax

Started by mediax, March 23, 2016, 08:11:27 AM

Previous topic - Next topic

mediax

Hi Guys,

I am trying to display a subtotal without tax in my invoice. This is the code that is used in invoice_items.php

<?php echo $this->currency->priceDisplay($this->orderDetails['details']['BT']->order_salesPrice, $this->currency) ; ?>

This gives me the total with tax and although I have looked I cannot find a way to display this without tax.

Any help would be great :)

MediaX

AH

The subtotal_net is not a variable passed to the invoice items code - so you have to create one for yourself.

Here is what I use - it might work for you


<!-- Totals line   -->
<tr class="cart-totals">
<td align="right" class="pricePad" colspan="4"><strong><?php echo vmText::_('COM_VIRTUEMART_ORDER_PRINT_TOTAL'?></strong></td>

<?php if ( VmConfig::get('show_tax')) {
            
$billNet $this->orderDetails['details']['BT']->order_total $this->orderDetails['details']['BT']->order_billTaxAmount;
            
?>


<td align="right"><span class='priceColor2'><?php echo $this->currency->priceDisplay($this->orderDetails['details']['BT']->order_billTaxAmount$this->currency); ?></span></td>
        <td align="right"><span class='priceColor2'><?php echo $this->currency->priceDisplay($billNet$this->currency); ?></span></td>
<?php ?>

<td align="right"><strong><?php echo $this->currency->priceDisplay($this->orderDetails['details']['BT']->order_total$this->currency); ?></strong></td>
</tr>
<!--End of totals-->

Regards
A

Joomla 4.4.5
php 8.1

mediax

Thanks for the reply, that will work perfectly.


AH

Regards
A

Joomla 4.4.5
php 8.1