Changeset 109939 in spip-zone
- Timestamp:
- Apr 18, 2018, 1:47:40 PM (3 years ago)
- Location:
- _plugins_/produits/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/produits/trunk/formulaires/editer_produit.php
r109730 r109939 193 193 $contexte = formulaires_editer_objet_charger('produit', $id_produit, $id_rubrique, $lier_trad = 0, $retour, ''); 194 194 195 // Typecaster les nombres pour éviter des notices 196 $contexte['prix_ht'] = floatval($contexte['prix_ht']); 197 195 198 //Si on a déjà le $id_produit il faut afficher sa rubrique! 196 199 if ($id_produit > 0) { … … 200 203 201 204 //Calculer le prix TTC selon le contexte 202 $taxe = $contexte['taxe'] ? $contexte['taxe'] : lire_config('produits/taxe', 0);205 $taxe = floatval($contexte['taxe'] ? $contexte['taxe'] : lire_config('produits/taxe', 0)); 203 206 if (strlen($contexte['taxe'])) { 204 207 $contexte['taxe'] = 100 * $contexte['taxe']; … … 206 209 $contexte['_taxe_defaut'] = 100 * lire_config('produits/taxe', 0); 207 210 208 $precision_ttc = lire_config('produits/precision_ttc', 2);211 $precision_ttc = intval(lire_config('produits/precision_ttc', 2)); 209 212 $contexte['prix_ht'] = floatval($contexte['prix_ht']); 210 213 $contexte['prix_ttc'] = round($contexte['prix_ht'] * (1+$taxe), $precision_ttc); -
_plugins_/produits/trunk/paquet.xml
r109782 r109939 7 7 logo="prive/themes/spip/images/produits-64.png" 8 8 documentation="" 9 schema="1.1. 3"9 schema="1.1.4" 10 10 > 11 11
Note: See TracChangeset
for help on using the changeset viewer.