Patch level : 10.0
Files correlati : cg3.exe Ricompilazione Demo : [ ] Commento : 0000991: manca descrizione nella lista fatture Nella lista fattura manca la decodifica della causale contabile. git-svn-id: svn://10.65.10.50/trunk@17685 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ae20e57276
commit
6b9431085d
@ -70,7 +70,6 @@ class TListaMov_application : public TPrintapp
|
|||||||
word _flags;
|
word _flags;
|
||||||
char _tipoc;
|
char _tipoc;
|
||||||
TString4 _dacodiva, _acodiva;
|
TString4 _dacodiva, _acodiva;
|
||||||
TDecoder _simbval, _descdoc;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void preprocess_header();
|
virtual void preprocess_header();
|
||||||
@ -104,11 +103,12 @@ public:
|
|||||||
void incrementa_totali();
|
void incrementa_totali();
|
||||||
void compila_clifo();
|
void compila_clifo();
|
||||||
void compila_comuni();
|
void compila_comuni();
|
||||||
const char * get_error(int error);
|
const char * get_error(int error) const;
|
||||||
|
|
||||||
bool RicercaDoc(const char*);
|
bool RicercaDoc(const char* cod) const;
|
||||||
const TString& SimboloValuta (const char* cod);
|
const TString& SimboloValuta (const char* cod) const;
|
||||||
const TString& DescrDoc(const char* cod);
|
const TString& DescrDoc(const char* cod) const;
|
||||||
|
const TString& AttivitaRegistro(const char * cod, int anno) const;
|
||||||
|
|
||||||
TListaMov_application(char tipost);
|
TListaMov_application(char tipost);
|
||||||
virtual ~TListaMov_application() {}
|
virtual ~TListaMov_application() {}
|
||||||
@ -206,7 +206,7 @@ bool TListaMov_application::data_fine(TMask_field& f, KEY k)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TListaMov_application::RicercaDoc(const char* tipo)
|
bool TListaMov_application::RicercaDoc(const char* tipo) const
|
||||||
{
|
{
|
||||||
const TRectype& tab_tpd = cache().get(TAB_TPD, tipo);
|
const TRectype& tab_tpd = cache().get(TAB_TPD, tipo);
|
||||||
return !tab_tpd.empty();
|
return !tab_tpd.empty();
|
||||||
@ -256,7 +256,7 @@ void TListaMov_application::compila_comuni()
|
|||||||
_provcom = comuni.get(COM_PROVCOM);
|
_provcom = comuni.get(COM_PROVCOM);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * TListaMov_application::get_error(int err)
|
const char * TListaMov_application::get_error(int err) const
|
||||||
{
|
{
|
||||||
switch (err)
|
switch (err)
|
||||||
{
|
{
|
||||||
@ -419,22 +419,16 @@ const char * TipoAttivita (const char * attreg, long codice_ditta)
|
|||||||
return attiv.get(ATT_TIPOATT);
|
return attiv.get(ATT_TIPOATT);
|
||||||
}
|
}
|
||||||
|
|
||||||
const TString& TListaMov_application::SimboloValuta(const char* cod)
|
const TString& TListaMov_application::SimboloValuta(const char* cod) const
|
||||||
|
{ return cache().get(TAB_VAL, cod, "S7"); }
|
||||||
|
|
||||||
|
const TString& TListaMov_application::DescrDoc(const char* tipo) const
|
||||||
|
{ return cache().get(TAB_TPD, tipo, "S0"); }
|
||||||
|
|
||||||
|
const TString& TListaMov_application::AttivitaRegistro(const char * cod, int anno) const
|
||||||
{
|
{
|
||||||
return _simbval.decode(cod);
|
TString8 key;
|
||||||
}
|
key.format("%04d%-3s", anno, cod);
|
||||||
|
|
||||||
const TString& TListaMov_application::DescrDoc(const char* tipo)
|
|
||||||
{
|
|
||||||
return _descdoc.decode(tipo);
|
|
||||||
}
|
|
||||||
|
|
||||||
const char * AttivitaRegistro (const char * cod, int anno)
|
|
||||||
{
|
|
||||||
TString16 key;
|
|
||||||
|
|
||||||
key.format ("%04d%-3s", anno, cod);
|
|
||||||
|
|
||||||
return cache().get("REG", key, "S8");
|
return cache().get("REG", key, "S8");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1033,8 +1027,8 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
|||||||
if (file == LF_MOV)
|
if (file == LF_MOV)
|
||||||
{
|
{
|
||||||
const TRectype& curmov = current_cursor()->curr(LF_MOV);
|
const TRectype& curmov = current_cursor()->curr(LF_MOV);
|
||||||
int anno = curmov.get_int(MOV_ANNOIVA);
|
const int anno = curmov.get_int(MOV_ANNOIVA);
|
||||||
const TString8 codreg = curmov.get(MOV_REG);
|
const TString4 codreg = curmov.get(MOV_REG);
|
||||||
_numr = curmov.get_long(MOV_NUMREG);
|
_numr = curmov.get_long(MOV_NUMREG);
|
||||||
_tipo_elenco = curmov.get(MOV_TIPO);
|
_tipo_elenco = curmov.get(MOV_TIPO);
|
||||||
_codcf = curmov.get_long(MOV_CODCF);
|
_codcf = curmov.get_long(MOV_CODCF);
|
||||||
@ -1116,7 +1110,7 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
|||||||
key.add("");
|
key.add("");
|
||||||
const TRectype & pcon = cache().get(LF_PCON, key);
|
const TRectype & pcon = cache().get(LF_PCON, key);
|
||||||
|
|
||||||
_ricser = pcon.get_int("RICSER");
|
_ricser = pcon.get_int(PCN_RICSER);
|
||||||
|
|
||||||
_simbolo = SimboloValuta(_codval);
|
_simbolo = SimboloValuta(_codval);
|
||||||
_allegb = CausAlleg(_codcaus);
|
_allegb = CausAlleg(_codcaus);
|
||||||
@ -1139,7 +1133,6 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
|||||||
if (uprotiva.full())
|
if (uprotiva.full())
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; protiva[i] && (protiva[i] == uprotiva[i]); i++);
|
for (i = 0; protiva[i] && (protiva[i] == uprotiva[i]); i++);
|
||||||
uprotiva = uprotiva.mid(i);
|
uprotiva = uprotiva.mid(i);
|
||||||
set_row(2, "@24g/@25g%s", (const char*) uprotiva);
|
set_row(2, "@24g/@25g%s", (const char*) uprotiva);
|
||||||
@ -2271,14 +2264,13 @@ void TListaMov_application::init_print(const TMask& msk)
|
|||||||
|
|
||||||
void TListaMov_application::preprocess_header()
|
void TListaMov_application::preprocess_header()
|
||||||
{
|
{
|
||||||
int soh; // riga d'inizio dell'intestazione
|
int soh = 1; // riga d'inizio dell'intestazione
|
||||||
|
|
||||||
TString sep(132);
|
TString sep(132);
|
||||||
TString key; key.format("%d", get_firm());
|
TString key; key.format("%d", get_firm());
|
||||||
const TString & ragsoc = cache().get(LF_NDITTE, key, NDT_RAGSOC);
|
const TString & ragsoc = cache().get(LF_NDITTE, key, NDT_RAGSOC);
|
||||||
|
|
||||||
reset_header();
|
reset_header();
|
||||||
soh=1;
|
|
||||||
sep << TR("Ditta ") << get_firm();
|
sep << TR("Ditta ") << get_firm();
|
||||||
sep << " " << ragsoc;
|
sep << " " << ragsoc;
|
||||||
sep.left_just(132);
|
sep.left_just(132);
|
||||||
@ -2435,24 +2427,21 @@ void TListaMov_application::preprocess_header()
|
|||||||
set_header (soh, FR("@92gal codice %ld"), _codice_fin);
|
set_header (soh, FR("@92gal codice %ld"), _codice_fin);
|
||||||
}
|
}
|
||||||
sep.fill('_');
|
sep.fill('_');
|
||||||
set_header (++soh, (const char *) sep);
|
set_header (++soh, sep);
|
||||||
set_header (++soh, FR("Numero Data Cod Prot. M Documento@48gCod Tp @75gTotale@101gCd Tp T O@129gNo"));
|
set_header (++soh, FR("Numero Data Cod Prot. M Documento@48gCod Tp @75gTotale@101gCd Tp T O@129gNo"));
|
||||||
set_header (++soh, FR("Regis. Operaz. Reg Num. L Data@41gNumero@48gCau Dc @55gDescrizione@75gDocumento@90gImponibile@101gIv Det A I@121gImposta@129gAll"));
|
set_header (++soh, FR("Regis. Operaz. Reg Num. L Data@41gNumero@48gCau Dc @55gDescrizione@75gDocumento@90gImponibile@101gIv Det A I@121gImposta@129gAll"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_header (++soh,(const char*)sep);
|
set_header (++soh, sep);
|
||||||
}
|
}
|
||||||
|
|
||||||
TListaMov_application::TListaMov_application(char tipost)
|
TListaMov_application::TListaMov_application(char tipost)
|
||||||
: _err(80),_tipoc(tipost),
|
: _err(80),_tipoc(tipost)
|
||||||
_simbval(TAB_VAL, "S7"), _descdoc(TAB_TPD, "S0")
|
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
||||||
int cg3100(int argc, char* argv[])
|
int cg3100(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
const char tipo = argc > 2 ? toupper(*argv[2]) : 'M';
|
const char tipo = argc > 2 ? toupper(*argv[2]) : 'M';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user