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

TAXES - (showing the correct discounts)

Started by jack19, October 13, 2012, 14:19:17 PM

Previous topic - Next topic

jack19

Hi,
I have the following question on the calculation of taxes.
For the Italian tax authorities to use the calculation is as follows eg:
Unit price: 15.70, VAT 21%

Q.ty 1 ->15.70 * 21% VAT=3.2977 roud to ->3.30
Q.ty 2 ->31.40 * 21% VAT=6.594 round to ->6.59 not 6.60 (3.30*2)
Q.ty 3 ->47.10 * 21% VAT=9.891 round to ->9.89 not 9.90 (3.30*3)
Q.ty 4 ->62.80 *21%  VAT=13.188 round to ->13.19 not 13.20 (3.30*4)
etc.
Then the calculation for the unit is done by multiplying the tax for the individual product units (3.30 * # Units), but we need to calculate the total product for the tax rate (15.70 * # Units * 21%)
Also, if you add a discount (e.g. 10%) calculation should be like in the attached images.
I noticed a display error in the invoice. (See images).
Any idea?
Rgds

[attachment cleanup by admin]
Best regards

Joomla! 2.5.9
Virtuemart 2.0.18a

jack19

Hi,
what are the correct pages to make the changes I want?
Rgds
Best regards

Joomla! 2.5.9
Virtuemart 2.0.18a

jack19

#2
Quote from: jack19 on October 13, 2012, 14:19:17 PM
...
I noticed a display error in the invoice. (See images).
...
Hi,
I found this workaround:
file invoice_items.php around line 80 found this code
<?php  echo  $this->currency->priceDisplay$item->product_subtotal_discount );  //No quantity is already stored with it ?>
replace with
<?php //echo  $this->currency->priceDisplay( $item->product_subtotal_discount );  //No quantity is already stored with it
// Edinting for show the correct disconut
                 $priceBaseWT str_replace(",",".",$this->currency->priceDisplay($item->product_basePriceWithTax,0$qtt));
  $priceSubtotalWT str_replace(",",".",$this->currency->priceDisplay(  $item->product_subtotal_with_tax ,0));
  $PriceDiscount str_replace(".",",",number_format($priceBaseWT-$priceSubtotalWT,2));
  echo $PriceDiscount;
// End editing   
?>

but I should also display the currency symbol, as I take it?
echo $PriceDiscount." currency symbol???

Ops, I found this:
echo $PriceDiscount." ".$this->currency->getSymbol('_symbol');
It is correct?
Rgds
Best regards

Joomla! 2.5.9
Virtuemart 2.0.18a

jack19

Quote from: jack19 on October 13, 2012, 14:19:17 PM
Hi,
I have the following question on the calculation of taxes.
For the Italian tax authorities to use the calculation is as follows eg:
Unit price: 15.70, VAT 21%

Q.ty 1 ->15.70 * 21% VAT=3.2977 roud to ->3.30
Q.ty 2 ->31.40 * 21% VAT=6.594 round to ->6.59 not 6.60 (3.30*2)
Q.ty 3 ->47.10 * 21% VAT=9.891 round to ->9.89 not 9.90 (3.30*3)
Q.ty 4 ->62.80 *21%  VAT=13.188 round to ->13.19 not 13.20 (3.30*4)
etc.
Then the calculation for the unit is done by multiplying the tax for the individual product units (3.30 * # Units), but we need to calculate the total product for the tax rate (15.70 * # Units * 21%)
Also, if you add a discount (e.g. 10%) calculation should be like in the attached images.
I noticed a display error in the invoice. (See images).
Any idea?
Rgds
Hi,
I am still finding this problem in version 2.0.12e. Again.
What are the pages to make corrections?
Thks.
Best Regards
Best regards

Joomla! 2.5.9
Virtuemart 2.0.18a

jack19

Best regards

Joomla! 2.5.9
Virtuemart 2.0.18a

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

jack19

Quote from: bytelord on November 05, 2012, 17:16:45 PM
Hello,

Please try to use vat tax per product, http://forum.virtuemart.net/index.php?topic=108865.5

Regards
Hi,
I tried, but practically does not change the result. The problem remains.
Regards
Best regards

Joomla! 2.5.9
Virtuemart 2.0.18a

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

AH

I agree that milbo expressed the problem of rounding in detailed terms.

But this has not resulted in a viable solution as yet. 
Regards
A

Joomla 4.4.5
php 8.1