From bd03da80de253461301eaeea99a691118476a44a Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 10 Jun 1997 16:39:30 +0000 Subject: [PATCH] Corretta generazione per documenti fornitore git-svn-id: svn://10.65.10.50/trunk@4583 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ve/ve0300.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ve/ve0300.cpp b/ve/ve0300.cpp index 926e672eb..e7b74414e 100755 --- a/ve/ve0300.cpp +++ b/ve/ve0300.cpp @@ -1022,7 +1022,7 @@ void TMask_generator::genera_item_sheet( TToken_string _line ) } void TMask_generator::intestazione_pagina( ) -{ +{ _m->page( _m->page( ) + 1 ); _m->pagina( _m->page( )); @@ -1127,6 +1127,7 @@ void TMask_generator::genera( const TString& profilo ) _pro = new TConfig( proname ); + const TString16 tipocf(_pro->get("TIPOCF", "MAIN")); TFilename _mskname( _pro->get( "MSKFILE", "MAIN") ); _mskname.ext( "msk" ); @@ -1226,7 +1227,7 @@ void TMask_generator::genera( const TString& profilo ) _m->begin( ); _m->prompt( 100, 100, "" ); _m->field( "TIPOCF" ); - if ( _pro->get( "TIPOCF", "MAIN" ) == "C" ) + if ( tipocf == "C" ) _m->item("C|Cliente"); else _m->item("F|Fornitore"); @@ -1281,7 +1282,7 @@ void TMask_generator::genera( const TString& profilo ) _m->control( T_STRINGA, F_CODCF, 6 ); _m->begin( ); - if ( _pro->get( "TIPOCF", "MAIN" ) == "C" ) + if ( tipocf == "C" ) { _m->prompt( 2, 4, "Cliente " ); _m->warning( "Cliente assente" ); @@ -1297,19 +1298,20 @@ void TMask_generator::genera( const TString& profilo ) _m->field( "CODCF" ); _m->group( 1 ); _m->use( LF_CLIFO, 1 ); - temp_s.format( "TIPOCF \"C\"~CODCF %d", F_CODCF); + temp_s.format( "TIPOCF \"%s\"~CODCF %d", (const char *)tipocf, F_CODCF); _m->input( temp_s ); _m->display( "\"Codice\" CODCF~\"Ragione Sociale@50\" RAGSOC~\"Partita IVA@12\" PAIV~\"Sospeso\" SOSPESO" ); temp_s.format( "%d CODCF~%d RAGSOC", F_CODCF, F_RAGSOC ); _m->output( temp_s ); _m->check( S_OBBLIGATORIO ); - _m->outline( "ADD RU cg0 -1 C" ); + temp_s.format( "ADD RU cg0 -1 %s", (const char *)tipocf); + _m->outline( temp_s ); _m->message( "CO,10@" ); _m->end( ); _m->control( T_STRINGA, F_RAGSOC, 50 ); _m->begin( ); - if ( _pro->get( "TIPOCF", "MAIN" ) == "C" ) + if ( tipocf == "C" ) { _m->warning( "Cliente assente" ); _m->help( "Ragione sociale del cliente del documento" ); @@ -1322,13 +1324,14 @@ void TMask_generator::genera( const TString& profilo ) _m->prompt( 24, 4, "" ); _m->group( 1 ); _m->use( LF_CLIFO, 2 ); - temp_s.format( "TIPOCF \"C\"~RAGSOC %d", F_RAGSOC ); + temp_s.format( "TIPOCF \"%s\"~RAGSOC %d", (const char *)tipocf, F_RAGSOC ); _m->input( temp_s ); _m->display( "\"Ragione Sociale@50\" RAGSOC~\"Partita IVA@12\" PAIV~\"Codice\" CODCF" ); temp_s.format( "%d CODCF~%d RAGSOC", F_CODCF, F_RAGSOC ); _m->output( temp_s ); _m->check( S_OBBLIGATORIO ); - _m->outline( "ADD RU cg0 -1 C" ); + temp_s.format( "ADD RU cg0 -1 %s", (const char *)tipocf); + _m->outline( temp_s ); _m->message( "CO,11@" ); _m->end( ); _m->line( MASK_FIRST_LINE );