=== 0. COLONNES === -- llx_paiementfourn : rowid, ref, entity, tms, datec, datep, amount, multicurrency_amount, fk_user_author, fk_user_modif, fk_paiement, num_paiement, note, fk_bank, statut, model_pdf -- llx_paiementfourn_facturefourn : rowid, fk_paiementfourn, fk_facturefourn, amount, multicurrency_code, multicurrency_tx, multicurrency_amount -- llx_facture_fourn : rowid, ref, ref_supplier, entity, ref_ext, type, subtype, fk_soc, datec, datef, date_pointoftax, date_valid, tms, date_closing, libelle, paye, amount, remise, close_code, close_missing_amount, close_note, vat_reverse_charge, tva, total_tva, localtax1, localtax2, revenuestamp, total_ht, total_ttc, fk_statut, fk_user_author, fk_user_modif, fk_user_valid, fk_user_closing, fk_fac_rec_source, fk_facture_source, fk_projet, fk_account, fk_cond_reglement, fk_mode_reglement, date_lim_reglement, note_private, note_public, fk_incoterms, location_incoterms, fk_transport_mode, model_pdf, last_main_doc, import_key, extraparams, fk_multicurrency, multicurrency_code, multicurrency_tx, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc, fk_thirdparty_rib_id, payment_reference, dispute_status ########## 1. PERIMETRE paiementfourn 0=204 | nb_paiements=204 | 1=2026-01-05 00:00:00 | du=2026-01-05 00:00:00 | 2=2026-10-17 00:00:00 | au=2026-10-17 00:00:00 | 3=265115.87 | total=265115.87 --> 1 ligne(s) ########## 1b. paiementfourn par annee 0=2026 | an=2026 | 1=204 | nb=204 | 2=265115.87 | total=265115.87 --> 1 ligne(s) ########## 1c. PERIMETRE ventilations 0=227 | nb_ventilations=227 | 1=265115.87 | total=265115.87 --> 1 ligne(s) ########## 1d. PERIMETRE facture_fourn 0=256 | nb_factures=256 | 1=2026-01-01 | du=2026-01-01 | 2=2026-10-20 | au=2026-10-20 | 3=293843.83 | ttc=293843.83 | 4=222 | nb_paye=222 | 5=0 | brouillon=0 | 6=12 | valide=12 | 7=232 | payee_statut=232 | 8=12 | abandon=12 --> 1 ligne(s) ########## 1e. factures fourn par annee 0=2026 | an=2026 | 1=256 | nb=256 | 2=293843.83 | ttc=293843.83 --> 1 ligne(s) ########## 1f. types de facture fourn (0=std 1=remplacement 2=avoir 3=acompte) 0=0 | type=0 | 1=256 | nb=256 | 2=293843.83 | ttc=293843.83 --> 1 ligne(s) ########## A. CHRONOLOGIE : paiement ANTERIEUR a la date de facture 0=234 | pid=234 | 1=SPAY2609-0189 | pref=SPAY2609-0189 | 2=2026-09-09 00:00:00 | datep=2026-09-09 00:00:00 | 3=505 | fid=505 | 4=SI2609-0268 | ref=SI2609-0268 | 5=n°5 | ref_supplier=n°5 | 6=2026-09-30 | datef=2026-09-30 | 7=21 | jours_avance=21 | 8=4800 | montant_impute=4800 | 9=4800 | ttc=4800 | 10=SCI MARLEG | fournisseur=SCI MARLEG 0=67 | pid=67 | 1=SPAY2603-0022 | pref=SPAY2603-0022 | 2=2026-03-09 00:00:00 | datep=2026-03-09 00:00:00 | 3=404 | fid=404 | 4=SI2603-0196 | ref=SI2603-0196 | 5=03/09 | ref_supplier=03/09 | 6=2026-03-23 | datef=2026-03-23 | 7=14 | jours_avance=14 | 8=1898.51 | montant_impute=1898.51 | 9=1898.51 | ttc=1898.51 | 10=SAS COMAT METAL INDUSTRIE | fournisseur=SAS COMAT METAL INDUSTRIE 0=248 | pid=248 | 1=SPAY2610-0203 | pref=SPAY2610-0203 | 2=2026-10-04 00:00:00 | datep=2026-10-04 00:00:00 | 3=536 | fid=536 | 4=SI2610-0299 | ref=SI2610-0299 | 5=26-10-17 | ref_supplier=26-10-17 | 6=2026-10-13 | datef=2026-10-13 | 7=9 | jours_avance=9 | 8=2510 | montant_impute=2510 | 9=2700 | ttc=2700 | 10=GRÉGOIRE DONNART | fournisseur=GRÉGOIRE DONNART 0=61 | pid=61 | 1=SPAY2601-0016 | pref=SPAY2601-0016 | 2=2026-01-07 00:00:00 | datep=2026-01-07 00:00:00 | 3=174 | fid=174 | 4=SI2601-0035 | ref=SI2601-0035 | 5=01/03 | ref_supplier=01/03 | 6=2026-01-14 | datef=2026-01-14 | 7=7 | jours_avance=7 | 8=11259.79 | montant_impute=11259.79 | 9=11259.79 | ttc=11259.79 | 10=ALMET PARIS | fournisseur=ALMET PARIS 0=116 | pid=116 | 1=SPAY2601-0071 | pref=SPAY2601-0071 | 2=2026-01-05 00:00:00 | datep=2026-01-05 00:00:00 | 3=248 | fid=248 | 4=SI2601-0108 | ref=SI2601-0108 | 5=01/02 | ref_supplier=01/02 | 6=2026-01-12 | datef=2026-01-12 | 7=7 | jours_avance=7 | 8=369 | montant_impute=369 | 9=369 | ttc=369 | 10=TACHER ACOGEX | fournisseur=TACHER ACOGEX 0=119 | pid=119 | 1=SPAY2602-0074 | pref=SPAY2602-0074 | 2=2026-02-05 00:00:00 | datep=2026-02-05 00:00:00 | 3=249 | fid=249 | 4=SI2602-0109 | ref=SI2602-0109 | 5=02/04 | ref_supplier=02/04 | 6=2026-02-12 | datef=2026-02-12 | 7=7 | jours_avance=7 | 8=369 | montant_impute=369 | 9=369 | ttc=369 | 10=TACHER ACOGEX | fournisseur=TACHER ACOGEX 0=147 | pid=147 | 1=SPAY2606-0102 | pref=SPAY2606-0102 | 2=2026-06-05 00:00:00 | datep=2026-06-05 00:00:00 | 3=253 | fid=253 | 4=SI2606-0113 | ref=SI2606-0113 | 5=06/08 | ref_supplier=06/08 | 6=2026-06-11 | datef=2026-06-11 | 7=6 | jours_avance=6 | 8=369 | montant_impute=369 | 9=369 | ttc=369 | 10=TACHER ACOGEX | fournisseur=TACHER ACOGEX 0=141 | pid=141 | 1=SPAY2605-0096 | pref=SPAY2605-0096 | 2=2026-05-05 00:00:00 | datep=2026-05-05 00:00:00 | 3=252 | fid=252 | 4=SI2605-0112 | ref=SI2605-0112 | 5=05/06 | ref_supplier=05/06 | 6=2026-05-11 | datef=2026-05-11 | 7=6 | jours_avance=6 | 8=369 | montant_impute=369 | 9=369 | ttc=369 | 10=TACHER ACOGEX | fournisseur=TACHER ACOGEX 0=62 | pid=62 | 1=SPAY2601-0017 | pref=SPAY2601-0017 | 2=2026-01-16 00:00:00 | datep=2026-01-16 00:00:00 | 3=175 | fid=175 | 4=SI2601-0036 | ref=SI2601-0036 | 5=01/05 | ref_supplier=01/05 | 6=2026-01-21 | datef=2026-01-21 | 7=5 | jours_avance=5 | 8=5466.96 | montant_impute=5466.96 | 9=5466.96 | ttc=5466.96 | 10=ALMET PARIS | fournisseur=ALMET PARIS 0=211 | pid=211 | 1=SPAY2608-0166 | pref=SPAY2608-0166 | 2=2026-08-05 00:00:00 | datep=2026-08-05 00:00:00 | 3=484 | fid=484 | 4=SI2608-0249 | ref=SI2608-0249 | 5=00270001052 | ref_supplier=00270001052 | 6=2026-08-10 | datef=2026-08-10 | 7=5 | jours_avance=5 | 8=369 | montant_impute=369 | 9=369 | ttc=369 | 10=TACHER ACOGEX | fournisseur=TACHER ACOGEX 0=122 | pid=122 | 1=SPAY2603-0077 | pref=SPAY2603-0077 | 2=2026-03-05 00:00:00 | datep=2026-03-05 00:00:00 | 3=250 | fid=250 | 4=SI2603-0110 | ref=SI2603-0110 | 5=03/04 | ref_supplier=03/04 | 6=2026-03-10 | datef=2026-03-10 | 7=5 | jours_avance=5 | 8=369 | montant_impute=369 | 9=369 | ttc=369 | 10=TACHER ACOGEX | fournisseur=TACHER ACOGEX 0=130 | pid=130 | 1=SPAY2603-0085 | pref=SPAY2603-0085 | 2=2026-03-20 00:00:00 | datep=2026-03-20 00:00:00 | 3=399 | fid=399 | 4=SI2603-0192 | ref=SI2603-0192 | 5=03/10 | ref_supplier=03/10 | 6=2026-03-24 | datef=2026-03-24 | 7=4 | jours_avance=4 | 8=425.7 | montant_impute=425.7 | 9=425.7 | ttc=425.7 | 10=ARCELOR MITTAL | fournisseur=ARCELOR MITTAL 0=145 | pid=145 | 1=SPAY2605-0100 | pref=SPAY2605-0100 | 2=2026-05-22 00:00:00 | datep=2026-05-22 00:00:00 | 3=212 | fid=212 | 4=SI2605-0073 | ref=SI2605-0073 | 5=05/17 | ref_supplier=05/17 | 6=2026-05-26 | datef=2026-05-26 | 7=4 | jours_avance=4 | 8=295.97 | montant_impute=295.97 | 9=295.97 | ttc=295.97 | 10=Divers au comptant | fournisseur=Divers au comptant 0=173 | pid=173 | 1=SPAY2607-0128 | pref=SPAY2607-0128 | 2=2026-07-06 00:00:00 | datep=2026-07-06 00:00:00 | 3=267 | fid=267 | 4=SI2607-0127 | ref=SI2607-0127 | 5=07/03 | ref_supplier=07/03 | 6=2026-07-10 | datef=2026-07-10 | 7=4 | jours_avance=4 | 8=369 | montant_impute=369 | 9=369 | ttc=369 | 10=TACHER ACOGEX | fournisseur=TACHER ACOGEX 0=134 | pid=134 | 1=SPAY2604-0089 | pref=SPAY2604-0089 | 2=2026-04-07 00:00:00 | datep=2026-04-07 00:00:00 | 3=251 | fid=251 | 4=SI2604-0111 | ref=SI2604-0111 | 5=04/06 | ref_supplier=04/06 | 6=2026-04-10 | datef=2026-04-10 | 7=3 | jours_avance=3 | 8=369 | montant_impute=369 | 9=369 | ttc=369 | 10=TACHER ACOGEX | fournisseur=TACHER ACOGEX 0=171 | pid=171 | 1=SPAY2605-0126 | pref=SPAY2605-0126 | 2=2026-05-19 00:00:00 | datep=2026-05-19 00:00:00 | 3=238 | fid=238 | 4=SI2605-0098 | ref=SI2605-0098 | 5=05/23 | ref_supplier=05/23 | 6=2026-05-22 | datef=2026-05-22 | 7=3 | jours_avance=3 | 8=8000 | montant_impute=8000 | 9=8000 | ttc=8000 | 10=SCI MARLEG | fournisseur=SCI MARLEG 0=171 | pid=171 | 1=SPAY2605-0126 | pref=SPAY2605-0126 | 2=2026-05-19 00:00:00 | datep=2026-05-19 00:00:00 | 3=239 | fid=239 | 4=SI2605-0099 | ref=SI2605-0099 | 5=05/24 | ref_supplier=05/24 | 6=2026-05-22 | datef=2026-05-22 | 7=3 | jours_avance=3 | 8=2012.9 | montant_impute=2012.9 | 9=2012.9 | ttc=2012.9 | 10=SCI MARLEG | fournisseur=SCI MARLEG 0=120 | pid=120 | 1=SPAY2602-0075 | pref=SPAY2602-0075 | 2=2026-02-16 00:00:00 | datep=2026-02-16 00:00:00 | 3=290 | fid=290 | 4=SI2602-0139 | ref=SI2602-0139 | 5=02/06 | ref_supplier=02/06 | 6=2026-02-19 | datef=2026-02-19 | 7=3 | jours_avance=3 | 8=1799.66 | montant_impute=1799.66 | 9=1799.66 | ttc=1799.66 | 10=KDI | fournisseur=KDI 0=212 | pid=212 | 1=SPAY2609-0167 | pref=SPAY2609-0167 | 2=2026-09-07 00:00:00 | datep=2026-09-07 00:00:00 | 3=498 | fid=498 | 4=SI2609-0262 | ref=SI2609-0262 | 5=00270002537 | ref_supplier=00270002537 | 6=2026-09-10 | datef=2026-09-10 | 7=3 | jours_avance=3 | 8=369 | montant_impute=369 | 9=369 | ttc=369 | 10=TACHER ACOGEX | fournisseur=TACHER ACOGEX 0=64 | pid=64 | 1=SPAY2601-0019 | pref=SPAY2601-0019 | 2=2026-01-27 00:00:00 | datep=2026-01-27 00:00:00 | 3=176 | fid=176 | 4=SI2601-0037 | ref=SI2601-0037 | 5=01/07 | ref_supplier=01/07 | 6=2026-01-30 | datef=2026-01-30 | 7=3 | jours_avance=3 | 8=6489.3 | montant_impute=6489.3 | 9=6489.3 | ttc=6489.3 | 10=ALMET PARIS | fournisseur=ALMET PARIS 0=127 | pid=127 | 1=SPAY2603-0082 | pref=SPAY2603-0082 | 2=2026-03-19 00:00:00 | datep=2026-03-19 00:00:00 | 3=200 | fid=200 | 4=SI2603-0061 | ref=SI2603-0061 | 5=03/13 | ref_supplier=03/13 | 6=2026-03-20 | datef=2026-03-20 | 7=1 | jours_avance=1 | 8=920.7 | montant_impute=920.7 | 9=920.7 | ttc=920.7 | 10=Divers au comptant | fournisseur=Divers au comptant 0=131 | pid=131 | 1=SPAY2603-0086 | pref=SPAY2603-0086 | 2=2026-03-25 00:00:00 | datep=2026-03-25 00:00:00 | 3=201 | fid=201 | 4=SI2603-0062 | ref=SI2603-0062 | 5=03/14 | ref_supplier=03/14 | 6=2026-03-26 | datef=2026-03-26 | 7=1 | jours_avance=1 | 8=404.79 | montant_impute=404.79 | 9=404.79 | ttc=404.79 | 10=Divers au comptant | fournisseur=Divers au comptant 0=123 | pid=123 | 1=SPAY2603-0078 | pref=SPAY2603-0078 | 2=2026-03-09 00:00:00 | datep=2026-03-09 00:00:00 | 3=198 | fid=198 | 4=SI2603-0059 | ref=SI2603-0059 | 5=03/11 | ref_supplier=03/11 | 6=2026-03-10 | datef=2026-03-10 | 7=1 | jours_avance=1 | 8=1806.72 | montant_impute=1806.72 | 9=1806.72 | ttc=1806.72 | 10=Divers au comptant | fournisseur=Divers au comptant 0=152 | pid=152 | 1=SPAY2606-0107 | pref=SPAY2606-0107 | 2=2026-06-17 00:00:00 | datep=2026-06-17 00:00:00 | 3=220 | fid=220 | 4=SI2606-0081 | ref=SI2606-0081 | 5=06/32 | ref_supplier=06/32 | 6=2026-06-18 | datef=2026-06-18 | 7=1 | jours_avance=1 | 8=313.51 | montant_impute=313.51 | 9=313.51 | ttc=313.51 | 10=Divers au comptant | fournisseur=Divers au comptant 0=118 | pid=118 | 1=SPAY2601-0073 | pref=SPAY2601-0073 | 2=2026-01-14 00:00:00 | datep=2026-01-14 00:00:00 | 3=195 | fid=195 | 4=SI2601-0056 | ref=SI2601-0056 | 5=01/13 | ref_supplier=01/13 | 6=2026-01-15 | datef=2026-01-15 | 7=1 | jours_avance=1 | 8=16.75 | montant_impute=16.75 | 9=16.75 | ttc=16.75 | 10=Divers au comptant | fournisseur=Divers au comptant 0=246 | pid=246 | 1=SPAY2610-0201 | pref=SPAY2610-0201 | 2=2026-10-12 00:00:00 | datep=2026-10-12 00:00:00 | 3=529 | fid=529 | 4=SI2610-0292 | ref=SI2610-0292 | 5=656761 | ref_supplier=656761 | 6=2026-10-13 | datef=2026-10-13 | 7=1 | jours_avance=1 | 8=680.94 | montant_impute=680.94 | 9=680.94 | ttc=680.94 | 10=BULTEAU SYSTEMS | fournisseur=BULTEAU SYSTEMS --> 26 ligne(s) ########## B1. paiement dont le montant != somme des ventilations (ou sans ventilation) --> 0 ligne(s) ########## B2. facture paye=1 mais somme des reglements != total_ttc 0=205 | fid=205 | 1=SI2604-0066 | ref=SI2604-0066 | 2=04/09 | ref_supplier=04/09 | 3=2026-04-28 | datef=2026-04-28 | 4=Divers au comptant | fournisseur=Divers au comptant | 5=0 | type=0 | 6=2 | fk_statut=2 | 7=1 | paye=1 | 8=293.32 | ttc=293.32 | 9=293.31 | regle=293.31 | 10=0.01 | reste=0.01 0=211 | fid=211 | 1=SI2605-0072 | ref=SI2605-0072 | 2=05/18 | ref_supplier=05/18 | 3=2026-05-22 | datef=2026-05-22 | 4=Divers au comptant | fournisseur=Divers au comptant | 5=0 | type=0 | 6=2 | fk_statut=2 | 7=1 | paye=1 | 8=231.53 | ttc=231.53 | 9=231.52 | regle=231.52 | 10=0.01 | reste=0.01 --> 2 ligne(s) ########## B3. facture SURPAYEE (reglements > total_ttc) --> 0 ligne(s) ########## B4. facture INTEGRALEMENT reglee mais paye=0 (statut non mis a jour) SQL ERROR: Unknown column 'ff.total_ttc' in 'having clause' ########## B5. ligne de ventilation superieure au TTC de la facture --> 0 ligne(s) ########## B6. ventilation a montant nul --> 0 ligne(s) ########## C1. DOUBLON : meme facture reglee 2x du MEME montant --> 0 ligne(s) ########## C2. DOUBLON : deux paiements fournisseurs meme date + meme montant --> 0 ligne(s) ########## D1. paiement fournisseur SANS ligne de banque (fk_bank vide ou orphelin) --> 0 ligne(s) ########## D2. montant du paiement != montant de la ligne de banque (banque negative attendue) 0=65 | pid=65 | 1=2026-01-30 00:00:00 | datep=2026-01-30 00:00:00 | 2=107.24 | montant_paiement=107.24 | 3=179 | bid=179 | 4=-107.25 | montant_banque=-107.25 | 5=-0.01 | ecart_signe=-0.01 | 6=(AgentCompta) PAIEMENT PAR CARTE X4074 AMAZON BUSINESS PAYL 29/01 | label=(AgentCompta) PAIEMENT PAR CARTE X4074 AMAZON BUSINESS PAYL 29/01 | 7=2026-01-30 | dateo=2026-01-30 | 8=2026-01-30 | datev=2026-01-30 | 9=1 | rappro=1 | 10=202601 | num_releve=202601 0=77 | pid=77 | 1=2026-05-04 00:00:00 | datep=2026-05-04 00:00:00 | 2=13.99 | montant_paiement=13.99 | 3=191 | bid=191 | 4=-14 | montant_banque=-14 | 5=-0.01 | ecart_signe=-0.01 | 6=(AgentCompta) PAIEMENT PAR CARTE X4074 AMAZON PAYMENTS PAYL 02/05 | label=(AgentCompta) PAIEMENT PAR CARTE X4074 AMAZON PAYMENTS PAYL 02/05 | 7=2026-05-04 | dateo=2026-05-04 | 8=2026-05-04 | datev=2026-05-04 | 9=1 | rappro=1 | 10=202605 | num_releve=202605 0=59 | pid=59 | 1=2026-01-06 00:00:00 | datep=2026-01-06 00:00:00 | 2=133.93 | montant_paiement=133.93 | 3=173 | bid=173 | 4=-133.94 | montant_banque=-133.94 | 5=-0.01 | ecart_signe=-0.01 | 6=(AgentCompta) PAIEMENT PAR CARTE X4074 AMAZON PAYMENTS PAYL 05/01 | label=(AgentCompta) PAIEMENT PAR CARTE X4074 AMAZON PAYMENTS PAYL 05/01 | 7=2026-01-06 | dateo=2026-01-06 | 8=2026-01-06 | datev=2026-01-06 | 9=1 | rappro=1 | 10=202601 | num_releve=202601 --> 3 ligne(s) ########## D3. ligne de banque type payment_supplier dont le PAIEMENT n'existe plus (orpheline) --> 0 ligne(s) ########## D4. paiement rattache a une ligne de banque SANS bank_url payment_supplier --> 0 ligne(s) ########## D5. bank_url company orphelin (controle annexe) --> 0 ligne(s) ########## E1. DOUBLON FACTURE : meme fournisseur + meme ref_supplier --> 0 ligne(s) ########## E2. DOUBLON FACTURE : meme fournisseur + meme date + meme TTC 0=MULTILAQUE | fournisseur=MULTILAQUE | 1=2026-02-26 | datef=2026-02-26 | 2=894.42 | ttc=894.42 | 3=2 | nb=2 | 4=301,302 | rowids=301,302 | 5=SI2602-0150,SI2602-0151 | refs=SI2602-0150,SI2602-0151 | 6=02/08,02/09 | refs_fourn=02/08,02/09 | 7=2,2 | statuts=2,2 | 8=1,1 | payes=1,1 --> 1 ligne(s) ########## F1. ventilation pointant un paiement INEXISTANT --> 0 ligne(s) ########## F2. ventilation pointant une facture INEXISTANTE --> 0 ligne(s) ########## F3. facture fournisseur sans tiers --> 0 ligne(s) ########## F4. HT+TVA != TTC sur la facture fournisseur --> 0 ligne(s) ########## F5. facture BROUILLON (fk_statut=0) qui porte pourtant des reglements --> 0 ligne(s) === FIN ===