Lettere di esenzione
Livelli digiacenza (da terminare) git-svn-id: svn://10.65.10.50/trunk@4498 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
21f5b5d47d
commit
3b7767ab90
@ -7,3 +7,4 @@
|
|||||||
#define F_NCOPIE 107
|
#define F_NCOPIE 107
|
||||||
#define F_RIFERIMENTO 108
|
#define F_RIFERIMENTO 108
|
||||||
#define F_SPESEAUT 109
|
#define F_SPESEAUT 109
|
||||||
|
#define F_TIPO 110
|
||||||
|
@ -103,7 +103,17 @@ BEGIN
|
|||||||
PROMPT 2 15 "Addebito automatico spese cliente"
|
PROMPT 2 15 "Addebito automatico spese cliente"
|
||||||
FIELD B0
|
FIELD B0
|
||||||
END
|
END
|
||||||
ENDPAGE
|
|
||||||
|
|
||||||
|
LIST F_TIPO 10
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 17 "Tipo del documento "
|
||||||
|
FIELD I1
|
||||||
|
ITEM "0|Altro"
|
||||||
|
ITEM "1|Fattura"
|
||||||
|
ITEM "2|Bolla"
|
||||||
|
ITEM "3|Ordine"
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
|
||||||
|
@ -12,8 +12,6 @@ FRMFILE=BOLLAC.FRM
|
|||||||
// modifica
|
// modifica
|
||||||
CAMPICALC=TOTMER|TOTPRE|TOTSPE|SPESINC|BOLLI|SCONTOD|TOTNS|IMPOSTE|TOTDOC|PROVVD
|
CAMPICALC=TOTMER|TOTPRE|TOTSPE|SPESINC|BOLLI|SCONTOD|TOTNS|IMPOSTE|TOTDOC|PROVVD
|
||||||
CALCOLI=BASESCONTO
|
CALCOLI=BASESCONTO
|
||||||
IMPONIBILE=TOTNS
|
|
||||||
IMPOSTA=IMPOSTE
|
|
||||||
TOTALE=TOTDOC
|
TOTALE=TOTDOC
|
||||||
BASESCONTO=BASESCONTO
|
BASESCONTO=BASESCONTO
|
||||||
SPESE=TOTSPE
|
SPESE=TOTSPE
|
||||||
@ -196,17 +194,21 @@ NDEFAULTS=1
|
|||||||
1=F_CAUSTRASP|VEN
|
1=F_CAUSTRASP|VEN
|
||||||
|
|
||||||
[SHEET]
|
[SHEET]
|
||||||
NCOLS=10
|
NCOLS=14
|
||||||
1=FR_CODMAG
|
1=FR_CODMAG
|
||||||
2=FR_CODDEP
|
2=FR_CODDEP
|
||||||
3=FR_CODART
|
3=FR_CODART
|
||||||
4=FR_DESCR
|
4=FR_LIV1
|
||||||
5=FR_UMQTA
|
5=FR_LIV2
|
||||||
6=FR_QTA
|
6=FR_LIV3
|
||||||
7=FR_PREZZO
|
7=FR_LIV4
|
||||||
8=FR_SCONTO
|
8=FR_DESCR
|
||||||
9=FR_PERCPROV
|
9=FR_UMQTA
|
||||||
10=FR_CODIVA
|
10=FR_QTA
|
||||||
|
11=FR_PREZZO
|
||||||
|
12=FR_SCONTO
|
||||||
|
13=FR_PERCPROV
|
||||||
|
14=FR_CODIVA
|
||||||
|
|
||||||
[RIGHE]
|
[RIGHE]
|
||||||
NTIPIRIGA=9
|
NTIPIRIGA=9
|
||||||
@ -262,7 +264,7 @@ NHANDLER=0
|
|||||||
4000 = S_NORMALE
|
4000 = S_NORMALE
|
||||||
|
|
||||||
[ORDINEGRUPPI]
|
[ORDINEGRUPPI]
|
||||||
NGROUPS=28
|
NGROUPS=29
|
||||||
1=100
|
1=100
|
||||||
2=200
|
2=200
|
||||||
3=300
|
3=300
|
||||||
@ -290,5 +292,6 @@ NGROUPS=28
|
|||||||
25=2700
|
25=2700
|
||||||
26=2710
|
26=2710
|
||||||
27=1700
|
27=1700
|
||||||
28=2400
|
28=2500
|
||||||
|
29=2400
|
||||||
|
|
||||||
|
@ -12,8 +12,6 @@ FRMFILE=BOLLAF.FRM
|
|||||||
// modifica
|
// modifica
|
||||||
CAMPICALC=
|
CAMPICALC=
|
||||||
CALCOLI=
|
CALCOLI=
|
||||||
IMPONIBILE=
|
|
||||||
IMPOSTA=
|
|
||||||
TOTALE=
|
TOTALE=
|
||||||
BASESCONTO=
|
BASESCONTO=
|
||||||
SPESE=
|
SPESE=
|
||||||
@ -146,14 +144,18 @@ NDEFAULTS=1
|
|||||||
1=F_CAUSTRASP|RES
|
1=F_CAUSTRASP|RES
|
||||||
|
|
||||||
[SHEET]
|
[SHEET]
|
||||||
NCOLS=6
|
NCOLS=11
|
||||||
1=FR_CODMAG
|
1=FR_CODMAG
|
||||||
2=FR_CODDEP
|
2=FR_CODDEP
|
||||||
3=FR_CODART
|
3=FR_CODART
|
||||||
4=FR_DESCR
|
4=FR_LIV1
|
||||||
5=FR_UMQTA
|
5=FR_LIV2
|
||||||
6=FR_QTA
|
6=FR_LIV3
|
||||||
6=FR_CODIVA
|
7=FR_LIV4
|
||||||
|
8=FR_DESCR
|
||||||
|
9=FR_UMQTA
|
||||||
|
10=FR_QTA
|
||||||
|
11=FR_CODIVA
|
||||||
|
|
||||||
[RIGHE]
|
[RIGHE]
|
||||||
NTIPIRIGA=1
|
NTIPIRIGA=1
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
34
|
34
|
||||||
0
|
0
|
||||||
$rdoc|0|0|263|31|Righe documenti di vendita|NDOC*3||
|
$rdoc|0|0|278|31|Righe documenti di vendita|NDOC*3||
|
||||||
|
51
ve/f34.trr
51
ve/f34.trr
@ -1,35 +1,36 @@
|
|||||||
34
|
34
|
||||||
31
|
32
|
||||||
CODNUM|1|4|0|
|
CODNUM|1|4|0|
|
||||||
ANNO|2|4|0|
|
ANNO|2|4|0|Anno
|
||||||
PROVV|1|1|0|Tipo numerazione <P>rovvisoria <D>efinitiva
|
PROVV|1|1|0|Tipo numerazione <P>rovvisoria <D>efinitiva
|
||||||
NDOC|3|7|0|
|
NDOC|3|7|0|N. documento
|
||||||
NRIGA|2|3|0|
|
NRIGA|2|3|0|N. riga
|
||||||
STATORIGA|1|1|0|
|
STATORIGA|1|1|0|Non usato
|
||||||
TIPORIGA|1|3|0|Tipo riga
|
TIPORIGA|1|3|0|Tipo riga
|
||||||
GENERATA|8|1|0|Riga generata
|
GENERATA|8|1|0|Riga generata
|
||||||
CODMAG|1|5|0|
|
CODMAG|1|5|0|Codice magazzino e deposito
|
||||||
CODART|1|20|0|
|
CODART|1|20|0|Codice articolo, codice spesa o codice prestazione
|
||||||
DESCR|1|50|0|
|
LIVELLO|1|15|0|Codice di giacenza
|
||||||
|
DESCR|1|50|0|Descrizione
|
||||||
DESCLUNGA|8|1|0|Descrizione estesa caricata
|
DESCLUNGA|8|1|0|Descrizione estesa caricata
|
||||||
DESCEST|11|10|0|Descrizione estesa
|
DESCEST|11|10|0|Descrizione estesa
|
||||||
PREZZO|4|18|2|
|
PREZZO|4|18|2|Prezzo o valore
|
||||||
UMQTA|1|2|0|
|
UMQTA|1|2|0|Unita di misura
|
||||||
QTA|4|11|3|
|
QTA|4|11|3|Quantita'
|
||||||
QTAEVASA|4|11|3|
|
QTAEVASA|4|11|3|Quantita' evasa
|
||||||
RIGAEVASA|8|1|0|
|
RIGAEVASA|8|1|0|Riga evasa
|
||||||
TARA|4|15|2|
|
TARA|4|15|2|Tara
|
||||||
PNETTO|4|15|2|
|
PNETTO|4|15|2|Peso netto
|
||||||
NCOLLI|3|7|0|
|
NCOLLI|3|7|0|N.colli
|
||||||
DAEVADERE|8|1|0|
|
DAEVADERE|8|1|0|????
|
||||||
SCONTO|1|25|0|
|
SCONTO|1|25|0|Sconto
|
||||||
PERCPROV|4|5|2|
|
PERCPROV|4|5|2|Percentuale di provvigione
|
||||||
IMPFISSO|4|18|2|
|
IMPFISSO|4|18|2|Importo fisso di provvigione
|
||||||
IMPFISUN|8|1|0|
|
IMPFISUN|8|1|0|Flag importo fisso unitario
|
||||||
CODIVA|1|4|0|
|
CODIVA|1|4|0|Codice IVA
|
||||||
ADDIVA|8|1|0|
|
ADDIVA|8|1|0|Addebito IVA
|
||||||
ASPBENI|1|2|0|
|
ASPBENI|1|2|0|Aspetto dei beni
|
||||||
G1|11|10|0|
|
G1|11|10|0|????
|
||||||
PSPESA|4|5|2|Percentuale di spesa
|
PSPESA|4|5|2|Percentuale di spesa
|
||||||
1
|
1
|
||||||
CODNUM+ANNO+PROVV+NDOC+NRIGA|
|
CODNUM+ANNO+PROVV+NDOC+NRIGA|
|
||||||
|
@ -12,8 +12,6 @@ FRMFILE=FATTURAA.FRM
|
|||||||
// modifica
|
// modifica
|
||||||
CAMPICALC=TOTMER|TOTPRE|TOTSPE|SPESINC|BOLLI|SCONTOD|TOTNS|IMPOSTE|TOTDOC|PROVVD
|
CAMPICALC=TOTMER|TOTPRE|TOTSPE|SPESINC|BOLLI|SCONTOD|TOTNS|IMPOSTE|TOTDOC|PROVVD
|
||||||
CALCOLI=BASESCONTO
|
CALCOLI=BASESCONTO
|
||||||
IMPONIBILE=TOTNS
|
|
||||||
IMPOSTA=IMPOSTE
|
|
||||||
TOTALE=TOTDOC
|
TOTALE=TOTDOC
|
||||||
BASESCONTO=BASESCONTO
|
BASESCONTO=BASESCONTO
|
||||||
SPESE=TOTSPE
|
SPESE=TOTSPE
|
||||||
@ -192,17 +190,21 @@ NDEFAULTS=1
|
|||||||
1=F_CAUSTRASP|VEN
|
1=F_CAUSTRASP|VEN
|
||||||
|
|
||||||
[SHEET]
|
[SHEET]
|
||||||
NCOLS=10
|
NCOLS=14
|
||||||
1=FR_CODMAG
|
1=FR_CODMAG
|
||||||
2=FR_CODDEP
|
2=FR_CODDEP
|
||||||
3=FR_CODART
|
3=FR_CODART
|
||||||
4=FR_DESCR
|
4=FR_LIV1
|
||||||
5=FR_UMQTA
|
5=FR_LIV2
|
||||||
6=FR_QTA
|
6=FR_LIV3
|
||||||
7=FR_PREZZO
|
7=FR_LIV4
|
||||||
8=FR_SCONTO
|
8=FR_DESCR
|
||||||
9=FR_PERCPROV
|
9=FR_UMQTA
|
||||||
10=FR_CODIVA
|
10=FR_QTA
|
||||||
|
11=FR_PREZZO
|
||||||
|
12=FR_SCONTO
|
||||||
|
13=FR_PERCPROV
|
||||||
|
14=FR_CODIVA
|
||||||
|
|
||||||
[RIGHE]
|
[RIGHE]
|
||||||
NTIPIRIGA=9
|
NTIPIRIGA=9
|
||||||
|
@ -11,8 +11,6 @@ FRMFILE=FATTURAC.FRM
|
|||||||
// modifica
|
// modifica
|
||||||
CAMPICALC=TOTMER|TOTPRE|TOTSPE|SPESINC|BOLLI|SCONTOD|TOTNS|IMPOSTE|TOTDOC|PROVVD
|
CAMPICALC=TOTMER|TOTPRE|TOTSPE|SPESINC|BOLLI|SCONTOD|TOTNS|IMPOSTE|TOTDOC|PROVVD
|
||||||
CALCOLI=BASESCONTO
|
CALCOLI=BASESCONTO
|
||||||
IMPONIBILE=TOTNS
|
|
||||||
IMPOSTA=IMPOSTE
|
|
||||||
TOTALE=TOTDOC
|
TOTALE=TOTDOC
|
||||||
BASESCONTO=BASESCONTO
|
BASESCONTO=BASESCONTO
|
||||||
SPESE=TOTSPE
|
SPESE=TOTSPE
|
||||||
@ -144,17 +142,21 @@ BLANK = S_DISABILITATO //4000
|
|||||||
NDEFAULTS=0
|
NDEFAULTS=0
|
||||||
|
|
||||||
[SHEET]
|
[SHEET]
|
||||||
NCOLS=10
|
NCOLS=14
|
||||||
1=FR_CODMAG
|
1=FR_CODMAG
|
||||||
2=FR_CODDEP
|
2=FR_CODDEP
|
||||||
3=FR_CODART
|
3=FR_CODART
|
||||||
4=FR_DESCR
|
4=FR_LIV1
|
||||||
5=FR_UMQTA
|
5=FR_LIV2
|
||||||
6=FR_QTA
|
6=FR_LIV3
|
||||||
7=FR_PREZZO
|
7=FR_LIV4
|
||||||
8=FR_SCONTO
|
8=FR_DESCR
|
||||||
9=FR_PERCPROV
|
9=FR_UMQTA
|
||||||
10=FR_CODIVA
|
10=FR_QTA
|
||||||
|
11=FR_PREZZO
|
||||||
|
12=FR_SCONTO
|
||||||
|
13=FR_PERCPROV
|
||||||
|
14=FR_CODIVA
|
||||||
|
|
||||||
[RIGHE]
|
[RIGHE]
|
||||||
NTIPIRIGA=9
|
NTIPIRIGA=9
|
||||||
|
@ -10,6 +10,10 @@
|
|||||||
#include "veini.h"
|
#include "veini.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __MGLIB01_H
|
||||||
|
#include "..\mg\mglib01.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __UTILITY_H
|
#ifndef __UTILITY_H
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
#endif
|
#endif
|
||||||
@ -103,10 +107,16 @@ int TMotore_application::user_function( int index )
|
|||||||
// Funzione che dato il profilo di riga ottiene la maschera
|
// Funzione che dato il profilo di riga ottiene la maschera
|
||||||
// Serve per ottenere una maschera diversa per ogni riga
|
// Serve per ottenere una maschera diversa per ogni riga
|
||||||
TMask * TMotore_application::ss_getmask( int numriga, TMask& fullmask)
|
TMask * TMotore_application::ss_getmask( int numriga, TMask& fullmask)
|
||||||
{
|
{
|
||||||
TRiga_documento & riga = (*(app()._doc))[numriga + 1];
|
const int n = numriga + 1;
|
||||||
|
if (n <= app()._doc->physical_rows())
|
||||||
return ((TTipo_riga_documento &)riga.tipo()).mask();
|
{
|
||||||
|
TRiga_documento & riga = (*(app()._doc))[numriga + 1];
|
||||||
|
|
||||||
|
return ((TTipo_riga_documento &)riga.tipo()).mask();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return & fullmask;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TMotore_application::user_set_handler( int fieldid, int index, TMask* m )
|
void TMotore_application::user_set_handler( int fieldid, int index, TMask* m )
|
||||||
@ -171,6 +181,7 @@ bool TMotore_application::ss_handler( TSheet_field& ss, int r, KEY key )
|
|||||||
s << app()._clifor->get(LF_CFVEN, "CODDEP");
|
s << app()._clifor->get(LF_CFVEN, "CODDEP");
|
||||||
riga.put("CODMAG", s);
|
riga.put("CODMAG", s);
|
||||||
riga.autoload(ss);
|
riga.autoload(ss);
|
||||||
|
ss.check_row(r);
|
||||||
ss.select(r);
|
ss.select(r);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -223,25 +234,18 @@ bool TMotore_application::num_handler( TMask_field& f, KEY key )
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool TMotore_application::elabora_handler( TMask_field& f, KEY key )
|
bool TMotore_application::elabora_handler( TMask_field& f, KEY key )
|
||||||
{
|
{
|
||||||
// Ottengo la maschera
|
if (key == K_SPACE)
|
||||||
// TMask& m = f.mask( );
|
{
|
||||||
|
return message_box("Funzione in fase di implementazione");
|
||||||
// Registra il record corrente
|
TString_array elabs;
|
||||||
// m.send_key( K_INS, 99 );
|
TMask & m = f.mask();
|
||||||
|
const TString16 tipo(m.get(F_TIPODOC));
|
||||||
// TString commandline("ve4 ");
|
const TString16 stato(m.get(F_STATO));
|
||||||
// commandline << m.get( F_CODNUM );
|
TLista_elaborazioni & elab = app().elab();
|
||||||
// commandline << " ";
|
|
||||||
// commandline << m.get( F_ANNO );
|
elab.select(elabs, TRUE, m.insert_mode(), NULL, NULL, tipo, stato);
|
||||||
// commandline << " ";
|
}
|
||||||
// commandline << m.get( F_PROVV );
|
|
||||||
// commandline << " ";
|
|
||||||
// commandline << m.get( F_NDOC );
|
|
||||||
// TExternal_app interattivo( commandline );
|
|
||||||
// interattivo.run( );
|
|
||||||
// ricarica il documento dopo che l'interattivo lo ha modificato
|
|
||||||
// app( ).read( m );
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -451,7 +455,7 @@ TMask* TMotore_application::get_mask( int mode )
|
|||||||
msk1->set_handler( F_DATAINSC, condpag_hndl );
|
msk1->set_handler( F_DATAINSC, condpag_hndl );
|
||||||
msk1->set_handler( F_CODNOTE, note_hndl );
|
msk1->set_handler( F_CODNOTE, note_hndl );
|
||||||
msk1->set_handler( F_DATADOC, data_hndl );
|
msk1->set_handler( F_DATADOC, data_hndl );
|
||||||
msk1->set_handler( 99, elabora_handler );
|
msk1->set_handler( 99, elabora_handler ); // cazzo !!!!!!
|
||||||
msk1->set_handler( DLG_PRINT, print_handler );
|
msk1->set_handler( DLG_PRINT, print_handler );
|
||||||
int numhandler = pro( ).get_int( "NHANDLER", "HANDLERS" ); // prof
|
int numhandler = pro( ).get_int( "NHANDLER", "HANDLERS" ); // prof
|
||||||
for ( i = 1; i <= numhandler; i ++ )
|
for ( i = 1; i <= numhandler; i ++ )
|
||||||
@ -460,7 +464,25 @@ TMask* TMotore_application::get_mask( int mode )
|
|||||||
chiave.format( "%d", i );
|
chiave.format( "%d", i );
|
||||||
TToken_string riga = pro( ).get( chiave, "HANDLERS" );
|
TToken_string riga = pro( ).get( chiave, "HANDLERS" );
|
||||||
user_set_handler( riga.get_int( 0 ), riga.get_int( 1 ) );
|
user_set_handler( riga.get_int( 0 ), riga.get_int( 1 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TMag_livelli l("FCG");
|
||||||
|
|
||||||
|
for ( i = MAX_GIAC_LEVEL; i > 0; i--)
|
||||||
|
{
|
||||||
|
const short pos = _sheet->cid2index(FR_LIV1 + i -1);
|
||||||
|
if (l.enabled(i))
|
||||||
|
{
|
||||||
|
const TString & header = l.name(i);
|
||||||
|
const int len = header.len() + 1;
|
||||||
|
const int f_len = l.code_lenght(i);
|
||||||
|
|
||||||
|
_sheet->set_column_header(pos, l.name(i));
|
||||||
|
_sheet->set_column_width(pos, (len > f_len ? len : f_len) * 8);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_sheet->delete_column(pos);
|
||||||
|
}
|
||||||
|
|
||||||
// configurazione campi
|
// configurazione campi
|
||||||
|
|
||||||
@ -607,7 +629,7 @@ int TMotore_application::read( TMask& m )
|
|||||||
TSheet_field& f = ( TSheet_field& ) m.field( F_SHEET );
|
TSheet_field& f = ( TSheet_field& ) m.field( F_SHEET );
|
||||||
|
|
||||||
f.destroy( );
|
f.destroy( );
|
||||||
const int rows = _doc->rows();
|
const int rows = _doc->physical_rows();
|
||||||
for (int i = 1; i <= rows; i++)
|
for (int i = 1; i <= rows; i++)
|
||||||
{
|
{
|
||||||
f.insert(-1, FALSE);
|
f.insert(-1, FALSE);
|
||||||
@ -616,7 +638,6 @@ int TMotore_application::read( TMask& m )
|
|||||||
|
|
||||||
rec.autoload(f);
|
rec.autoload(f);
|
||||||
f.check_row(i - 1);
|
f.check_row(i - 1);
|
||||||
// f.post_insert(i - 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
|
@ -111,7 +111,7 @@ class TMotore_application : public TRelation_application
|
|||||||
|
|
||||||
// Puntatore al profilo del documento caricato
|
// Puntatore al profilo del documento caricato
|
||||||
TConfig * _pro;
|
TConfig * _pro;
|
||||||
TConfig * _config_ditta;
|
TConfig * _config_ditta;
|
||||||
|
|
||||||
// Puntatore alla maschera di ricerca
|
// Puntatore alla maschera di ricerca
|
||||||
TMask * _msk;
|
TMask * _msk;
|
||||||
@ -130,17 +130,13 @@ class TMotore_application : public TRelation_application
|
|||||||
// Indica se il documento ha come soggetto un <C>liente o un <F>ornitore
|
// Indica se il documento ha come soggetto un <C>liente o un <F>ornitore
|
||||||
char _tipocf;
|
char _tipocf;
|
||||||
|
|
||||||
// TString16 _profilo;
|
|
||||||
TString16 _codnum;
|
TString16 _codnum;
|
||||||
TString16 _tipodoc;
|
TString16 _tipodoc;
|
||||||
// int _anno;
|
|
||||||
// TString16 _tiponum;
|
|
||||||
// long _numdoc;
|
|
||||||
// int _statodoc;
|
|
||||||
|
|
||||||
// Array di maschere documento
|
// Array di maschere documento
|
||||||
|
|
||||||
TAssoc_array _doc_masks;
|
TAssoc_array _doc_masks;
|
||||||
|
TLista_elaborazioni _elab;
|
||||||
|
|
||||||
// Ridefinizione dei metodi virtuali
|
// Ridefinizione dei metodi virtuali
|
||||||
virtual bool user_create( );
|
virtual bool user_create( );
|
||||||
@ -223,6 +219,7 @@ public:
|
|||||||
TCliForVendite & clifo() { CHECK( _clifor, "Oggetto cliente nullo!" ); return *_clifor; }
|
TCliForVendite & clifo() { CHECK( _clifor, "Oggetto cliente nullo!" ); return *_clifor; }
|
||||||
TCond_vendita & condv() { return *_condv; }
|
TCond_vendita & condv() { return *_condv; }
|
||||||
TConfig & config_ditta() {return *_config_ditta; }
|
TConfig & config_ditta() {return *_config_ditta; }
|
||||||
|
TLista_elaborazioni & elab() { return _elab; }
|
||||||
TDocumento & doc() {return *_doc; }
|
TDocumento & doc() {return *_doc; }
|
||||||
|
|
||||||
// Operazione
|
// Operazione
|
||||||
|
@ -31,7 +31,7 @@ PAGE "Gestione documenti" 1 1 60 14
|
|||||||
|
|
||||||
STRING F_DESNUM 50
|
STRING F_DESNUM 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 25 1 ""
|
PROMPT 24 1 ""
|
||||||
HELP "Descrizione numerazione"
|
HELP "Descrizione numerazione"
|
||||||
USE %NUM KEY 2
|
USE %NUM KEY 2
|
||||||
INPUT S0 F_DESNUM
|
INPUT S0 F_DESNUM
|
||||||
@ -58,7 +58,7 @@ PAGE "Gestione documenti" 1 1 60 14
|
|||||||
|
|
||||||
STRING F_DESTIPODOC 50
|
STRING F_DESTIPODOC 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 25 2 ""
|
PROMPT 24 2 ""
|
||||||
HELP "Descrizione tipo documento"
|
HELP "Descrizione tipo documento"
|
||||||
USE %TIP KEY 2
|
USE %TIP KEY 2
|
||||||
INPUT S0 F_DESTIPODOC
|
INPUT S0 F_DESTIPODOC
|
||||||
@ -67,9 +67,18 @@ PAGE "Gestione documenti" 1 1 60 14
|
|||||||
COPY OUTPUT F_TIPODOC
|
COPY OUTPUT F_TIPODOC
|
||||||
END
|
END
|
||||||
|
|
||||||
|
NUMBER F_ANNO 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 3 "Esercizio "
|
||||||
|
FIELD ANNO
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
FLAG "AP"
|
||||||
|
KEY 1
|
||||||
|
END
|
||||||
|
|
||||||
NUMBER F_NDOC 6
|
NUMBER F_NDOC 6
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 3 "Numero doc. "
|
PROMPT 24 3 "Numero doc. "
|
||||||
FIELD NDOC
|
FIELD NDOC
|
||||||
USE LF_DOC
|
USE LF_DOC
|
||||||
INPUT ANNO F_ANNO SELECT
|
INPUT ANNO F_ANNO SELECT
|
||||||
@ -91,7 +100,7 @@ PAGE "Gestione documenti" 1 1 60 14
|
|||||||
LISTBOX F_PROVV 14
|
LISTBOX F_PROVV 14
|
||||||
BEGIN
|
BEGIN
|
||||||
FIELD PROVV
|
FIELD PROVV
|
||||||
PROMPT 25 3 "Numerazione "
|
PROMPT 46 3 "Tipo "
|
||||||
ITEM "D|Definitiva "
|
ITEM "D|Definitiva "
|
||||||
ITEM "P|Provvisoria"
|
ITEM "P|Provvisoria"
|
||||||
KEY 1
|
KEY 1
|
||||||
@ -100,27 +109,11 @@ PAGE "Gestione documenti" 1 1 60 14
|
|||||||
|
|
||||||
STRING F_STATO 1
|
STRING F_STATO 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 57 3 "Stato "
|
PROMPT 69 3 "Stato "
|
||||||
FIELD STATO
|
FIELD STATO
|
||||||
FLAG "D"
|
FLAG "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_ANNO 4
|
|
||||||
BEGIN
|
|
||||||
PROMPT 68 3 "Es. "
|
|
||||||
FIELD ANNO
|
|
||||||
CHECKTYPE REQUIRED
|
|
||||||
FLAG "A"
|
|
||||||
KEY 1
|
|
||||||
END
|
|
||||||
|
|
||||||
BOOLEAN F_ATTIVAANNO
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 6 "Attiva esercizio"
|
|
||||||
MESSAGE TRUE ENABLE,F_ANNO
|
|
||||||
MESSAGE FALSE DISABLE,F_ANNO
|
|
||||||
END
|
|
||||||
|
|
||||||
STRING F_TIPIDOCS 40
|
STRING F_TIPIDOCS 40
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 10 ""
|
PROMPT 2 10 ""
|
||||||
|
@ -14,24 +14,24 @@
|
|||||||
|
|
||||||
#ifndef __TABUTIL_H
|
#ifndef __TABUTIL_H
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "veconf.h"
|
#include "veconf.h"
|
||||||
|
|
||||||
#define SINTASSI "Usage: VE0 -2 -[1|2|3|4|5|6]"
|
#define SINTASSI "Usage: VE0 -2 -[1|2|3|4|5|6]"
|
||||||
|
|
||||||
class TConf_vendite : public TConfig_application
|
class TConf_vendite : public TConfig_application
|
||||||
{
|
{
|
||||||
char _current;
|
char _current;
|
||||||
|
|
||||||
static bool check_fields(TMask_field& f, KEY k);
|
static bool check_fields(TMask_field& f, KEY k);
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual bool preprocess_config (TMask& mask, TConfig& config);
|
virtual bool preprocess_config (TMask& mask, TConfig& config);
|
||||||
virtual bool postprocess_config (TMask& mask, TConfig& config);
|
virtual bool postprocess_config (TMask& mask, TConfig& config);
|
||||||
virtual bool user_create( );
|
virtual bool user_create( );
|
||||||
virtual bool user_destroy( );
|
virtual bool user_destroy( );
|
||||||
|
|
||||||
TConf_vendite() : TConfig_application( CONFIG_DITTA ){ }
|
TConf_vendite() : TConfig_application( CONFIG_DITTA ){ }
|
||||||
virtual ~TConf_vendite( ){ }
|
virtual ~TConf_vendite( ){ }
|
||||||
};
|
};
|
||||||
@ -56,7 +56,7 @@ bool TConf_vendite::check_fields(TMask_field& f, KEY k)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool TConf_vendite::preprocess_config (TMask& mask, TConfig& config)
|
bool TConf_vendite::preprocess_config (TMask& mask, TConfig& config)
|
||||||
{
|
{
|
||||||
disable_menu_item(M_FILE_NEW);
|
disable_menu_item(M_FILE_NEW);
|
||||||
disable_menu_item(M_FILE_REVERT);
|
disable_menu_item(M_FILE_REVERT);
|
||||||
if (_current == '5') // solo per configurazione "e"
|
if (_current == '5') // solo per configurazione "e"
|
||||||
@ -93,11 +93,11 @@ bool TConf_vendite::preprocess_config (TMask& mask, TConfig& config)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TConf_vendite::postprocess_config (TMask& mask, TConfig& config)
|
bool TConf_vendite::postprocess_config (TMask& mask, TConfig& config)
|
||||||
{
|
{
|
||||||
enable_menu_item(M_FILE_NEW);
|
enable_menu_item(M_FILE_NEW);
|
||||||
enable_menu_item(M_FILE_REVERT);
|
enable_menu_item(M_FILE_REVERT);
|
||||||
if (_current == '5') // solo per configurazione "e"
|
if (_current == '5') // solo per configurazione "e"
|
||||||
@ -106,17 +106,17 @@ bool TConf_vendite::postprocess_config (TMask& mask, TConfig& config)
|
|||||||
TString r;
|
TString r;
|
||||||
const KEY k = mask.last_key();
|
const KEY k = mask.last_key();
|
||||||
bool tosave = k == K_ENTER || k == K_SAVE;
|
bool tosave = k == K_ENTER || k == K_SAVE;
|
||||||
|
|
||||||
if (!tosave && mask.dirty())
|
if (!tosave && mask.dirty())
|
||||||
tosave = yesno_box("Modifiche non registrate. Salvare?");
|
tosave = yesno_box("Modifiche non registrate. Salvare?");
|
||||||
|
|
||||||
if (!tosave)
|
if (!tosave)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
for (short i=F_RICERCACR1;i<=F_RICERCACR5;i++)
|
for (short i=F_RICERCACR1;i<=F_RICERCACR5;i++)
|
||||||
{
|
{
|
||||||
r = mask.get(i);
|
r = mask.get(i);
|
||||||
if (r == "-") continue;
|
if (r == "-") continue;
|
||||||
if (r == "AN")
|
if (r == "AN")
|
||||||
for (short j=F_RICERCAAN1;j<=F_RICERCAAN4;j++)
|
for (short j=F_RICERCAAN1;j<=F_RICERCAAN4;j++)
|
||||||
{
|
{
|
||||||
@ -129,7 +129,7 @@ bool TConf_vendite::postprocess_config (TMask& mask, TConfig& config)
|
|||||||
}
|
}
|
||||||
config.set("RICERCACR",ric);
|
config.set("RICERCACR",ric);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -139,12 +139,12 @@ bool TConf_vendite::user_create( )
|
|||||||
// Il fottuto meno serve per evitare fottutamente che la fottuta confapp
|
// Il fottuto meno serve per evitare fottutamente che la fottuta confapp
|
||||||
// si fotta il fottuto parametro
|
// si fotta il fottuto parametro
|
||||||
if( arg[ 0 ] != '-' )
|
if( arg[ 0 ] != '-' )
|
||||||
fatal_box( SINTASSI );
|
fatal_box( SINTASSI );
|
||||||
_current = arg[1];
|
_current = arg[1];
|
||||||
TConfig conf(_current == '6' ? CONFIG_STUDIO : CONFIG_DITTA );
|
TConfig conf(_current == '6' ? CONFIG_STUDIO : CONFIG_DITTA );
|
||||||
if (_current == '6') set_config(CONFIG_STUDIO);
|
if (_current == '6') set_config(CONFIG_STUDIO);
|
||||||
// Prima usavo le lettere ma la fottuta confapp si fotte il fottuto -c per i suoi fottuti
|
// Prima usavo le lettere ma la fottuta confapp si fotte il fottuto -c per i suoi fottuti
|
||||||
// motivi, così uso i fottuti numeri
|
// motivi, cosi uso i fottuti numeri
|
||||||
switch( _current )
|
switch( _current )
|
||||||
{
|
{
|
||||||
case '1':
|
case '1':
|
||||||
@ -153,16 +153,16 @@ bool TConf_vendite::user_create( )
|
|||||||
case '2':
|
case '2':
|
||||||
conf.set( "EdMask", "ve0200b", "ve" );
|
conf.set( "EdMask", "ve0200b", "ve" );
|
||||||
break;
|
break;
|
||||||
case '3':
|
case '3':
|
||||||
conf.set( "EdMask", "ve0200c", "ve" );
|
conf.set( "EdMask", "ve0200c", "ve" );
|
||||||
break;
|
break;
|
||||||
case '4':
|
case '4':
|
||||||
conf.set( "EdMask", "ve0200d", "ve" );
|
conf.set( "EdMask", "ve0200d", "ve" );
|
||||||
break;
|
break;
|
||||||
case '5':
|
case '5':
|
||||||
conf.set( "EdMask", "ve0200e", "ve" );
|
conf.set( "EdMask", "ve0200e", "ve" );
|
||||||
break;
|
break;
|
||||||
case '6':
|
case '6':
|
||||||
conf.set( "EdMask", "ve0200f", "ve" );
|
conf.set( "EdMask", "ve0200f", "ve" );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -171,19 +171,19 @@ bool TConf_vendite::user_create( )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TConf_vendite::user_destroy( )
|
bool TConf_vendite::user_destroy( )
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ve0200(int argc, char** argv)
|
int ve0200(int argc, char** argv)
|
||||||
{
|
{
|
||||||
TConf_vendite appc;
|
TConf_vendite appc;
|
||||||
|
|
||||||
if( argc < 3 )
|
if( argc < 3 )
|
||||||
fatal_box( SINTASSI );
|
fatal_box( SINTASSI );
|
||||||
appc.run(argc, argv, "Parametri gestione vendite");
|
appc.run(argc, argv, "Parametri gestione vendite");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ END
|
|||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Tabelle di installazione" 1 1 60 14
|
PAGE "Installazione" 1 1 60 14
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 7
|
GROUPBOX DLG_NULL 78 7
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -134,7 +134,7 @@ END
|
|||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Tabella gestione sconti " 1 1 60 14
|
PAGE "Sconti " 1 1 60 14
|
||||||
|
|
||||||
LIST F_GESSCO 36
|
LIST F_GESSCO 36
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -222,20 +222,6 @@ PROMPT 2 13 "Gestione archivio sconti unita' di misura "
|
|||||||
FIELD GESSCOUM
|
FIELD GESSCOUM
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_SCOTRIGA 4
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 14 "Tipo riga per gli sconti di testa "
|
|
||||||
FLAGS "U"
|
|
||||||
USE %TRI SELECT S7=="C"
|
|
||||||
FIELD SCOTRIGA
|
|
||||||
INPUT CODTAB F_SCOTRIGA
|
|
||||||
DISPLAY "Codice" CODTAB
|
|
||||||
DISPLAY "Descrizione@50" S0
|
|
||||||
OUTPUT F_SCOTRIGA CODTAB
|
|
||||||
CHECKTYPE REQUIRED
|
|
||||||
END
|
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ END
|
|||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Tabelle di installazione" 1 1 60 14
|
PAGE "Installazione" 1 1 60 14
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 4
|
GROUPBOX DLG_NULL 78 4
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -14,7 +14,7 @@ END
|
|||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Tabella gestione sconti" 1 1 60 14
|
PAGE "Sconti" 1 1 60 14
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 4
|
GROUPBOX DLG_NULL 78 4
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -56,7 +56,7 @@ COPY ALL F_SCOPRCODCON1
|
|||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_SCOPRDESCON 50
|
STRING F_SCOPRDESCON 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 3 "Descrizione "
|
PROMPT 2 3 "Descrizione "
|
||||||
USE LF_PCON KEY 2
|
USE LF_PCON KEY 2
|
||||||
|
@ -14,7 +14,7 @@ END
|
|||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Tabella gestione spese" 1 1 60 14
|
PAGE "Spese" 1 1 60 14
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 8
|
GROUPBOX DLG_NULL 78 8
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -14,7 +14,7 @@ END
|
|||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Tabelle contabilizzazione" 1 1 60 14
|
PAGE "Contabilizzazione" 1 1 60 14
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 7
|
GROUPBOX DLG_NULL 78 7
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -14,7 +14,7 @@ END
|
|||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Gestione spese incasso" 1 1 60 14
|
PAGE "Spese incasso" 1 1 60 14
|
||||||
|
|
||||||
NUMBER F_IMPSPINC1 9
|
NUMBER F_IMPSPINC1 9
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -82,7 +82,7 @@ END
|
|||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
|
|
||||||
PAGE "Gestione spese bolli" 1 1 60 14
|
PAGE "Spese bolli" 1 1 60 14
|
||||||
|
|
||||||
NUMBER F_SPBOSCA1 11
|
NUMBER F_SPBOSCA1 11
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -182,31 +182,84 @@ FIELD SPBOIMP[7]
|
|||||||
PICTURE "."
|
PICTURE "."
|
||||||
END
|
END
|
||||||
|
|
||||||
|
NUMBER F_BOLLIES 11
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 10 "Bollo per esenzioni "
|
||||||
|
FIELD BOLLIES
|
||||||
|
PICTURE "."
|
||||||
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Gestione omaggi" 1 1 60 14
|
PAGE "Automatismi" 1 1 60 14
|
||||||
|
|
||||||
STRING F_TIPORIGAOM 4
|
STRING F_OMTRIGA 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Tipo riga per omaggi "
|
PROMPT 2 2 "Tipo riga omaggi "
|
||||||
FIELD TROMAGGI
|
FIELD TROMAGGI
|
||||||
FLAGS "U"
|
FLAGS "U"
|
||||||
USE %TRI SELECT S7=="O"
|
USE %TRI SELECT S7=="O"
|
||||||
INPUT CODTAB F_TIPORIGAOM
|
INPUT CODTAB F_OMTRIGA
|
||||||
DISPLAY "Codice" CODTAB
|
DISPLAY "Codice" CODTAB
|
||||||
DISPLAY "Descrizione@50" S0
|
DISPLAY "Descrizione@50" S0
|
||||||
OUTPUT F_TIPORIGAOM CODTAB
|
OUTPUT F_OMTRIGA CODTAB
|
||||||
OUTPUT F_DESCRRIGAOM S0
|
OUTPUT F_OMDRIGA S0
|
||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_DESCRRIGAOM 50
|
STRING F_OMDRIGA 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 23 3 ""
|
PROMPT 25 3 ""
|
||||||
USE %TRI KEY 2 SELECT S7=="O"
|
USE %TRI KEY 2 SELECT S7=="O"
|
||||||
INPUT S0 F_DESCRRIGAOM
|
INPUT S0 F_OMDRIGA
|
||||||
COPY DISPLAY F_TIPORIGAOM
|
COPY DISPLAY F_OMTRIGA
|
||||||
COPY OUTPUT F_TIPORIGAOM
|
COPY OUTPUT F_OMTRIGA
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_ESTRIGA 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 4 "Tipo riga esenzioni "
|
||||||
|
FLAGS "U"
|
||||||
|
USE %TRI SELECT S7=="D"
|
||||||
|
FIELD TRESENZ
|
||||||
|
INPUT CODTAB F_ESTRIGA
|
||||||
|
DISPLAY "Codice" CODTAB
|
||||||
|
DISPLAY "Descrizione@50" S0
|
||||||
|
OUTPUT F_ESTRIGA CODTAB
|
||||||
|
OUTPUT F_ESDRIGA S0
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_ESDRIGA 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 25 5 ""
|
||||||
|
USE %TRI KEY 2 SELECT S7=="D"
|
||||||
|
INPUT S0 F_ESDRIGA
|
||||||
|
COPY DISPLAY F_ESTRIGA
|
||||||
|
COPY OUTPUT F_ESTRIGA
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_SCTRIGA 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 6 "Tipo riga sconti testa "
|
||||||
|
FLAGS "U"
|
||||||
|
USE %TRI SELECT S7=="C"
|
||||||
|
FIELD TRSCONTI
|
||||||
|
INPUT CODTAB F_SCTRIGA
|
||||||
|
DISPLAY "Codice" CODTAB
|
||||||
|
DISPLAY "Descrizione@50" S0
|
||||||
|
OUTPUT F_SCTRIGA CODTAB
|
||||||
|
OUTPUT F_SCDRIGA S0
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_SCDRIGA 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 25 7 ""
|
||||||
|
USE %TRI KEY 2 SELECT S7=="C"
|
||||||
|
INPUT S0 F_SCDRIGA
|
||||||
|
COPY DISPLAY F_SCTRIGA
|
||||||
|
COPY OUTPUT F_SCTRIGA
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
@ -1059,34 +1059,34 @@ void TMask_generator::intestazione_pagina( )
|
|||||||
_m->group( 5 );
|
_m->group( 5 );
|
||||||
_m->end( );
|
_m->end( );
|
||||||
|
|
||||||
|
_m->control( T_STRINGA, DLG_NULL, 4 );
|
||||||
|
_m->begin( );
|
||||||
|
_m->prompt( 2, 3, "Esercizio " );
|
||||||
|
_m->group( 9 );
|
||||||
|
_m->flag( "D" );
|
||||||
|
_m->end( );
|
||||||
|
|
||||||
_m->control( T_NUMERO, DLG_NULL, 6 );
|
_m->control( T_NUMERO, DLG_NULL, 6 );
|
||||||
_m->begin( );
|
_m->begin( );
|
||||||
_m->prompt( 2, 3, "Doc.: nr. " );
|
_m->prompt( 24, 3, "Numero doc. " );
|
||||||
_m->group( 6 );
|
_m->group( 6 );
|
||||||
_m->flag( "D" );
|
_m->flag( "D" );
|
||||||
_m->end( );
|
_m->end( );
|
||||||
|
|
||||||
_m->control( T_DATA, DLG_NULL );
|
_m->control( T_DATA, DLG_NULL );
|
||||||
_m->begin( );
|
_m->begin( );
|
||||||
_m->prompt( 24, 3, "Data " );
|
_m->prompt( 46, 3, "Data " );
|
||||||
_m->group( 7 );
|
_m->group( 7 );
|
||||||
_m->flag( "D" );
|
_m->flag( "D" );
|
||||||
_m->end( );
|
_m->end( );
|
||||||
|
|
||||||
_m->control( T_NUMERO, DLG_NULL, 1 );
|
_m->control( T_NUMERO, DLG_NULL, 1 );
|
||||||
_m->begin( );
|
_m->begin( );
|
||||||
_m->prompt( 50, 3, "Stato " );
|
_m->prompt( 67, 3, "Stato " );
|
||||||
_m->group( 8 );
|
_m->group( 8 );
|
||||||
_m->flag( "D" );
|
_m->flag( "D" );
|
||||||
_m->end( );
|
_m->end( );
|
||||||
|
|
||||||
_m->control( T_STRINGA, DLG_NULL, 4 );
|
|
||||||
_m->begin( );
|
|
||||||
_m->prompt( 66, 3, "Es. " );
|
|
||||||
_m->group( 9 );
|
|
||||||
_m->flag( "D" );
|
|
||||||
_m->end( );
|
|
||||||
|
|
||||||
_m->control( T_STRINGA, DLG_NULL, 6 );
|
_m->control( T_STRINGA, DLG_NULL, 6 );
|
||||||
_m->begin( );
|
_m->begin( );
|
||||||
if ( _pro->get( "TIPOCF", "MAIN" ) == "C" )
|
if ( _pro->get( "TIPOCF", "MAIN" ) == "C" )
|
||||||
@ -1247,9 +1247,17 @@ void TMask_generator::genera( const TString& profilo )
|
|||||||
_m->message( "CO,5@" );
|
_m->message( "CO,5@" );
|
||||||
_m->end( );
|
_m->end( );
|
||||||
|
|
||||||
|
_m->control( T_STRINGA, F_ANNO, 4 );
|
||||||
|
_m->begin( );
|
||||||
|
_m->prompt( 2, 3, "Esercizio " );
|
||||||
|
_m->field( "ANNO" );
|
||||||
|
_m->flag( "GD" );
|
||||||
|
_m->message( "CO,9@" );
|
||||||
|
_m->end( );
|
||||||
|
|
||||||
_m->control( T_NUMERO, F_NDOC, 6 );
|
_m->control( T_NUMERO, F_NDOC, 6 );
|
||||||
_m->begin( );
|
_m->begin( );
|
||||||
_m->prompt( 2, 3, "Doc.: nr. " );
|
_m->prompt( 24, 3, "Numero doc. " );
|
||||||
_m->field( "NDOC" );
|
_m->field( "NDOC" );
|
||||||
_m->message( "CO,6@" );
|
_m->message( "CO,6@" );
|
||||||
_m->flag( "GDR" );
|
_m->flag( "GDR" );
|
||||||
@ -1257,28 +1265,20 @@ void TMask_generator::genera( const TString& profilo )
|
|||||||
|
|
||||||
_m->control( T_DATA, F_DATADOC );
|
_m->control( T_DATA, F_DATADOC );
|
||||||
_m->begin( );
|
_m->begin( );
|
||||||
_m->prompt( 24, 3, "Data " );
|
_m->prompt( 46, 3, "Data " );
|
||||||
_m->field( "DATADOC" );
|
_m->field( "DATADOC" );
|
||||||
_m->message( "CO,7@" );
|
_m->message( format("CO,7@|CO,%d", F_DATACAMBIO1) );
|
||||||
_m->flag( "A" );
|
_m->flag( "A" );
|
||||||
_m->end( );
|
_m->end( );
|
||||||
|
|
||||||
_m->control( T_NUMERO, F_STATO, 1 );
|
_m->control( T_NUMERO, F_STATO, 1 );
|
||||||
_m->begin( );
|
_m->begin( );
|
||||||
_m->prompt( 50, 3, "Stato " );
|
_m->prompt( 67, 3, "Stato " );
|
||||||
_m->field( "STATO" );
|
_m->field( "STATO" );
|
||||||
_m->message( "CO,8@" );
|
_m->message( "CO,8@" );
|
||||||
_m->flag( "DG" );
|
_m->flag( "DG" );
|
||||||
_m->end( );
|
_m->end( );
|
||||||
|
|
||||||
_m->control( T_STRINGA, F_ANNO, 4 );
|
|
||||||
_m->begin( );
|
|
||||||
_m->prompt( 66, 3, "Es. " );
|
|
||||||
_m->field( "ANNO" );
|
|
||||||
_m->flag( "GD" );
|
|
||||||
_m->message( "CO,9@" );
|
|
||||||
_m->end( );
|
|
||||||
|
|
||||||
_m->control( T_STRINGA, F_CODCF, 6 );
|
_m->control( T_STRINGA, F_CODCF, 6 );
|
||||||
_m->begin( );
|
_m->begin( );
|
||||||
if ( _pro->get( "TIPOCF", "MAIN" ) == "C" )
|
if ( _pro->get( "TIPOCF", "MAIN" ) == "C" )
|
||||||
|
@ -2,7 +2,11 @@ STATORIGA|2|1|Stato|1
|
|||||||
TIPORIGA|2|2|Tipo riga|2
|
TIPORIGA|2|2|Tipo riga|2
|
||||||
CODMAG[1,3]|2|3|Mag. |3
|
CODMAG[1,3]|2|3|Mag. |3
|
||||||
CODMAG[4,5]|2|2|Dep.|2
|
CODMAG[4,5]|2|2|Dep.|2
|
||||||
CODART|2|30|Cod. Art.|30
|
CODART|2|20|Cod. Art.|20
|
||||||
|
CODG1|2|9|Cod.G.1|9
|
||||||
|
CODG2|2|9|Cod.G.2|9
|
||||||
|
CODG3|2|9|Cod.G.3|9
|
||||||
|
CODG4|2|9|Cod.G.4|9
|
||||||
DESCR|2|50|Descrizione|50
|
DESCR|2|50|Descrizione|50
|
||||||
UMQTA|2|2|UM|2
|
UMQTA|2|2|UM|2
|
||||||
QTA|3|1103|Qta|11
|
QTA|3|1103|Qta|11
|
||||||
|
@ -90,7 +90,7 @@ HEIGHT=1
|
|||||||
HEIGHT=1
|
HEIGHT=1
|
||||||
|
|
||||||
[2500]
|
[2500]
|
||||||
HEIGHT=1
|
HEIGHT=7
|
||||||
|
|
||||||
[2700]
|
[2700]
|
||||||
HEIGHT=1
|
HEIGHT=1
|
||||||
|
@ -76,6 +76,7 @@ class TDocumento_form : public TForm
|
|||||||
TRelation &_firmrel; // relazione di gestione dei dati della ditta corrente
|
TRelation &_firmrel; // relazione di gestione dei dati della ditta corrente
|
||||||
TString _module; // codice del modulo di carta associato a questo al form
|
TString _module; // codice del modulo di carta associato a questo al form
|
||||||
TCliFor *_cliente; // oggetto per le informazioni sul cliente
|
TCliFor *_cliente; // oggetto per le informazioni sul cliente
|
||||||
|
TCond_vendita * _condv;
|
||||||
TString_array _exclude_array; // array di coppie tipo/articolo da escludere dalla stampa
|
TString_array _exclude_array; // array di coppie tipo/articolo da escludere dalla stampa
|
||||||
TDocumentoEsteso * _doc; // Documento da stampare
|
TDocumentoEsteso * _doc; // Documento da stampare
|
||||||
bool _valid, _cli_loaded; // flag che indica se il form e' valido | se l'oggetto cliente è già stato caricato
|
bool _valid, _cli_loaded; // flag che indica se il form e' valido | se l'oggetto cliente è già stato caricato
|
||||||
@ -173,7 +174,8 @@ TDocumento_form::TDocumento_form(TRectype&/*TDocumentoEsteso**/ doc, TRelation&
|
|||||||
_cli_loaded= FALSE;
|
_cli_loaded= FALSE;
|
||||||
_is_lista = FALSE;
|
_is_lista = FALSE;
|
||||||
|
|
||||||
_doc = new TDocumentoEsteso(doc); // istanzia TDocumentoEsteso
|
_condv = new TCond_vendita(_cliente);
|
||||||
|
_doc = new TDocumentoEsteso(doc, _condv); // istanzia TDocumentoEsteso
|
||||||
_docfile = new TDocisamfile(_doc);
|
_docfile = new TDocisamfile(_doc);
|
||||||
_rdocfile = new TRDocisamfile(_doc);
|
_rdocfile = new TRDocisamfile(_doc);
|
||||||
relation()->replace(_docfile,0);
|
relation()->replace(_docfile,0);
|
||||||
@ -750,16 +752,11 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s) {
|
|||||||
TLocalisamfile &rdoc= (cursor())->file(LF_RIGHEDOC);
|
TLocalisamfile &rdoc= (cursor())->file(LF_RIGHEDOC);
|
||||||
TString descrizione = rdoc.get("DESCR");
|
TString descrizione = rdoc.get("DESCR");
|
||||||
const bool desclunga = rdoc.get_bool("DESCLUNGA");
|
const bool desclunga = rdoc.get_bool("DESCLUNGA");
|
||||||
if (desclunga) {
|
if (desclunga)
|
||||||
TTextfile t;
|
{
|
||||||
rdoc.get_memo("DESCEST",t);
|
const TString & s = rdoc.get("DESCEST");
|
||||||
const long l = t.lines();
|
|
||||||
for (long i = 0; i<l; i++) {
|
descrizione << s;
|
||||||
TString linea(t.line(i));
|
|
||||||
linea.trim();
|
|
||||||
if (linea.not_empty())
|
|
||||||
descrizione << " " << linea;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
cf.put_paragraph(descrizione);
|
cf.put_paragraph(descrizione);
|
||||||
// Setta l'altezza effettiva del body, per evitare sprechi di righe
|
// Setta l'altezza effettiva del body, per evitare sprechi di righe
|
||||||
|
11
ve/veconf.h
11
ve/veconf.h
@ -33,7 +33,6 @@
|
|||||||
|
|
||||||
#define F_GESSCOSCA 128
|
#define F_GESSCOSCA 128
|
||||||
#define F_GESSCOUM 129
|
#define F_GESSCOUM 129
|
||||||
#define F_SCOTRIGA 130
|
|
||||||
|
|
||||||
// Campi per ve0200b.uml
|
// Campi per ve0200b.uml
|
||||||
#define F_GESAGE 101
|
#define F_GESAGE 101
|
||||||
@ -112,9 +111,13 @@
|
|||||||
#define F_SPBOIMP6 121
|
#define F_SPBOIMP6 121
|
||||||
#define F_SPBOSCA7 122
|
#define F_SPBOSCA7 122
|
||||||
#define F_SPBOIMP7 123
|
#define F_SPBOIMP7 123
|
||||||
#define F_TIPORIGAOM 124
|
#define F_OMTRIGA 124
|
||||||
#define F_DESCRRIGAOM 125
|
#define F_OMDRIGA 125
|
||||||
|
#define F_ESTRIGA 126
|
||||||
|
#define F_ESDRIGA 127
|
||||||
|
#define F_SCTRIGA 128
|
||||||
|
#define F_SCDRIGA 129
|
||||||
|
#define F_BOLLIES 130
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
541
ve/velib01.cpp
541
ve/velib01.cpp
@ -54,6 +54,10 @@
|
|||||||
#include "sconti.h"
|
#include "sconti.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __EXECP_H
|
||||||
|
#include <execp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
TSpesa_prest::TSpesa_prest(const char* codice, char tipo)
|
TSpesa_prest::TSpesa_prest(const char* codice, char tipo)
|
||||||
: TRectype(LF_TAB)
|
: TRectype(LF_TAB)
|
||||||
{
|
{
|
||||||
@ -177,6 +181,7 @@ bool note_hndl( TMask_field& f, KEY key )
|
|||||||
if (key == K_TAB && (f.focusdirty() || !m.is_running()))
|
if (key == K_TAB && (f.focusdirty() || !m.is_running()))
|
||||||
{
|
{
|
||||||
TTable & note = (TTable &) ((TEdit_field &) f).browse()->cursor()->file();
|
TTable & note = (TTable &) ((TEdit_field &) f).browse()->cursor()->file();
|
||||||
|
note.setkey(1);
|
||||||
const TString16 cod(f.get());
|
const TString16 cod(f.get());
|
||||||
|
|
||||||
if (cod != note.get("CODTAB"))
|
if (cod != note.get("CODTAB"))
|
||||||
@ -263,6 +268,17 @@ HIDDEN bool codart_handler( TMask_field& f, KEY key )
|
|||||||
{
|
{
|
||||||
TMask& row_mask = f.mask();
|
TMask& row_mask = f.mask();
|
||||||
|
|
||||||
|
if (f.to_check(key, TRUE))
|
||||||
|
{
|
||||||
|
if (f.get().not_empty())
|
||||||
|
row_mask.enable(FR_LIV1);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
row_mask.reset(FR_LIV1);
|
||||||
|
row_mask.disable(FR_LIV1);
|
||||||
|
}
|
||||||
|
row_mask.field(FR_LIV1).on_hit();
|
||||||
|
}
|
||||||
if (key == K_TAB && (f.focusdirty() || row_mask.get(FR_DESCR).empty()))
|
if (key == K_TAB && (f.focusdirty() || row_mask.get(FR_DESCR).empty()))
|
||||||
{
|
{
|
||||||
TDocumento_mask & mask = (TDocumento_mask &) row_mask.get_sheet()->mask();
|
TDocumento_mask & mask = (TDocumento_mask &) row_mask.get_sheet()->mask();
|
||||||
@ -293,8 +309,8 @@ HIDDEN bool codart_handler( TMask_field& f, KEY key )
|
|||||||
if (anamag.read() == NOERR)
|
if (anamag.read() == NOERR)
|
||||||
f.set(codart);
|
f.set(codart);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (anamag.good())
|
if (anamag.good())
|
||||||
{
|
{
|
||||||
const TString16 lingua = mask.get(F_CODLIN);
|
const TString16 lingua = mask.get(F_CODLIN);
|
||||||
@ -338,6 +354,24 @@ HIDDEN bool codart_handler( TMask_field& f, KEY key )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HIDDEN bool liv_handler( TMask_field& f, KEY key )
|
||||||
|
{
|
||||||
|
if (f.to_check(key, TRUE))
|
||||||
|
{
|
||||||
|
TMask& row_mask = f.mask();
|
||||||
|
TMask_field & next = row_mask.field(f.dlg() + 1);
|
||||||
|
if (f.get().not_empty())
|
||||||
|
next.enable();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
next.reset();
|
||||||
|
next.disable();
|
||||||
|
}
|
||||||
|
next.on_hit();
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
HIDDEN bool umart_handler( TMask_field& f, KEY key )
|
HIDDEN bool umart_handler( TMask_field& f, KEY key )
|
||||||
{
|
{
|
||||||
// Se qualcuno cerca di modificare la maschera
|
// Se qualcuno cerca di modificare la maschera
|
||||||
@ -598,21 +632,18 @@ real TDocumento::spese_incasso(real & imp, int ndec, TTipo_importo t) const
|
|||||||
|
|
||||||
if (cambio == ZERO)
|
if (cambio == ZERO)
|
||||||
cambio = 1.0;
|
cambio = 1.0;
|
||||||
// if (netto == FALSE)
|
static TString16 codiva;
|
||||||
// {
|
static long firm = -1;
|
||||||
static TString16 codiva;
|
long new_firm = main_app().get_firm();
|
||||||
static long firm = -1;
|
|
||||||
long new_firm = main_app().get_firm();
|
|
||||||
|
|
||||||
if (firm != new_firm)
|
if (firm != new_firm)
|
||||||
{
|
{
|
||||||
TConfig conf(CONFIG_DITTA);
|
TConfig conf(CONFIG_DITTA);
|
||||||
|
|
||||||
codiva = conf.get("SPINCODIVA", "ve");
|
codiva = conf.get("SPINCODIVA", "ve");
|
||||||
firm = new_firm;
|
firm = new_firm;
|
||||||
}
|
}
|
||||||
real iva_spese(iva(imp_spese, TRiga_documento::iva(codiva), ndec));
|
real iva_spese(iva(imp_spese, TRiga_documento::iva(codiva), ndec));
|
||||||
// }
|
|
||||||
if (t == _lordo)
|
if (t == _lordo)
|
||||||
imp_spese += iva_spese;
|
imp_spese += iva_spese;
|
||||||
else
|
else
|
||||||
@ -728,22 +759,18 @@ real TDocumento::bolli(real & imp, int ndec, TTipo_importo t) const
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if (netto == FALSE)
|
static TString16 codiva;
|
||||||
// {
|
static long firm = -1;
|
||||||
static TString16 codiva;
|
long new_firm = main_app().get_firm();
|
||||||
static long firm = -1;
|
|
||||||
long new_firm = main_app().get_firm();
|
|
||||||
|
|
||||||
if (firm != new_firm)
|
if (firm != new_firm)
|
||||||
{
|
{
|
||||||
TConfig conf(CONFIG_DITTA);
|
TConfig conf(CONFIG_DITTA);
|
||||||
|
|
||||||
codiva = conf.get("SPBOCODIVA", "ve");
|
codiva = conf.get("SPBOCODIVA", "ve");
|
||||||
firm = new_firm;
|
firm = new_firm;
|
||||||
}
|
}
|
||||||
iva_bolli = iva(tot_bolli, TRiga_documento::iva(codiva), ndec);
|
iva_bolli = iva(tot_bolli, TRiga_documento::iva(codiva), ndec);
|
||||||
// tot_bolli += iva_bolli;
|
|
||||||
// }
|
|
||||||
importo += (tot_bolli + iva_bolli - old_bolli);
|
importo += (tot_bolli + iva_bolli - old_bolli);
|
||||||
}
|
}
|
||||||
if (t == _lordo)
|
if (t == _lordo)
|
||||||
@ -983,7 +1010,6 @@ void TExpr_documento::evaluate_user_func(int index, int nparms, TEval_stack & st
|
|||||||
real & val = stack.peek_real();
|
real & val = stack.peek_real();
|
||||||
|
|
||||||
if (_row)
|
if (_row)
|
||||||
// val = _row->iva(ndec);
|
|
||||||
val = _row->imposta();
|
val = _row->imposta();
|
||||||
else
|
else
|
||||||
val = ZERO;
|
val = ZERO;
|
||||||
@ -1063,14 +1089,14 @@ TObject* TExpr_documento::dup() const
|
|||||||
// Formula generica
|
// Formula generica
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
TFormula_documento::TFormula_documento(TTipo_formula tipo, const char* codice)
|
TFormula_documento::TFormula_documento(TTipo_formula tipo, const char* codice, const char * expr, bool numexpr)
|
||||||
: TRectype(LF_TABCOM), _expr(NULL)
|
: TRectype(LF_TABCOM), _expr(NULL)
|
||||||
{
|
{
|
||||||
_tab = tipo == _documento ? "FRD" : "FRR";
|
_tab = tipo == _documento ? "FRD" : "FRR";
|
||||||
settab(_tab);
|
settab(_tab);
|
||||||
_tab.insert("%");
|
_tab.insert("%");
|
||||||
if (codice && *codice)
|
if (codice && *codice)
|
||||||
read(codice);
|
read(codice, expr, numexpr);
|
||||||
}
|
}
|
||||||
|
|
||||||
TFormula_documento::TFormula_documento(const TRectype& rec)
|
TFormula_documento::TFormula_documento(const TRectype& rec)
|
||||||
@ -1086,7 +1112,7 @@ TFormula_documento::~TFormula_documento()
|
|||||||
if (_expr) delete _expr;
|
if (_expr) delete _expr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TFormula_documento::read(const char* codice)
|
int TFormula_documento::read(const char* codice, const char * expr, bool numexpr)
|
||||||
{
|
{
|
||||||
if (_expr != NULL)
|
if (_expr != NULL)
|
||||||
{
|
{
|
||||||
@ -1094,11 +1120,21 @@ int TFormula_documento::read(const char* codice)
|
|||||||
_expr = NULL;
|
_expr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
TTable t(_tab);
|
|
||||||
|
|
||||||
put("CODTAB", codice);
|
put("CODTAB", codice);
|
||||||
|
|
||||||
int err = TRectype::read(t);
|
int err = NOERR;
|
||||||
|
|
||||||
|
if (expr && *expr)
|
||||||
|
{
|
||||||
|
put("S1", expr);
|
||||||
|
put("B0", numexpr ? "X" : "");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TTable t(_tab);
|
||||||
|
|
||||||
|
err = TRectype::read(t);
|
||||||
|
}
|
||||||
|
|
||||||
if (err == NOERR)
|
if (err == NOERR)
|
||||||
{
|
{
|
||||||
@ -1163,6 +1199,12 @@ void TTipo_documento::read_formule()
|
|||||||
_formule = profile.get("CAMPICALC", "MAIN");
|
_formule = profile.get("CAMPICALC", "MAIN");
|
||||||
_formule.add(profile.get("CALCOLI", "MAIN"));
|
_formule.add(profile.get("CALCOLI", "MAIN"));
|
||||||
_totale = profile.get("TOTALE", "MAIN");
|
_totale = profile.get("TOTALE", "MAIN");
|
||||||
|
if (_totale.empty())
|
||||||
|
{
|
||||||
|
_totale = "TOTDOC";
|
||||||
|
if (_formule.find(_totale) < 0)
|
||||||
|
_formule.add("TOTDOC=IMPONIBILI()+IMPOSTE()");
|
||||||
|
}
|
||||||
_totale_netto = "_";
|
_totale_netto = "_";
|
||||||
_totale_netto << _totale;
|
_totale_netto << _totale;
|
||||||
if (_totale.not_empty() && _formule.find(_totale) < 0)
|
if (_totale.not_empty() && _formule.find(_totale) < 0)
|
||||||
@ -1171,12 +1213,24 @@ void TTipo_documento::read_formule()
|
|||||||
_totale.cut(0);
|
_totale.cut(0);
|
||||||
}
|
}
|
||||||
_basesconto = profile.get("BASESCONTO", "MAIN");
|
_basesconto = profile.get("BASESCONTO", "MAIN");
|
||||||
|
if (_basesconto.empty())
|
||||||
|
{
|
||||||
|
_basesconto = "BASESCONTO";
|
||||||
|
if (_formule.find(_basesconto) < 0)
|
||||||
|
_formule.add("BASESCONTO=SOMMA(\"IMPONIBILE()\", \"(TIPO() != 'S') && (TIPO() != 'C')\")");
|
||||||
|
}
|
||||||
if (_basesconto.not_empty() && _formule.find(_basesconto) < 0)
|
if (_basesconto.not_empty() && _formule.find(_basesconto) < 0)
|
||||||
{
|
{
|
||||||
error_box("Campo sconto documento (%s) sconosciuto nel tipo documento %s", (const char *) _basesconto, (const char *) codice());
|
error_box("Campo sconto documento (%s) sconosciuto nel tipo documento %s", (const char *) _basesconto, (const char *) codice());
|
||||||
_basesconto.cut(0);
|
_basesconto.cut(0);
|
||||||
}
|
}
|
||||||
_spese = profile.get("SPESE", "MAIN");
|
_spese = profile.get("SPESE", "MAIN");
|
||||||
|
if (_spese.empty())
|
||||||
|
{
|
||||||
|
_spese = "SPESE";
|
||||||
|
if (_formule.find(_spese) < 0)
|
||||||
|
_formule.add("SPESE=SOMMA(\"IMPONIBILE()\", \"TIPO() != 'S'\")");
|
||||||
|
}
|
||||||
if (_spese.not_empty() && _formule.find(_spese) < 0)
|
if (_spese.not_empty() && _formule.find(_spese) < 0)
|
||||||
{
|
{
|
||||||
error_box("Campo spese (%s) sconosciuto nel tipo documento %s", (const char *) _spese, (const char *) codice());
|
error_box("Campo spese (%s) sconosciuto nel tipo documento %s", (const char *) _spese, (const char *) codice());
|
||||||
@ -1188,13 +1242,20 @@ TFormula_documento * TTipo_documento::succ_formula(bool restart)
|
|||||||
{
|
{
|
||||||
if (restart)
|
if (restart)
|
||||||
_formule.restart();
|
_formule.restart();
|
||||||
const TString16 formula(_formule.get());
|
const TString formula(_formule.get());
|
||||||
if (formula.not_empty())
|
if (formula.not_empty())
|
||||||
{
|
{
|
||||||
|
char *expr = NULL;
|
||||||
|
const int p = formula.find("=");
|
||||||
|
if (p > 0)
|
||||||
|
{
|
||||||
|
expr = (char *) (const char *) formula + p;
|
||||||
|
*expr = '\0'; expr++;
|
||||||
|
}
|
||||||
TFormula_documento * o = (TFormula_documento*)_formule_documento.objptr(formula);
|
TFormula_documento * o = (TFormula_documento*)_formule_documento.objptr(formula);
|
||||||
if (o == NULL)
|
if (o == NULL)
|
||||||
{
|
{
|
||||||
o = new TFormula_documento(_documento, formula);
|
o = new TFormula_documento(_documento, formula, expr);
|
||||||
_formule_documento.add(formula, o);
|
_formule_documento.add(formula, o);
|
||||||
}
|
}
|
||||||
return o;
|
return o;
|
||||||
@ -1256,6 +1317,12 @@ void TTipo_riga_documento::read_formule()
|
|||||||
_formule = profile.get("CAMPICALC", "MAIN");
|
_formule = profile.get("CAMPICALC", "MAIN");
|
||||||
_formule.add(profile.get("CALCOLI", "MAIN"));
|
_formule.add(profile.get("CALCOLI", "MAIN"));
|
||||||
_imponibile = profile.get("IMPONIBILE", "MAIN");
|
_imponibile = profile.get("IMPONIBILE", "MAIN");
|
||||||
|
if (_imponibile.empty())
|
||||||
|
{
|
||||||
|
_imponibile = "IMPONIBILE";
|
||||||
|
if (_formule.find(_imponibile) < 0)
|
||||||
|
_formule.add("IMPONIBILE=PREZZO()");
|
||||||
|
}
|
||||||
if (_imponibile.not_empty() && _formule.find(_imponibile) < 0)
|
if (_imponibile.not_empty() && _formule.find(_imponibile) < 0)
|
||||||
{
|
{
|
||||||
error_box("Campo imponibile (%s) sconosciuto nel tipo riga %s", (const char *) _imponibile, (const char *) codice());
|
error_box("Campo imponibile (%s) sconosciuto nel tipo riga %s", (const char *) _imponibile, (const char *) codice());
|
||||||
@ -1267,13 +1334,20 @@ TFormula_documento * TTipo_riga_documento::succ_formula(bool restart)
|
|||||||
{
|
{
|
||||||
if (restart)
|
if (restart)
|
||||||
_formule.restart();
|
_formule.restart();
|
||||||
const TString16 formula(_formule.get());
|
const TString formula(_formule.get());
|
||||||
if (formula.not_empty())
|
if (formula.not_empty())
|
||||||
{
|
{
|
||||||
|
char *expr = NULL;
|
||||||
|
const int p = formula.find("=");
|
||||||
|
if (p > 0)
|
||||||
|
{
|
||||||
|
expr = (char *) (const char *) formula + p;
|
||||||
|
*expr = '\0'; expr++;
|
||||||
|
}
|
||||||
TFormula_documento * o = (TFormula_documento*)_formule_riga.objptr(formula);
|
TFormula_documento * o = (TFormula_documento*)_formule_riga.objptr(formula);
|
||||||
if (o == NULL)
|
if (o == NULL)
|
||||||
{
|
{
|
||||||
o = new TFormula_documento(_riga, formula);
|
o = new TFormula_documento(_riga, formula, expr);
|
||||||
_formule_riga.add(formula, o);
|
_formule_riga.add(formula, o);
|
||||||
}
|
}
|
||||||
return o;
|
return o;
|
||||||
@ -1286,7 +1360,7 @@ TVariable_mask * TTipo_riga_documento::mask()
|
|||||||
{
|
{
|
||||||
if (mask_loaded())
|
if (mask_loaded())
|
||||||
return _mask;
|
return _mask;
|
||||||
_mask = new TVariable_mask(mask_name());
|
_mask = new TVariable_mask(mask_name());
|
||||||
TFilename proname(profile_name());
|
TFilename proname(profile_name());
|
||||||
|
|
||||||
proname.ext( "ini" );
|
proname.ext( "ini" );
|
||||||
@ -1321,6 +1395,9 @@ TVariable_mask * TTipo_riga_documento::mask()
|
|||||||
if (num == LF_ANAMAG)
|
if (num == LF_ANAMAG)
|
||||||
{
|
{
|
||||||
_mask->set_handler( FR_CODART, codart_handler );
|
_mask->set_handler( FR_CODART, codart_handler );
|
||||||
|
_mask->set_handler( FR_LIV1, liv_handler );
|
||||||
|
_mask->set_handler( FR_LIV2, liv_handler );
|
||||||
|
_mask->set_handler( FR_LIV3, liv_handler );
|
||||||
_mask->set_handler( FR_UMQTA, umart_handler );
|
_mask->set_handler( FR_UMQTA, umart_handler );
|
||||||
_mask->set_handler( FR_DESCR, descr_handler );
|
_mask->set_handler( FR_DESCR, descr_handler );
|
||||||
_mask->set_handler( FR_QTA, qta_handler );
|
_mask->set_handler( FR_QTA, qta_handler );
|
||||||
@ -1625,8 +1702,20 @@ real TRiga_documento::imponibile() const
|
|||||||
{
|
{
|
||||||
const TString16 field(tipo().imponibile());
|
const TString16 field(tipo().imponibile());
|
||||||
|
|
||||||
if (field.not_empty())
|
if (field.not_empty())
|
||||||
return get_real(field);
|
{
|
||||||
|
if (tipo().tipo() == RIGA_OMAGGI && _iva_calc)
|
||||||
|
{
|
||||||
|
TDocumento_variable_field * f = (TDocumento_variable_field *) variable_field(field);
|
||||||
|
CHECKS(f, "Field UNKNOWN : ", field);
|
||||||
|
f->set_dirty(TRUE);
|
||||||
|
const real r = get_real(field);
|
||||||
|
f->set_dirty(TRUE);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return get_real(field);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return importo(TRUE, FALSE, doc().in_valuta() ? 3 : 0);
|
return importo(TRUE, FALSE, doc().in_valuta() ? 3 : 0);
|
||||||
}
|
}
|
||||||
@ -1706,7 +1795,11 @@ void TRiga_documento::autosave(TSheet_field & f)
|
|||||||
codmag.left_just(3);
|
codmag.left_just(3);
|
||||||
codmag << row.get( f.cid2index(FR_CODDEP ));
|
codmag << row.get( f.cid2index(FR_CODDEP ));
|
||||||
put( "CODMAG", codmag);
|
put( "CODMAG", codmag);
|
||||||
put( "CODART", row.get( f.cid2index(FR_CODART )) );
|
put( "CODART", row.get( f.cid2index(FR_CODART )) );
|
||||||
|
put( "LIVELLO",row.get( f.cid2index(FR_LIV1 ))); // da modificare
|
||||||
|
put( "LIVELLO",row.get( f.cid2index(FR_LIV2 )));
|
||||||
|
put( "LIVELLO",row.get( f.cid2index(FR_LIV3 )));
|
||||||
|
put( "LIVELLO",row.get( f.cid2index(FR_LIV4 )));
|
||||||
TString s(row.get(f.cid2index(FR_DESCR)));
|
TString s(row.get(f.cid2index(FR_DESCR)));
|
||||||
int split_pos = s.find('\n');
|
int split_pos = s.find('\n');
|
||||||
|
|
||||||
@ -1754,6 +1847,7 @@ void TRiga_documento::autoload(TSheet_field & f)
|
|||||||
const int num = numero() - 1;
|
const int num = numero() - 1;
|
||||||
|
|
||||||
TToken_string & row = f.row(num);
|
TToken_string & row = f.row(num);
|
||||||
|
row.cut(0);
|
||||||
|
|
||||||
row.add( get( "STATORIGA" ), f.cid2index(FR_STATORIGA ));
|
row.add( get( "STATORIGA" ), f.cid2index(FR_STATORIGA ));
|
||||||
row.add( get( "TIPORIGA" ), f.cid2index(FR_TIPORIGA ));
|
row.add( get( "TIPORIGA" ), f.cid2index(FR_TIPORIGA ));
|
||||||
@ -1761,6 +1855,10 @@ void TRiga_documento::autoload(TSheet_field & f)
|
|||||||
row.add( codmag.left(3), f.cid2index(FR_CODMAG ));
|
row.add( codmag.left(3), f.cid2index(FR_CODMAG ));
|
||||||
row.add( codmag.mid(3), f.cid2index(FR_CODDEP ));
|
row.add( codmag.mid(3), f.cid2index(FR_CODDEP ));
|
||||||
row.add( get( "CODART" ), f.cid2index(FR_CODART ));
|
row.add( get( "CODART" ), f.cid2index(FR_CODART ));
|
||||||
|
row.add( get( "LIVELLO" ), f.cid2index(FR_LIV1 )); // da modificare
|
||||||
|
row.add( get( "LIVELLO" ), f.cid2index(FR_LIV2 ));
|
||||||
|
row.add( get( "LIVELLO" ), f.cid2index(FR_LIV3 ));
|
||||||
|
row.add( get( "LIVELLO" ), f.cid2index(FR_LIV4 ));
|
||||||
TString s(get("DESCR"));
|
TString s(get("DESCR"));
|
||||||
if (get_bool("DESCLUNGA"))
|
if (get_bool("DESCLUNGA"))
|
||||||
s << get("DESCEST");
|
s << get("DESCEST");
|
||||||
@ -1908,6 +2006,21 @@ void TDocumento::copy_data(TRectype& dst, const TRectype& src)
|
|||||||
if (nriga > 0)
|
if (nriga > 0)
|
||||||
dst.put("NRIGA", nriga);
|
dst.put("NRIGA", nriga);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TDocumento::copy_contents(const TDocumento & src)
|
||||||
|
{
|
||||||
|
copy_data(head(), src.head());
|
||||||
|
destroy_rows();
|
||||||
|
const int rows = src.physical_rows();
|
||||||
|
|
||||||
|
for (int i = 0; i < rows ; i++)
|
||||||
|
{
|
||||||
|
const TRiga_documento & s = src[i];
|
||||||
|
TRiga_documento & r = new_row(s.tipo().codice());
|
||||||
|
|
||||||
|
copy_data(r, s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TRiga_documento& TDocumento::insert_row(int row, const char *tipo)
|
TRiga_documento& TDocumento::insert_row(int row, const char *tipo)
|
||||||
{
|
{
|
||||||
@ -1953,6 +2066,8 @@ int TDocumento::read(const TRectype& rec)
|
|||||||
_rows.set_key(key); // ok
|
_rows.set_key(key); // ok
|
||||||
}
|
}
|
||||||
set_riga_sconto();
|
set_riga_sconto();
|
||||||
|
if (is_fattura())
|
||||||
|
set_riga_esenzione();
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1993,18 +2108,14 @@ void TDocumento::set_riga_sconto()
|
|||||||
{
|
{
|
||||||
if (_sconto == NULL)
|
if (_sconto == NULL)
|
||||||
{
|
{
|
||||||
static TString _tipo_riga;
|
static TString _tipo_riga_sc;
|
||||||
static long firm = -1;
|
if (_tipo_riga_sc.empty())
|
||||||
long new_firm = main_app().get_firm();
|
|
||||||
|
|
||||||
if (firm != new_firm)
|
|
||||||
{
|
{
|
||||||
TConfig conf(CONFIG_DITTA);
|
TConfig conf(CONFIG_STUDIO);
|
||||||
|
|
||||||
_tipo_riga = conf.get("SCOTRIGA", "ve");
|
_tipo_riga_sc = conf.get("TRSCONTI", "ve");
|
||||||
firm = new_firm;
|
|
||||||
}
|
}
|
||||||
_sconto = new TRiga_documento(this, _tipo_riga);
|
_sconto = new TRiga_documento(this, _tipo_riga_sc);
|
||||||
_sconto->put("DESCR","Sconto");
|
_sconto->put("DESCR","Sconto");
|
||||||
}
|
}
|
||||||
_sconto->put("SCONTO", sconto);
|
_sconto->put("SCONTO", sconto);
|
||||||
@ -2012,7 +2123,61 @@ void TDocumento::set_riga_sconto()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TDocumento::set_riga_esenzione()
|
void TDocumento::set_riga_esenzione()
|
||||||
{
|
{
|
||||||
|
TCliFor & c = condv().clifo();
|
||||||
|
const char tipo = get_char("TIPOCF");
|
||||||
|
const long cod = get_long("CODCF");
|
||||||
|
const TString80 occ(get("OCFPI"));
|
||||||
|
c.load(tipo, cod, occ);
|
||||||
|
const TIVA codes(c.get(LF_CFVEN, CLI_ASSFIS));
|
||||||
|
const TString16 v_esenzione(c.get(LF_CFVEN, CLI_VSPROT));
|
||||||
|
const TString16 v_data_esenzione(c.get(LF_CFVEN, CLI_VSDATAREG));
|
||||||
|
// const TString16 ufficio_IVA; ??
|
||||||
|
const TString16 n_registrazione(c.get(LF_CFVEN, CLI_NSPROT));
|
||||||
|
const TString16 n_data_registrazione(c.get(LF_CFVEN, CLI_NSDATAREG));
|
||||||
|
bool esente = codes.tipo().not_empty() && v_esenzione.not_empty() &&
|
||||||
|
v_data_esenzione.not_empty() && n_registrazione.not_empty() &&
|
||||||
|
n_data_registrazione.not_empty();
|
||||||
|
|
||||||
|
if (esente)
|
||||||
|
{
|
||||||
|
esente = FALSE;
|
||||||
|
const TString16 codiva(codes.codice());
|
||||||
|
for (int i = physical_rows(); !esente && i > 0; i--)
|
||||||
|
esente = codiva == row(i).get("CODIVA");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!esente)
|
||||||
|
{
|
||||||
|
if(_esenzione != NULL)
|
||||||
|
delete _esenzione;
|
||||||
|
_esenzione = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
static TString _tipo_riga_es;
|
||||||
|
static real _bollo_es;
|
||||||
|
if (_tipo_riga_es.empty())
|
||||||
|
{
|
||||||
|
TConfig conf(CONFIG_STUDIO);
|
||||||
|
|
||||||
|
_tipo_riga_es = conf.get("TRESENZ", "ve");
|
||||||
|
_bollo_es = (real)conf.get("BOLLIES", "ve");
|
||||||
|
}
|
||||||
|
if (_esenzione == NULL)
|
||||||
|
_esenzione = new TRiga_documento(this, _tipo_riga_es);
|
||||||
|
TString d(256); d.format("Fattura non imponibile come da vostra dichiarazion");
|
||||||
|
|
||||||
|
_esenzione->put( "DESCR", d);
|
||||||
|
|
||||||
|
/* rilasciata dall' ufficio IVA di %s*/
|
||||||
|
d.format("e n. %s del %s da noi annotata al n. %s il %s. Marca da bollo da Lit. %s sull' originale.",
|
||||||
|
(const char *) v_esenzione, (const char *) v_data_esenzione,
|
||||||
|
/*(const char *) ufficio_IVA, */(const char *) n_registrazione,
|
||||||
|
(const char *) n_data_registrazione, _bollo_es.string("."));
|
||||||
|
_esenzione->put("DESCLUNGA", "X");
|
||||||
|
_esenzione->put("DESCEST", d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TDocumento::dirty_fields()
|
void TDocumento::dirty_fields()
|
||||||
@ -2168,7 +2333,7 @@ bool TDocumento::raggruppabile(const TDocumento& doc, TToken_string& campi) cons
|
|||||||
|
|
||||||
void TDocumento::set_fields(TAuto_variable_rectype & rec)
|
void TDocumento::set_fields(TAuto_variable_rectype & rec)
|
||||||
{
|
{
|
||||||
if (get("TIPODOC").not_empty())
|
if (tipo_valido())
|
||||||
{
|
{
|
||||||
TTipo_documento & tipo_doc = (TTipo_documento &) tipo();
|
TTipo_documento & tipo_doc = (TTipo_documento &) tipo();
|
||||||
const TString16 tot_doc(tipo_doc.totale_doc());
|
const TString16 tot_doc(tipo_doc.totale_doc());
|
||||||
@ -2361,9 +2526,23 @@ void TDocumento::zero(const char * fieldname)
|
|||||||
void TDocumento::zero(char c)
|
void TDocumento::zero(char c)
|
||||||
{
|
{
|
||||||
reset_fields(*this);
|
reset_fields(*this);
|
||||||
TAuto_variable_rectype::zero(c);
|
TAuto_variable_rectype::zero(c);
|
||||||
|
destroy_rows();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TDocumento & TDocumento::operator =(const TDocumento & d)
|
||||||
|
{
|
||||||
|
zero();
|
||||||
|
operator=((TRectype &)d);
|
||||||
|
_rows = d._rows;
|
||||||
|
set_riga_sconto();
|
||||||
|
if (is_fattura())
|
||||||
|
set_riga_esenzione();
|
||||||
|
set_relation(d._rel);
|
||||||
|
set_condv(d._condv);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
TRectype & TDocumento::operator =(const TRectype & r)
|
TRectype & TDocumento::operator =(const TRectype & r)
|
||||||
{
|
{
|
||||||
TRectype::operator=(r);
|
TRectype::operator=(r);
|
||||||
@ -2454,7 +2633,6 @@ void TDocumento::update_spese_aut(TString_array & spese_aut, bool preserve_old,
|
|||||||
const int nrow = sh->insert(-1, FALSE);
|
const int nrow = sh->insert(-1, FALSE);
|
||||||
riga.autoload(*sh);
|
riga.autoload(*sh);
|
||||||
sh->check_row(nrow);
|
sh->check_row(nrow);
|
||||||
// sh->post_insert(nrow);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2745,6 +2923,114 @@ int TElaborazione::read(const char* cod)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TEsterna
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
TEsterna::TEsterna(const char* cod)
|
||||||
|
: TElaborazione(cod)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TEsterna::elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab)
|
||||||
|
{
|
||||||
|
CHECK(doc_in.items() == 1, "Si deve specificare uno e un solo documento in entrata");
|
||||||
|
CHECK(doc_out.items() == 1, "Si deve specificare uno e un solo documento in uscita");
|
||||||
|
TFilename name; name.temp("ext");
|
||||||
|
{
|
||||||
|
TConfig c(name);
|
||||||
|
TDocumento & d = doc_in[0];
|
||||||
|
int nfields = d.items();
|
||||||
|
TString par; par.format("%d,0", LF_DOC);
|
||||||
|
|
||||||
|
for (int i = 0; i < nfields; i++)
|
||||||
|
{
|
||||||
|
const TString16 fname(d.fieldname(i));
|
||||||
|
TFieldref f(fname, LF_DOC);
|
||||||
|
|
||||||
|
f.write(c, par, d.get(fname));
|
||||||
|
}
|
||||||
|
for (TVariable_field * v = d.first_variable_field(); v ; v = d.succ_variable_field())
|
||||||
|
c.set(v->name(), v->get(), par);
|
||||||
|
const int rows = d.physical_rows();
|
||||||
|
if (rows > 0)
|
||||||
|
{
|
||||||
|
nfields = d[0].items();
|
||||||
|
|
||||||
|
for (int r = 0; r < rows; r++)
|
||||||
|
{
|
||||||
|
TRiga_documento row = d[r];
|
||||||
|
|
||||||
|
par.format("%d,%d", LF_RIGHEDOC, r + 1);
|
||||||
|
for (int i = 0; i < nfields; i++)
|
||||||
|
{
|
||||||
|
const TString16 fname(row.fieldname(i));
|
||||||
|
TFieldref f(fname, LF_RIGHEDOC);
|
||||||
|
|
||||||
|
f.write(c, par, row.get(fname));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TString command_line(applicazione_esterna()); command_line << " -i " << name;
|
||||||
|
TExternal_app app(command_line);
|
||||||
|
if (app.run() == 0)
|
||||||
|
{
|
||||||
|
TConfig c(name);
|
||||||
|
TDocumento & d = doc_out[0];
|
||||||
|
int nfields = d.items();
|
||||||
|
TString par; par.format("%d,0", LF_DOC);
|
||||||
|
|
||||||
|
for (int i = 0; i < nfields; i++)
|
||||||
|
{
|
||||||
|
const TString16 fname(d.fieldname(i));
|
||||||
|
TFieldref f(fname, LF_DOC);
|
||||||
|
|
||||||
|
d.put(fname, f.read(c, par));
|
||||||
|
}
|
||||||
|
for (TVariable_field * v = d.first_variable_field(); v ; v = d.succ_variable_field())
|
||||||
|
v->put(c.get(v->name(), par));
|
||||||
|
|
||||||
|
TString_array p;
|
||||||
|
|
||||||
|
c.list_paragraphs(p);
|
||||||
|
nfields = d[0].items();
|
||||||
|
d.destroy_rows();
|
||||||
|
int r = 1 ;
|
||||||
|
par.format("%d,%d", LF_RIGHEDOC, r);
|
||||||
|
while (p.find(par) >= 0)
|
||||||
|
{
|
||||||
|
TRiga_documento row = d.new_row();
|
||||||
|
for (int i = 0; i < nfields; i++)
|
||||||
|
{
|
||||||
|
const TString16 fname(row.fieldname(i));
|
||||||
|
TFieldref f(fname, LF_RIGHEDOC);
|
||||||
|
|
||||||
|
row.put(fname, f.read(c, par));
|
||||||
|
}
|
||||||
|
r++;
|
||||||
|
par.format("%d,%d", LF_RIGHEDOC, r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TConsegna ordini
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
TConsegna_ordini::TConsegna_ordini(const char* cod)
|
||||||
|
: TElaborazione(cod)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TConsegna_ordini::elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab)
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TFatturazione bolle
|
// TFatturazione bolle
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -2948,3 +3234,142 @@ bool TFatturazione_bolle::elabora(TLista_documenti& doc_in, TLista_documenti& do
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TContabilizzazione
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
TContabilizzazione::TContabilizzazione(const char* cod)
|
||||||
|
: TElaborazione(cod)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TContabilizzazione::elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab)
|
||||||
|
{
|
||||||
|
CHECK(doc_in.items() == 1, "Si deve specificare uno e un solo documento in entrata");
|
||||||
|
CHECK(doc_out.items() == 1, "Si deve specificare uno e un solo documento in uscita");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TCopia_documento
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
TCopia_documento::TCopia_documento(const char* cod)
|
||||||
|
: TElaborazione(cod)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TCopia_documento::elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab)
|
||||||
|
{
|
||||||
|
CHECK(doc_in.items() == 1, "Si deve specificare uno e un solo documento in entrata");
|
||||||
|
CHECK(doc_out.items() == 1, "Si deve specificare uno e un solo documento in uscita");
|
||||||
|
TDocumento & doc_src = doc_in[0];
|
||||||
|
TDocumento & doc_dest = doc_out[0];
|
||||||
|
|
||||||
|
doc_dest.copy_contents(doc_src);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TGenerazione_effetti
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
TGenerazione_effetti::TGenerazione_effetti(const char* cod)
|
||||||
|
: TElaborazione(cod)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TGenerazione_effetti::elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab)
|
||||||
|
{
|
||||||
|
CHECK(doc_in.items() == 1, "Si deve specificare uno e un solo documento in entrata");
|
||||||
|
CHECK(doc_out.items() == 1, "Si deve specificare uno e un solo documento in uscita");
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TLista_elaborazioni
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void TLista_elaborazioni::read()
|
||||||
|
{
|
||||||
|
if (_elab == NULL)
|
||||||
|
{
|
||||||
|
_elab = new TAssoc_array();
|
||||||
|
|
||||||
|
TTable eld("%ELD");
|
||||||
|
|
||||||
|
for (int err = eld.first(); err == NOERR; err = eld.next())
|
||||||
|
{
|
||||||
|
TElaborazione * el = NULL;
|
||||||
|
switch (eld.curr().get_int("I0"))
|
||||||
|
{
|
||||||
|
case _esterna :
|
||||||
|
el = new TEsterna(eld.curr());
|
||||||
|
break;
|
||||||
|
case _consegna_ordini:
|
||||||
|
el = new TConsegna_ordini(eld.curr());
|
||||||
|
break;
|
||||||
|
case _fatturazione_bolle :
|
||||||
|
el = new TFatturazione_bolle(eld.curr());
|
||||||
|
break;
|
||||||
|
case _contabilizzazione :
|
||||||
|
el = new TContabilizzazione(eld.curr());
|
||||||
|
break;
|
||||||
|
case _copia_documento :
|
||||||
|
el = new TCopia_documento(eld.curr());
|
||||||
|
break;
|
||||||
|
case _generazione_effetti :
|
||||||
|
el = new TGenerazione_effetti(eld.curr());
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
_elab->add(el->codice(), el);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int TLista_elaborazioni::select(TString_array & result, bool interattivo, bool insert_mode, const char * tipo_iniziale, const char * stato_iniziale, const char * tipo_finale, const char * stato_finale)
|
||||||
|
{
|
||||||
|
read();
|
||||||
|
_elab->restart();
|
||||||
|
result.destroy();
|
||||||
|
for (TElaborazione * el = (TElaborazione *)_elab->get(); el ; el = (TElaborazione *) _elab->get())
|
||||||
|
{
|
||||||
|
bool ok = TRUE;
|
||||||
|
if (tipo_iniziale && stato_iniziale)
|
||||||
|
{
|
||||||
|
bool found = FALSE;
|
||||||
|
for (int i = 0; !found && i < 5; i++)
|
||||||
|
found = el->tipo_iniziale(i) == tipo_iniziale && el->stato_iniziale(i) == *stato_iniziale;
|
||||||
|
ok = found;
|
||||||
|
}
|
||||||
|
ok &= (tipo_finale && stato_finale && el->tipo_finale() == tipo_finale && el->stato_finale() == *stato_finale);
|
||||||
|
if (ok && (!interattivo || interattivo == el->interattivo()) &&
|
||||||
|
(!insert_mode || insert_mode == el->insert_mode()))
|
||||||
|
result.add(el->codice());
|
||||||
|
}
|
||||||
|
return result.items();
|
||||||
|
}
|
||||||
|
|
||||||
|
TElaborazione & TLista_elaborazioni::operator [](const char * key) const
|
||||||
|
{
|
||||||
|
((TLista_elaborazioni *)this)->read();
|
||||||
|
return (TElaborazione &) (*_elab)[key];
|
||||||
|
}
|
||||||
|
|
||||||
|
void TLista_elaborazioni::update()
|
||||||
|
{
|
||||||
|
delete _elab; _elab = NULL;
|
||||||
|
read();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
TLista_elaborazioni::~TLista_elaborazioni()
|
||||||
|
{
|
||||||
|
if (_elab)
|
||||||
|
delete _elab;
|
||||||
|
}
|
||||||
|
114
ve/velib01.h
114
ve/velib01.h
@ -160,10 +160,10 @@ class TFormula_documento : public TRectype
|
|||||||
TExpr_documento * _expr;
|
TExpr_documento * _expr;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int read(const char* codice);
|
int read(const char* codice, const char* expr = NULL, bool numexpr = TRUE);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TObject* dup() const { return new TFormula_documento(_tab == "%FRD" ? _documento : _riga, codice()); }
|
TObject* dup() const { return new TFormula_documento(_tab == "%FRD" ? _documento : _riga, codice(), NULL, TRUE); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const TString& codice() const { return get("CODTAB");}
|
const TString& codice() const { return get("CODTAB");}
|
||||||
@ -174,7 +174,7 @@ public:
|
|||||||
const TString& expr_string() const { return get("S1"); }
|
const TString& expr_string() const { return get("S1"); }
|
||||||
TTypeexp expr_type() const { return get_bool("B0") ? _numexpr : _strexpr;}
|
TTypeexp expr_type() const { return get_bool("B0") ? _numexpr : _strexpr;}
|
||||||
|
|
||||||
TFormula_documento(TTipo_formula tipo = _documento, const char* codice = NULL);
|
TFormula_documento(TTipo_formula tipo = _documento, const char* codice = NULL, const char* expr = NULL, bool numexpr = TRUE);
|
||||||
TFormula_documento(const TRectype& rec);
|
TFormula_documento(const TRectype& rec);
|
||||||
virtual ~TFormula_documento();
|
virtual ~TFormula_documento();
|
||||||
};
|
};
|
||||||
@ -182,7 +182,8 @@ public:
|
|||||||
|
|
||||||
class TTipo_documento : public TRectype
|
class TTipo_documento : public TRectype
|
||||||
{
|
{
|
||||||
|
enum { _altro, _fattura, _bolla, _ordine};
|
||||||
|
|
||||||
static TAssoc_array _formule_documento;
|
static TAssoc_array _formule_documento;
|
||||||
TToken_string _formule;
|
TToken_string _formule;
|
||||||
TString16 _imponibile;
|
TString16 _imponibile;
|
||||||
@ -203,8 +204,14 @@ public:
|
|||||||
const TString& profile_name() const { return get("S4");}
|
const TString& profile_name() const { return get("S4");}
|
||||||
const TString& mask_name() const { return get("S4");}
|
const TString& mask_name() const { return get("S4");}
|
||||||
const TString& causale() const { return get("S6"); }
|
const TString& causale() const { return get("S6"); }
|
||||||
|
int tipo() const { return get_int("I1"); }
|
||||||
const TString& codice() const { return get("CODTAB");}
|
const TString& codice() const { return get("CODTAB");}
|
||||||
|
|
||||||
|
bool is_generic() const { return tipo() == _altro; }
|
||||||
|
bool is_fattura() const { return tipo() == _fattura; }
|
||||||
|
bool is_bolla() const { return tipo() == _bolla; }
|
||||||
|
bool is_ordine() const { return tipo() == _ordine; }
|
||||||
|
|
||||||
const TString& descrizione() const { return get("S0"); }
|
const TString& descrizione() const { return get("S0"); }
|
||||||
const TString& riferimento() const { return get("S1"); }
|
const TString& riferimento() const { return get("S1"); }
|
||||||
const TString& imponibile() const { return _imponibile;}
|
const TString& imponibile() const { return _imponibile;}
|
||||||
@ -361,12 +368,14 @@ public:
|
|||||||
void set_condv(TCond_vendita * condv) { _condv = condv; }
|
void set_condv(TCond_vendita * condv) { _condv = condv; }
|
||||||
void set_relation(TRelation * rel) { _rel = rel; }
|
void set_relation(TRelation * rel) { _rel = rel; }
|
||||||
|
|
||||||
|
virtual TDocumento & operator =(const TDocumento & d);
|
||||||
virtual TRectype & operator =(const TRectype & r);
|
virtual TRectype & operator =(const TRectype & r);
|
||||||
virtual TRectype & operator =(const char * r);
|
virtual TRectype & operator =(const char * r);
|
||||||
virtual void zero(const char * fieldname);
|
virtual void zero(const char * fieldname);
|
||||||
virtual void zero(char c = '\0');
|
virtual void zero(char c = '\0');
|
||||||
|
|
||||||
int rows() const { return _rows.rows() + ((_sconto != NULL) ? 1 : 0) + ((_esenzione != NULL) ? 1 : 0); }
|
int physical_rows() const { return _rows.rows(); }
|
||||||
|
int rows() const { return physical_rows() + ((_sconto != NULL) ? 1 : 0) + ((_esenzione != NULL) ? 1 : 0); }
|
||||||
const TRiga_documento& operator[](int index) const { return (const TRiga_documento&)((TDocumento *)this)->row(index); }
|
const TRiga_documento& operator[](int index) const { return (const TRiga_documento&)((TDocumento *)this)->row(index); }
|
||||||
TRiga_documento& operator[](int index) { return (TRiga_documento&)row(index); }
|
TRiga_documento& operator[](int index) { return (TRiga_documento&)row(index); }
|
||||||
|
|
||||||
@ -389,7 +398,8 @@ public:
|
|||||||
TDate data() const { return get_date("DATADOC"); }
|
TDate data() const { return get_date("DATADOC"); }
|
||||||
const bool in_valuta() const;
|
const bool in_valuta() const;
|
||||||
const TString& valuta() const { return get("CODVAL"); }
|
const TString& valuta() const { return get("CODVAL"); }
|
||||||
const real cambio() { return get_real("CAMBIO"); }
|
const real cambio() const { return get_real("CAMBIO"); }
|
||||||
|
bool tipo_valido() const { return get("TIPODOC").not_empty(); }
|
||||||
const TTipo_documento& tipo() const;
|
const TTipo_documento& tipo() const;
|
||||||
void set_tipo(const char * tipo) { head().put("TIPODOC", tipo);}
|
void set_tipo(const char * tipo) { head().put("TIPODOC", tipo);}
|
||||||
|
|
||||||
@ -401,6 +411,7 @@ public:
|
|||||||
|
|
||||||
static void set_key(TRectype& rec, char provv, int anno, const char* codnum, long numdoc);
|
static void set_key(TRectype& rec, char provv, int anno, const char* codnum, long numdoc);
|
||||||
static void copy_data(TRectype& dst, const TRectype& src);
|
static void copy_data(TRectype& dst, const TRectype& src);
|
||||||
|
void copy_contents(const TDocumento & src);
|
||||||
|
|
||||||
void reset_fields(TAuto_variable_rectype & rec) { rec.remove_field(); }
|
void reset_fields(TAuto_variable_rectype & rec) { rec.remove_field(); }
|
||||||
void set_fields(TAuto_variable_rectype & rec);
|
void set_fields(TAuto_variable_rectype & rec);
|
||||||
@ -421,6 +432,12 @@ public:
|
|||||||
|
|
||||||
void update_spese_aut(TString_array & spese, bool preserve_old = FALSE, TSheet_field * sh = NULL);
|
void update_spese_aut(TString_array & spese, bool preserve_old = FALSE, TSheet_field * sh = NULL);
|
||||||
|
|
||||||
|
bool is_generic() const { return tipo_valido() && tipo().is_generic(); }
|
||||||
|
bool is_fattura() const { return tipo_valido() && tipo().is_fattura(); }
|
||||||
|
bool is_bolla() const { return tipo_valido() && tipo().is_bolla(); }
|
||||||
|
bool is_ordine() const { return tipo_valido() && tipo().is_ordine(); }
|
||||||
|
|
||||||
|
|
||||||
TDocumento ();
|
TDocumento ();
|
||||||
TDocumento(char provv, int anno, const char* codnum, long numdoc,
|
TDocumento(char provv, int anno, const char* codnum, long numdoc,
|
||||||
TCond_vendita * condv = NULL, TRelation * rel = NULL);
|
TCond_vendita * condv = NULL, TRelation * rel = NULL);
|
||||||
@ -539,6 +556,8 @@ class TLista_fornitori : public TLista_clifo
|
|||||||
protected:
|
protected:
|
||||||
virtual char tipo() const { return 'F'; }
|
virtual char tipo() const { return 'F'; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum TTipo_elaborazione {_esterna, _consegna_ordini, _fatturazione_bolle, _contabilizzazione, _copia_documento, _generazione_effetti };
|
||||||
|
|
||||||
class TElaborazione : public TRectype
|
class TElaborazione : public TRectype
|
||||||
{
|
{
|
||||||
@ -547,6 +566,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
const TString& codice() const { return get("CODTAB"); }
|
const TString& codice() const { return get("CODTAB"); }
|
||||||
|
const TTipo_elaborazione tipo() const { return (TTipo_elaborazione) get_int("I0"); }
|
||||||
|
|
||||||
bool doc_uguale(int u) const { return get("S1")[u] == 'X'; }
|
bool doc_uguale(int u) const { return get("S1")[u] == 'X'; }
|
||||||
bool riga_uguale(int u) const { return get("S1")[40+u] == 'X'; }
|
bool riga_uguale(int u) const { return get("S1")[40+u] == 'X'; }
|
||||||
@ -554,9 +574,17 @@ public:
|
|||||||
bool gestione_riferimenti() const { return get_bool("B1"); }
|
bool gestione_riferimenti() const { return get_bool("B1"); }
|
||||||
bool riferimenti_in_testa() const { return get_bool("B2"); }
|
bool riferimenti_in_testa() const { return get_bool("B2"); }
|
||||||
bool ignora_descrizioni() const { return get_bool("B3"); }
|
bool ignora_descrizioni() const { return get_bool("B3"); }
|
||||||
|
bool interattivo() const { return get_bool("B5"); }
|
||||||
|
bool insert_mode() const { return get_bool("B6"); }
|
||||||
|
|
||||||
|
const TString& tipo_iniziale(int i) const { return get("S8").mid(i*4, 4); }
|
||||||
|
const char stato_iniziale(int i) const { return get("S9")[i]; }
|
||||||
|
const TString& tipo_finale() const { return get("S8"); }
|
||||||
|
const TString& stato_finale() const { return get("S9"); }
|
||||||
|
|
||||||
char tipo_numerazione() const { return get_bool("B4") ? 'P' : 'D'; }
|
char tipo_numerazione() const { return get_bool("B4") ? 'P' : 'D'; }
|
||||||
const TString& codice_numerazione_finale() const { return get("S6"); }
|
const TString& codice_numerazione_finale() const { return get("S6"); }
|
||||||
|
const TString & applicazione_esterna() const { return get("S5"); }
|
||||||
|
|
||||||
virtual bool elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
virtual bool elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
const TDate& data_elab) pure;
|
const TDate& data_elab) pure;
|
||||||
@ -566,6 +594,28 @@ public:
|
|||||||
virtual ~TElaborazione() { }
|
virtual ~TElaborazione() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TEsterna : public TElaborazione
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab);
|
||||||
|
|
||||||
|
TEsterna(const char* cod);
|
||||||
|
TEsterna(const TRectype& rec) : TElaborazione(rec) { }
|
||||||
|
virtual ~TEsterna() { }
|
||||||
|
};
|
||||||
|
|
||||||
|
class TConsegna_ordini : public TElaborazione
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab);
|
||||||
|
|
||||||
|
TConsegna_ordini(const char* cod);
|
||||||
|
TConsegna_ordini(const TRectype& rec) : TElaborazione(rec) { }
|
||||||
|
virtual ~TConsegna_ordini() { }
|
||||||
|
};
|
||||||
|
|
||||||
class TFatturazione_bolle : public TElaborazione
|
class TFatturazione_bolle : public TElaborazione
|
||||||
{
|
{
|
||||||
TToken_string _cod_desc;
|
TToken_string _cod_desc;
|
||||||
@ -579,7 +629,57 @@ public:
|
|||||||
void stati_validi(TToken_string& stati) const;
|
void stati_validi(TToken_string& stati) const;
|
||||||
|
|
||||||
TFatturazione_bolle(const char* cod);
|
TFatturazione_bolle(const char* cod);
|
||||||
|
TFatturazione_bolle(const TRectype& rec) : TElaborazione(rec) { }
|
||||||
virtual ~TFatturazione_bolle() { }
|
virtual ~TFatturazione_bolle() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TContabilizzazione : public TElaborazione
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab);
|
||||||
|
|
||||||
|
TContabilizzazione(const char* cod);
|
||||||
|
TContabilizzazione(const TRectype& rec) : TElaborazione(rec) { }
|
||||||
|
virtual ~TContabilizzazione() { }
|
||||||
|
};
|
||||||
|
|
||||||
|
class TCopia_documento : public TElaborazione
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab);
|
||||||
|
|
||||||
|
TCopia_documento(const char* cod);
|
||||||
|
TCopia_documento(const TRectype& rec) : TElaborazione(rec) { }
|
||||||
|
virtual ~TCopia_documento() { }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class TGenerazione_effetti : public TElaborazione
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab);
|
||||||
|
|
||||||
|
TGenerazione_effetti(const char* cod);
|
||||||
|
TGenerazione_effetti(const TRectype& rec) : TElaborazione(rec) { }
|
||||||
|
virtual ~TGenerazione_effetti() { }
|
||||||
|
};
|
||||||
|
|
||||||
|
class TLista_elaborazioni : public TObject
|
||||||
|
{
|
||||||
|
TAssoc_array * _elab;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void read();
|
||||||
|
|
||||||
|
public:
|
||||||
|
TElaborazione & operator [](const char * key) const;
|
||||||
|
int select(TString_array & result, bool interattivo, bool insert_mode, const char * tipo_iniziale = NULL, const char * stato_iniziale = NULL, const char * tipo_finale = NULL, const char * stato_finale = NULL);
|
||||||
|
void update();
|
||||||
|
TLista_elaborazioni() : _elab(NULL) {}
|
||||||
|
virtual ~TLista_elaborazioni();
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -313,8 +313,8 @@ const char* TDocumentoEsteso::get_head_info(const TString & what)
|
|||||||
return (const char*) rt;
|
return (const char*) rt;
|
||||||
}
|
}
|
||||||
|
|
||||||
TDocumentoEsteso::TDocumentoEsteso(const TRectype& rec, TCliFor *cli)
|
TDocumentoEsteso::TDocumentoEsteso(const TRectype& rec, TCond_vendita * condv)
|
||||||
: TDocumento(rec), _sum_filter(-1), _sum_selected(FALSE), _scadenze_current(-1)
|
: TDocumento(rec, condv), _sum_filter(-1), _sum_selected(FALSE), _scadenze_current(-1)
|
||||||
{
|
{
|
||||||
_iva = new TTable("%IVA");
|
_iva = new TTable("%IVA");
|
||||||
// Inizializza i parametri di default
|
// Inizializza i parametri di default
|
||||||
@ -323,8 +323,8 @@ TDocumentoEsteso::TDocumentoEsteso(const TRectype& rec, TCliFor *cli)
|
|||||||
_parm.imp_lit = 0; _parm.imp_val = 3;
|
_parm.imp_lit = 0; _parm.imp_val = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
TDocumentoEsteso::TDocumentoEsteso(const TRectype& rec, dec_parm & parm, TCliFor *cli)
|
TDocumentoEsteso::TDocumentoEsteso(const TRectype& rec, dec_parm & parm, TCond_vendita * condv)
|
||||||
: TDocumento(rec), _sum_filter(-1), _sum_selected(FALSE), _scadenze_current(-1)
|
: TDocumento(rec, condv), _sum_filter(-1), _sum_selected(FALSE), _scadenze_current(-1)
|
||||||
{
|
{
|
||||||
_parm = parm;
|
_parm = parm;
|
||||||
_iva = new TTable("%IVA");
|
_iva = new TTable("%IVA");
|
||||||
|
@ -138,8 +138,8 @@ public:
|
|||||||
// Funzioni per settare i parametri
|
// Funzioni per settare i parametri
|
||||||
void set_decimals(dec_parm & parm) { _parm = parm ; }
|
void set_decimals(dec_parm & parm) { _parm = parm ; }
|
||||||
void set_condv(TCliFor * cli); // Cambia le condizioni di vendita
|
void set_condv(TCliFor * cli); // Cambia le condizioni di vendita
|
||||||
TDocumentoEsteso (const TRectype & rec, dec_parm & parm, TCliFor * cli = NULL) ;
|
TDocumentoEsteso (const TRectype & rec, dec_parm & parm, TCond_vendita * condv = NULL) ;
|
||||||
TDocumentoEsteso (const TRectype & rec, TCliFor * cli = NULL) ;
|
TDocumentoEsteso (const TRectype & rec, TCond_vendita * condv = NULL) ;
|
||||||
TDocumentoEsteso () ;
|
TDocumentoEsteso () ;
|
||||||
~TDocumentoEsteso();
|
~TDocumentoEsteso();
|
||||||
};
|
};
|
||||||
|
56
ve/verig.h
56
ve/verig.h
@ -12,37 +12,41 @@
|
|||||||
#define FR_CODSPQ 105
|
#define FR_CODSPQ 105
|
||||||
#define FR_CODSPP 105
|
#define FR_CODSPP 105
|
||||||
#define FR_CODPRS 105
|
#define FR_CODPRS 105
|
||||||
|
#define FR_LIV1 106
|
||||||
|
#define FR_LIV2 107
|
||||||
|
#define FR_LIV3 108
|
||||||
|
#define FR_LIV4 109
|
||||||
// DESCR DESCRART DESCRSPV DESCPSPQ DESCRSPP DESCRPRS alternativi definirne uno solo
|
// DESCR DESCRART DESCRSPV DESCPSPQ DESCRSPP DESCRPRS alternativi definirne uno solo
|
||||||
#define FR_DESCR 106
|
#define FR_DESCR 110
|
||||||
#define FR_DESCRART 106
|
#define FR_DESCRART 110
|
||||||
#define FR_DESCRSPV 106
|
#define FR_DESCRSPV 110
|
||||||
#define FR_DESCRSPQ 106
|
#define FR_DESCRSPQ 110
|
||||||
#define FR_DESCRSPP 106
|
#define FR_DESCRSPP 110
|
||||||
#define FR_DESCRPRS 106
|
#define FR_DESCRPRS 110
|
||||||
// UMQTA UMQTASP UMQTAPR alternativi definirne uno solo
|
// UMQTA UMQTASP UMQTAPR alternativi definirne uno solo
|
||||||
#define FR_UMQTA 107
|
#define FR_UMQTA 111
|
||||||
#define FR_UMQTASP 107
|
#define FR_UMQTASP 111
|
||||||
// QTA PERCSP alternativi definirne uno solo
|
// QTA PERCSP alternativi definirne uno solo
|
||||||
#define FR_QTA 108
|
#define FR_QTA 112
|
||||||
#define FR_PERCSP 108
|
#define FR_PERCSP 112
|
||||||
// PREZZO VALORE alternativi definirne uno solo
|
// PREZZO VALORE alternativi definirne uno solo
|
||||||
#define FR_PREZZO 109
|
#define FR_PREZZO 113
|
||||||
#define FR_VALORE 109
|
#define FR_VALORE 113
|
||||||
|
|
||||||
#define FR_QTAEVASA 110
|
#define FR_QTAEVASA 114
|
||||||
#define FR_RIGAEVASA 111
|
#define FR_RIGAEVASA 115
|
||||||
#define FR_TARA 112
|
#define FR_TARA 116
|
||||||
#define FR_PNETTO 113
|
#define FR_PNETTO 117
|
||||||
#define FR_NCOLLI 114
|
#define FR_NCOLLI 118
|
||||||
#define FR_DAEVADERE 115
|
#define FR_DAEVADERE 119
|
||||||
#define FR_SCONTO 116
|
#define FR_SCONTO 120
|
||||||
#define FR_PERCPROV 117
|
#define FR_PERCPROV 121
|
||||||
#define FR_IMPFISUN 118
|
#define FR_IMPFISUN 122
|
||||||
#define FR_IMPFISSO 119
|
#define FR_IMPFISSO 123
|
||||||
#define FR_CODIVA 120
|
#define FR_CODIVA 124
|
||||||
#define FR_ADDIVA 121
|
#define FR_ADDIVA 125
|
||||||
#define FR_ASPBENI 122
|
#define FR_ASPBENI 126
|
||||||
#define FR_END 123
|
#define FR_END 127
|
||||||
#define MAX_COLUMNS FR_END-FR_STATORIGA
|
#define MAX_COLUMNS FR_END-FR_STATORIGA
|
||||||
|
|
||||||
#define FR_DESMAG 150
|
#define FR_DESMAG 150
|
||||||
|
85
ve/verig.uml
85
ve/verig.uml
@ -150,7 +150,7 @@ ENDIF
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IFDEF(F_CODART)
|
IFDEF(F_CODART)
|
||||||
ST FR_CODART 20
|
STRING FR_CODART 20
|
||||||
BEGIN
|
BEGIN
|
||||||
IFDEF(X_CODART)
|
IFDEF(X_CODART)
|
||||||
PROMPT X_CODART Y_CODART PR_CODART
|
PROMPT X_CODART Y_CODART PR_CODART
|
||||||
@ -172,6 +172,89 @@ ENDIF
|
|||||||
FIELD CODART
|
FIELD CODART
|
||||||
ADD RUN ve2 -3
|
ADD RUN ve2 -3
|
||||||
END
|
END
|
||||||
|
|
||||||
|
STRING FR_LIV1 10
|
||||||
|
BEGIN
|
||||||
|
IFDEF(X_LIV1)
|
||||||
|
PROMPT X_LIV1 Y_LIV1 ""
|
||||||
|
ELSEIF
|
||||||
|
PROMPT 37 6 ""
|
||||||
|
FLAGS "U"
|
||||||
|
USE GCG
|
||||||
|
JOIN FCG ALIAS 500 INTO CODTAB==CODTAB[1,1]
|
||||||
|
INPUT CODTAB[1,1] "1"
|
||||||
|
INPUT CODTAB[2,] FR_LIV1
|
||||||
|
DISPLAY "Livello@20" 500@->S0
|
||||||
|
DISPLAY "Gruppo@10" CODTAB[2,]
|
||||||
|
DISPLAY "Descrizione@30" S0
|
||||||
|
OUTPUT FR_LIV1 CODTAB[2,]
|
||||||
|
MESSAGE EMPTY RESET,FR_LIV2|RESET,FR_LIV3|RESET,FR_LIV4
|
||||||
|
MESSAGE ENABLE,FR_LIV2
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
ENDIF
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING FR_LIV2 6
|
||||||
|
BEGIN
|
||||||
|
IFDEF(X_LIV2)
|
||||||
|
PROMPT X_LIV2 Y_LIV2 ""
|
||||||
|
ELSEIF
|
||||||
|
PROMPT 50 6 ""
|
||||||
|
ENDIF
|
||||||
|
FLAGS "U"
|
||||||
|
USE GCG
|
||||||
|
JOIN FCG ALIAS 500 INTO CODTAB==CODTAB[1,1]
|
||||||
|
INPUT CODTAB[1,1] "2"
|
||||||
|
INPUT CODTAB[2,] FR_LIV2
|
||||||
|
DISPLAY "Livello@20" 500@->S0
|
||||||
|
DISPLAY "Gruppo@10" CODTAB[2,]
|
||||||
|
DISPLAY "Descrizione@30" S0
|
||||||
|
OUTPUT FR_LIV2 CODTAB[2,]
|
||||||
|
MESSAGE EMPTY RESET,FR_LIV3|RESET,FR_LIV4
|
||||||
|
MESSAGE ENABLE,FR_LIV3
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING FR_LIV3 6
|
||||||
|
BEGIN
|
||||||
|
IFDEF(X_LIV3)
|
||||||
|
PROMPT X_LIV3 Y_LIV3 ""
|
||||||
|
ELSEIF
|
||||||
|
PROMPT 59 6 ""
|
||||||
|
ENDIF
|
||||||
|
FLAGS "U"
|
||||||
|
USE GCG
|
||||||
|
JOIN FCG ALIAS 500 INTO CODTAB==CODTAB[1,1]
|
||||||
|
INPUT CODTAB[1,1] "3"
|
||||||
|
INPUT CODTAB[2,] FR_LIV3
|
||||||
|
DISPLAY "Livello@20" 500@->S0
|
||||||
|
DISPLAY "Gruppo@10" CODTAB[2,]
|
||||||
|
DISPLAY "Descrizione@30" S0
|
||||||
|
OUTPUT FR_LIV3 CODTAB[2,]
|
||||||
|
MESSAGE EMPTY RESET,FR_LIV4
|
||||||
|
MESSAGE ENABLE,FR_LIV4
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING FR_LIV4 6
|
||||||
|
BEGIN
|
||||||
|
IFDEF(X_LIV4)
|
||||||
|
PROMPT X_LIV4 Y_LIV4 ""
|
||||||
|
ELSEIF
|
||||||
|
PROMPT 67 6 ""
|
||||||
|
ENDIF
|
||||||
|
FLAGS "U"
|
||||||
|
USE GCG
|
||||||
|
JOIN FCG ALIAS 500 INTO CODTAB==CODTAB[1,1]
|
||||||
|
INPUT CODTAB[1,1] "4"
|
||||||
|
INPUT CODTAB[2,] FR_LIV4
|
||||||
|
DISPLAY "Livello@20" 500@->S0
|
||||||
|
DISPLAY "Gruppo@10" CODTAB[2,]
|
||||||
|
DISPLAY "Descrizione@30" S0
|
||||||
|
OUTPUT FR_LIV4 CODTAB[2,]
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IFDEF(F_CODSPV)
|
IFDEF(F_CODSPV)
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PROVVR|SCONTOR
|
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PROVVR|SCONTOR
|
||||||
CAMPICALC=
|
CAMPICALC=
|
||||||
IMPONIBILE=IMPNS
|
IMPONIBILE=IMPNS
|
||||||
IMPOSTA=IMPOSTA
|
|
||||||
|
|
||||||
[HANDLERS]
|
[HANDLERS]
|
||||||
NHANDLER = 0
|
NHANDLER = 0
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PREZZONS|SCONTOR
|
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PREZZONS|SCONTOR
|
||||||
CAMPICALC=
|
CAMPICALC=
|
||||||
IMPONIBILE=IMPNS
|
IMPONIBILE=IMPNS
|
||||||
IMPOSTA=IMPOSTA
|
|
||||||
|
|
||||||
[HANDLERS]
|
[HANDLERS]
|
||||||
NHANDLER = 0
|
NHANDLER = 0
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PREZZONS|SCONTOR
|
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PREZZONS|SCONTOR
|
||||||
CAMPICALC=
|
CAMPICALC=
|
||||||
IMPONIBILE=IMPNS
|
IMPONIBILE=IMPNS
|
||||||
IMPOSTA=IMPOSTA
|
|
||||||
|
|
||||||
[HANDLERS]
|
[HANDLERS]
|
||||||
NHANDLER = 0
|
NHANDLER = 0
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA|PREZZOLN
|
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA|PREZZOLN
|
||||||
CAMPICALC=
|
CAMPICALC=
|
||||||
IMPONIBILE=IMPNN
|
IMPONIBILE=IMPNN
|
||||||
IMPOSTA=IMPOSTA
|
|
||||||
|
|
||||||
[HANDLERS]
|
[HANDLERS]
|
||||||
NHANDLER = 0
|
NHANDLER = 0
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
CALCOLI=
|
CALCOLI=
|
||||||
CAMPICALC=
|
CAMPICALC=
|
||||||
IMPONIBILE=
|
IMPONIBILE=
|
||||||
IMPOSTA=
|
|
||||||
|
|
||||||
[HANDLERS]
|
[HANDLERS]
|
||||||
NHANDLER = 0
|
NHANDLER = 0
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PREZZONS|SCONTOR
|
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PREZZONS|SCONTOR
|
||||||
CAMPICALC=
|
CAMPICALC=
|
||||||
IMPONIBILE=IMPNS
|
IMPONIBILE=IMPNS
|
||||||
IMPOSTA=IMPOSTA
|
|
||||||
|
|
||||||
[HANDLERS]
|
[HANDLERS]
|
||||||
NHANDLER = 0
|
NHANDLER = 0
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA
|
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA
|
||||||
CAMPICALC=
|
CAMPICALC=
|
||||||
IMPONIBILE=IMPNN
|
IMPONIBILE=IMPNN
|
||||||
IMPOSTA=IMPOSTA
|
|
||||||
|
|
||||||
[HANDLERS]
|
[HANDLERS]
|
||||||
NHANDLER = 0
|
NHANDLER = 0
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA
|
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA
|
||||||
CAMPICALC=
|
CAMPICALC=
|
||||||
IMPONIBILE=IMPNN
|
IMPONIBILE=IMPNN
|
||||||
IMPOSTA=IMPOSTA
|
|
||||||
|
|
||||||
[HANDLERS]
|
[HANDLERS]
|
||||||
NHANDLER = 0
|
NHANDLER = 0
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA|PREZZOLN|PREZZONN|PREZZONS
|
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA|PREZZOLN|PREZZONN|PREZZONS
|
||||||
CAMPICALC=
|
CAMPICALC=
|
||||||
IMPONIBILE=IMPNN
|
IMPONIBILE=IMPNN
|
||||||
IMPOSTA=IMPOSTA
|
|
||||||
|
|
||||||
[HANDLERS]
|
[HANDLERS]
|
||||||
NHANDLER = 0
|
NHANDLER = 0
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
#include "verigdef.h"
|
#include "verigdef.h"
|
||||||
|
|
||||||
#define FULL_SCREEN
|
#define FULL_SCREEN
|
||||||
// else
|
// else
|
||||||
// #define MASK_WIDTH 60
|
// #define MASK_WIDTH 60
|
||||||
// #define MASK_HEIGHT 14
|
// #define MASK_HEIGHT 14
|
||||||
//
|
//
|
||||||
#define MASK_TITLE1 "Omaggio"
|
#define MASK_TITLE1 "Omaggio"
|
||||||
|
|
||||||
|
|
||||||
DEFINE_FIELD(CODMAG)
|
DEFINE_FIELD(CODMAG)
|
||||||
// F_POS(CODMAG, 2, 3, "Magazzino ")
|
// F_POS(CODMAG, 2, 3, "Magazzino ")
|
||||||
// F_FLG(CODMAG, "U")
|
// F_FLG(CODMAG, "U")
|
||||||
// F_CHK(CODMAG, REQUIRED)
|
// F_CHK(CODMAG, REQUIRED)
|
||||||
DEFINE_FIELD(DESMAG)
|
DEFINE_FIELD(DESMAG)
|
||||||
DEFINE_FIELD(CODDEP)
|
DEFINE_FIELD(CODDEP)
|
||||||
DEFINE_FIELD(DESDEP)
|
DEFINE_FIELD(DESDEP)
|
||||||
DEFINE_FIELD(CODART)
|
DEFINE_FIELD(CODART)
|
||||||
DEFINE_FIELD(DESCRART)
|
DEFINE_FIELD(DESCRART)
|
||||||
DEFINE_FIELD(UMQTA)
|
DEFINE_FIELD(UMQTA)
|
||||||
DEFINE_FIELD(QTA)
|
DEFINE_FIELD(QTA)
|
||||||
DEFINE_FIELD(PREZZO)
|
DEFINE_FIELD(PREZZO)
|
||||||
DEFINE_FIELD(CODIVA)
|
DEFINE_FIELD(CODIVA)
|
||||||
F_POS(CODIVA, 2, 11,"Cod. IVA " )
|
F_POS(CODIVA, 2, 11,"Cod. IVA " )
|
||||||
DEFINE_FIELD(DESIVA)
|
DEFINE_FIELD(DESIVA)
|
||||||
F_POS(DESIVA, 22, 11,"" )
|
F_POS(DESIVA, 22, 11,"" )
|
||||||
|
DEFINE_FIELD(ADDIVA)
|
||||||
#include "verig.uml"
|
|
||||||
|
#include "verig.uml"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user