diff --git a/conf/conf.php b/conf/conf.php index 5667c8c..d4967d3 100644 --- a/conf/conf.php +++ b/conf/conf.php @@ -36,6 +36,7 @@ require_once(COMPOSER_LOADER); require_once(FUNCTIONS_DIR_PATH.'functions.php'); require_once(FUNCTIONS_DIR_PATH.'dbSqlManager.php'); +$GLOBALS['smarty']->assign('site_name',SITE_NAME); $GLOBALS['smarty']->assign('online_repo',ONLINE_REPOSITORY); //////////////////////////////////////////////////////////////////////// diff --git a/conf/settings.php b/conf/settings.php index 5d81618..fa4b240 100644 --- a/conf/settings.php +++ b/conf/settings.php @@ -1,5 +1,11 @@ "); $(this).html("").append(ipt); - if(unite=="kg") { - initFloatInput(ipt); - ipt.val( parseFloat(val) ); - } - else { - initIntInput(ipt); - ipt.val( parseInt(val) ); - } + initFloatInput(ipt); + ipt.val( parseFloat(val) ); ipt.blur(function(e) { var td = $(this).parent(); - val = $(this).val(); - if(td.attr("unite")=="kg") td.html( number_format(val, 3) ); - else td.html( val ); + val = parseFloat( $(this).val() ); + td.html( number_format(val, 3) ); td.parent().updateCompoLegumeMontant(); }); ipt.select(); diff --git a/public_html_admin/templates/livraisons/livraison_modal_view_tab_compo.tpl b/public_html_admin/templates/livraisons/livraison_modal_view_tab_compo.tpl index 1ed151d..1ce6c13 100644 --- a/public_html_admin/templates/livraisons/livraison_modal_view_tab_compo.tpl +++ b/public_html_admin/templates/livraisons/livraison_modal_view_tab_compo.tpl @@ -20,7 +20,7 @@ {$l.nom} {$l.tarif_prix|string_format:"%.2f"} €/{$l.tarif_unite_acro} - {if $l.tarif_unite=="kg"}{$l.quantite|string_format:"%.3f"}{else}{$l.quantite|string_format:"%.d"}{/if} + {$l.quantite|string_format:"%.3f"} {$l.tarif_unite_acro} {($l.tarif_prix * $l.quantite)|string_format:"%.2f"} € diff --git a/public_html_admin/templates/livraisons/livraison_modal_view_tab_legumes.tpl b/public_html_admin/templates/livraisons/livraison_modal_view_tab_legumes.tpl index 992ca63..e744aba 100644 --- a/public_html_admin/templates/livraisons/livraison_modal_view_tab_legumes.tpl +++ b/public_html_admin/templates/livraisons/livraison_modal_view_tab_legumes.tpl @@ -2,7 +2,7 @@ TOTAL : - {$infos.total_legumes.montant} + {$infos.total_legumes.montant|string_format:"%.2f"} € diff --git a/public_html_admin/templates/structure/top.tpl b/public_html_admin/templates/structure/top.tpl index a03f176..a289b93 100644 --- a/public_html_admin/templates/structure/top.tpl +++ b/public_html_admin/templates/structure/top.tpl @@ -4,7 +4,7 @@ - Panier + {$site_name}