Patch level : 12.0 1150

Files correlati     : fp

Commento:
Corretti alcuni bug nell'invio di fatture elettroniche con sconto in fattura.
nello specifico mancavano l'inizializazzione del PAF0900F e il campo PK_RIFDATO del PAF2100F veniva riempito con una stringa troppo lunga. Ho accorciato la descrizione
This commit is contained in:
smen 2022-05-16 17:26:14 +02:00
parent f3f98ec6a2
commit e42a8447ff

View File

@ -207,7 +207,7 @@ TString_array & get_paf_names()
if (__paf_names.items() == 0)
{
const char * names[] = { "PAF0100F", "PAF0200F", "PAF0400F", "PAF0700F", "PAF0800F", "PAF1000F", "PAF1100F", "PAF1200F",
const char * names[] = { "PAF0100F", "PAF0200F", "PAF0400F", "PAF0700F", "PAF0800F", "PAF0900F", "PAF1000F", "PAF1100F", "PAF1200F",
"PAF1400F", "PAF1600F", "PAF1700F", "PAF1800F", "PAF1900F", "PAF2000F", "PAF2100F", "PAF2200F",
"PAF2400F", "PAF2500F", "PAF2600F", "PAF2700F", "PAF3000F", "PAF3200F", "PAF3400F", "PAF3400F",
"PAFW300F", nullptr };
@ -575,7 +575,7 @@ bool TPaf_record::search()
bool first = true;
query << "SELECT TOP 1 * FROM " << _table << " WHERE " << filter_string() << " ORDER BY ";
first = true;
//first = true;
FOR_EACH_TOKEN(_key, fld)
{
const TVariant& var = get(fld);
@ -856,6 +856,8 @@ TPaf_container::TPaf_container()
_pafs.insert(std::pair<const char *, TPaf_record>("PAF0700F", TPaf_record("PAF0700F")));
// Cassa previdenziale
_pafs.insert(std::pair<const char *, TPaf_record>("PAF0800F", TPaf_record("PAF0800F")));
// Sconto in fattura
_pafs.insert(std::pair<const char *, TPaf_record>("PAF0900F", TPaf_record("PAF0900F")));
// Contratti
_pafs.insert(std::pair<const char *, TPaf_record>("PAF1000F", TPaf_record("PAF1000F")));
// Convenzioni
@ -2517,8 +2519,8 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
{
reset(paf2100f);
paf2100f.set("PK_KEYNLINAR", _idx_adg_doc_row++);
//paf2100f.set("PK_TIPODATO", "Sconto"); DA CAPIRE COSA METTERCI
paf2100f.set("PK_RIFDATO", "Sconto praticato in base all articolo 121 del decreto - legge n. 34 del 2020");
paf2100f.set("PK_TIPODATO", "Sconto"); //DA CAPIRE COSA METTERCI
paf2100f.set("PK_RIFDATO", "Sconto in base all articolo 121 del dl 34 del 2020");
ok &= insert(paf2100f);
}
// Se il bollo va fatto pagare bisogna aggiungere una riga!