From fca404e8d5e95e727c7ac3034722c30773e4b3c4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 30 Mar 2019 19:30:58 +0100 Subject: [PATCH] Show price without tax to prepare tax per customer country. --- htdocs/admin/dolistore/class/dolistore.class.php | 4 +--- htdocs/core/lib/functions.lib.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 619af090805..26b9bcc8918 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -44,7 +44,6 @@ class Dolistore // setups public $url; // the url of this page public $shop_url; // the url of the shop - public $vat_rate; // the vat rate used in the shop (prices are provided without vat) public $lang; // the integer representing the lang in the store public $debug_api; // usefull if no dialog @@ -60,7 +59,6 @@ class Dolistore $this->url = DOL_URL_ROOT.'/admin/modules.php?mode=marketplace'; $this->shop_url = 'https://www.dolistore.com/index.php?controller=product&id_product='; - $this->vat_rate = 1.2; // 20% de TVA $this->debug_api = $debug; $langtmp = explode('_', $langs->defaultlang); @@ -250,7 +248,7 @@ class Dolistore // free or pay ? if ($product->price > 0) { - $price = '

'.price(round((float) $product->price * $this->vat_rate, 2)).' €

'; + $price = '

'.price(price2num($product->price, 'MT'), 0, $langs, 1, -1, -1, 'EUR').' '.$langs->trans("HT").'

'; $download_link = ''; } else { $price = '

'.$langs->trans('Free').'

'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0937981164b..25d4d4bd513 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3675,7 +3675,7 @@ function img_searchclear($titlealt = 'default', $other = '') * @param string $text Text info * @param integer $infoonimgalt Info is shown only on alt of star picto, otherwise it is show on output after the star picto * @param int $nodiv No div - * @param string $admin '1'=Info for admin users. '0'=Info for standard users (change only the look), 'xxx'=Other + * @param string $admin '1'=Info for admin users. '0'=Info for standard users (change only the look), 'error','xxx'=Other * @param string $morecss More CSS * @return string String with info text */