News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Order Confirmation mail Tax listings

Started by Lapskaus, January 29, 2015, 08:33:57 AM

Previous topic - Next topic

Lapskaus

Hi,

im using joomla 3.3.6 and VM 3.02 and i got some strange tax positions  listed in my confirmation E-mail.
The only tax i set up in the backend is 19% and it gets added to every product price correctly. My cart also shows only my baseprice, the 19% tax and the final price with tax. everything is calculated correctly.

But the emails i receive all list up different numbers of 20% Tax positions, they just show some values but dont effect the product / final price.

So where do those postitions come from, how to get rid of them ?

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Lapskaus

Not for the mails. At least im not overriding anything in the invoice folder and if im not mistake thats where the magic happens  ;)

Lapskaus

Now i am :


<?php /* 
foreach($this->orderDetails['calc_rules'] as $rule){
  if ($rule->calc_kind == 'DBTaxRulesBill' or $rule->calc_kind == 'DATaxRulesBill') { ?>

    <tr >
      <td colspan="6" align="right" class="pricePad"><?php echo $rule->calc_rule_name ?> </td>
      <?php if ( VmConfig::get('show_tax')) { ?>
      <td align="right"> </td>
  <?php ?>
      <td align="right"> <?php echo $this->currency->priceDisplay($rule->calc_amount$this->currency); ?></td>
      <td align="right"><?php echo $this->currency->priceDisplay($rule->calc_amount$this->currency); ?> </td>
    </tr>
    <?php
} elseif ($rule->calc_kind == 'taxRulesBill' or $rule->calc_kind == 'VatTax' ) { ?>

    <tr >
      <td colspan="6"  align="right" class="pricePad"><?php echo $rule->calc_rule_name ?> </td>
      <?php if ( VmConfig::get('show_tax')) { ?>
      <td align="right"><?php echo $this->currency->priceDisplay($rule->calc_amount$this->currency); ?></td>
      <?php ?>
      <td align="right"></td>
      <td align="right"><?php echo $this->currency->priceDisplay($rule->calc_amount$this->currency); ?></td>
    </tr>
  <?php
  
}
} */ 
?>



commenting out those lines in the invoice_items.php did the trick.
It seems to me that for each tax rule and item the tax amount is listed up again in the sum at the end of the bill ... but here some questions.
#1 Why list up the tax amounts again in the sum when they are already show for each ordered item and summed up in the "COM_VIRTUEMART_ORDER_PRINT_PRODUCT_PRICES_TOTAL" - Tablerow.?
#2 Where did those 20% Taxes come from, as i said above i did only create a 19% rule.

p.barg

I do need this listing because the shop handles 2 different tax rates. So I think it's necessary to list them there in this case
(the rates are correct in my case b.t.w.). But what's not nice is that the VAT amounts are not summed up for the different rates. I.E. if
you buy 10 products belonging to 2 different tax groups you get 10 lines (instead of 2 sums) which makes the invoice look very messy...

I'll probably make an override for this, but maybe this can be amended in the core?

Petra

Frans D

#5
I agree, that the invoice/email parts needs some urgent cleaning up, as it now looks like this (used the pic of another topic);



The invoice_items.php calls for this data, which is also shown in the invoice pdf.

I ripped a lot out of the invoice_items.php so it would look a lot cleaner and the sums add up properly.
However I have only one VAT rule, which makes it easier.

Invoice before;



Invoice now:



I've enclosed my adapted invoice_items.php if someone wants to use it.
It is of VM version 3.0.6.2.

PS: I also got rid of the discount fields as we don't use them, if someone needs them I can add them and upload an extra version.

p.barg

Additionally, I just discovered that the displayed amounts aren't correct if the product quantity is more than 1....
The quantity seems not to be taken into account.

Frans D

I don't have that problem.
I just did a test order of 5 pieces and the calculations and total amounts are correct.

p.barg

But in your solution you don't have those single listings any longer...
The problem doesn't occur for the complete tax amount, but only in the listings below for the different tax rates.
Or did I misunderstand you?

Frans D