number_format($c / 100, 2, ',', ' ') . ' €'; $statusLabels = ['paid' => 'Payée','to_pay' => 'À payer','partial' => 'Partiellement payée','disputed' => 'Contestée','cancelled' => 'Annulée','credit' => 'Avoir']; $methodLabels = ['transfer' => 'Virement','direct_debit' => 'Prélèvement','card' => 'Carte','check' => 'Chèque','cash' => 'Espèces','other' => 'Autre','unknown' => 'Non renseigné'];?> '','vendor_id' => 0,'status' => '','type' => '','payment_method' => '']; $filterQuery = array_merge(['year' => (int)$year], $accountingFilters);?>
| Structure | Facturé | Payé | Reste dû | Animaux | Coût/animal |
|---|---|---|---|---|---|
| = h($v['label']) ?>= h($v['label']) ?>
= (int)$v['paid_documents'] ?>/= (int)$v['documents'] ?> pièce(s) soldée(s)
|
= $money((int)$v['billed']) ?> | = $money((int)$vendorPaid) ?> | = $money((int)$v['due']) ?> | = (int)$v['animals'] ?: '—' ?> | = $v['animals'] ? $money((int)round($v['animal_cost'] / $v['animals'])) : '—' ?> |
| Date | Référence | Type | Structure | HT | TTC | Statut | Règlement | |
|---|---|---|---|---|---|---|---|---|
| = h(date('d/m/Y', strtotime($r['invoice_date']))) ?> | = h($r['reference']) ?> | = h(['invoice' => 'Facture','credit' => 'Avoir','adjustment' => 'Régularisation'][$r['document_type']] ?? $r['document_type']) ?> | = h($r['vendor_name'] ?? '—') ?> | = $r['total_ht_cents'] === null ? '—' : number_format($r['total_ht_cents'] / 100, 2, ',', ' ') . ' €' ?> | = number_format($r['total_ttc_cents'] / 100, 2, ',', ' ') ?> € | = h(['paid' => 'Payée','to_pay' => 'À payer','partial' => 'Partielle','disputed' => 'Contestée','cancelled' => 'Annulée','credit' => 'Avoir'][$r['status']] ?? $r['status']) ?> | = h(['transfer' => 'Virement','direct_debit' => 'Prélèvement','card' => 'Carte','check' => 'Chèque','cash' => 'Espèces','other' => 'Autre'][$r['payment_method']] ?? '—') ?> | Voir |
| Aucune facture pour cette période. | ||||||||