Oggetto cliente sembra funzionare. Sistemata la gestione righe ed i totali.
git-svn-id: svn://10.65.10.50/trunk@1806 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5f3225d8fd
commit
874f4618e0
194
ve/tclifor.cpp
194
ve/tclifor.cpp
@ -10,72 +10,7 @@
|
||||
#include "ve1000o.h"
|
||||
#endif
|
||||
|
||||
|
||||
TCliFor::TCliFor( ) : TRelation( LF_CLIFO ), _occas_mask( "ve1000o" )
|
||||
{
|
||||
_occas_mask.set_handler( O_CODICE, occas_code_handler );
|
||||
add( LF_CFVEN, "TIPOCF=TIPOCF|CODCF=CODCF" );
|
||||
}
|
||||
|
||||
void TCliFor::load( const char tipocf, const long codcf )
|
||||
{
|
||||
_tipocf = tipocf;
|
||||
_codcf = codcf;
|
||||
zero( );
|
||||
curr( ).put( "TIPOCF", tipocf );
|
||||
curr( ).put( "CODCF", codcf );
|
||||
read( );
|
||||
}
|
||||
|
||||
void TCliFor::set( TMask& m, const int mskfield, const TString& value )
|
||||
{
|
||||
if( present( m, mskfield ) )
|
||||
{
|
||||
m.set( mskfield, value, TRUE );
|
||||
m.field( mskfield ).check( );
|
||||
}
|
||||
};
|
||||
|
||||
const TString& TCliFor::get( const int file, const TString& fieldname )
|
||||
{
|
||||
return lfile( file ).get( fieldname );
|
||||
}
|
||||
|
||||
int TCliFor::get_int( const int file, const TString& fieldname )
|
||||
{
|
||||
return lfile( file ).get_int( fieldname );
|
||||
}
|
||||
|
||||
long TCliFor::get_long( const int file, const TString& fieldname )
|
||||
{
|
||||
return lfile( file ).get_long( fieldname );
|
||||
}
|
||||
|
||||
bool TCliFor::get_bool( const int file, const TString& fieldname )
|
||||
{
|
||||
return lfile( file ).get_bool( fieldname );
|
||||
}
|
||||
|
||||
int TCliFor::write_occas( )
|
||||
{
|
||||
if( !occasionale( ) )
|
||||
return NOERR;
|
||||
TLocalisamfile occas( LF_OCCAS );
|
||||
occas.zero( );
|
||||
occas.put( "CFPI", occas_mask( ).get( O_CODICE ) );
|
||||
occas.put( "RAGSOC", occas_mask( ).get( O_RAGSOC ) );
|
||||
occas.put( "INDIR", occas_mask( ).get( O_INDIRIZZO ) );
|
||||
occas.put( "CIV", occas_mask( ).get( O_NUMERO ) );
|
||||
occas.put( "STATO", occas_mask( ).get( O_STATO ) );
|
||||
occas.put( "COM", occas_mask( ).get( O_COMUNE ) );
|
||||
occas.put( "CAP", occas_mask( ).get( O_CAP ) );
|
||||
occas.put( "DNASC", occas_mask( ).get( O_DATANAS ) );
|
||||
occas.put( "STATONASC", occas_mask( ).get( O_STATONAS ) );
|
||||
occas.put( "COMNASC", occas_mask( ).get( O_COMUNENAS ) );
|
||||
return occas.write( );
|
||||
}
|
||||
|
||||
const TString& TCliFor::get( const TString& table, const TString& codtab, const TString& field )
|
||||
const TString& TData_picker::get( const TString& table, const TString& codtab, const TString& field )
|
||||
{
|
||||
if( table != _tablename )
|
||||
{
|
||||
@ -92,43 +27,112 @@ const TString& TCliFor::get( const TString& table, const TString& codtab, const
|
||||
return _table->get( field );
|
||||
};
|
||||
|
||||
void TCliForVendite::update_mask( TMask& m )
|
||||
void TData_picker::set( TMask& m, const int mskfield, const TString& value )
|
||||
{
|
||||
if( present( m, mskfield ) )
|
||||
{
|
||||
m.set( mskfield, value, TRUE );
|
||||
m.field( mskfield ).check( );
|
||||
}
|
||||
};
|
||||
|
||||
const TString& TData_picker::get( const int file, const TString& fieldname )
|
||||
{
|
||||
return lfile( file ).get( fieldname );
|
||||
}
|
||||
|
||||
int TData_picker::get_int( const int file, const TString& fieldname )
|
||||
{
|
||||
return lfile( file ).get_int( fieldname );
|
||||
}
|
||||
|
||||
long TData_picker::get_long( const int file, const TString& fieldname )
|
||||
{
|
||||
return lfile( file ).get_long( fieldname );
|
||||
}
|
||||
|
||||
bool TData_picker::get_bool( const int file, const TString& fieldname )
|
||||
{
|
||||
return lfile( file ).get_bool( fieldname );
|
||||
}
|
||||
|
||||
int TCliFor::write_occas( )
|
||||
{
|
||||
if( !occasionale( ) )
|
||||
return NOERR;
|
||||
TRelation occas( LF_OCCAS );
|
||||
occas_mask( ).autosave( &occas );
|
||||
return occas.write( );
|
||||
}
|
||||
|
||||
TCliFor::TCliFor( ) : TData_picker( LF_CLIFO ), _occas_mask( "ve1000o" )
|
||||
{
|
||||
_occas_mask.set_handler( O_CODICE, occas_code_handler );
|
||||
add( LF_CFVEN, "TIPOCF=TIPOCF|CODCF=CODCF" );
|
||||
}
|
||||
|
||||
void TCliFor::load( const char tipocf, const long codcf, const TString& ocfpi )
|
||||
{
|
||||
_tipocf = tipocf;
|
||||
_codcf = codcf;
|
||||
zero( );
|
||||
curr( ).put( "TIPOCF", tipocf );
|
||||
curr( ).put( "CODCF", codcf );
|
||||
lfile( ).setkey( 1 );
|
||||
if( read( ) != NOERR )
|
||||
yesnofatal_box( "Il %s %d non è stato trovato!", tipocf == 'C'?"cliente":"fornitore", codcf );
|
||||
_occas = curr().get_bool( "OCCAS" );
|
||||
if ( occasionale( ) )
|
||||
{
|
||||
TRelation occrel( LF_OCCAS );
|
||||
occrel.curr( ).zero( );
|
||||
occrel.curr( ).put( "CFPI", ocfpi );
|
||||
occrel.read( );
|
||||
occas_mask( ).autoload( &occrel );
|
||||
}
|
||||
}
|
||||
|
||||
void TCliForVendite::update_mask( TMask& m, bool onload )
|
||||
{
|
||||
// Setta i campi che appartengono al file LF_CLIFO
|
||||
bool occas = occasionale( );
|
||||
show( m, F_OCFPI, occas );
|
||||
show( m, F_OCCASEDIT, occas );
|
||||
// In forse per l'Occasionale, sicuri per il Normale
|
||||
// m.show( F_COFI, !occas );
|
||||
// m.show( F_STATOPAIV, !occas );
|
||||
// m.show( F_PAIVA, !occas );
|
||||
set( m, F_RAGSOC, LF_CLIFO, "RAGSOC" );
|
||||
set( m, F_CODVAL, LF_CLIFO, "CODVAL" );
|
||||
set( m, F_CODLIN, LF_CLIFO, "CODLIN" );
|
||||
set( m, F_CODPAG, LF_CLIFO, "CODPAG" );
|
||||
set( m, F_DATAINSC, m.get( F_DATADOC ) );
|
||||
set( m, F_CODABIA, LF_CLIFO, "CODABI" );
|
||||
set( m, F_CODCABA, LF_CLIFO, "CODCAB" );
|
||||
// Setta i campi che appartengono al file LF_CFVEN
|
||||
set( m, F_CODABIP, LF_CFVEN, "CODABIPR" );
|
||||
set( m, F_CODCABP, LF_CFVEN, "CODCABPR" );
|
||||
set( m, F_RAGGR, LF_CFVEN, "RAGGDOC" );
|
||||
set( m, F_CODINDSP, LF_CFVEN, "CODINDSP" );
|
||||
set( m, F_CODAG, LF_CFVEN, "CODAG" );
|
||||
set( m, F_CODSPMEZZO, LF_CFVEN, "CODSPMEZZO" );
|
||||
set( m, F_CODPORTO, LF_CFVEN, "CODPORTO" );
|
||||
set( m, F_CODNOTESP1, LF_CFVEN, "CODNOTESP1" );
|
||||
set( m, F_CODNOTESP2, LF_CFVEN, "CODNOTESP2" );
|
||||
set( m, F_CODVETT1, LF_CFVEN, "CODVETT1" );
|
||||
set( m, F_CODVETT2, LF_CFVEN, "CODVETT2" );
|
||||
set( m, F_CODVETT3, LF_CFVEN, "CODVETT3" );
|
||||
set( m, F_SPESEINC, LF_CFVEN, "ADDSPINC" );
|
||||
set( m, F_ADDBRB, LF_CFVEN, "ADDBOLLIRB" );
|
||||
set( m, F_ADDBTR, LF_CFVEN, "ADDBOLLITR" );
|
||||
m.show( F_COFI, !occas );
|
||||
m.show( F_STATOPAIVA, !occas );
|
||||
m.show( F_PAIVA, !occas );
|
||||
set( m, F_RAGSOC, LF_CLIFO, "RAGSOC" );
|
||||
if( !onload )
|
||||
{
|
||||
set( m, F_CODVAL, LF_CLIFO, "CODVAL" );
|
||||
set( m, F_CODLIN, LF_CLIFO, "CODLIN" );
|
||||
set( m, F_CODPAG, LF_CLIFO, "CODPAG" );
|
||||
// Questo nonb va qua, ma nella read
|
||||
set( m, F_DATAINSC, m.get( F_DATADOC ) );
|
||||
set( m, F_CODABIA, LF_CLIFO, "CODABI" );
|
||||
set( m, F_CODCABA, LF_CLIFO, "CODCAB" );
|
||||
// Setta i campi che appartengono al file LF_CFVEN
|
||||
set( m, F_CODABIP, LF_CFVEN, "CODABIPR" );
|
||||
set( m, F_CODCABP, LF_CFVEN, "CODCABPR" );
|
||||
set( m, F_RAGGR, LF_CFVEN, "RAGGDOC" );
|
||||
set( m, F_CODINDSP, LF_CFVEN, "CODINDSP" );
|
||||
set( m, F_CODAG, LF_CFVEN, "CODAG" );
|
||||
set( m, F_CODSPMEZZO, LF_CFVEN, "CODSPMEZZO" );
|
||||
set( m, F_CODPORTO, LF_CFVEN, "CODPORTO" );
|
||||
set( m, F_CODNOTESP1, LF_CFVEN, "CODNOTESP1" );
|
||||
set( m, F_CODNOTESP2, LF_CFVEN, "CODNOTESP2" );
|
||||
set( m, F_CODVETT1, LF_CFVEN, "CODVETT1" );
|
||||
set( m, F_CODVETT2, LF_CFVEN, "CODVETT2" );
|
||||
set( m, F_CODVETT3, LF_CFVEN, "CODVETT3" );
|
||||
set( m, F_SPESEINC, LF_CFVEN, "ADDSPINC" );
|
||||
set( m, F_ADDBRB, LF_CFVEN, "ADDBOLLIRB" );
|
||||
set( m, F_ADDBTR, LF_CFVEN, "ADDBOLLITR" );
|
||||
}
|
||||
if ( occasionale ( ) )
|
||||
{
|
||||
set( m, F_COFI, "" );
|
||||
set( m, F_PAIVA, "" );
|
||||
// set( m, F_COFI, "" );
|
||||
// set( m, F_PAIVA, "" );
|
||||
set( m, F_OCFPI, occas_mask( ).get( O_CODICE ) );
|
||||
set( m, F_RAGSOC, occas_mask( ).get( O_RAGSOC ) );
|
||||
set( m, F_INDCF, occas_mask( ).get( O_INDIRIZZO ) );
|
||||
|
39
ve/tclifor.h
39
ve/tclifor.h
@ -18,34 +18,43 @@
|
||||
#include <mask.h>
|
||||
#endif
|
||||
|
||||
class TCliFor : public TRelation
|
||||
class TData_picker : public TRelation
|
||||
{
|
||||
private:
|
||||
|
||||
char _tipocf;
|
||||
long _codcf;
|
||||
|
||||
TTable* _table;
|
||||
TString16 _tablename;
|
||||
|
||||
TMask _occas_mask;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
TCliFor( );
|
||||
void load( const char tipocf, const long codcf );
|
||||
TData_picker( const int mainfile ) : TRelation ( mainfile ) { }
|
||||
const TString& get( const TString& table, const TString& codtab, const TString& field );
|
||||
const TString& get( const int file, const TString& fieldname );
|
||||
int get_int( const int file, const TString& fieldname );
|
||||
long get_long( const int file, const TString& fieldname );
|
||||
bool get_bool( const int file, const TString& fieldname );
|
||||
bool occasionale( ){ return get_bool( LF_CLIFO, "OCCAS" ); };
|
||||
TMask& occas_mask( ){ return _occas_mask; };
|
||||
static bool occas_code_handler(TMask_field& f, KEY key);
|
||||
bool present( TMask& m, const int mskfield ){ return ( m.id2pos( mskfield ) >= 0 ); }
|
||||
void set( TMask& m, const int mskfield, const int file, const TString& filefield ){ set( m, mskfield, get( file, filefield ) ); };
|
||||
void set( TMask& m, const int mskfield, const TString& value );
|
||||
void show( TMask& m, const int mskfield, const bool show = TRUE ){ if( present( m, mskfield ) ) m.show( mskfield, show ); };
|
||||
void hide( TMask& m, const int mskfield ){ show( m, mskfield, FALSE ); };
|
||||
void hide( TMask& m, const int mskfield ){ show( m, mskfield, FALSE ); };
|
||||
};
|
||||
|
||||
class TCliFor : public TData_picker
|
||||
{
|
||||
private:
|
||||
|
||||
char _tipocf;
|
||||
long _codcf;
|
||||
bool _occas;
|
||||
TMask _occas_mask;
|
||||
|
||||
public:
|
||||
|
||||
TCliFor( );
|
||||
void load( const char tipocf, const long codcf, const TString& ocfpi );
|
||||
bool occasionale( ){ return get_bool( LF_CLIFO, "OCCAS" ); };
|
||||
TMask& occas_mask( ){ return _occas_mask; };
|
||||
static bool occas_code_handler(TMask_field& f, KEY key);
|
||||
int write_occas( );
|
||||
void edita_occasionale( );
|
||||
|
||||
@ -55,7 +64,7 @@ class TCliForVendite : public TCliFor
|
||||
{
|
||||
public:
|
||||
|
||||
void update_mask( TMask& m );
|
||||
void update_mask( TMask& m, bool onload = FALSE );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
138
ve/ve0100.cpp
138
ve/ve0100.cpp
@ -32,6 +32,10 @@
|
||||
#include "veuml.h"
|
||||
#endif
|
||||
|
||||
#ifndef __VEUML1_H
|
||||
#include "veuml1.h"
|
||||
#endif
|
||||
|
||||
#ifndef __SHEET_H
|
||||
#include <sheet.h>
|
||||
#endif
|
||||
@ -68,12 +72,16 @@
|
||||
#define MAX_COLUMNS 22
|
||||
|
||||
#define F_LBTIPORIGA 175
|
||||
#define NPIEDI 40
|
||||
|
||||
typedef real array_piede[ NPIEDI ];
|
||||
|
||||
// Definizione della classe dell'applicazione motore
|
||||
class TMotore_application : public TRelation_application
|
||||
{
|
||||
// Array di totalizzatori
|
||||
real _piedi[79];
|
||||
array_piede _piedi;
|
||||
array_piede _piedi_temp;
|
||||
|
||||
// Record array per la gestione delle righe
|
||||
TRecord_array* _righe_rec;
|
||||
@ -127,7 +135,10 @@ class TMotore_application : public TRelation_application
|
||||
long prossimo_numero( bool provv );
|
||||
int avanza_numero( bool provv );
|
||||
void get_edit_mask( void );
|
||||
void azzera_piedi( );
|
||||
void azzera_piedi( bool temp = FALSE );
|
||||
void carica_piedi( );
|
||||
void somma_piedi( );
|
||||
void sottrai_piedi( );
|
||||
|
||||
// Esegue, se c'è, la procedura utente relativa ad una certa operazione
|
||||
int esegui_procedura( int operazione );
|
||||
@ -155,7 +166,7 @@ protected:
|
||||
void segnala_stato_non_valido( int operazione );
|
||||
TString& stati_validi( int operazione ){ return ( pro( ).get( "STATIVALIDI", nome_sezione( operazione ) ) );};
|
||||
|
||||
void calcola_riga( TRectype& rdoc );
|
||||
void calcola_riga( TRectype& rdoc, bool temp = FALSE );
|
||||
|
||||
// Handle che ritorna la maschera per le righe
|
||||
static TMask * ss_getmask( int numriga, TMask& fullmask, bool destroy );
|
||||
@ -299,6 +310,14 @@ void TMotore_application::user_set_handler( int fieldid, int index, TMask* m )
|
||||
|
||||
bool TMotore_application::ss_handler( TSheet_field& ss, int r, KEY key )
|
||||
{
|
||||
if ( key == K_SPACE ) // Inizio modifica
|
||||
{
|
||||
app().azzera_piedi( TRUE );
|
||||
TRelation rdoc( LF_RIGHEDOC );
|
||||
ss.sheet_mask( ).autosave( &rdoc );
|
||||
// Mi calcolo nei piedi temporanei la riga
|
||||
app().calcola_riga( rdoc.curr( ), TRUE );
|
||||
}
|
||||
if ( key == K_INS ) // Inserimento
|
||||
{
|
||||
TMask& m = *app( )._msk1;
|
||||
@ -311,7 +330,7 @@ bool TMotore_application::ss_handler( TSheet_field& ss, int r, KEY key )
|
||||
riga.add( m.get( F_LBTIPORIGA ), 1 );
|
||||
riga.add( tabtr.get( "S4" ), 2 );
|
||||
return TRUE;
|
||||
};
|
||||
}
|
||||
if ( key == K_CTRL + K_INS ) // Dopo inserimento
|
||||
{
|
||||
TMask& m = *app( )._msk1;
|
||||
@ -338,7 +357,22 @@ bool TMotore_application::ss_handler( TSheet_field& ss, int r, KEY key )
|
||||
ss.force_update( );
|
||||
app( ).curr_mask( ).send_key( K_ROWEDIT, F_SHEET );
|
||||
return TRUE;
|
||||
};
|
||||
}
|
||||
if ( key == K_DEL ) // Cancellazione
|
||||
{
|
||||
// Sottraggo la riga appena cancellata ai totalizzatori
|
||||
app().sottrai_piedi( );
|
||||
app().carica_piedi( );
|
||||
}
|
||||
if ( key == K_ENTER ) // Modifica
|
||||
{
|
||||
app().sottrai_piedi( );
|
||||
TRelation rdoc( LF_RIGHEDOC );
|
||||
ss.sheet_mask( ).autosave( &rdoc );
|
||||
// Sommo la riga ai totalizzatori
|
||||
app().calcola_riga( rdoc.curr( ) );
|
||||
app().sottrai_piedi( );
|
||||
}
|
||||
return TRUE;
|
||||
};
|
||||
|
||||
@ -367,13 +401,15 @@ bool TMotore_application::num_handler( TMask_field& f, KEY key )
|
||||
tabnum.put( "CODTAB", value );
|
||||
if( tabnum.read( ) == NOERR )
|
||||
{
|
||||
// Copio la descriozione della numerazione
|
||||
// Copio la descrizione della numerazione
|
||||
m.set(F_DESNUM, tabnum.get("S0") );
|
||||
// Copio i tipi di documento validi per la numerazione
|
||||
const TString tipidocs( tabnum.get("S2") );
|
||||
m.set(F_TIPIDOCS, tipidocs );
|
||||
// Propone il primo tipo di documento come default
|
||||
m.set(F_TIPODOC, tipidocs.left( 4 ) );
|
||||
// m.field( F_TIPODOC ).check( );
|
||||
m.send_key( K_TAB, F_TIPODOC );
|
||||
|
||||
// Se per questa numerazione è abilitata le numerazione provvisoria
|
||||
if ( tabnum.get_bool ( "B0" ) )
|
||||
@ -533,11 +569,10 @@ bool TMotore_application::clifo_handler(TMask_field& f, KEY key)
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
app().clifo( ).load( cf, atol( f.get( ) ) );
|
||||
// Disabilitazioni varie, ma le demando all'oggetto cliente
|
||||
if (f.focusdirty())
|
||||
{
|
||||
app().clifo( ).load( cf, atol( f.get( ) ), "" );
|
||||
app().clifo( ).update_mask( m );
|
||||
if ( app( ).clifo( ).occasionale( ) && app( ).clifo( ).occas_mask( ).get(O_CODICE).empty( ) )
|
||||
m.send_key(K_SPACE, F_OCCASEDIT); // Lancia maschera occasionali
|
||||
@ -546,13 +581,40 @@ bool TMotore_application::clifo_handler(TMask_field& f, KEY key)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void TMotore_application::azzera_piedi( )
|
||||
void TMotore_application::azzera_piedi( bool temp )
|
||||
{
|
||||
for ( int i = 0; i < 40; i++ )
|
||||
_piedi[ i ] = 0.0;
|
||||
for ( int i = 0; i < NPIEDI; i++ )
|
||||
if ( temp )
|
||||
_piedi_temp[ i ] = 0.0;
|
||||
else
|
||||
_piedi[ i ] = 0.0;
|
||||
}
|
||||
|
||||
void TMotore_application::carica_piedi( )
|
||||
{
|
||||
TToken_string s( pro( ).get( "PROGPIEDE", "MAIN" ) );
|
||||
int i = s.get_int( );
|
||||
int j = 0;
|
||||
while( i != 0 )
|
||||
{
|
||||
real strpiede( _piedi[ i ] );
|
||||
edit_mask( ).set( BASE_PIEDE + ( ++j ), strpiede.stringa( 15 ) );
|
||||
i = s.get_int( );
|
||||
}
|
||||
}
|
||||
|
||||
void TMotore_application::somma_piedi( )
|
||||
{
|
||||
for ( int i = 0; i < NPIEDI; i++ )
|
||||
_piedi[ i ] += _piedi_temp[ i ];
|
||||
}
|
||||
|
||||
void TMotore_application::sottrai_piedi( )
|
||||
{
|
||||
for ( int i = 0; i < NPIEDI; i++ )
|
||||
_piedi[ i ] -= _piedi_temp[ i ];
|
||||
}
|
||||
|
||||
bool TMotore_application::changing_mask(int mode)
|
||||
{
|
||||
static int lastmode = NO_MODE;
|
||||
@ -721,10 +783,14 @@ const char* TMotore_application::get_next_key( )
|
||||
int TMotore_application::read(TMask& m)
|
||||
{
|
||||
azzera_piedi( );
|
||||
m.reset( );
|
||||
clifo( ).occas_mask( ).reset( );
|
||||
int err = TRelation_application::read( m );
|
||||
if ( err == NOERR )
|
||||
{
|
||||
TString16 tipocf( m.get( F_TIPOCF ) );
|
||||
clifo( ).load( tipocf[ 0 ], m.get_int( F_CODCF ), rel( ).curr( ).get( "OCFPI" ) );
|
||||
clifo( ).update_mask( m, TRUE );
|
||||
TLocalisamfile& rdoc = rel( ).lfile(LF_RIGHEDOC);
|
||||
TRectype r = rdoc.curr( );
|
||||
r.zero( );
|
||||
@ -741,16 +807,8 @@ int TMotore_application::read(TMask& m)
|
||||
TRectype &rec = _righe_rec->row( i, TRUE );
|
||||
load_riga( f, i - 1, rec );
|
||||
calcola_riga( rec );
|
||||
}
|
||||
TToken_string s( pro( ).get( "PROGPIEDE", "MAIN" ) );
|
||||
i = s.get_int( );
|
||||
int j = 0;
|
||||
while( i != 0 )
|
||||
{
|
||||
real strpiede( _piedi[ i ] );
|
||||
m.set( BASE_PIEDE + ( ++j ), strpiede.stringa( 15 ) );
|
||||
i = s.get_int( );
|
||||
}
|
||||
};
|
||||
carica_piedi( );
|
||||
}
|
||||
return err;
|
||||
}
|
||||
@ -861,7 +919,8 @@ void TMotore_application::load_riga( TSheet_field& f, int numrig, TRectype& r )
|
||||
TToken_string& riga = f.row(numrig);
|
||||
riga = r.get( "STATORIGA" );
|
||||
riga.add( r.get( "TIPORIGA" ) );
|
||||
riga.add( r.get( "PROFRIGA" ) );
|
||||
TFilename proname( r.get( "PROFRIGA" ) );
|
||||
riga.add( proname );
|
||||
riga.add( r.get( "CODMAG" ) );
|
||||
riga.add( r.get( "CODART" ) );
|
||||
riga.add( r.get( "DESCR" ) );
|
||||
@ -872,6 +931,30 @@ void TMotore_application::load_riga( TSheet_field& f, int numrig, TRectype& r )
|
||||
riga.add( r.get( "QTAEVASA" ) );
|
||||
riga.add( r.get( "RIGAEVASA" ) );
|
||||
riga.add( r.get( "TARA" ) );
|
||||
riga.add( r.get( "PNETTO" ) );
|
||||
riga.add( r.get( "NCOLLI" ) );
|
||||
riga.add( r.get( "DAEVADERE" ) );
|
||||
riga.add( r.get( "SCONTO" ) );
|
||||
riga.add( r.get( "PERCPROV" ) );
|
||||
riga.add( r.get( "IMPFISSO" ) );
|
||||
riga.add( r.get( "IMPFISUN" ) );
|
||||
riga.add( r.get( "CODIVA" ) );
|
||||
riga.add( r.get( "ADDIVA" ) );
|
||||
riga.add( r.get( "ASPBENI" ) );
|
||||
proname.ext( "ini" );
|
||||
TConfig pro( proname );
|
||||
int ncols = pro.get_int( "NCOLS", "COLUMNS" );
|
||||
// Disabilita tutte le colonne
|
||||
for( int i = 1; i <= MAX_COLUMNS; i ++ )
|
||||
f.disable_cell ( f.items( ) - 1, i );
|
||||
// Abilita le colonne indicate nel profilo della riga
|
||||
for( i = 1; i <= ncols; i ++ )
|
||||
{
|
||||
TString16 chiave;
|
||||
chiave.format( "%d", i );
|
||||
int coltoenable = pro.get_int( chiave, "COLUMNS" );
|
||||
f.enable_cell ( numrig - 1, coltoenable - 1 );
|
||||
}
|
||||
}
|
||||
|
||||
void TMotore_application::store_riga( TSheet_field& f, int numrig, TRectype& r )
|
||||
@ -898,7 +981,7 @@ void TMotore_application::store_riga( TSheet_field& f, int numrig, TRectype& r )
|
||||
}
|
||||
|
||||
|
||||
void TMotore_application::calcola_riga( TRectype& r )
|
||||
void TMotore_application::calcola_riga( TRectype& r, bool temp )
|
||||
{
|
||||
TFilename proriganame( r.get("PROFRIGA") );
|
||||
proriganame.ext( "INI" );
|
||||
@ -907,7 +990,10 @@ void TMotore_application::calcola_riga( TRectype& r )
|
||||
int func = s.get_int( );
|
||||
while( func )
|
||||
{
|
||||
_piedi[ s.get_int( ) ] += user_row_calculate( r, func );
|
||||
if ( temp )
|
||||
_piedi_temp[ s.get_int( ) ] += user_row_calculate( r, func );
|
||||
else
|
||||
_piedi[ s.get_int( ) ] += user_row_calculate( r, func );
|
||||
func = s.get_int( );
|
||||
}
|
||||
}
|
||||
|
@ -772,6 +772,7 @@ void TMask_generator::genera_campo_sheet( TToken_string _line )
|
||||
_m->control( type, id( ), _line.get_int( B_MSKSIZE ) );
|
||||
_m->begin( );
|
||||
_m->prompt( 2, 2 );
|
||||
_m->field( _line.get( B_NOME ) );
|
||||
_m->end( );
|
||||
}
|
||||
|
||||
@ -977,7 +978,7 @@ void TMask_generator::genera( )
|
||||
_m->prompt( 24, 3, "Data " );
|
||||
_m->field( "DATADOC" );
|
||||
_m->message( "CO,7@" );
|
||||
_m->flag( "" );
|
||||
_m->flag( "A" );
|
||||
_m->end();
|
||||
|
||||
_m->control( T_NUMERO, F_STATO, 1 );
|
||||
|
@ -127,7 +127,7 @@ GROUP=100
|
||||
TYPE=T_BOTTONE
|
||||
SIZE=801
|
||||
PROMPT="Modifica"
|
||||
X=60
|
||||
X=61
|
||||
Y=0
|
||||
MSKID=F_OCCASEDIT
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user