Show price without tax to prepare tax per customer country.

This commit is contained in:
Laurent Destailleur 2019-03-30 19:30:58 +01:00
parent c1157679e8
commit fca404e8d5
2 changed files with 2 additions and 4 deletions

View File

@ -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 = '<h3>'.price(round((float) $product->price * $this->vat_rate, 2)).'&nbsp;&euro;</h3>';
$price = '<h3>'.price(price2num($product->price, 'MT'), 0, $langs, 1, -1, -1, 'EUR').' '.$langs->trans("HT").'</h3>';
$download_link = '<a target="_blank" href="'.$this->shop_url.$product->id.'"><img width="32" src="'.DOL_URL_ROOT.'/admin/dolistore/img/follow.png" /></a>';
} else {
$price = '<h3>'.$langs->trans('Free').'</h3>';

View File

@ -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
*/