Patch level : 10.0 508

Files correlati     :  tc1.exe
Ricompilazione Demo : [ ]

Trasferimento Zucchetti


git-svn-id: svn://10.65.10.50/trunk@19607 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2009-11-12 12:09:57 +00:00
parent 25e1fc55c5
commit 0c7e5cb405
4 changed files with 42 additions and 25 deletions

View File

@ -58,19 +58,10 @@ long TRiclassifica_cache::decode(const char* tab, const TString& cod)
return (ric ? atol(*ric) : 0);
}
const char * TRiclassifica_cache::sdecode(const char* tab, const TString& cod)
{
TToken_string tok;
tok.add(tab);
tok.add(cod);
const TString* ric = (const TString*) objptr(tok);
return ric ? (const char *) *ric : "";
}
class TInvio;
inline TInvio& app() { return (TInvio&) main_app();}
class TInvio_file: public TFile_text
{
protected:
@ -164,6 +155,32 @@ public:
virtual ~TInvio() {} ;
};
const char * TRiclassifica_cache::sdecode(const char* tab, const TString& cod)
{
const TString* ric = NULL;
if (cod.full())
{
TToken_string tok;
tok.add(tab);
tok.add(cod);
ric = (const TString*) objptr(tok);
if (ric == NULL || ric->blank())
{
TString msg;
msg << TR("Tabella") << " "<< &(tab[2]) << " " << TR("Codice") << " " << cod << " :" << TR("Non presente in tabella");
app().log(2, msg);
}
}
else
int i = 1;
return ric ? (const char *) *ric : "";
}
void TInvio::log(int sev, const char* msg)
{
if (_log != NULL)
@ -194,12 +211,14 @@ const TString& TInvio_file::bill2ricl(const char t, int gr, int co, long so)
cod.add(so);
// Provo il sottoconto ma se non riesco provo con conto e poi anche gruppo
for (int c = 3; c > 0 && codricl <= 0; c--)
for (int c = 3; c > 0 && codricl.blank(); c--)
{
codricl = atol(app().conti().get(cod, "CODICE"));
const TRectype & rec = app().conti().get(cod);
codricl = rec.get("CODICE");
cod.add(0, c);
}
if (codricl <= 0)
if (codricl.blank())
{
TString msg;
msg << TR("Conto") << " " << gr << " " << co << " " << so << " :" << TR("Non presente in tabella");
@ -403,7 +422,7 @@ void TInvio_file::validate(TCursor& cur,TRecord_text &rec, TToken_string &s, TSt
char t = ' ';
const TString& tiponame = s.get();
if (s.full())
if (tiponame.full())
t = rec.get_char(tiponame);
if (ln == LF_CLIFO)

View File

@ -201,7 +201,7 @@ NAME(6) = NOME SOGGETTO
TYPE(6) = STRINGA
POSITION(6) = 43
LENGTH(6) = 25
FIELD(6) = 20->RAGSOC[26,25]
FIELD(6) = 20->RAGSOC[26,50]
NAME(7) = CODICE FISCALE
TYPE(7) = STRINGA

View File

@ -38,13 +38,12 @@ END
GROUPBOX DLG_NULL 76 6
BEGIN
PROMPT 2 4 "Dati da inviare"
PROMPT 2 4 "Dati da inviare"
END
BOOLEAN F_CAUSALI
BEGIN
PROMPT 3 5 "Causali"
FLAGS "D"
END
BOOLEAN F_CONTI

View File

@ -34,7 +34,6 @@ BEGIN
OUTPUT F_DESCG DESCR
CHECKTYPE FORCED
ADD RUN cg0 -0
// GROUP 1
END
STRING F_DESCG 50
@ -70,12 +69,6 @@ BEGIN
GROUP 1
END
STRING F_DESCC 50
BEGIN
PROMPT 24 3 ""
FLAGS "D"
END
NUMBER F_SOTTOCONTO 6
BEGIN
PROMPT 2 4 "Sottoconto "
@ -111,6 +104,12 @@ BEGIN
ADD RUN cg0 -0
END
STRING F_DESCC 50
BEGIN
PROMPT 24 3 ""
FLAGS "D"
END
NUMBER F_SOTTOCONTO1 6
BEGIN
PROMPT 2 4 "Sottoconto "
@ -179,7 +178,7 @@ BEGIN
INPUT S0 F_DESCRIZ
DISPLAY "Descrizione@50" S0
DISPLAY "Conto Zucchetti" CODTAB
// COPY OUTPUT F_CONTOZU
COPY OUTPUT F_CONTOZU
CHECKTYPE NORMAL
END