Patch level : 2.0 638
Files correlati : f33.dir f33.trr fatturac.src ve0.exe ve6.exe ve0300a.src ve6200a.msk Ricompilazione Demo : [ ] Commento : Prima implementazione gestione codice IBAN git-svn-id: svn://10.65.10.50/trunk@11583 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
f1b3583676
commit
588d054f61
@ -1,3 +1,3 @@
|
|||||||
33
|
33
|
||||||
0
|
0
|
||||||
$doc|0|0|462|0|Documenti di vendita|NDOC*3||
|
$doc|0|0|496|0|Documenti di vendita|NDOC*3||
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
33
|
33
|
||||||
76
|
77
|
||||||
CODNUM|1|4|0|Codice della numerazione
|
CODNUM|1|4|0|Codice della numerazione
|
||||||
ANNO|2|4|0|Anno
|
ANNO|2|4|0|Anno
|
||||||
PROVV|1|1|0|Tipo numerazione <P>rovvisorio <D>efinitivo
|
PROVV|1|1|0|Tipo numerazione <P>rovvisorio <D>efinitivo
|
||||||
@ -22,6 +22,7 @@ CODPAG|1|4|0|Codice condizione di pagamento
|
|||||||
DATAINSC|5|8|0|Data inizio scadenza
|
DATAINSC|5|8|0|Data inizio scadenza
|
||||||
CODABIA|10|5|0|Codice ABI banca di appoggio
|
CODABIA|10|5|0|Codice ABI banca di appoggio
|
||||||
CODCABA|10|5|0|Codice CAB banca di appoggio
|
CODCABA|10|5|0|Codice CAB banca di appoggio
|
||||||
|
IBAN|1|34|0|Codice IBAN di appoggio
|
||||||
CODABIP|10|5|0|Codice ABI banca di presentazione
|
CODABIP|10|5|0|Codice ABI banca di presentazione
|
||||||
CODCABP|10|5|0|Codice CAB banca di presentazione
|
CODCABP|10|5|0|Codice CAB banca di presentazione
|
||||||
CATVEN|1|2|0|Categoria di vendita
|
CATVEN|1|2|0|Categoria di vendita
|
||||||
|
@ -55,6 +55,14 @@ DATASCAD5 = S_DISABILITATO //500
|
|||||||
CODABIA = S_OBBLIGATORIO //600
|
CODABIA = S_OBBLIGATORIO //600
|
||||||
CODCABA = S_OBBLIGATORIO //600
|
CODCABA = S_OBBLIGATORIO //600
|
||||||
DESBANAPP = S_NORMALE //600
|
DESBANAPP = S_NORMALE //600
|
||||||
|
IBAN = S_NORMALE //600
|
||||||
|
IBAN_STATO = S_NORMALE //600
|
||||||
|
IBAN_CHECK = S_NORMALE //600
|
||||||
|
BBAN = S_NORMALE //600
|
||||||
|
BBAN_CIN = S_NORMALE //600
|
||||||
|
BBAN_ABI = S_NORMALE //600
|
||||||
|
BBAN_CAB = S_NORMALE //600
|
||||||
|
BBAN_CONTO = S_NORMALE //600
|
||||||
CODABIP = S_NORMALE //700
|
CODABIP = S_NORMALE //700
|
||||||
CODCABP = S_NORMALE //700
|
CODCABP = S_NORMALE //700
|
||||||
DESBANPRE = S_NORMALE //700
|
DESBANPRE = S_NORMALE //700
|
||||||
|
@ -96,8 +96,6 @@ void TMotore_application::init_insert_mode( TMask& m )
|
|||||||
|
|
||||||
void TMotore_application::init_modify_mode( TMask& m )
|
void TMotore_application::init_modify_mode( TMask& m )
|
||||||
{
|
{
|
||||||
static TString80 __last_key;
|
|
||||||
|
|
||||||
enable_menu_item(M_FILE_PRINT);
|
enable_menu_item(M_FILE_PRINT);
|
||||||
m.enable(DLG_PRINT);
|
m.enable(DLG_PRINT);
|
||||||
m.enable(DLG_ELABORA);
|
m.enable(DLG_ELABORA);
|
||||||
@ -112,7 +110,7 @@ void TMotore_application::init_modify_mode( TMask& m )
|
|||||||
if (autodeleting() != 0x3)
|
if (autodeleting() != 0x3)
|
||||||
{
|
{
|
||||||
const bool transaction = is_transaction();
|
const bool transaction = is_transaction();
|
||||||
const bool no_mod = !doc().modificabile() && !transaction;
|
const bool no_mod = !transaction && !doc().modificabile();
|
||||||
const bool no_del = !doc().cancellabile();
|
const bool no_del = !doc().cancellabile();
|
||||||
if (no_del || no_mod)
|
if (no_del || no_mod)
|
||||||
{
|
{
|
||||||
@ -136,6 +134,9 @@ void TMotore_application::init_modify_mode( TMask& m )
|
|||||||
m.disable(DLG_SAVEREC);
|
m.disable(DLG_SAVEREC);
|
||||||
if (no_del)
|
if (no_del)
|
||||||
m.disable(DLG_DELREC);
|
m.disable(DLG_DELREC);
|
||||||
|
|
||||||
|
if (m.id2pos(F_IBAN_STATO) > 0)
|
||||||
|
m.efield(F_IBAN_STATO).validate(K_TAB); // Decodifica IBAN
|
||||||
}
|
}
|
||||||
__last_key = key;
|
__last_key = key;
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ class TMotore_application : public TRelation_application
|
|||||||
|
|
||||||
TString16 _codnum;
|
TString16 _codnum;
|
||||||
TString16 _tipodoc;
|
TString16 _tipodoc;
|
||||||
|
TString80 __last_key;
|
||||||
|
|
||||||
// Array di maschere documento
|
// Array di maschere documento
|
||||||
|
|
||||||
|
@ -111,8 +111,8 @@ public:
|
|||||||
// ENDMASK
|
// ENDMASK
|
||||||
void endmask( void ) { outline ( "ENDMASK" ); };
|
void endmask( void ) { outline ( "ENDMASK" ); };
|
||||||
|
|
||||||
// FLAG
|
// FLAGS
|
||||||
void flag( const char* s ) { _out << "FLAG \"" << s << "\"\n"; };
|
void flag( const char* s ) { _out << "FL \"" << s << "\"\n"; };
|
||||||
|
|
||||||
// HELP
|
// HELP
|
||||||
void help( const TString& s ) { _out << "HE \"" << s << "\"\n"; };
|
void help( const TString& s ) { _out << "HE \"" << s << "\"\n"; };
|
||||||
|
@ -512,13 +512,13 @@ Y=0
|
|||||||
FIELDNAME=CODABIA
|
FIELDNAME=CODABIA
|
||||||
MSKID=F_CODABIA
|
MSKID=F_CODABIA
|
||||||
TYPE=T_NUMERO
|
TYPE=T_NUMERO
|
||||||
PROMPT="Banca appoggio : cod. ABI "
|
PROMPT="Banca appoggio : Cod. ABI "
|
||||||
SIZE=5
|
SIZE=5
|
||||||
FLAG=Z
|
FLAG=Z
|
||||||
USE=%BAN SE CODTAB?="?????"
|
USE=%BAN SE CODTAB?="?????"
|
||||||
INPUT=CODTAB[1,5] F_CODABIA
|
INPUT=CODTAB[1,5] F_CODABIA
|
||||||
DISPLAY="Cod. Istit." CODTAB[1,5]~"Cod. Fil." CODTAB[6,10]~"Denominazione@50" S0
|
DISPLAY="Cod. Istit." CODTAB[1,5]~"Cod. Fil." CODTAB[6,10]~"Denominazione@50" S0
|
||||||
OUTPUT=F_CODABIA CODTAB[1,5]~F_DESBANAPP S0
|
OUTPUT=F_CODABIA CODTAB[1,5]~F_DESBANAPP S0~F_BBAN_ABI CODTAB[1,5]
|
||||||
|
|
||||||
[CODCABA]
|
[CODCABA]
|
||||||
GROUP=600
|
GROUP=600
|
||||||
@ -527,13 +527,13 @@ Y=0
|
|||||||
FIELDNAME=CODCABA
|
FIELDNAME=CODCABA
|
||||||
MSKID=F_CODCABA
|
MSKID=F_CODCABA
|
||||||
TYPE=T_NUMERO
|
TYPE=T_NUMERO
|
||||||
PROMPT="cod. CAB "
|
PROMPT="Cod. CAB "
|
||||||
SIZE=5
|
SIZE=5
|
||||||
FLAG=Z
|
FLAG=Z
|
||||||
USE=%BAN SE CODTAB?="??????????"
|
USE=%BAN SE CODTAB?="??????????"
|
||||||
INPUT=CODTAB[1,5] F_CODABIA~CODTAB[6,10] F_CODCABA
|
INPUT=CODTAB[1,5] F_CODABIA~CODTAB[6,10] F_CODCABA
|
||||||
DISPLAY=@F_CODABIA
|
DISPLAY=@F_CODABIA
|
||||||
OUTPUT=F_CODABIA CODTAB[1,5]~F_CODCABA CODTAB[6,10]~F_DESBANAPP S0
|
OUTPUT=F_CODABIA CODTAB[1,5]~F_CODCABA CODTAB[6,10]~F_DESBANAPP S0~F_BBAN_CAB CODTAB[6,10]
|
||||||
|
|
||||||
[DESBANAPP]
|
[DESBANAPP]
|
||||||
GROUP=600
|
GROUP=600
|
||||||
@ -548,6 +548,91 @@ INPUT=S0 F_DESBANAPP
|
|||||||
DISPLAY=@F_CODABIA
|
DISPLAY=@F_CODABIA
|
||||||
OUTPUT=@F_CODABIA
|
OUTPUT=@F_CODABIA
|
||||||
|
|
||||||
|
[IBAN]
|
||||||
|
GROUP=600
|
||||||
|
X = 2
|
||||||
|
Y = 2
|
||||||
|
MSKID=F_IBAN
|
||||||
|
TYPE=T_STRINGA
|
||||||
|
PROMPT=""
|
||||||
|
SIZE=34
|
||||||
|
FLAG=H
|
||||||
|
FIELDNAME=IBAN
|
||||||
|
|
||||||
|
[IBAN_STATO]
|
||||||
|
GROUP=600
|
||||||
|
X = 2
|
||||||
|
Y = 2
|
||||||
|
MSKID=F_IBAN_STATO
|
||||||
|
TYPE=T_STRINGA
|
||||||
|
PROMPT="Codice conto IBAN "
|
||||||
|
SIZE=2
|
||||||
|
FLAG=U
|
||||||
|
SPECIAL=VA 24 8 F_IBAN F_IBAN_STATO F_IBAN_CHECK F_BBAN F_BBAN_CIN F_BBAN_ABI F_BBAN_CAB F_BBAN_CONTO
|
||||||
|
|
||||||
|
[IBAN_CHECK]
|
||||||
|
GROUP=600
|
||||||
|
X = 28
|
||||||
|
Y = 2
|
||||||
|
MSKID=F_IBAN_CHECK
|
||||||
|
TYPE=T_NUMERO
|
||||||
|
PROMPT=""
|
||||||
|
SIZE=2
|
||||||
|
FLAG=UZ
|
||||||
|
SPECIAL=VA 24 8 F_IBAN F_IBAN_STATO F_IBAN_CHECK F_BBAN F_BBAN_CIN F_BBAN_ABI F_BBAN_CAB F_BBAN_CONTO
|
||||||
|
|
||||||
|
[BBAN]
|
||||||
|
GROUP=600
|
||||||
|
X = 39
|
||||||
|
Y = 2
|
||||||
|
MSKID=F_BBAN
|
||||||
|
TYPE=T_STRINGA
|
||||||
|
PROMPT="BBAN "
|
||||||
|
SIZE=30
|
||||||
|
FLAG=HUZ
|
||||||
|
|
||||||
|
[BBAN_CIN]
|
||||||
|
GROUP=600
|
||||||
|
X = 40
|
||||||
|
Y = 2
|
||||||
|
MSKID=F_BBAN_CIN
|
||||||
|
TYPE=T_STRINGA
|
||||||
|
PROMPT="BBAN "
|
||||||
|
SIZE=1
|
||||||
|
FLAG=U
|
||||||
|
SPECIAL=VA 25 5 F_BBAN F_BBAN_CIN F_BBAN_ABI F_BBAN_CAB F_BBAN_CONTO
|
||||||
|
|
||||||
|
[BBAN_ABI]
|
||||||
|
GROUP=600
|
||||||
|
X = 48
|
||||||
|
Y = 2
|
||||||
|
MSKID=F_BBAN_ABI
|
||||||
|
TYPE=T_NUMERO
|
||||||
|
PROMPT=""
|
||||||
|
SIZE=5
|
||||||
|
FLAG=DZ
|
||||||
|
|
||||||
|
[BBAN_CAB]
|
||||||
|
GROUP=600
|
||||||
|
X = 55
|
||||||
|
Y = 2
|
||||||
|
MSKID=F_BBAN_CAB
|
||||||
|
TYPE=T_NUMERO
|
||||||
|
PROMPT=""
|
||||||
|
SIZE=5
|
||||||
|
FLAG=DZ
|
||||||
|
|
||||||
|
[BBAN_CONTO]
|
||||||
|
GROUP=600
|
||||||
|
X = 62
|
||||||
|
Y = 2
|
||||||
|
MSKID=F_BBAN_CONTO
|
||||||
|
TYPE=T_STRINGA
|
||||||
|
PROMPT=""
|
||||||
|
SIZE=12
|
||||||
|
FLAG=Z
|
||||||
|
SPECIAL=VA 25 5 F_BBAN F_BBAN_CIN F_BBAN_ABI F_BBAN_CAB F_BBAN_CONTO
|
||||||
|
|
||||||
[CODABIP]
|
[CODABIP]
|
||||||
GROUP=700
|
GROUP=700
|
||||||
X=2
|
X=2
|
||||||
@ -555,7 +640,7 @@ Y=0
|
|||||||
FIELDNAME=CODABIP
|
FIELDNAME=CODABIP
|
||||||
MSKID=F_CODABIP
|
MSKID=F_CODABIP
|
||||||
TYPE=T_NUMERO
|
TYPE=T_NUMERO
|
||||||
PROMPT="Banca presentazione : cod. ABI "
|
PROMPT="Banca presentazione : Cod. ABI "
|
||||||
SIZE=5
|
SIZE=5
|
||||||
FLAG=Z
|
FLAG=Z
|
||||||
USE=@F_CODABIA
|
USE=@F_CODABIA
|
||||||
@ -570,7 +655,7 @@ Y=0
|
|||||||
FIELDNAME=CODCABP
|
FIELDNAME=CODCABP
|
||||||
MSKID=F_CODCABP
|
MSKID=F_CODCABP
|
||||||
TYPE=T_NUMERO
|
TYPE=T_NUMERO
|
||||||
PROMPT="cod. CAB "
|
PROMPT="Cod. CAB "
|
||||||
SIZE=5
|
SIZE=5
|
||||||
FLAG=Z
|
FLAG=Z
|
||||||
USE=@F_CODCABA
|
USE=@F_CODCABA
|
||||||
|
@ -170,13 +170,11 @@ TDocumento_form::TDocumento_form(TRectype& doc, TRelation& rel, bool definitiva,
|
|||||||
{
|
{
|
||||||
_form = this;
|
_form = this;
|
||||||
|
|
||||||
//const TString codnum(doc.get(DOC_CODNUM));
|
const TString4 tipodoc(doc.get(DOC_TIPODOC));
|
||||||
//const TString numdoc(doc.get(DOC_NDOC));
|
|
||||||
const TString8 tipodoc(doc.get(DOC_TIPODOC));
|
|
||||||
TFilename nomeform;
|
TFilename nomeform;
|
||||||
|
|
||||||
|
|
||||||
const TRectype rec = cache().get("%TIP", tipodoc);
|
const TRectype& rec = cache().get("%TIP", tipodoc);
|
||||||
if (!rec.empty())
|
if (!rec.empty())
|
||||||
{ // se non ci sono errori procede con la stampa
|
{ // se non ci sono errori procede con la stampa
|
||||||
nomeform = aggiuntivo ? rec.get("S5").mid(8) : rec.get("S5").left(8); // legge il nome del form di stampa
|
nomeform = aggiuntivo ? rec.get("S5").mid(8) : rec.get("S5").left(8); // legge il nome del form di stampa
|
||||||
|
@ -204,6 +204,7 @@ BEGIN
|
|||||||
DISPLAY "Tipo@50" 104@->S0
|
DISPLAY "Tipo@50" 104@->S0
|
||||||
DISPLAY "Ragione sociale@50" LF_CLIFO->RAGSOC
|
DISPLAY "Ragione sociale@50" LF_CLIFO->RAGSOC
|
||||||
OUTPUT F_NUMERO_DOCUMENTO_DA NDOC
|
OUTPUT F_NUMERO_DOCUMENTO_DA NDOC
|
||||||
|
ADD RUN ve0 -0
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_NUMERO_DOCUMENTO_A 7
|
NUMBER F_NUMERO_DOCUMENTO_A 7
|
||||||
@ -218,6 +219,7 @@ BEGIN
|
|||||||
OUTPUT F_NUMERO_DOCUMENTO_A NDOC
|
OUTPUT F_NUMERO_DOCUMENTO_A NDOC
|
||||||
NUM_EXPR (#THIS_FIELD==0)||(#THIS_FIELD>=#F_NUMERO_DOCUMENTO_DA)
|
NUM_EXPR (#THIS_FIELD==0)||(#THIS_FIELD>=#F_NUMERO_DOCUMENTO_DA)
|
||||||
WARNING "Specificare un numero documento superiore a quello di partenza"
|
WARNING "Specificare un numero documento superiore a quello di partenza"
|
||||||
|
ADD RUN ve0 -0
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
|
@ -22,12 +22,12 @@ TCodice_numerazione::~TCodice_numerazione()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const TString & TCodice_numerazione::tipo_doc(int i) const
|
const TString& TCodice_numerazione::tipo_doc(int i) const
|
||||||
{
|
{
|
||||||
CHECK(i < MAX_TIPI_DOC, "Impossibbile tipo documento");
|
CHECK(i < MAX_TIPI_DOC, "Impossibbile tipo documento");
|
||||||
const char * field = i < 17 ? "S2" : "S3";
|
const char * field = i < 17 ? "S2" : "S3";
|
||||||
|
|
||||||
if (i > 16)
|
if (i > 16)
|
||||||
i -= 17;
|
i -= 17;
|
||||||
return ((TString& ) get(field).mid(i << 2, 4)).trim();
|
return ((TString& ) get(field).mid(i << 2, 4)).trim();
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ TDate TLista_documenti::num2date(char provv, int anno, const char* codnum, long
|
|||||||
if (doc.read(_isgteq) != NOERR) // In caso d'errore ...
|
if (doc.read(_isgteq) != NOERR) // In caso d'errore ...
|
||||||
doc.last(); // prendi l'ultimo
|
doc.last(); // prendi l'ultimo
|
||||||
|
|
||||||
return doc.get("DATADOC");
|
return doc.get(DOC_DATADOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TLista_documenti::read(char provv, char tipocf, long clifo, int anno,
|
int TLista_documenti::read(char provv, char tipocf, long clifo, int anno,
|
||||||
@ -37,59 +37,59 @@ int TLista_documenti::read(char provv, char tipocf, long clifo, int anno,
|
|||||||
TRectype start(LF_DOC), stop(LF_DOC);
|
TRectype start(LF_DOC), stop(LF_DOC);
|
||||||
int anno_start, anno_stop;
|
int anno_start, anno_stop;
|
||||||
|
|
||||||
start.put("TIPOCF", tipocf);
|
start.put(DOC_TIPOCF, tipocf);
|
||||||
stop.put("TIPOCF", tipocf);
|
stop.put(DOC_TIPOCF, tipocf);
|
||||||
|
|
||||||
start.put("CODCF", clifo);
|
start.put(DOC_CODCF, clifo);
|
||||||
stop.put("CODCF", clifo);
|
stop.put(DOC_CODCF, clifo);
|
||||||
|
|
||||||
start.put("PROVV", provv);
|
start.put(DOC_PROVV, provv);
|
||||||
stop.put("PROVV", provv);
|
stop.put(DOC_PROVV, provv);
|
||||||
|
|
||||||
anno_start = anno_stop = anno;
|
anno_start = anno_stop = anno;
|
||||||
|
|
||||||
if (dd.ok())
|
if (dd.ok())
|
||||||
{
|
{
|
||||||
anno_start = dd.year();
|
anno_start = dd.year();
|
||||||
start.put("ANNO", anno_start);
|
start.put(DOC_ANNO, anno_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ad.ok())
|
if (ad.ok())
|
||||||
{
|
{
|
||||||
anno_stop = ad.year();
|
anno_stop = ad.year();
|
||||||
stop.put("ANNO", anno_stop);
|
stop.put(DOC_ANNO, anno_stop);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dn > 0)
|
if (dn > 0)
|
||||||
{
|
{
|
||||||
const TDate d(num2date(provv, anno_start, codnum, dn));
|
const TDate d(num2date(provv, anno_start, codnum, dn));
|
||||||
|
|
||||||
start.put("DATADOC", d);
|
start.put(DOC_DATADOC, d);
|
||||||
start.put("ANNO", d.year());
|
start.put(DOC_ANNO, d.year());
|
||||||
start.put("NDOC", dn);
|
start.put(DOC_NDOC, dn);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (dd.ok() && dd > botime)
|
if (dd.ok() && dd > botime)
|
||||||
start.put("DATADOC", dd);
|
start.put(DOC_DATADOC, dd);
|
||||||
|
|
||||||
if (anno_start <= anno_stop)
|
if (anno_start <= anno_stop)
|
||||||
start.put("ANNO", anno_start);
|
start.put(DOC_ANNO, anno_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (an > 0)
|
if (an > 0)
|
||||||
{
|
{
|
||||||
const TDate d(num2date(provv, anno_stop, codnum, an));
|
const TDate d(num2date(provv, anno_stop, codnum, an));
|
||||||
stop.put("DATADOC", d);
|
stop.put(DOC_DATADOC, d);
|
||||||
stop.put("ANNO", d.year());
|
stop.put(DOC_ANNO, d.year());
|
||||||
stop.put("NDOC", an);
|
stop.put(DOC_NDOC, an);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ad.ok() && ad < eotime)
|
if (ad.ok() && ad < eotime)
|
||||||
stop.put("DATADOC", ad);
|
stop.put(DOC_DATADOC, ad);
|
||||||
|
|
||||||
stop.put("ANNO", anno_stop);
|
stop.put(DOC_ANNO, anno_stop);
|
||||||
}
|
}
|
||||||
|
|
||||||
TString filter(16);
|
TString filter(16);
|
||||||
@ -97,15 +97,15 @@ int TLista_documenti::read(char provv, char tipocf, long clifo, int anno,
|
|||||||
{
|
{
|
||||||
bool numfilter = FALSE;
|
bool numfilter = FALSE;
|
||||||
|
|
||||||
if (start.get("DATADOC").empty())
|
if (start.get(DOC_DATADOC).empty())
|
||||||
numfilter = TRUE;
|
numfilter = TRUE;
|
||||||
else
|
else
|
||||||
start.put("CODNUM", codnum);
|
start.put(DOC_CODNUM, codnum);
|
||||||
|
|
||||||
if (stop.get("DATADOC").empty())
|
if (stop.get(DOC_DATADOC).empty())
|
||||||
numfilter = TRUE;
|
numfilter = TRUE;
|
||||||
else
|
else
|
||||||
stop.put("CODNUM", codnum);
|
stop.put(DOC_CODNUM, codnum);
|
||||||
|
|
||||||
if (numfilter)
|
if (numfilter)
|
||||||
filter << "CODNUM=\"" << codnum << '"';
|
filter << "CODNUM=\"" << codnum << '"';
|
||||||
@ -117,8 +117,8 @@ int TLista_documenti::read(char provv, char tipocf, long clifo, int anno,
|
|||||||
_documenti.destroy();
|
_documenti.destroy();
|
||||||
for (cur = 0; cur.ok(); ++cur)
|
for (cur = 0; cur.ok(); ++cur)
|
||||||
{
|
{
|
||||||
const TString16 tipodoc = head.get("TIPODOC");
|
const TString16 tipodoc = head.get(DOC_TIPODOC);
|
||||||
const TString16 statodoc = head.get("STATO");
|
const TString16 statodoc = head.get(DOC_STATO);
|
||||||
bool match = FALSE;
|
bool match = FALSE;
|
||||||
|
|
||||||
for (int i = tipidoc.items()-1; i>=0; i--)
|
for (int i = tipidoc.items()-1; i>=0; i--)
|
||||||
|
@ -336,27 +336,29 @@ long TGenerazione_effetti::group_bills(TAssoc_array& group_array)
|
|||||||
{
|
{
|
||||||
// Se non esiste effetto n-esimo (corrisponde al numero di rata corrente+offset)
|
// Se non esiste effetto n-esimo (corrisponde al numero di rata corrente+offset)
|
||||||
// lo genera con la relativa riga. Se esiste vi somma gli importi ed accoda la riga
|
// lo genera con la relativa riga. Se esiste vi somma gli importi ed accoda la riga
|
||||||
const bool is_new = n+offset > _effetti_array.items();
|
const int index = n+offset-1;
|
||||||
if (is_new) // Nuovo effetto: crea effetto con i dati di questo documento (e' il primo che incontro nella scansione)
|
// Nuovo effetto: crea effetto con i dati di questo documento (e' il primo che incontro nella scansione)
|
||||||
|
if (index >= _effetti_array.items())
|
||||||
{
|
{
|
||||||
TEffetto effetto;
|
TEffetto* effetto = new TEffetto;
|
||||||
// Setta i dati della testata;
|
// Setta i dati della testata;
|
||||||
effetto.put(EFF_DATASCAD, pag.data_rata(n-1));
|
effetto->put(EFF_DATASCAD, pag.data_rata(n-1));
|
||||||
effetto.put(EFF_TIPOPAG,pag.tipo_rata(n-1));
|
effetto->put(EFF_TIPOPAG,pag.tipo_rata(n-1));
|
||||||
effetto.put(EFF_ULTCLASS,pag.ulc_rata(n-1));
|
effetto->put(EFF_ULTCLASS,pag.ulc_rata(n-1));
|
||||||
effetto.put(EFF_TIPOCF, doc.get_char(DOC_TIPOCF));
|
effetto->put(EFF_TIPOCF, doc.get_char(DOC_TIPOCF));
|
||||||
effetto.put(EFF_CODCF, doc.get_long(DOC_CODCF));
|
effetto->put(EFF_CODCF, doc.get_long(DOC_CODCF));
|
||||||
effetto.put(EFF_CODVAL, doc.get(DOC_CODVAL));
|
effetto->put(EFF_CODVAL, doc.get(DOC_CODVAL));
|
||||||
effetto.put(EFF_CAMBIO, change);
|
effetto->put(EFF_CAMBIO, change);
|
||||||
effetto.put(EFF_DATACAMBIO,doc.get_date(DOC_DATACAMBIO));
|
effetto->put(EFF_DATACAMBIO,doc.get_date(DOC_DATACAMBIO));
|
||||||
effetto.put(EFF_CONTROEURO,doc.get_date(DOC_CONTROEURO));
|
effetto->put(EFF_CONTROEURO,doc.get_date(DOC_CONTROEURO));
|
||||||
effetto.put(EFF_CODABI,doc.get(DOC_CODABIA));
|
effetto->put(EFF_CODABI,doc.get(DOC_CODABIA));
|
||||||
effetto.put(EFF_CODCAB,doc.get(DOC_CODCABA));
|
effetto->put(EFF_CODCAB,doc.get(DOC_CODCABA));
|
||||||
effetto.put(EFF_EFFCOMP,TRUE);
|
effetto->put(EFF_IBAN,doc.get(DOC_IBAN));
|
||||||
|
effetto->put(EFF_EFFCOMP,TRUE);
|
||||||
_effetti_array.add(effetto);
|
_effetti_array.add(effetto);
|
||||||
}
|
}
|
||||||
// aggiorna totale effetto (testata)
|
// aggiorna totale effetto (testata)
|
||||||
TEffetto& effetto=(TEffetto&)_effetti_array[n+offset-1];
|
TEffetto& effetto=(TEffetto&)_effetti_array[index];
|
||||||
const int rows = effetto.rows_r();
|
const int rows = effetto.rows_r();
|
||||||
|
|
||||||
importo = effetto.get_real(EFF_IMPORTO);
|
importo = effetto.get_real(EFF_IMPORTO);
|
||||||
@ -582,6 +584,7 @@ void TGenerazione_effetti::generate_bill(TDocumento& doc) // bill in inglese sig
|
|||||||
const bool contro_euro = doc.get_bool(DOC_CONTROEURO);
|
const bool contro_euro = doc.get_bool(DOC_CONTROEURO);
|
||||||
const long codabi = doc.get_long(DOC_CODABIA);
|
const long codabi = doc.get_long(DOC_CODABIA);
|
||||||
const long codcab = doc.get_long(DOC_CODCABA);
|
const long codcab = doc.get_long(DOC_CODCABA);
|
||||||
|
const TString80 iban = doc.get(DOC_IBAN);
|
||||||
const TString16 provv(doc.get(DOC_PROVV));
|
const TString16 provv(doc.get(DOC_PROVV));
|
||||||
const int anno = doc.get_int(DOC_ANNO);
|
const int anno = doc.get_int(DOC_ANNO);
|
||||||
const TString16 codnum(doc.get(DOC_CODNUM));
|
const TString16 codnum(doc.get(DOC_CODNUM));
|
||||||
@ -613,6 +616,7 @@ void TGenerazione_effetti::generate_bill(TDocumento& doc) // bill in inglese sig
|
|||||||
}
|
}
|
||||||
effetto.put(EFF_CODABI,codabi);
|
effetto.put(EFF_CODABI,codabi);
|
||||||
effetto.put(EFF_CODCAB,codcab);
|
effetto.put(EFF_CODCAB,codcab);
|
||||||
|
effetto.put(EFF_IBAN,iban);
|
||||||
effetto.put(EFF_EFFCOMP,TRUE);
|
effetto.put(EFF_EFFCOMP,TRUE);
|
||||||
if (i == numrate - 1) effetto.put(EFF_ULTRATA,TRUE);
|
if (i == numrate - 1) effetto.put(EFF_ULTRATA,TRUE);
|
||||||
// Put sulla riga dell'effetto
|
// Put sulla riga dell'effetto
|
||||||
|
@ -438,6 +438,22 @@ void TDocumento_mask::cli2mask()
|
|||||||
set(F_CODPAG, c.get(CLI_CODPAG));
|
set(F_CODPAG, c.get(CLI_CODPAG));
|
||||||
set(F_CODABIA, c.get(CLI_CODABI));
|
set(F_CODABIA, c.get(CLI_CODABI));
|
||||||
set(F_CODCABA, c.get(CLI_CODCAB));
|
set(F_CODCABA, c.get(CLI_CODCAB));
|
||||||
|
if (id2pos(F_IBAN_STATO) > 0)
|
||||||
|
{
|
||||||
|
const TString& iban = c.get(CLI_IBAN);
|
||||||
|
set(F_IBAN, iban);
|
||||||
|
efield(F_IBAN_STATO).validate(K_TAB);
|
||||||
|
if (iban.not_empty())
|
||||||
|
{
|
||||||
|
set(F_IBAN_STATO, iban.left(2));
|
||||||
|
set(F_IBAN_CHECK, iban.mid(2,2));
|
||||||
|
set(F_BBAN , iban.mid(4));
|
||||||
|
set(F_BBAN_CIN , iban.mid(4,1));
|
||||||
|
set(F_BBAN_ABI , iban.mid(5,5));
|
||||||
|
set(F_BBAN_CAB , iban.mid(10,5));
|
||||||
|
set(F_BBAN_CONTO, iban.mid(15,12));
|
||||||
|
}
|
||||||
|
}
|
||||||
// Setta i campi che appartengono al file LF_CFVEN
|
// Setta i campi che appartengono al file LF_CFVEN
|
||||||
set(F_CODABIP, ven_rec.get(CFV_CODABIPR));
|
set(F_CODABIP, ven_rec.get(CFV_CODABIPR));
|
||||||
set(F_CODCABP, ven_rec.get(CFV_CODCABPR));
|
set(F_CODCABP, ven_rec.get(CFV_CODCABPR));
|
||||||
@ -1064,26 +1080,25 @@ bool TDocumento_mask::clifo_handler( TMask_field& f, KEY key )
|
|||||||
{
|
{
|
||||||
TDocumento_mask & m = (TDocumento_mask &) f.mask();
|
TDocumento_mask & m = (TDocumento_mask &) f.mask();
|
||||||
TDocumento & d = m.doc();
|
TDocumento & d = m.doc();
|
||||||
const TString & val = f.get();
|
|
||||||
|
|
||||||
TTipo_documento& tdoc = (TTipo_documento&) d.tipo();
|
TTipo_documento& tdoc = (TTipo_documento&) d.tipo();
|
||||||
d.put("TIPOCF", tdoc.tipocf());
|
d.put(DOC_TIPOCF, tdoc.tipocf());
|
||||||
d.put("CODCF", atol(val));
|
d.put(DOC_CODCF, f.get());
|
||||||
|
|
||||||
TCli_for & cli_for = d.clifor();
|
TCli_for & cli_for = d.clifor();
|
||||||
cli_for.put(CLI_CODCF, ""); // force reload
|
cli_for.put(CLI_CODCF, ""); // force reload
|
||||||
|
|
||||||
if ( cli_for.get_bool("SOSPESO") )
|
if ( cli_for.get_bool(CLI_SOSPESO) )
|
||||||
return f.error_box( "Il codice '%ld' e' sospeso e non puo' essere utilizzato", atol(val) );
|
return f.error_box( "Il codice '%ld' e' sospeso e non puo' essere utilizzato", atol(f.get()));
|
||||||
m.cli2mask();
|
m.cli2mask();
|
||||||
if (cli_for.occasionale())
|
if (cli_for.occasionale())
|
||||||
{
|
{
|
||||||
TOccasionale & occas = d.occas();
|
TOccasionale& occas = d.occas();
|
||||||
if(m.id2pos(F_OCCASEDIT) > 0 && f.to_check(key) && *(occas.codice()) == '\0')
|
if(m.id2pos(F_OCCASEDIT) > 0 && f.to_check(key) && *(occas.codice()) == '\0')
|
||||||
m.send_key( K_SPACE, F_OCCASEDIT ); // Lancia maschera occasionali
|
m.send_key( K_SPACE, F_OCCASEDIT ); // Lancia maschera occasionali
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
d.zero("OCFPI");
|
d.zero(DOC_OCFPI);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -84,6 +84,14 @@
|
|||||||
#define F_DESCRCMS 189
|
#define F_DESCRCMS 189
|
||||||
#define F_FASCMS 190
|
#define F_FASCMS 190
|
||||||
#define F_DESCRFAS 191
|
#define F_DESCRFAS 191
|
||||||
|
#define F_IBAN 192
|
||||||
|
#define F_IBAN_STATO 193
|
||||||
|
#define F_IBAN_CHECK 194
|
||||||
|
#define F_BBAN 195
|
||||||
|
#define F_BBAN_CIN 196
|
||||||
|
#define F_BBAN_ABI 197
|
||||||
|
#define F_BBAN_CAB 198
|
||||||
|
#define F_BBAN_CONTO 199
|
||||||
|
|
||||||
#define F_CODVAL1 200
|
#define F_CODVAL1 200
|
||||||
#define F_NOMEVAL1 201
|
#define F_NOMEVAL1 201
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define __VEUML1_H
|
#define __VEUML1_H
|
||||||
|
|
||||||
#ifndef __VEUML_H
|
#ifndef __VEUML_H
|
||||||
#include "VEUML.H"
|
#include "veuml.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// gruppo dei vettori
|
// gruppo dei vettori
|
||||||
|
Loading…
x
Reference in New Issue
Block a user