=== 1. llx_facture par type (entity=1) === SELECT type,COUNT(*) AS nb,ROUND(SUM(total_ttc),2) AS ttc FROM llx_facture WHERE entity=1 GROUP BY type ORDER BY type type=0 | nb=392 | ttc=499013.28 (1 lignes) === 1b. llx_facture par type (TOUTES entities) === SELECT type,COUNT(*) AS nb FROM llx_facture GROUP BY type ORDER BY type type=0 | nb=392 (1 lignes) === 2. llx_facture_fourn par type === SELECT type,COUNT(*) AS nb,ROUND(SUM(total_ttc),2) AS ttc FROM llx_facture_fourn WHERE entity=1 GROUP BY type ORDER BY type type=0 | nb=256 | ttc=293843.83 (1 lignes) === 3. Factures fk_statut=3 === SELECT rowid,ref,ref_ext,datef,date_valid,total_ht,total_tva,total_ttc,fk_statut,paye,close_code,close_note,date_closing,fk_soc,fk_facture_source,type,module_source FROM llx_facture WHERE entity=1 AND fk_statut=3 ORDER BY rowid rowid=25 | ref=FA2508-0021 | ref_ext= | datef=2025-08-09 | date_valid=2025-08-09 | total_ht=495.60000000 | total_tva=99.12000000 | total_ttc=594.72000000 | fk_statut=3 | paye=0 | close_code=abandon | close_note= | date_closing=2025-09-18 20:59:53 | fk_soc=240 | fk_facture_source= | type=0 | module_source= rowid=34 | ref=FA2509-0028 | ref_ext= | datef=2025-09-02 | date_valid=2025-09-02 | total_ht=64746.26000000 | total_tva=12949.25000000 | total_ttc=77695.51000000 | fk_statut=3 | paye=0 | close_code=abandon | close_note= | date_closing=2025-10-14 14:23:20 | fk_soc=222 | fk_facture_source= | type=0 | module_source= (2 lignes) === 3b. Repartition statut/paye === SELECT fk_statut,paye,COUNT(*) AS nb,ROUND(SUM(total_ttc),2) AS ttc FROM llx_facture WHERE entity=1 GROUP BY fk_statut,paye ORDER BY fk_statut,paye fk_statut=0 | paye=0 | nb=2 | ttc=1118.33 fk_statut=1 | paye=0 | nb=41 | ttc=38307.97 fk_statut=2 | paye=1 | nb=347 | ttc=381296.75 fk_statut=3 | paye=0 | nb=2 | ttc=78290.23 (4 lignes) === 4. Totaux fk_statut=3 === SELECT COUNT(*) AS nb,ROUND(SUM(total_ht),2) AS ht,ROUND(SUM(total_tva),2) AS tva,ROUND(SUM(total_ttc),2) AS ttc FROM llx_facture WHERE entity=1 AND fk_statut=3 nb=2 | ht=65241.86 | tva=13048.37 | ttc=78290.23 (1 lignes) === 5. Clients concernes === SELECT f.rowid,f.ref,f.datef,f.total_ttc,f.close_code,f.close_note,s.nom AS client,s.rowid AS socid FROM llx_facture f LEFT JOIN llx_societe s ON s.rowid=f.fk_soc WHERE f.entity=1 AND f.fk_statut=3 rowid=25 | ref=FA2508-0021 | datef=2025-08-09 | total_ttc=594.72000000 | close_code=abandon | close_note= | client=Kerimov Nathan | socid=240 rowid=34 | ref=FA2509-0028 | datef=2025-09-02 | total_ttc=77695.51000000 | close_code=abandon | close_note= | client=Normandie Biologi'K Construction | socid=222 (2 lignes) === 6. Lignes des factures abandonnees === SELECT fd.rowid,fd.fk_facture,fd.description,fd.qty,fd.subprice,fd.total_ht,fd.total_tva,fd.tva_tx FROM llx_facturedet fd WHERE fd.fk_facture IN (SELECT rowid FROM llx_facture WHERE entity=1 AND fk_statut=3) ORDER BY fd.fk_facture,fd.rowid rowid=98 | fk_facture=25 | description=chemise intérieure et bouchon | qty=25 | subprice=3.00000000 | total_ht=75.00000000 | total_tva=15.00000000 | tva_tx=20.0000 rowid=99 | fk_facture=25 | description=pattes galva | qty=85 | subprice=3.00000000 | total_ht=255.00000000 | total_tva=51.00000000 | tva_tx=20.0000 rowid=100 | fk_facture=25 | description=Acier 75/100 Laqué 7016 - DEV:400mm LONG:4000mm | qty=5 | subprice=33.12000000 | total_ht=165.60000000 | total_tva=33.12000000 | tva_tx=20.0000 rowid=114 | fk_facture=34 | description=Transfert du chiffre de d'affaire ancien logiciels | qty=1 | subprice=64746.26000000 | total_ht=64746.26000000 | total_tva=12949.25000000 | tva_tx=20.0000 (4 lignes) === 7. Paiements sur factures abandonnees === SELECT pf.rowid,pf.fk_facture,pf.fk_paiement,pf.amount FROM llx_paiement_facture pf WHERE pf.fk_facture IN (SELECT rowid FROM llx_facture WHERE entity=1 AND fk_statut=3) (0 lignes) === 8. Liens element_element factures 25/34 === SELECT * FROM llx_element_element WHERE (sourcetype='facture' AND fk_source IN (25,34)) OR (targettype='facture' AND fk_target IN (25,34)) rowid=40 | fk_source=96 | sourcetype=propal | fk_target=25 | targettype=facture | relationtype= (1 lignes) === 9. Champs situation === SELECT rowid,ref,type,situation_cycle_ref,situation_counter,situation_final,retained_warranty FROM llx_facture WHERE entity=1 AND fk_statut=3 rowid=25 | ref=FA2508-0021 | type=0 | situation_cycle_ref= | situation_counter= | situation_final=0 | retained_warranty=0 rowid=34 | ref=FA2509-0028 | type=0 | situation_cycle_ref= | situation_counter= | situation_final=0 | retained_warranty=0 (2 lignes)