Просмотр исходного кода

Ajout du total dans le récapitulatif PDF

master
keun 8 лет назад
Родитель
Сommit
7f4bc0c129
1 измененных файлов: 19 добавлений и 0 удалений
  1. +19
    -0
      backend/views/commande/report.php

+ 19
- 0
backend/views/commande/report.php Просмотреть файл

@@ -1,6 +1,8 @@

<?php

use common\models\Commande ;

$num_jour_semaine = date('w', strtotime($date));
$arr_jour_semaine = [0 => 'dimanche', 1 => 'lundi', 2 => 'mardi', 3 => 'mercredi', 4 => 'jeudi', 5 => 'vendredi', 6 => 'samedi'];
$champs_horaires_point_vente = 'horaires_' . $arr_jour_semaine[$num_jour_semaine];
@@ -62,6 +64,23 @@ foreach ($points_vente as $pv) {
$html .= '</tr>' ;
}

$html .= '<tr><td><strong>Total</strong></td>' ;
$str_produits = '';
foreach ($produits as $p) {
if (!$p->vrac && isset($produits_selec[$p->id]['actif']) && $produits_selec[$p->id]['actif']) {
$quantite = Commande::getQuantiteProduit($p->id, $pv->commandes);
$str_quantite = '';
if ($quantite) {
$str_quantite = $quantite;
$str_produits .= $str_quantite .' x '. $p->nom . '<br />';
}
}
}
$html .= '<td>'.$str_produits.'</td><td></td>' ;
$html .= '<td><strong>'.number_format($pv->recettes_pain, 2) . ' €</strong></td>';
$html .= '</tbody></table><pagebreak>' ;
}

Загрузка…
Отмена
Сохранить