Patch level : 12.0 412
Files correlati : Commento : Sistemate le chiavi interne nel programma, capitava che il codcf e il numero documento si unissero creando errori madornali git-svn-id: svn://10.65.10.50/branches/R_10_00@23893 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8ec6a0d808
commit
78eb00966b
@ -1487,10 +1487,12 @@ TString TTrFa_app::getHeader(TToken_string* strarr)
|
|||||||
// Chiave header (20): TIPOCF(1) + CODCF(6)
|
// Chiave header (20): TIPOCF(1) + CODCF(6)
|
||||||
static long int idHeader = 0L;
|
static long int idHeader = 0L;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Cerco/Aggiungo il Clifo all'std::map
|
// Cerco/Aggiungo il Clifo all'std::map
|
||||||
TString keyMap; keyMap << strarr->get_char(_tipocf) << strarr->get_int(_codcf);
|
TString keyMap; keyMap << strarr->get_char(_tipocf) << "|" << strarr->get_int(_codcf);
|
||||||
clifoDoc app;
|
clifoDoc app;
|
||||||
// Non è presente e lo inserisco
|
// Non è presente e lo inserisco per la chiave body
|
||||||
if(mCliDoc.find(keyMap) == mCliDoc.end())
|
if(mCliDoc.find(keyMap) == mCliDoc.end())
|
||||||
{
|
{
|
||||||
idHeader++;
|
idHeader++;
|
||||||
@ -1498,11 +1500,6 @@ TString TTrFa_app::getHeader(TToken_string* strarr)
|
|||||||
app.countDoc = 0L;
|
app.countDoc = 0L;
|
||||||
mCliDoc.insert(std::pair<TString,clifoDoc>(keyMap, app));
|
mCliDoc.insert(std::pair<TString,clifoDoc>(keyMap, app));
|
||||||
}
|
}
|
||||||
// É presente lo prendo
|
|
||||||
else
|
|
||||||
{
|
|
||||||
app = mCliDoc[keyMap];
|
|
||||||
}
|
|
||||||
TString header; header.format("%c%06ld", strarr->get_char(_tipocf), strarr->get_int(_codcf));
|
TString header; header.format("%c%06ld", strarr->get_char(_tipocf), strarr->get_int(_codcf));
|
||||||
// Ritorno l'header
|
// Ritorno l'header
|
||||||
return header;
|
return header;
|
||||||
@ -1520,7 +1517,7 @@ TString TTrFa_app::getBody(TToken_string* strarr, bool add)
|
|||||||
/* Sembra che utilizzare identificatori chiari e sensati in questo mondo non è concesso, quindi adesso vi sbatto un bell'ID numerico
|
/* Sembra che utilizzare identificatori chiari e sensati in questo mondo non è concesso, quindi adesso vi sbatto un bell'ID numerico
|
||||||
* Ok per OGNI cliente devo assegnarli un identificativo del numero della fattura
|
* Ok per OGNI cliente devo assegnarli un identificativo del numero della fattura
|
||||||
*/
|
*/
|
||||||
TString keyMap; keyMap << strarr->get_char(_tipocf) << strarr->get_int(_codcf);
|
TString keyMap; keyMap << strarr->get_char(_tipocf) << "|" << strarr->get_int(_codcf);
|
||||||
|
|
||||||
clifoDoc app = mCliDoc[keyMap];
|
clifoDoc app = mCliDoc[keyMap];
|
||||||
if(add)
|
if(add)
|
||||||
@ -1812,7 +1809,10 @@ bool TTrFa_app::tff0700(TSheet_field& sheet)
|
|||||||
return false;
|
return false;
|
||||||
if(strcmp(strarr->get(_invio), "X") != 0) continue; // Non mi interessa se non è selezionata
|
if(strcmp(strarr->get(_invio), "X") != 0) continue; // Non mi interessa se non è selezionata
|
||||||
|
|
||||||
TString checkFatt; checkFatt << strarr->get_char(_tipocf) << strarr->get_long(_codcf) << strarr->get(_numdoc);
|
if(strcmp(strarr->get(_numero), "86709") == 0 || strcmp(strarr->get(_numero), "86772") == 0)
|
||||||
|
bool tolla = true;
|
||||||
|
|
||||||
|
TString checkFatt; checkFatt << strarr->get_char(_tipocf) << "|" << strarr->get_long(_codcf) << "|" << strarr->get(_numdoc);
|
||||||
if(fattSent.get_pos(checkFatt) < 0)
|
if(fattSent.get_pos(checkFatt) < 0)
|
||||||
{
|
{
|
||||||
fattSent.add(checkFatt);
|
fattSent.add(checkFatt);
|
||||||
@ -1856,7 +1856,9 @@ bool TTrFa_app::tff2200(TToken_string* strarr, int nriga)
|
|||||||
tff2200f.set("PL_KEYPRGINVIO", getKey(strarr));
|
tff2200f.set("PL_KEYPRGINVIO", getKey(strarr));
|
||||||
tff2200f.set("PL_KEYHEADERFATT", getHeader(strarr));
|
tff2200f.set("PL_KEYHEADERFATT", getHeader(strarr));
|
||||||
tff2200f.set("PL_KEYBODYFATT", getBody(strarr, false));
|
tff2200f.set("PL_KEYBODYFATT", getBody(strarr, false));
|
||||||
|
|
||||||
TString numriga; numriga.format("%020d", nriga);
|
TString numriga; numriga.format("%020d", nriga);
|
||||||
|
|
||||||
tff2200f.set("PL_KEYBODYDETT", numriga);
|
tff2200f.set("PL_KEYBODYDETT", numriga);
|
||||||
|
|
||||||
tff2200f.set("PL_IMPONIBILE", real(strarr->get(_imponibile))); // Se li converto in real una volta passati vengono parsati da var2str nel formato che vuole l'agenzia delle entrate
|
tff2200f.set("PL_IMPONIBILE", real(strarr->get(_imponibile))); // Se li converto in real una volta passati vengono parsati da var2str nel formato che vuole l'agenzia delle entrate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user