Debug last commit
This commit is contained in:
parent
dca63c7d6f
commit
74981fc92a
|
|
@ -36,6 +36,7 @@ require_once(COMPOSER_LOADER);
|
||||||
require_once(FUNCTIONS_DIR_PATH.'functions.php');
|
require_once(FUNCTIONS_DIR_PATH.'functions.php');
|
||||||
require_once(FUNCTIONS_DIR_PATH.'dbSqlManager.php');
|
require_once(FUNCTIONS_DIR_PATH.'dbSqlManager.php');
|
||||||
|
|
||||||
|
$GLOBALS['smarty']->assign('site_name',SITE_NAME);
|
||||||
$GLOBALS['smarty']->assign('online_repo',ONLINE_REPOSITORY);
|
$GLOBALS['smarty']->assign('online_repo',ONLINE_REPOSITORY);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
// NOM DU SITE ////////////////////////////////////////////////////////
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
define("SITE_NAME", "La p'tite fourmi - Gestion paniers");
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// ONLINE REPO ////////////////////////////////////////////////////////
|
// ONLINE REPO ////////////////////////////////////////////////////////
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -497,8 +497,7 @@ function addPanierTypeCompoLegume(panier, datas) {
|
||||||
tdTarif.html(number_format(datas.tarif_prix,2));
|
tdTarif.html(number_format(datas.tarif_prix,2));
|
||||||
tdTarifUnit.html("€/"+unite);
|
tdTarifUnit.html("€/"+unite);
|
||||||
|
|
||||||
if(datas.tarif_unite == 'kg') tdQ.html(number_format(datas.quantite,3));
|
tdQ.html(number_format(datas.quantite,3));
|
||||||
else tdQ.html(datas.quantite);
|
|
||||||
|
|
||||||
tdQ.attr("unite", datas.tarif_unite);
|
tdQ.attr("unite", datas.tarif_unite);
|
||||||
tdQunit.html(unite);
|
tdQunit.html(unite);
|
||||||
|
|
@ -592,19 +591,12 @@ function addPanierTypeCompoLegume(panier, datas) {
|
||||||
if(unite in legumeTarifUnitesAccronymes) {
|
if(unite in legumeTarifUnitesAccronymes) {
|
||||||
var ipt = $("<input class='editable quantite' type='text'>");
|
var ipt = $("<input class='editable quantite' type='text'>");
|
||||||
$(this).html("").append(ipt);
|
$(this).html("").append(ipt);
|
||||||
if(unite=="kg") {
|
|
||||||
initFloatInput(ipt);
|
initFloatInput(ipt);
|
||||||
ipt.val( parseFloat(val) );
|
ipt.val( parseFloat(val) );
|
||||||
}
|
|
||||||
else {
|
|
||||||
initIntInput(ipt);
|
|
||||||
ipt.val( parseInt(val) );
|
|
||||||
}
|
|
||||||
ipt.blur(function(e) {
|
ipt.blur(function(e) {
|
||||||
var td = $(this).parent();
|
var td = $(this).parent();
|
||||||
val = $(this).val();
|
val = parseFloat( $(this).val() );
|
||||||
if(td.attr("unite")=="kg") td.html( number_format(val, 3) );
|
td.html( number_format(val, 3) );
|
||||||
else td.html( val );
|
|
||||||
td.parent().updateCompoLegumeMontant();
|
td.parent().updateCompoLegumeMontant();
|
||||||
});
|
});
|
||||||
ipt.select();
|
ipt.select();
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<td class="nom">{$l.nom}</td>
|
<td class="nom">{$l.nom}</td>
|
||||||
<td class="tarif">{$l.tarif_prix|string_format:"%.2f"}</td>
|
<td class="tarif">{$l.tarif_prix|string_format:"%.2f"}</td>
|
||||||
<td class="tarif_unite unite">€/{$l.tarif_unite_acro}</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="quantite_unite unite">{$l.tarif_unite_acro}</td>
|
||||||
<td class="montant">{($l.tarif_prix * $l.quantite)|string_format:"%.2f"}</td>
|
<td class="montant">{($l.tarif_prix * $l.quantite)|string_format:"%.2f"}</td>
|
||||||
<td class="montant_unite unite">€</td>
|
<td class="montant_unite unite">€</td>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="title">
|
<tr class="title">
|
||||||
<th class="titre" colspan="5">TOTAL :</th>
|
<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>
|
<th class="total unite">€</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="head">
|
<tr class="head">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
|
|
||||||
<title>Panier</title>
|
<title>{$site_name}</title>
|
||||||
|
|
||||||
<!-- On ouvre la fenêtre à la largeur de l'écran -->
|
<!-- On ouvre la fenêtre à la largeur de l'écran -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue