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:
alex 1997-06-03 10:29:42 +00:00
parent 21f5b5d47d
commit 3b7767ab90
39 changed files with 1032 additions and 354 deletions

View File

@ -7,3 +7,4 @@
#define F_NCOPIE 107
#define F_RIFERIMENTO 108
#define F_SPESEAUT 109
#define F_TIPO 110

View File

@ -103,7 +103,17 @@ BEGIN
PROMPT 2 15 "Addebito automatico spese cliente"
FIELD B0
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

View File

@ -12,8 +12,6 @@ FRMFILE=BOLLAC.FRM
// modifica
CAMPICALC=TOTMER|TOTPRE|TOTSPE|SPESINC|BOLLI|SCONTOD|TOTNS|IMPOSTE|TOTDOC|PROVVD
CALCOLI=BASESCONTO
IMPONIBILE=TOTNS
IMPOSTA=IMPOSTE
TOTALE=TOTDOC
BASESCONTO=BASESCONTO
SPESE=TOTSPE
@ -196,17 +194,21 @@ NDEFAULTS=1
1=F_CAUSTRASP|VEN
[SHEET]
NCOLS=10
NCOLS=14
1=FR_CODMAG
2=FR_CODDEP
3=FR_CODART
4=FR_DESCR
5=FR_UMQTA
6=FR_QTA
7=FR_PREZZO
8=FR_SCONTO
9=FR_PERCPROV
10=FR_CODIVA
4=FR_LIV1
5=FR_LIV2
6=FR_LIV3
7=FR_LIV4
8=FR_DESCR
9=FR_UMQTA
10=FR_QTA
11=FR_PREZZO
12=FR_SCONTO
13=FR_PERCPROV
14=FR_CODIVA
[RIGHE]
NTIPIRIGA=9
@ -262,7 +264,7 @@ NHANDLER=0
4000 = S_NORMALE
[ORDINEGRUPPI]
NGROUPS=28
NGROUPS=29
1=100
2=200
3=300
@ -290,5 +292,6 @@ NGROUPS=28
25=2700
26=2710
27=1700
28=2400
28=2500
29=2400

View File

@ -12,8 +12,6 @@ FRMFILE=BOLLAF.FRM
// modifica
CAMPICALC=
CALCOLI=
IMPONIBILE=
IMPOSTA=
TOTALE=
BASESCONTO=
SPESE=
@ -146,14 +144,18 @@ NDEFAULTS=1
1=F_CAUSTRASP|RES
[SHEET]
NCOLS=6
NCOLS=11
1=FR_CODMAG
2=FR_CODDEP
3=FR_CODART
4=FR_DESCR
5=FR_UMQTA
6=FR_QTA
6=FR_CODIVA
4=FR_LIV1
5=FR_LIV2
6=FR_LIV3
7=FR_LIV4
8=FR_DESCR
9=FR_UMQTA
10=FR_QTA
11=FR_CODIVA
[RIGHE]
NTIPIRIGA=1

View File

@ -1,3 +1,3 @@
34
0
$rdoc|0|0|263|31|Righe documenti di vendita|NDOC*3||
$rdoc|0|0|278|31|Righe documenti di vendita|NDOC*3||

View File

@ -1,35 +1,36 @@
34
31
32
CODNUM|1|4|0|
ANNO|2|4|0|
ANNO|2|4|0|Anno
PROVV|1|1|0|Tipo numerazione <P>rovvisoria <D>efinitiva
NDOC|3|7|0|
NRIGA|2|3|0|
STATORIGA|1|1|0|
NDOC|3|7|0|N. documento
NRIGA|2|3|0|N. riga
STATORIGA|1|1|0|Non usato
TIPORIGA|1|3|0|Tipo riga
GENERATA|8|1|0|Riga generata
CODMAG|1|5|0|
CODART|1|20|0|
DESCR|1|50|0|
CODMAG|1|5|0|Codice magazzino e deposito
CODART|1|20|0|Codice articolo, codice spesa o codice prestazione
LIVELLO|1|15|0|Codice di giacenza
DESCR|1|50|0|Descrizione
DESCLUNGA|8|1|0|Descrizione estesa caricata
DESCEST|11|10|0|Descrizione estesa
PREZZO|4|18|2|
UMQTA|1|2|0|
QTA|4|11|3|
QTAEVASA|4|11|3|
RIGAEVASA|8|1|0|
TARA|4|15|2|
PNETTO|4|15|2|
NCOLLI|3|7|0|
DAEVADERE|8|1|0|
SCONTO|1|25|0|
PERCPROV|4|5|2|
IMPFISSO|4|18|2|
IMPFISUN|8|1|0|
CODIVA|1|4|0|
ADDIVA|8|1|0|
ASPBENI|1|2|0|
G1|11|10|0|
PREZZO|4|18|2|Prezzo o valore
UMQTA|1|2|0|Unita di misura
QTA|4|11|3|Quantita'
QTAEVASA|4|11|3|Quantita' evasa
RIGAEVASA|8|1|0|Riga evasa
TARA|4|15|2|Tara
PNETTO|4|15|2|Peso netto
NCOLLI|3|7|0|N.colli
DAEVADERE|8|1|0|????
SCONTO|1|25|0|Sconto
PERCPROV|4|5|2|Percentuale di provvigione
IMPFISSO|4|18|2|Importo fisso di provvigione
IMPFISUN|8|1|0|Flag importo fisso unitario
CODIVA|1|4|0|Codice IVA
ADDIVA|8|1|0|Addebito IVA
ASPBENI|1|2|0|Aspetto dei beni
G1|11|10|0|????
PSPESA|4|5|2|Percentuale di spesa
1
CODNUM+ANNO+PROVV+NDOC+NRIGA|

View File

@ -12,8 +12,6 @@ FRMFILE=FATTURAA.FRM
// modifica
CAMPICALC=TOTMER|TOTPRE|TOTSPE|SPESINC|BOLLI|SCONTOD|TOTNS|IMPOSTE|TOTDOC|PROVVD
CALCOLI=BASESCONTO
IMPONIBILE=TOTNS
IMPOSTA=IMPOSTE
TOTALE=TOTDOC
BASESCONTO=BASESCONTO
SPESE=TOTSPE
@ -192,17 +190,21 @@ NDEFAULTS=1
1=F_CAUSTRASP|VEN
[SHEET]
NCOLS=10
NCOLS=14
1=FR_CODMAG
2=FR_CODDEP
3=FR_CODART
4=FR_DESCR
5=FR_UMQTA
6=FR_QTA
7=FR_PREZZO
8=FR_SCONTO
9=FR_PERCPROV
10=FR_CODIVA
4=FR_LIV1
5=FR_LIV2
6=FR_LIV3
7=FR_LIV4
8=FR_DESCR
9=FR_UMQTA
10=FR_QTA
11=FR_PREZZO
12=FR_SCONTO
13=FR_PERCPROV
14=FR_CODIVA
[RIGHE]
NTIPIRIGA=9

View File

@ -11,8 +11,6 @@ FRMFILE=FATTURAC.FRM
// modifica
CAMPICALC=TOTMER|TOTPRE|TOTSPE|SPESINC|BOLLI|SCONTOD|TOTNS|IMPOSTE|TOTDOC|PROVVD
CALCOLI=BASESCONTO
IMPONIBILE=TOTNS
IMPOSTA=IMPOSTE
TOTALE=TOTDOC
BASESCONTO=BASESCONTO
SPESE=TOTSPE
@ -144,17 +142,21 @@ BLANK = S_DISABILITATO //4000
NDEFAULTS=0
[SHEET]
NCOLS=10
NCOLS=14
1=FR_CODMAG
2=FR_CODDEP
3=FR_CODART
4=FR_DESCR
5=FR_UMQTA
6=FR_QTA
7=FR_PREZZO
8=FR_SCONTO
9=FR_PERCPROV
10=FR_CODIVA
4=FR_LIV1
5=FR_LIV2
6=FR_LIV3
7=FR_LIV4
8=FR_DESCR
9=FR_UMQTA
10=FR_QTA
11=FR_PREZZO
12=FR_SCONTO
13=FR_PERCPROV
14=FR_CODIVA
[RIGHE]
NTIPIRIGA=9

View File

@ -10,6 +10,10 @@
#include "veini.h"
#endif
#ifndef __MGLIB01_H
#include "..\mg\mglib01.h"
#endif
#ifndef __UTILITY_H
#include "utility.h"
#endif
@ -103,10 +107,16 @@ int TMotore_application::user_function( int index )
// Funzione che dato il profilo di riga ottiene la maschera
// Serve per ottenere una maschera diversa per ogni riga
TMask * TMotore_application::ss_getmask( int numriga, TMask& fullmask)
{
TRiga_documento & riga = (*(app()._doc))[numriga + 1];
return ((TTipo_riga_documento &)riga.tipo()).mask();
{
const int n = numriga + 1;
if (n <= app()._doc->physical_rows())
{
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 )
@ -171,6 +181,7 @@ bool TMotore_application::ss_handler( TSheet_field& ss, int r, KEY key )
s << app()._clifor->get(LF_CFVEN, "CODDEP");
riga.put("CODMAG", s);
riga.autoload(ss);
ss.check_row(r);
ss.select(r);
}
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 )
{
// Ottengo la maschera
// TMask& m = f.mask( );
// Registra il record corrente
// m.send_key( K_INS, 99 );
// TString commandline("ve4 ");
// commandline << m.get( F_CODNUM );
// commandline << " ";
// commandline << m.get( F_ANNO );
// 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 );
{
if (key == K_SPACE)
{
return message_box("Funzione in fase di implementazione");
TString_array elabs;
TMask & m = f.mask();
const TString16 tipo(m.get(F_TIPODOC));
const TString16 stato(m.get(F_STATO));
TLista_elaborazioni & elab = app().elab();
elab.select(elabs, TRUE, m.insert_mode(), NULL, NULL, tipo, stato);
}
return TRUE;
}
@ -451,7 +455,7 @@ TMask* TMotore_application::get_mask( int mode )
msk1->set_handler( F_DATAINSC, condpag_hndl );
msk1->set_handler( F_CODNOTE, note_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 );
int numhandler = pro( ).get_int( "NHANDLER", "HANDLERS" ); // prof
for ( i = 1; i <= numhandler; i ++ )
@ -460,7 +464,25 @@ TMask* TMotore_application::get_mask( int mode )
chiave.format( "%d", i );
TToken_string riga = pro( ).get( chiave, "HANDLERS" );
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
@ -607,7 +629,7 @@ int TMotore_application::read( TMask& m )
TSheet_field& f = ( TSheet_field& ) m.field( F_SHEET );
f.destroy( );
const int rows = _doc->rows();
const int rows = _doc->physical_rows();
for (int i = 1; i <= rows; i++)
{
f.insert(-1, FALSE);
@ -616,7 +638,6 @@ int TMotore_application::read( TMask& m )
rec.autoload(f);
f.check_row(i - 1);
// f.post_insert(i - 1);
}
}
return err;

View File

@ -111,7 +111,7 @@ class TMotore_application : public TRelation_application
// Puntatore al profilo del documento caricato
TConfig * _pro;
TConfig * _config_ditta;
TConfig * _config_ditta;
// Puntatore alla maschera di ricerca
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
char _tipocf;
// TString16 _profilo;
TString16 _codnum;
TString16 _tipodoc;
// int _anno;
// TString16 _tiponum;
// long _numdoc;
// int _statodoc;
// Array di maschere documento
TAssoc_array _doc_masks;
TLista_elaborazioni _elab;
// Ridefinizione dei metodi virtuali
virtual bool user_create( );
@ -223,6 +219,7 @@ public:
TCliForVendite & clifo() { CHECK( _clifor, "Oggetto cliente nullo!" ); return *_clifor; }
TCond_vendita & condv() { return *_condv; }
TConfig & config_ditta() {return *_config_ditta; }
TLista_elaborazioni & elab() { return _elab; }
TDocumento & doc() {return *_doc; }
// Operazione

View File

@ -31,7 +31,7 @@ PAGE "Gestione documenti" 1 1 60 14
STRING F_DESNUM 50
BEGIN
PROMPT 25 1 ""
PROMPT 24 1 ""
HELP "Descrizione numerazione"
USE %NUM KEY 2
INPUT S0 F_DESNUM
@ -58,7 +58,7 @@ PAGE "Gestione documenti" 1 1 60 14
STRING F_DESTIPODOC 50
BEGIN
PROMPT 25 2 ""
PROMPT 24 2 ""
HELP "Descrizione tipo documento"
USE %TIP KEY 2
INPUT S0 F_DESTIPODOC
@ -67,9 +67,18 @@ PAGE "Gestione documenti" 1 1 60 14
COPY OUTPUT F_TIPODOC
END
NUMBER F_ANNO 4
BEGIN
PROMPT 2 3 "Esercizio "
FIELD ANNO
CHECKTYPE REQUIRED
FLAG "AP"
KEY 1
END
NUMBER F_NDOC 6
BEGIN
PROMPT 2 3 "Numero doc. "
PROMPT 24 3 "Numero doc. "
FIELD NDOC
USE LF_DOC
INPUT ANNO F_ANNO SELECT
@ -91,7 +100,7 @@ PAGE "Gestione documenti" 1 1 60 14
LISTBOX F_PROVV 14
BEGIN
FIELD PROVV
PROMPT 25 3 "Numerazione "
PROMPT 46 3 "Tipo "
ITEM "D|Definitiva "
ITEM "P|Provvisoria"
KEY 1
@ -100,27 +109,11 @@ PAGE "Gestione documenti" 1 1 60 14
STRING F_STATO 1
BEGIN
PROMPT 57 3 "Stato "
PROMPT 69 3 "Stato "
FIELD STATO
FLAG "D"
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
BEGIN
PROMPT 2 10 ""

View File

@ -14,24 +14,24 @@
#ifndef __TABUTIL_H
#include <tabutil.h>
#endif
#endif
#include "veconf.h"
#define SINTASSI "Usage: VE0 -2 -[1|2|3|4|5|6]"
class TConf_vendite : public TConfig_application
{
{
char _current;
static bool check_fields(TMask_field& f, KEY k);
public:
virtual bool preprocess_config (TMask& mask, TConfig& config);
virtual bool postprocess_config (TMask& mask, TConfig& config);
virtual bool user_create( );
virtual bool user_destroy( );
TConf_vendite() : TConfig_application( CONFIG_DITTA ){ }
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)
{
{
disable_menu_item(M_FILE_NEW);
disable_menu_item(M_FILE_REVERT);
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)
{
{
enable_menu_item(M_FILE_NEW);
enable_menu_item(M_FILE_REVERT);
if (_current == '5') // solo per configurazione "e"
@ -106,17 +106,17 @@ bool TConf_vendite::postprocess_config (TMask& mask, TConfig& config)
TString r;
const KEY k = mask.last_key();
bool tosave = k == K_ENTER || k == K_SAVE;
if (!tosave && mask.dirty())
tosave = yesno_box("Modifiche non registrate. Salvare?");
if (!tosave)
return FALSE;
for (short i=F_RICERCACR1;i<=F_RICERCACR5;i++)
{
r = mask.get(i);
if (r == "-") continue;
if (r == "-") continue;
if (r == "AN")
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);
}
return TRUE;
return TRUE;
}
@ -139,12 +139,12 @@ bool TConf_vendite::user_create( )
// Il fottuto meno serve per evitare fottutamente che la fottuta confapp
// si fotta il fottuto parametro
if( arg[ 0 ] != '-' )
fatal_box( SINTASSI );
fatal_box( SINTASSI );
_current = arg[1];
TConfig conf(_current == '6' ? CONFIG_STUDIO : CONFIG_DITTA );
if (_current == '6') set_config(CONFIG_STUDIO);
// 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 )
{
case '1':
@ -153,16 +153,16 @@ bool TConf_vendite::user_create( )
case '2':
conf.set( "EdMask", "ve0200b", "ve" );
break;
case '3':
case '3':
conf.set( "EdMask", "ve0200c", "ve" );
break;
case '4':
case '4':
conf.set( "EdMask", "ve0200d", "ve" );
break;
case '5':
case '5':
conf.set( "EdMask", "ve0200e", "ve" );
break;
case '6':
case '6':
conf.set( "EdMask", "ve0200f", "ve" );
break;
default:
@ -171,19 +171,19 @@ bool TConf_vendite::user_create( )
break;
}
return TRUE;
}
}
bool TConf_vendite::user_destroy( )
{
{
return TRUE;
}
}
int ve0200(int argc, char** argv)
{
TConf_vendite appc;
if( argc < 3 )
fatal_box( SINTASSI );
appc.run(argc, argv, "Parametri gestione vendite");
return 0;
}
}

View File

@ -14,7 +14,7 @@ END
ENDPAGE
PAGE "Tabelle di installazione" 1 1 60 14
PAGE "Installazione" 1 1 60 14
GROUPBOX DLG_NULL 78 7
BEGIN
@ -134,7 +134,7 @@ END
ENDPAGE
PAGE "Tabella gestione sconti " 1 1 60 14
PAGE "Sconti " 1 1 60 14
LIST F_GESSCO 36
BEGIN
@ -222,20 +222,6 @@ PROMPT 2 13 "Gestione archivio sconti unita' di misura "
FIELD GESSCOUM
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
ENDMASK

View File

@ -14,7 +14,7 @@ END
ENDPAGE
PAGE "Tabelle di installazione" 1 1 60 14
PAGE "Installazione" 1 1 60 14
GROUPBOX DLG_NULL 78 4
BEGIN

View File

@ -14,7 +14,7 @@ END
ENDPAGE
PAGE "Tabella gestione sconti" 1 1 60 14
PAGE "Sconti" 1 1 60 14
GROUPBOX DLG_NULL 78 4
BEGIN
@ -56,7 +56,7 @@ COPY ALL F_SCOPRCODCON1
CHECKTYPE NORMAL
END
STRING F_SCOPRDESCON 50
STRING F_SCOPRDESCON 50
BEGIN
PROMPT 2 3 "Descrizione "
USE LF_PCON KEY 2

View File

@ -14,7 +14,7 @@ END
ENDPAGE
PAGE "Tabella gestione spese" 1 1 60 14
PAGE "Spese" 1 1 60 14
GROUPBOX DLG_NULL 78 8
BEGIN

View File

@ -14,7 +14,7 @@ END
ENDPAGE
PAGE "Tabelle contabilizzazione" 1 1 60 14
PAGE "Contabilizzazione" 1 1 60 14
GROUPBOX DLG_NULL 78 7
BEGIN

View File

@ -14,7 +14,7 @@ END
ENDPAGE
PAGE "Gestione spese incasso" 1 1 60 14
PAGE "Spese incasso" 1 1 60 14
NUMBER F_IMPSPINC1 9
BEGIN
@ -82,7 +82,7 @@ END
ENDPAGE
PAGE "Gestione spese bolli" 1 1 60 14
PAGE "Spese bolli" 1 1 60 14
NUMBER F_SPBOSCA1 11
BEGIN
@ -182,31 +182,84 @@ FIELD SPBOIMP[7]
PICTURE "."
END
NUMBER F_BOLLIES 11
BEGIN
PROMPT 2 10 "Bollo per esenzioni "
FIELD BOLLIES
PICTURE "."
END
ENDPAGE
PAGE "Gestione omaggi" 1 1 60 14
PAGE "Automatismi" 1 1 60 14
STRING F_TIPORIGAOM 4
STRING F_OMTRIGA 4
BEGIN
PROMPT 2 2 "Tipo riga per omaggi "
PROMPT 2 2 "Tipo riga omaggi "
FIELD TROMAGGI
FLAGS "U"
USE %TRI SELECT S7=="O"
INPUT CODTAB F_TIPORIGAOM
INPUT CODTAB F_OMTRIGA
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_TIPORIGAOM CODTAB
OUTPUT F_DESCRRIGAOM S0
OUTPUT F_OMTRIGA CODTAB
OUTPUT F_OMDRIGA S0
CHECKTYPE REQUIRED
END
STRING F_DESCRRIGAOM 50
STRING F_OMDRIGA 50
BEGIN
PROMPT 23 3 ""
PROMPT 25 3 ""
USE %TRI KEY 2 SELECT S7=="O"
INPUT S0 F_DESCRRIGAOM
COPY DISPLAY F_TIPORIGAOM
COPY OUTPUT F_TIPORIGAOM
INPUT S0 F_OMDRIGA
COPY DISPLAY F_OMTRIGA
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
ENDPAGE

View File

@ -1059,34 +1059,34 @@ void TMask_generator::intestazione_pagina( )
_m->group( 5 );
_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->begin( );
_m->prompt( 2, 3, "Doc.: nr. " );
_m->prompt( 24, 3, "Numero doc. " );
_m->group( 6 );
_m->flag( "D" );
_m->end( );
_m->control( T_DATA, DLG_NULL );
_m->begin( );
_m->prompt( 24, 3, "Data " );
_m->prompt( 46, 3, "Data " );
_m->group( 7 );
_m->flag( "D" );
_m->end( );
_m->control( T_NUMERO, DLG_NULL, 1 );
_m->begin( );
_m->prompt( 50, 3, "Stato " );
_m->prompt( 67, 3, "Stato " );
_m->group( 8 );
_m->flag( "D" );
_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->begin( );
if ( _pro->get( "TIPOCF", "MAIN" ) == "C" )
@ -1247,9 +1247,17 @@ void TMask_generator::genera( const TString& profilo )
_m->message( "CO,5@" );
_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->begin( );
_m->prompt( 2, 3, "Doc.: nr. " );
_m->prompt( 24, 3, "Numero doc. " );
_m->field( "NDOC" );
_m->message( "CO,6@" );
_m->flag( "GDR" );
@ -1257,28 +1265,20 @@ void TMask_generator::genera( const TString& profilo )
_m->control( T_DATA, F_DATADOC );
_m->begin( );
_m->prompt( 24, 3, "Data " );
_m->prompt( 46, 3, "Data " );
_m->field( "DATADOC" );
_m->message( "CO,7@" );
_m->message( format("CO,7@|CO,%d", F_DATACAMBIO1) );
_m->flag( "A" );
_m->end( );
_m->control( T_NUMERO, F_STATO, 1 );
_m->begin( );
_m->prompt( 50, 3, "Stato " );
_m->prompt( 67, 3, "Stato " );
_m->field( "STATO" );
_m->message( "CO,8@" );
_m->flag( "DG" );
_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->begin( );
if ( _pro->get( "TIPOCF", "MAIN" ) == "C" )

View File

@ -2,7 +2,11 @@ STATORIGA|2|1|Stato|1
TIPORIGA|2|2|Tipo riga|2
CODMAG[1,3]|2|3|Mag. |3
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
UMQTA|2|2|UM|2
QTA|3|1103|Qta|11

View File

@ -90,7 +90,7 @@ HEIGHT=1
HEIGHT=1
[2500]
HEIGHT=1
HEIGHT=7
[2700]
HEIGHT=1

View File

@ -76,6 +76,7 @@ class TDocumento_form : public TForm
TRelation &_firmrel; // relazione di gestione dei dati della ditta corrente
TString _module; // codice del modulo di carta associato a questo al form
TCliFor *_cliente; // oggetto per le informazioni sul cliente
TCond_vendita * _condv;
TString_array _exclude_array; // array di coppie tipo/articolo da escludere dalla stampa
TDocumentoEsteso * _doc; // Documento da stampare
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;
_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);
_rdocfile = new TRDocisamfile(_doc);
relation()->replace(_docfile,0);
@ -750,16 +752,11 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s) {
TLocalisamfile &rdoc= (cursor())->file(LF_RIGHEDOC);
TString descrizione = rdoc.get("DESCR");
const bool desclunga = rdoc.get_bool("DESCLUNGA");
if (desclunga) {
TTextfile t;
rdoc.get_memo("DESCEST",t);
const long l = t.lines();
for (long i = 0; i<l; i++) {
TString linea(t.line(i));
linea.trim();
if (linea.not_empty())
descrizione << " " << linea;
}
if (desclunga)
{
const TString & s = rdoc.get("DESCEST");
descrizione << s;
}
cf.put_paragraph(descrizione);
// Setta l'altezza effettiva del body, per evitare sprechi di righe

View File

@ -33,7 +33,6 @@
#define F_GESSCOSCA 128
#define F_GESSCOUM 129
#define F_SCOTRIGA 130
// Campi per ve0200b.uml
#define F_GESAGE 101
@ -112,9 +111,13 @@
#define F_SPBOIMP6 121
#define F_SPBOSCA7 122
#define F_SPBOIMP7 123
#define F_TIPORIGAOM 124
#define F_DESCRRIGAOM 125
#define F_OMTRIGA 124
#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

View File

@ -54,6 +54,10 @@
#include "sconti.h"
#endif
#ifndef __EXECP_H
#include <execp.h>
#endif
TSpesa_prest::TSpesa_prest(const char* codice, char tipo)
: TRectype(LF_TAB)
{
@ -177,6 +181,7 @@ bool note_hndl( TMask_field& f, KEY key )
if (key == K_TAB && (f.focusdirty() || !m.is_running()))
{
TTable & note = (TTable &) ((TEdit_field &) f).browse()->cursor()->file();
note.setkey(1);
const TString16 cod(f.get());
if (cod != note.get("CODTAB"))
@ -263,6 +268,17 @@ HIDDEN bool codart_handler( TMask_field& f, KEY key )
{
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()))
{
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)
f.set(codart);
}
}
}
if (anamag.good())
{
const TString16 lingua = mask.get(F_CODLIN);
@ -338,6 +354,24 @@ HIDDEN bool codart_handler( TMask_field& f, KEY key )
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 )
{
// 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)
cambio = 1.0;
// if (netto == FALSE)
// {
static TString16 codiva;
static long firm = -1;
long new_firm = main_app().get_firm();
static TString16 codiva;
static long firm = -1;
long new_firm = main_app().get_firm();
if (firm != new_firm)
{
TConfig conf(CONFIG_DITTA);
if (firm != new_firm)
{
TConfig conf(CONFIG_DITTA);
codiva = conf.get("SPINCODIVA", "ve");
firm = new_firm;
}
real iva_spese(iva(imp_spese, TRiga_documento::iva(codiva), ndec));
// }
codiva = conf.get("SPINCODIVA", "ve");
firm = new_firm;
}
real iva_spese(iva(imp_spese, TRiga_documento::iva(codiva), ndec));
if (t == _lordo)
imp_spese += iva_spese;
else
@ -728,22 +759,18 @@ real TDocumento::bolli(real & imp, int ndec, TTipo_importo t) const
break;
}
}
// if (netto == FALSE)
// {
static TString16 codiva;
static long firm = -1;
long new_firm = main_app().get_firm();
static TString16 codiva;
static long firm = -1;
long new_firm = main_app().get_firm();
if (firm != new_firm)
{
TConfig conf(CONFIG_DITTA);
if (firm != new_firm)
{
TConfig conf(CONFIG_DITTA);
codiva = conf.get("SPBOCODIVA", "ve");
firm = new_firm;
}
iva_bolli = iva(tot_bolli, TRiga_documento::iva(codiva), ndec);
// tot_bolli += iva_bolli;
// }
codiva = conf.get("SPBOCODIVA", "ve");
firm = new_firm;
}
iva_bolli = iva(tot_bolli, TRiga_documento::iva(codiva), ndec);
importo += (tot_bolli + iva_bolli - old_bolli);
}
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();
if (_row)
// val = _row->iva(ndec);
val = _row->imposta();
else
val = ZERO;
@ -1063,14 +1089,14 @@ TObject* TExpr_documento::dup() const
// 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)
{
_tab = tipo == _documento ? "FRD" : "FRR";
settab(_tab);
_tab.insert("%");
if (codice && *codice)
read(codice);
read(codice, expr, numexpr);
}
TFormula_documento::TFormula_documento(const TRectype& rec)
@ -1086,7 +1112,7 @@ TFormula_documento::~TFormula_documento()
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)
{
@ -1094,11 +1120,21 @@ int TFormula_documento::read(const char* codice)
_expr = NULL;
}
TTable t(_tab);
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)
{
@ -1163,6 +1199,12 @@ void TTipo_documento::read_formule()
_formule = profile.get("CAMPICALC", "MAIN");
_formule.add(profile.get("CALCOLI", "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;
if (_totale.not_empty() && _formule.find(_totale) < 0)
@ -1171,12 +1213,24 @@ void TTipo_documento::read_formule()
_totale.cut(0);
}
_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)
{
error_box("Campo sconto documento (%s) sconosciuto nel tipo documento %s", (const char *) _basesconto, (const char *) codice());
_basesconto.cut(0);
}
_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)
{
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)
_formule.restart();
const TString16 formula(_formule.get());
const TString formula(_formule.get());
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);
if (o == NULL)
{
o = new TFormula_documento(_documento, formula);
o = new TFormula_documento(_documento, formula, expr);
_formule_documento.add(formula, o);
}
return o;
@ -1256,6 +1317,12 @@ void TTipo_riga_documento::read_formule()
_formule = profile.get("CAMPICALC", "MAIN");
_formule.add(profile.get("CALCOLI", "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)
{
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)
_formule.restart();
const TString16 formula(_formule.get());
const TString formula(_formule.get());
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);
if (o == NULL)
{
o = new TFormula_documento(_riga, formula);
o = new TFormula_documento(_riga, formula, expr);
_formule_riga.add(formula, o);
}
return o;
@ -1286,7 +1360,7 @@ TVariable_mask * TTipo_riga_documento::mask()
{
if (mask_loaded())
return _mask;
_mask = new TVariable_mask(mask_name());
_mask = new TVariable_mask(mask_name());
TFilename proname(profile_name());
proname.ext( "ini" );
@ -1321,6 +1395,9 @@ TVariable_mask * TTipo_riga_documento::mask()
if (num == LF_ANAMAG)
{
_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_DESCR, descr_handler );
_mask->set_handler( FR_QTA, qta_handler );
@ -1625,8 +1702,20 @@ real TRiga_documento::imponibile() const
{
const TString16 field(tipo().imponibile());
if (field.not_empty())
return get_real(field);
if (field.not_empty())
{
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
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 << row.get( f.cid2index(FR_CODDEP ));
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)));
int split_pos = s.find('\n');
@ -1754,6 +1847,7 @@ void TRiga_documento::autoload(TSheet_field & f)
const int num = numero() - 1;
TToken_string & row = f.row(num);
row.cut(0);
row.add( get( "STATORIGA" ), f.cid2index(FR_STATORIGA ));
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.mid(3), f.cid2index(FR_CODDEP ));
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"));
if (get_bool("DESCLUNGA"))
s << get("DESCEST");
@ -1908,6 +2006,21 @@ void TDocumento::copy_data(TRectype& dst, const TRectype& src)
if (nriga > 0)
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)
{
@ -1953,6 +2066,8 @@ int TDocumento::read(const TRectype& rec)
_rows.set_key(key); // ok
}
set_riga_sconto();
if (is_fattura())
set_riga_esenzione();
return err;
}
@ -1993,18 +2108,14 @@ void TDocumento::set_riga_sconto()
{
if (_sconto == NULL)
{
static TString _tipo_riga;
static long firm = -1;
long new_firm = main_app().get_firm();
if (firm != new_firm)
static TString _tipo_riga_sc;
if (_tipo_riga_sc.empty())
{
TConfig conf(CONFIG_DITTA);
TConfig conf(CONFIG_STUDIO);
_tipo_riga = conf.get("SCOTRIGA", "ve");
firm = new_firm;
_tipo_riga_sc = conf.get("TRSCONTI", "ve");
}
_sconto = new TRiga_documento(this, _tipo_riga);
_sconto = new TRiga_documento(this, _tipo_riga_sc);
_sconto->put("DESCR","Sconto");
}
_sconto->put("SCONTO", sconto);
@ -2012,7 +2123,61 @@ void TDocumento::set_riga_sconto()
}
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()
@ -2168,7 +2333,7 @@ bool TDocumento::raggruppabile(const TDocumento& doc, TToken_string& campi) cons
void TDocumento::set_fields(TAuto_variable_rectype & rec)
{
if (get("TIPODOC").not_empty())
if (tipo_valido())
{
TTipo_documento & tipo_doc = (TTipo_documento &) tipo();
const TString16 tot_doc(tipo_doc.totale_doc());
@ -2361,9 +2526,23 @@ void TDocumento::zero(const char * fieldname)
void TDocumento::zero(char c)
{
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::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);
riga.autoload(*sh);
sh->check_row(nrow);
// sh->post_insert(nrow);
}
}
}
@ -2745,6 +2923,114 @@ int TElaborazione::read(const char* cod)
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
///////////////////////////////////////////////////////////
@ -2948,3 +3234,142 @@ bool TFatturazione_bolle::elabora(TLista_documenti& doc_in, TLista_documenti& do
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;
}

View File

@ -160,10 +160,10 @@ class TFormula_documento : public TRectype
TExpr_documento * _expr;
protected:
int read(const char* codice);
int read(const char* codice, const char* expr = NULL, bool numexpr = TRUE);
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:
const TString& codice() const { return get("CODTAB");}
@ -174,7 +174,7 @@ public:
const TString& expr_string() const { return get("S1"); }
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);
virtual ~TFormula_documento();
};
@ -182,7 +182,8 @@ public:
class TTipo_documento : public TRectype
{
enum { _altro, _fattura, _bolla, _ordine};
static TAssoc_array _formule_documento;
TToken_string _formule;
TString16 _imponibile;
@ -203,8 +204,14 @@ public:
const TString& profile_name() const { return get("S4");}
const TString& mask_name() const { return get("S4");}
const TString& causale() const { return get("S6"); }
int tipo() const { return get_int("I1"); }
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& riferimento() const { return get("S1"); }
const TString& imponibile() const { return _imponibile;}
@ -361,12 +368,14 @@ public:
void set_condv(TCond_vendita * condv) { _condv = condv; }
void set_relation(TRelation * rel) { _rel = rel; }
virtual TDocumento & operator =(const TDocumento & d);
virtual TRectype & operator =(const TRectype & r);
virtual TRectype & operator =(const char * r);
virtual void zero(const char * fieldname);
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); }
TRiga_documento& operator[](int index) { return (TRiga_documento&)row(index); }
@ -389,7 +398,8 @@ public:
TDate data() const { return get_date("DATADOC"); }
const bool in_valuta() const;
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;
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 copy_data(TRectype& dst, const TRectype& src);
void copy_contents(const TDocumento & src);
void reset_fields(TAuto_variable_rectype & rec) { rec.remove_field(); }
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);
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(char provv, int anno, const char* codnum, long numdoc,
TCond_vendita * condv = NULL, TRelation * rel = NULL);
@ -539,6 +556,8 @@ class TLista_fornitori : public TLista_clifo
protected:
virtual char tipo() const { return 'F'; }
};
enum TTipo_elaborazione {_esterna, _consegna_ordini, _fatturazione_bolle, _contabilizzazione, _copia_documento, _generazione_effetti };
class TElaborazione : public TRectype
{
@ -547,6 +566,7 @@ protected:
public:
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 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 riferimenti_in_testa() const { return get_bool("B2"); }
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'; }
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,
const TDate& data_elab) pure;
@ -566,6 +594,28 @@ public:
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
{
TToken_string _cod_desc;
@ -579,7 +629,57 @@ public:
void stati_validi(TToken_string& stati) const;
TFatturazione_bolle(const char* cod);
TFatturazione_bolle(const TRectype& rec) : TElaborazione(rec) { }
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

View File

@ -313,8 +313,8 @@ const char* TDocumentoEsteso::get_head_info(const TString & what)
return (const char*) rt;
}
TDocumentoEsteso::TDocumentoEsteso(const TRectype& rec, TCliFor *cli)
: TDocumento(rec), _sum_filter(-1), _sum_selected(FALSE), _scadenze_current(-1)
TDocumentoEsteso::TDocumentoEsteso(const TRectype& rec, TCond_vendita * condv)
: TDocumento(rec, condv), _sum_filter(-1), _sum_selected(FALSE), _scadenze_current(-1)
{
_iva = new TTable("%IVA");
// Inizializza i parametri di default
@ -323,8 +323,8 @@ TDocumentoEsteso::TDocumentoEsteso(const TRectype& rec, TCliFor *cli)
_parm.imp_lit = 0; _parm.imp_val = 3;
}
TDocumentoEsteso::TDocumentoEsteso(const TRectype& rec, dec_parm & parm, TCliFor *cli)
: TDocumento(rec), _sum_filter(-1), _sum_selected(FALSE), _scadenze_current(-1)
TDocumentoEsteso::TDocumentoEsteso(const TRectype& rec, dec_parm & parm, TCond_vendita * condv)
: TDocumento(rec, condv), _sum_filter(-1), _sum_selected(FALSE), _scadenze_current(-1)
{
_parm = parm;
_iva = new TTable("%IVA");

View File

@ -138,8 +138,8 @@ public:
// Funzioni per settare i parametri
void set_decimals(dec_parm & parm) { _parm = parm ; }
void set_condv(TCliFor * cli); // Cambia le condizioni di vendita
TDocumentoEsteso (const TRectype & rec, dec_parm & parm, TCliFor * cli = NULL) ;
TDocumentoEsteso (const TRectype & rec, TCliFor * cli = NULL) ;
TDocumentoEsteso (const TRectype & rec, dec_parm & parm, TCond_vendita * condv = NULL) ;
TDocumentoEsteso (const TRectype & rec, TCond_vendita * condv = NULL) ;
TDocumentoEsteso () ;
~TDocumentoEsteso();
};

View File

@ -12,37 +12,41 @@
#define FR_CODSPQ 105
#define FR_CODSPP 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
#define FR_DESCR 106
#define FR_DESCRART 106
#define FR_DESCRSPV 106
#define FR_DESCRSPQ 106
#define FR_DESCRSPP 106
#define FR_DESCRPRS 106
#define FR_DESCR 110
#define FR_DESCRART 110
#define FR_DESCRSPV 110
#define FR_DESCRSPQ 110
#define FR_DESCRSPP 110
#define FR_DESCRPRS 110
// UMQTA UMQTASP UMQTAPR alternativi definirne uno solo
#define FR_UMQTA 107
#define FR_UMQTASP 107
#define FR_UMQTA 111
#define FR_UMQTASP 111
// QTA PERCSP alternativi definirne uno solo
#define FR_QTA 108
#define FR_PERCSP 108
#define FR_QTA 112
#define FR_PERCSP 112
// PREZZO VALORE alternativi definirne uno solo
#define FR_PREZZO 109
#define FR_VALORE 109
#define FR_PREZZO 113
#define FR_VALORE 113
#define FR_QTAEVASA 110
#define FR_RIGAEVASA 111
#define FR_TARA 112
#define FR_PNETTO 113
#define FR_NCOLLI 114
#define FR_DAEVADERE 115
#define FR_SCONTO 116
#define FR_PERCPROV 117
#define FR_IMPFISUN 118
#define FR_IMPFISSO 119
#define FR_CODIVA 120
#define FR_ADDIVA 121
#define FR_ASPBENI 122
#define FR_END 123
#define FR_QTAEVASA 114
#define FR_RIGAEVASA 115
#define FR_TARA 116
#define FR_PNETTO 117
#define FR_NCOLLI 118
#define FR_DAEVADERE 119
#define FR_SCONTO 120
#define FR_PERCPROV 121
#define FR_IMPFISUN 122
#define FR_IMPFISSO 123
#define FR_CODIVA 124
#define FR_ADDIVA 125
#define FR_ASPBENI 126
#define FR_END 127
#define MAX_COLUMNS FR_END-FR_STATORIGA
#define FR_DESMAG 150

View File

@ -150,7 +150,7 @@ ENDIF
ENDIF
IFDEF(F_CODART)
ST FR_CODART 20
STRING FR_CODART 20
BEGIN
IFDEF(X_CODART)
PROMPT X_CODART Y_CODART PR_CODART
@ -172,6 +172,89 @@ ENDIF
FIELD CODART
ADD RUN ve2 -3
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
IFDEF(F_CODSPV)

View File

@ -3,7 +3,6 @@
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PROVVR|SCONTOR
CAMPICALC=
IMPONIBILE=IMPNS
IMPOSTA=IMPOSTA
[HANDLERS]
NHANDLER = 0

View File

@ -3,7 +3,6 @@
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PREZZONS|SCONTOR
CAMPICALC=
IMPONIBILE=IMPNS
IMPOSTA=IMPOSTA
[HANDLERS]
NHANDLER = 0

View File

@ -3,7 +3,6 @@
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PREZZONS|SCONTOR
CAMPICALC=
IMPONIBILE=IMPNS
IMPOSTA=IMPOSTA
[HANDLERS]
NHANDLER = 0

View File

@ -3,7 +3,6 @@
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA|PREZZOLN
CAMPICALC=
IMPONIBILE=IMPNN
IMPOSTA=IMPOSTA
[HANDLERS]
NHANDLER = 0

View File

@ -3,7 +3,6 @@
CALCOLI=
CAMPICALC=
IMPONIBILE=
IMPOSTA=
[HANDLERS]
NHANDLER = 0

View File

@ -3,7 +3,6 @@
CALCOLI=IMPLN|IMPN|IMPNN|IMPNS|IMPOSTA|PREZZOLN|PREZZOLS|PREZZONN|PREZZONS|SCONTOR
CAMPICALC=
IMPONIBILE=IMPNS
IMPOSTA=IMPOSTA
[HANDLERS]
NHANDLER = 0

View File

@ -3,7 +3,6 @@
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA
CAMPICALC=
IMPONIBILE=IMPNN
IMPOSTA=IMPOSTA
[HANDLERS]
NHANDLER = 0

View File

@ -3,7 +3,6 @@
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA
CAMPICALC=
IMPONIBILE=IMPNN
IMPOSTA=IMPOSTA
[HANDLERS]
NHANDLER = 0

View File

@ -3,7 +3,6 @@
CALCOLI=IMPLN|IMPN|IMPNN|IMPOSTA|PREZZOLN|PREZZONN|PREZZONS
CAMPICALC=
IMPONIBILE=IMPNN
IMPOSTA=IMPOSTA
[HANDLERS]
NHANDLER = 0

View File

@ -1,30 +1,30 @@
#include "verigdef.h"
#define FULL_SCREEN
// else
// #define MASK_WIDTH 60
// #define MASK_HEIGHT 14
//
#define MASK_TITLE1 "Omaggio"
DEFINE_FIELD(CODMAG)
// F_POS(CODMAG, 2, 3, "Magazzino ")
// F_FLG(CODMAG, "U")
// F_CHK(CODMAG, REQUIRED)
DEFINE_FIELD(DESMAG)
DEFINE_FIELD(CODDEP)
DEFINE_FIELD(DESDEP)
DEFINE_FIELD(CODART)
DEFINE_FIELD(DESCRART)
DEFINE_FIELD(UMQTA)
DEFINE_FIELD(QTA)
DEFINE_FIELD(PREZZO)
DEFINE_FIELD(CODIVA)
F_POS(CODIVA, 2, 11,"Cod. IVA " )
DEFINE_FIELD(DESIVA)
F_POS(DESIVA, 22, 11,"" )
#include "verig.uml"

#include "verigdef.h"
#define FULL_SCREEN
// else
// #define MASK_WIDTH 60
// #define MASK_HEIGHT 14
//
#define MASK_TITLE1 "Omaggio"
DEFINE_FIELD(CODMAG)
// F_POS(CODMAG, 2, 3, "Magazzino ")
// F_FLG(CODMAG, "U")
// F_CHK(CODMAG, REQUIRED)
DEFINE_FIELD(DESMAG)
DEFINE_FIELD(CODDEP)
DEFINE_FIELD(DESDEP)
DEFINE_FIELD(CODART)
DEFINE_FIELD(DESCRART)
DEFINE_FIELD(UMQTA)
DEFINE_FIELD(QTA)
DEFINE_FIELD(PREZZO)
DEFINE_FIELD(CODIVA)
F_POS(CODIVA, 2, 11,"Cod. IVA " )
DEFINE_FIELD(DESIVA)
F_POS(DESIVA, 22, 11,"" )
DEFINE_FIELD(ADDIVA)
#include "verig.uml"