|
|
|
|
|
|
|
|
|
|
|
|
|
|
$html .= '<h3>'.$pv->nom.'</h3>' ; |
|
|
$html .= '<h3>'.$pv->nom.'</h3>' ; |
|
|
|
|
|
|
|
|
|
|
|
$col_credit_pain = '' ; |
|
|
|
|
|
if($pv->credit_pain) { |
|
|
|
|
|
$col_credit_pain = '<th>Rappel crédit</th>' ; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$html .= '<table class="table table-bordered">' |
|
|
$html .= '<table class="table table-bordered">' |
|
|
. '<thead>' |
|
|
. '<thead>' |
|
|
. '<tr>' |
|
|
. '<tr>' |
|
|
. '<th>Client</th>' |
|
|
. '<th>Client</th>' |
|
|
. '<th>Produits</th>' |
|
|
. '<th>Produits</th>' |
|
|
. '<th>Commentaire</th>' |
|
|
. '<th>Commentaire</th>' |
|
|
|
|
|
. $col_credit_pain |
|
|
. '<th>Montant</th>' |
|
|
. '<th>Montant</th>' |
|
|
. '</tr>' |
|
|
. '</tr>' |
|
|
. '<tbody>'; |
|
|
. '<tbody>'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$html .= '<td>'.substr($str_produits, 0, strlen($str_produits) - 2).'</td>'; |
|
|
$html .= '<td>'.substr($str_produits, 0, strlen($str_produits) - 2).'</td>'; |
|
|
$html .= '<td>'.$c->commentaire.'</td>'; |
|
|
$html .= '<td>'.$c->commentaire.'</td>'; |
|
|
$html .= '<td>'.number_format($c->montant, 2) . ' € '; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($pv->credit_pain) { |
|
|
|
|
|
$credit = '' ; |
|
|
|
|
|
if(isset($c->user) && isset($c->user->userEtablissement)) { |
|
|
|
|
|
$credit = number_format($c->user->userEtablissement[0]->credit,2).' €' ; |
|
|
|
|
|
} |
|
|
|
|
|
$html .= '<td>'.$credit.'</td>' ; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$html .= '<td><strong>'.number_format($c->montant, 2) . ' € '; |
|
|
|
|
|
|
|
|
if($c->getStatutPaiement() == Commande::STATUT_PAYEE) |
|
|
if($c->getStatutPaiement() == Commande::STATUT_PAYEE) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
$html .= '(surplus : '.$c->getMontantSurplus(true).' à rembourser)' ; |
|
|
$html .= '(surplus : '.$c->getMontantSurplus(true).' à rembourser)' ; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$html .= '</td>' ; |
|
|
|
|
|
|
|
|
$html .= '</strong></td>' ; |
|
|
|
|
|
|
|
|
$html .= '</tr>' ; |
|
|
$html .= '</tr>' ; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$str_produits = substr($str_produits, 0, strlen($str_produits) - 2) ; |
|
|
$str_produits = substr($str_produits, 0, strlen($str_produits) - 2) ; |
|
|
|
|
|
|
|
|
$html .= '<td>'.$str_produits.'</td><td></td>' ; |
|
|
$html .= '<td>'.$str_produits.'</td><td></td>' ; |
|
|
|
|
|
if($pv->credit_pain) { |
|
|
|
|
|
$html .= '<td></td>' ; |
|
|
|
|
|
} |
|
|
$html .= '<td><strong>'.number_format($pv->recettes_pain, 2) . ' €</strong></td>'; |
|
|
$html .= '<td><strong>'.number_format($pv->recettes_pain, 2) . ' €</strong></td>'; |
|
|
|
|
|
|
|
|
$html .= '</tbody></table><pagebreak>' ; |
|
|
$html .= '</tbody></table><pagebreak>' ; |