Debug last commit

This commit is contained in:
Adrien RENARD 2023-12-24 01:19:06 +01:00
parent dca63c7d6f
commit 74981fc92a
6 changed files with 15 additions and 16 deletions

View File

@ -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);
////////////////////////////////////////////////////////////////////////

View File

@ -1,5 +1,11 @@
<?php
////////////////////////////////////////////////////////////////////////
// NOM DU SITE ////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
define("SITE_NAME", "La p'tite fourmi - Gestion paniers");
////////////////////////////////////////////////////////////////////////
// ONLINE REPO ////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////

View File

@ -497,8 +497,7 @@ function addPanierTypeCompoLegume(panier, datas) {
tdTarif.html(number_format(datas.tarif_prix,2));
tdTarifUnit.html("€/"+unite);
if(datas.tarif_unite == 'kg') tdQ.html(number_format(datas.quantite,3));
else tdQ.html(datas.quantite);
tdQ.html(number_format(datas.quantite,3));
tdQ.attr("unite", datas.tarif_unite);
tdQunit.html(unite);
@ -592,19 +591,12 @@ function addPanierTypeCompoLegume(panier, datas) {
if(unite in legumeTarifUnitesAccronymes) {
var ipt = $("<input class='editable quantite' type='text'>");
$(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();

View File

@ -20,7 +20,7 @@
<td class="nom">{$l.nom}</td>
<td class="tarif">{$l.tarif_prix|string_format:"%.2f"}</td>
<td class="tarif_unite unite">€/{$l.tarif_unite_acro}</td>
<td class="quantite">{if $l.tarif_unite=="kg"}{$l.quantite|string_format:"%.3f"}{else}{$l.quantite|string_format:"%.d"}{/if}</td>
<td class="quantite">{$l.quantite|string_format:"%.3f"}</td>
<td class="quantite_unite unite">{$l.tarif_unite_acro}</td>
<td class="montant">{($l.tarif_prix * $l.quantite)|string_format:"%.2f"}</td>
<td class="montant_unite unite">€</td>

View File

@ -2,7 +2,7 @@
<thead>
<tr class="title">
<th class="titre" colspan="5">TOTAL :</th>
<th class="total montant">{$infos.total_legumes.montant}</th>
<th class="total montant">{$infos.total_legumes.montant|string_format:"%.2f"}</th>
<th class="total unite">€</th>
</tr>
<tr class="head">

View File

@ -4,7 +4,7 @@
<meta charset="utf-8"/>
<title>Panier</title>
<title>{$site_name}</title>
<!-- On ouvre la fenêtre à la largeur de l'écran -->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>