Patch level : 12.0 492
Files correlati : tf Commento : Adattato TF alle richieste di Alessandra git-svn-id: svn://10.65.10.50/branches/R_10_00@24245 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2d2597c77e
commit
9df346f464
@ -824,12 +824,6 @@ TString TTrFa_app::getKey(TToken_string* strarr)
|
|||||||
|
|
||||||
TString TTrFa_app::getHeader(TToken_string* strarr)
|
TString TTrFa_app::getHeader(TToken_string* strarr)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
// Chiave header (20): TIPOCF(1) + NANANANANA(10) + CODCF(6)
|
|
||||||
TString header; header.format("%c3753N4108E%06ld", strarr->get_char(_tipocf), strarr->get_int(_codcf));
|
|
||||||
return header;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Devo crearmi una struttura dove immagazzino delle strutture di clienti e all'interno ci metto i numeratori che mi chiedono
|
/* Devo crearmi una struttura dove immagazzino delle strutture di clienti e all'interno ci metto i numeratori che mi chiedono
|
||||||
* Così facendo mando a puttane persino l'append che potevo tranquillamente implementare prima e creare fastidiose query per capire dove cazzo sto
|
* Così facendo mando a puttane persino l'append che potevo tranquillamente implementare prima e creare fastidiose query per capire dove cazzo sto
|
||||||
*/
|
*/
|
||||||
@ -871,13 +865,13 @@ TString TTrFa_app::getHeader(TToken_string* strarr)
|
|||||||
static TString formatString; formatString.cut(0) << "%c%0";
|
static TString formatString; formatString.cut(0) << "%c%0";
|
||||||
if(occas.blank())
|
if(occas.blank())
|
||||||
{
|
{
|
||||||
formatString << 18 - codcf.len() << "d";
|
formatString << 13 - codcf.len() << "d";
|
||||||
header.format(formatString, tipocf[0], 0);
|
header.format(formatString, tipocf[0], 0);
|
||||||
header << codcf; // Perchè cazzo non va il %s!?
|
header << codcf; // Perchè cazzo non va il %s!?
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
formatString << 18 - occas.len() << "d";
|
formatString << 13 - occas.len() << "d";
|
||||||
header.format(formatString, 'O', 0);
|
header.format(formatString, 'O', 0);
|
||||||
header << occas;
|
header << occas;
|
||||||
}
|
}
|
||||||
@ -888,13 +882,6 @@ TString TTrFa_app::getHeader(TToken_string* strarr)
|
|||||||
|
|
||||||
TString TTrFa_app::getBody(TToken_string* strarr, bool add)
|
TString TTrFa_app::getBody(TToken_string* strarr, bool add)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
// Chiave body (20): TIPODOC(2) + DATADOC[YEAR](4) + NUMDOC(7) + AAA(3) + CODALIQUOTA(4)
|
|
||||||
TDate datadoc(strarr->get(_datadoc));
|
|
||||||
TString body; body.format("%02s%04d%07s%04s", strarr->get(_codnum), datadoc.year(), strarr->get(_numdoc), strarr->get(_aliquota));
|
|
||||||
return body;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* 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
|
||||||
*/
|
*/
|
||||||
@ -909,7 +896,7 @@ TString TTrFa_app::getBody(TToken_string* strarr, bool add)
|
|||||||
}
|
}
|
||||||
mCliDoc[keyMap] = app;
|
mCliDoc[keyMap] = app;
|
||||||
|
|
||||||
static TString body; body.format("%010d%010d", app.contCliFo, app.docID[numDoc]);
|
static TString body; body.format("%07d%07d", app.contCliFo, app.docID[numDoc]);
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1356,7 +1343,9 @@ bool TTrFa_app::tff0700(TSheet_field& sheet)
|
|||||||
// <DatiFatturaBody>
|
// <DatiFatturaBody>
|
||||||
TTrFa_record tff0700f("TFF0700F");
|
TTrFa_record tff0700f("TFF0700F");
|
||||||
tff0700f.set("P7_KEYPRGINVIO", getKey(strarr));
|
tff0700f.set("P7_KEYPRGINVIO", getKey(strarr));
|
||||||
tff0700f.set("P7_KEYHEADERFATT", getHeader(strarr));
|
static TString header;
|
||||||
|
header.cut(0) << getHeader(strarr);
|
||||||
|
tff0700f.set("P7_KEYHEADERFATT", header);
|
||||||
tff0700f.set("P7_KEYBODYFATT", getBody(strarr));
|
tff0700f.set("P7_KEYBODYFATT", getBody(strarr));
|
||||||
|
|
||||||
TString natura = strarr->get(_natura);
|
TString natura = strarr->get(_natura);
|
||||||
@ -1365,10 +1354,20 @@ bool TTrFa_app::tff0700(TSheet_field& sheet)
|
|||||||
|
|
||||||
// Controllo il tipo di esigilità
|
// Controllo il tipo di esigilità
|
||||||
tff0700f.set("P7_DATA", toDate(strarr->get(_datadoc)));
|
tff0700f.set("P7_DATA", toDate(strarr->get(_datadoc)));
|
||||||
tff0700f.set("P7_NUMERO", strarr->get(_numdoc));
|
static TString ndoc;
|
||||||
tff0700f.set("P7_NRODOC", cache().get(LF_MOV, strarr->get(_numero), "NUMDOCEXT"));
|
ndoc.cut(0) << cache().get(LF_MOV, strarr->get(_numero), "NUMDOCEXT");
|
||||||
|
if(ndoc.blank())
|
||||||
|
ndoc.cut(0) << strarr->get(_numdoc);
|
||||||
|
tff0700f.set("P7_NUMERO", ndoc);
|
||||||
tff0700f.set("P7_DATAREG", toDate(strarr->get(_datareg))); // Obbligatoria nei DTR
|
tff0700f.set("P7_DATAREG", toDate(strarr->get(_datareg))); // Obbligatoria nei DTR
|
||||||
tff0700f.set("P7_GESTIONE", "");
|
tff0700f.set("P7_GESTIONE", "");
|
||||||
|
|
||||||
|
// Campi di controllo
|
||||||
|
tff0700f.set("P7_CLIFOR", header);
|
||||||
|
tff0700f.set("P7_NRODOC", ndoc);
|
||||||
|
tff0700f.set("P7_DATADOC", toDate(strarr->get(_datadoc)));
|
||||||
|
|
||||||
|
|
||||||
ok = tff0700f.insert();
|
ok = tff0700f.insert();
|
||||||
|
|
||||||
// Controllo dopo l'inserimento del tff0700f
|
// Controllo dopo l'inserimento del tff0700f
|
||||||
|
Loading…
x
Reference in New Issue
Block a user