Patch level :10.0
Files correlati : Ricompilazione Demo : [ ] Commento :aggiunto segnaposto e prima stesura maschera della configurazione dei fidi (non fa assolutamente ancora una ceppa) git-svn-id: svn://10.65.10.50/trunk@17509 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e39648939a
commit
12db4b468f
169
ve/ve0200.cpp
169
ve/ve0200.cpp
@ -14,11 +14,11 @@
|
||||
|
||||
#include "veconf.h"
|
||||
|
||||
#define SINTASSI "Usage: VE0 -2 -[1|2|3|4|5|6|7]"
|
||||
#define SINTASSI "Usage: VE0 -2 -[1|2|3|4|5|6|7|8]"
|
||||
|
||||
class TConf_vendite : public TConfig_application
|
||||
{
|
||||
char _current;
|
||||
int _current;
|
||||
|
||||
static bool check_fields(TMask_field& f, KEY k);
|
||||
static bool check_fields_iva(TMask_field& f, KEY k);
|
||||
@ -48,7 +48,7 @@ bool TConf_vendite::check_fields(TMask_field& f, KEY k)
|
||||
if (f.dlg() == i) continue;
|
||||
t.add(m.get(i));
|
||||
}
|
||||
if (t.find(fld)>=0)
|
||||
if (t.find(fld) >= 0)
|
||||
return f.error_box("Immettere un gruppo di ricerca non ancora indicato nella sequenza");
|
||||
}
|
||||
return TRUE;
|
||||
@ -74,81 +74,103 @@ bool TConf_vendite::check_fields_iva(TMask_field& f, KEY k)
|
||||
bool TConf_vendite::preprocess_config (TMask& mask, TConfig& config)
|
||||
{
|
||||
disable_menu_item(M_FILE_NEW);
|
||||
if (_current == '5') // solo per configurazione "e"
|
||||
|
||||
switch (_current)
|
||||
{
|
||||
TToken_string ric(config.get("RICERCACR"));
|
||||
TString ana_items("AR|GM|SM|RF");
|
||||
int nor_order = 0, ana_order = 0;
|
||||
TString it;
|
||||
mask.set_handler(F_RICERCACR1,check_fields);
|
||||
mask.set_handler(F_RICERCACR2,check_fields);
|
||||
mask.set_handler(F_RICERCACR3,check_fields);
|
||||
mask.set_handler(F_RICERCACR4,check_fields);
|
||||
mask.set_handler(F_RICERCACR5,check_fields);
|
||||
mask.set_handler(F_RICERCAAN1,check_fields);
|
||||
mask.set_handler(F_RICERCAAN2,check_fields);
|
||||
mask.set_handler(F_RICERCAAN3,check_fields);
|
||||
mask.set_handler(F_RICERCAAN4,check_fields);
|
||||
for (it = ric.get();it.not_empty();it = ric.get())
|
||||
|
||||
case 5: // solo per configurazione "e"
|
||||
{
|
||||
if (ana_items.find(it) >= 0)
|
||||
TToken_string ric(config.get("RICERCACR"));
|
||||
TString ana_items("AR|GM|SM|RF");
|
||||
int nor_order = 0, ana_order = 0;
|
||||
TString it;
|
||||
mask.set_handler(F_RICERCACR1,check_fields);
|
||||
mask.set_handler(F_RICERCACR2,check_fields);
|
||||
mask.set_handler(F_RICERCACR3,check_fields);
|
||||
mask.set_handler(F_RICERCACR4,check_fields);
|
||||
mask.set_handler(F_RICERCACR5,check_fields);
|
||||
mask.set_handler(F_RICERCAAN1,check_fields);
|
||||
mask.set_handler(F_RICERCAAN2,check_fields);
|
||||
mask.set_handler(F_RICERCAAN3,check_fields);
|
||||
mask.set_handler(F_RICERCAAN4,check_fields);
|
||||
for (it = ric.get();it.not_empty();it = ric.get())
|
||||
{
|
||||
mask.set(F_RICERCAAN1+ana_order,it);
|
||||
if (ana_order==0) // Se e' la prima volta...
|
||||
if (ana_items.find(it) >= 0)
|
||||
{
|
||||
mask.set(F_RICERCACR1+nor_order,"AN");
|
||||
mask.set(F_RICERCAAN1+ana_order,it);
|
||||
if (ana_order==0) // Se e' la prima volta...
|
||||
{
|
||||
mask.set(F_RICERCACR1+nor_order,"AN");
|
||||
nor_order++;
|
||||
}
|
||||
ana_order++;
|
||||
}
|
||||
else
|
||||
{
|
||||
mask.set(F_RICERCACR1+nor_order,it);
|
||||
nor_order++;
|
||||
}
|
||||
ana_order++;
|
||||
}
|
||||
else
|
||||
}
|
||||
break;
|
||||
case 6: // solo per configurazione "f"
|
||||
{
|
||||
mask.set(F_RICERCACR1+nor_order,it);
|
||||
nor_order++;
|
||||
mask.set_handler(F_EX_PERCIVA1,check_fields_iva); // Basta su uno che controlla tutti all'uscita della maschera
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
else
|
||||
if (_current == '6') // solo per configurazione "f"
|
||||
{
|
||||
mask.set_handler(F_EX_PERCIVA1,check_fields_iva); // Basta su uno che controlla tutti all'uscita della maschera
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TConf_vendite::postprocess_config (TMask& mask, TConfig& config)
|
||||
{
|
||||
enable_menu_item(M_FILE_NEW);
|
||||
if (_current == '5') // solo per configurazione "e"
|
||||
|
||||
switch (_current)
|
||||
{
|
||||
TToken_string ric;
|
||||
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++)
|
||||
|
||||
case 5: // solo per configurazione "e"
|
||||
{
|
||||
r = mask.get(i);
|
||||
if (r == "-") continue;
|
||||
if (r == "AN")
|
||||
for (short j=F_RICERCAAN1;j<=F_RICERCAAN4;j++)
|
||||
{
|
||||
r = mask.get(j);
|
||||
if (r == "-") continue;
|
||||
TToken_string ric;
|
||||
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 == "AN")
|
||||
for (short j=F_RICERCAAN1;j<=F_RICERCAAN4;j++)
|
||||
{
|
||||
r = mask.get(j);
|
||||
if (r == "-") continue;
|
||||
ric.add(r);
|
||||
}
|
||||
else
|
||||
ric.add(r);
|
||||
}
|
||||
else
|
||||
ric.add(r);
|
||||
}
|
||||
config.set("RICERCACR",ric);
|
||||
}
|
||||
config.set("RICERCACR",ric);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
{
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -157,38 +179,45 @@ bool TConf_vendite::user_create( )
|
||||
TString16 arg( argv(2) );
|
||||
if( arg[ 0 ] != '-' )
|
||||
fatal_box( SINTASSI );
|
||||
_current = arg[1];
|
||||
TConfig conf(_current == '6' ? CONFIG_STUDIO : CONFIG_DITTA );
|
||||
if (_current == '6') set_config(CONFIG_STUDIO);
|
||||
|
||||
_current = arg[1] - '0';
|
||||
|
||||
TConfig conf(_current == 6 ? CONFIG_STUDIO : CONFIG_DITTA );
|
||||
if (_current == 6)
|
||||
set_config(CONFIG_STUDIO);
|
||||
|
||||
switch( _current )
|
||||
{
|
||||
case '1':
|
||||
case 1:
|
||||
conf.set( "EdMask", "ve0200a", "ve" );
|
||||
break;
|
||||
case '2':
|
||||
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;
|
||||
case '7':
|
||||
case 7:
|
||||
conf.set( "EdMask", "ve0200g", "ve" );
|
||||
break;
|
||||
case 8:
|
||||
conf.set( "EdMask", "ve0200h", "ve");
|
||||
break;
|
||||
default:
|
||||
fatal_box( SINTASSI );
|
||||
return FALSE;
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int ve0200(int argc, char* argv[])
|
||||
|
115
ve/ve0200h.uml
Executable file
115
ve/ve0200h.uml
Executable file
@ -0,0 +1,115 @@
|
||||
#include "veconf.h"
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -11 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -11 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Configurazione calcolo fido clienti" -1 -1 78 10
|
||||
|
||||
NUMBER F_DANGERDAYS 2
|
||||
BEGIN
|
||||
PROMPT 1 2 "Giorni di rischio "
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
NUMBER F_SAFEPERC 6 2
|
||||
BEGIN
|
||||
PROMPT 1 3 "% di tolleranza "
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
TEXT -1
|
||||
BEGIN
|
||||
PROMPT 1 5 "@bNumerazioni/Tipi documenti da considerare"
|
||||
END
|
||||
|
||||
SPREADSHEET F_DOCS -1 4
|
||||
BEGIN
|
||||
PROMPT 1 6 ""
|
||||
ITEM "Numerazione"
|
||||
ITEM "Descrizione@50"
|
||||
ITEM "Tipo"
|
||||
ITEM "Stato"
|
||||
ITEM "Scarico"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
PAGE "Numerazioni/Tipi documenti da considerare" -1 -1 78 8
|
||||
|
||||
STRING SN_CODNUM 4
|
||||
BEGIN
|
||||
PROMPT 1 1 "Codice numerazione "
|
||||
USE %NUM
|
||||
INPUT CODTAB SN_CODNUM
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT SN_CODNUM CODTAB
|
||||
OUTPUT SN_DESCR S0
|
||||
CHECKTYPE REQUIRED
|
||||
FLAGS "UZ"
|
||||
END
|
||||
|
||||
STRING SN_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 1 2 "Descrizione "
|
||||
USE %NUM KEY 2
|
||||
INPUT S0 SN_DESCR
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT SN_CODNUM
|
||||
END
|
||||
|
||||
STRING SN_TIPO 4
|
||||
BEGIN
|
||||
PROMPT 1 3 "Tipo "
|
||||
USE %TIP
|
||||
INPUT CODTAB F_TIPODOC
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT SN_TIPO CODTAB
|
||||
CHECKTYPE REQUIRED
|
||||
FLAG "UPD"
|
||||
END
|
||||
|
||||
NUMBER SN_STATO 1
|
||||
BEGIN
|
||||
PROMPT 1 4 "Stato "
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
BOOLEAN SN_RESIDUO
|
||||
BEGIN
|
||||
PROMPT 1 5 "Documento a residuo "
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_DELREC 10 2
|
||||
BEGIN
|
||||
PROMPT -23 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -33 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
12
ve/veconf.h
12
ve/veconf.h
@ -221,5 +221,17 @@
|
||||
#define F_EAN8 172
|
||||
#define F_EAN13 173
|
||||
#define F_EAN8CIN 174
|
||||
|
||||
// Campi per ve0200h.uml
|
||||
#define F_DANGERDAYS 201
|
||||
#define F_SAFEPERC 202
|
||||
#define F_DOCS 203
|
||||
|
||||
#define SN_CODNUM 101
|
||||
#define SN_DESCR 102
|
||||
#define SN_TIPO 103
|
||||
#define SN_STATO 104
|
||||
#define SN_RESIDUO 105
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user