Patch level : 2.2 csa
Files correlati : cg7.exe proforma.ini Ricompilazione Demo : [ ] Commento : corretto voce di spesa git-svn-id: svn://10.65.10.50/trunk@13503 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1985ae8986
commit
e16e3c656d
@ -24,11 +24,6 @@
|
|||||||
#include "../ca/movana.h"
|
#include "../ca/movana.h"
|
||||||
#include "../ca/rmovana.h"
|
#include "../ca/rmovana.h"
|
||||||
|
|
||||||
#define ALIAS_PCON1 100
|
|
||||||
#define ALIAS_PCON2 200
|
|
||||||
#define ALIAS_ABPCON1 300
|
|
||||||
#define ALIAS_ABPCON2 400
|
|
||||||
|
|
||||||
class TInvioP_file: public TFile_text
|
class TInvioP_file: public TFile_text
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
@ -101,6 +96,7 @@ public:
|
|||||||
const real get_importo() {return _importo;};
|
const real get_importo() {return _importo;};
|
||||||
const char* get_nregcosto() {return format("%d", _nregcosto);};
|
const char* get_nregcosto() {return format("%d", _nregcosto);};
|
||||||
const char* get_nregpag() {return format("%d", _nregpag);};
|
const char* get_nregpag() {return format("%d", _nregpag);};
|
||||||
|
const char* get_vocespesa(const int gruppo, const int conto, const long sottoc);
|
||||||
TInvioP_file* apri_file(const char* nome);
|
TInvioP_file* apri_file(const char* nome);
|
||||||
void chiudi_file(TInvioP_file* trasfile);
|
void chiudi_file(TInvioP_file* trasfile);
|
||||||
|
|
||||||
@ -135,11 +131,12 @@ void TInvioP_file::validate(TCursor& cur,TRecord_text &rec, TToken_string &s, TS
|
|||||||
valore << str;
|
valore << str;
|
||||||
valore.trim();
|
valore.trim();
|
||||||
}
|
}
|
||||||
else if (code == "_CODCBL")
|
else if (code == "_VOCESPESA")
|
||||||
{
|
{
|
||||||
valore = str;
|
const int gruppo = atoi(rec.get(3));
|
||||||
int i = valore.find("$");
|
const int conto = atoi(rec.get(4));
|
||||||
valore = valore.left(i);
|
const long sottoc = atol(rec.get(5));
|
||||||
|
valore = app().get_vocespesa(gruppo, conto, sottoc);
|
||||||
}
|
}
|
||||||
else if (code == "_RAGSOC")
|
else if (code == "_RAGSOC")
|
||||||
{
|
{
|
||||||
@ -189,6 +186,32 @@ void TInvioP::chiudi_file(TInvioP_file* trasfile)
|
|||||||
delete trasfile;
|
delete trasfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* TInvioP::get_vocespesa(const int gruppo,const int conto, const long sottoc)
|
||||||
|
{
|
||||||
|
TFilename configname = "cg7200a.ini"; //file configurazione della maschera
|
||||||
|
configname.custom_path();
|
||||||
|
TConfig configfile(configname);
|
||||||
|
TString80 confstringa = configfile.get("CONFSTRINGA");
|
||||||
|
confstringa.trim();
|
||||||
|
const int len = confstringa.len();
|
||||||
|
TLocalisamfile panapdc(LF_PANAPDC);
|
||||||
|
panapdc.zero();
|
||||||
|
panapdc.setkey(2);
|
||||||
|
panapdc.put("GRUPPO", gruppo);
|
||||||
|
panapdc.put("CONTO", conto);
|
||||||
|
panapdc.put("SOTTOCONTO", sottoc);
|
||||||
|
TRectype r(panapdc.curr());
|
||||||
|
for (panapdc.read(); !panapdc.eof(); panapdc.next())
|
||||||
|
{
|
||||||
|
if (panapdc.curr() != r) break;
|
||||||
|
const TString& codconto = panapdc.get("CODCONTO");
|
||||||
|
const TString& prefisso = codconto.sub(0,len-1);
|
||||||
|
if (prefisso == confstringa)
|
||||||
|
return codconto.sub(len-1);
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
bool TInvioP::i_proforma_conti()
|
bool TInvioP::i_proforma_conti()
|
||||||
{
|
{
|
||||||
TInvioP_file* trasfile = apri_file("pianocon");
|
TInvioP_file* trasfile = apri_file("pianocon");
|
||||||
|
@ -221,8 +221,7 @@ NAME(14) = VOCE DI SPESA
|
|||||||
TYPE(14) = STRINGA
|
TYPE(14) = STRINGA
|
||||||
POSITION(14) = 145
|
POSITION(14) = 145
|
||||||
LENGTH(14) = 10
|
LENGTH(14) = 10
|
||||||
//MESSAGE(14) = _CODCBL
|
MESSAGE(14) = _VOCESPESA
|
||||||
//FIELD(14) = 300@->DESCRIZ
|
|
||||||
|
|
||||||
[RECORD I]
|
[RECORD I]
|
||||||
|
|
||||||
@ -303,8 +302,7 @@ NAME(14) = VOCE DI SPESA
|
|||||||
TYPE(14) = STRINGA
|
TYPE(14) = STRINGA
|
||||||
POSITION(14) = 145
|
POSITION(14) = 145
|
||||||
LENGTH(14) = 10
|
LENGTH(14) = 10
|
||||||
//MESSAGE(14) = _CODCBL
|
MESSAGE(14) = _VOCESPESA
|
||||||
//FIELD(14) = 400@->DESCRIZ
|
|
||||||
|
|
||||||
[RECORD C]
|
[RECORD C]
|
||||||
|
|
||||||
@ -372,7 +370,7 @@ POSITION(0) = 0
|
|||||||
LENGTH(0) = 5
|
LENGTH(0) = 5
|
||||||
FIELD(0)=19->GRUPPO
|
FIELD(0)=19->GRUPPO
|
||||||
|
|
||||||
NAME(1) = CODICE MCONTO
|
NAME(1) = CODICE CONTO
|
||||||
TYPE(1) = STRINGA
|
TYPE(1) = STRINGA
|
||||||
POSITION(1) = 5
|
POSITION(1) = 5
|
||||||
B LENGTH(1) = 5
|
B LENGTH(1) = 5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user