Author Topic: display of prices  (Read 6450 times)

seyi

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 401
    • AwoDev
Re: display of prices
« Reply #15 on: November 11, 2010, 12:24:42 pm »
On what page are you seeing the incorrect VAT?  Is it within the modifications I posted or is it in the shopping cart?
Seyi A
--------------------
Promotion enhancement for Virtuemart:
   - AwoCoupon FREE - http://www.awocoupon.com/starter
   - AwoCoupon Pro - http://awodev.com/products/joomla/awocoupon
   - AwoRewards - http://awodev.com/products/joomla/aworewards
   - AwoAffiliate - http://awodev.com/products/joomla/awoaffiliate

Tommy33

  • Beginner
  • *
  • Posts: 10
Re: display of prices
« Reply #16 on: November 12, 2010, 08:22:37 am »
In the shopping cart not, it is within your presentation.
Shows the right price with VAT, but the price without VAT is bad. When I turn off customers set the price with VAT, the price is correctly displayed without VAT, but the calculation of the price with VAT is terribly wrong.
For example:



Price is right! but excluding VAT is lower! 252/1.2 = 210, not 202Kč  :'(
Alkohol tester HQ-AT10
Cena: 202 Kč
252 Kč ( s DPH )


Price excluding VAT is correct! But VAT is lower! 210 * 1.2 = 252Kč
Alkohol tester HQ-AT10
Cena: 210 Kč
42 Kč ( s DPH )




seyi

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 401
    • AwoDev
Re: display of prices
« Reply #17 on: November 12, 2010, 08:45:33 am »
Hi Tommy,

Yes you are right, i messed up the calculations, but think the below will fix it.  In www/administrator/components/com_virtuemart/classes/ps_product, at the end of function show_price, change the if condition to this:
Code: [Select]
<?php
if ($auth["show_price_including_tax"] == 1) {
$base_price_with_tax $base_price;
$base_price $base_price_with_tax/(1+$my_taxrate);
}
else {
$my_taxrate $this->get_product_taxrate($product_id);
$base_price_with_tax  $base_price*(1+$my_taxrate);
}
?>
Seyi A
--------------------
Promotion enhancement for Virtuemart:
   - AwoCoupon FREE - http://www.awocoupon.com/starter
   - AwoCoupon Pro - http://awodev.com/products/joomla/awocoupon
   - AwoRewards - http://awodev.com/products/joomla/aworewards
   - AwoAffiliate - http://awodev.com/products/joomla/awoaffiliate

Tommy33

  • Beginner
  • *
  • Posts: 10
Re: display of prices
« Reply #18 on: November 12, 2010, 09:17:19 am »
Yeah, it's right, really, thanks so much!  :)

zeroscorte

  • Beginner
  • *
  • Posts: 11
Re: display of prices
« Reply #19 on: July 25, 2012, 11:18:42 am »
and for VirtueMart 1.1.9?