Correzione MI2206
git-svn-id: svn://10.65.10.50/trunk@3776 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a3e5b7647f
commit
27bf18b4da
@ -56,15 +56,16 @@ bool TVar_sc::create()
|
|||||||
rp.sheet_mask().set_handler(124, codval_handler);
|
rp.sheet_mask().set_handler(124, codval_handler);
|
||||||
rp.sheet_mask().set_handler(125, datacam_handler);
|
rp.sheet_mask().set_handler(125, datacam_handler);
|
||||||
rp.sheet_mask().set_handler(126, cambio_handler);
|
rp.sheet_mask().set_handler(126, cambio_handler);
|
||||||
|
rp.sheet_mask().set_handler(100, gestione_handler);
|
||||||
|
rp.sheet_mask().set_handler(DLG_OK, registra_dati_comuni);
|
||||||
|
rp.sheet_mask().set_handler(DLG_DELREC, elimina_partita);
|
||||||
|
|
||||||
rp.swap_columns(105,106);
|
rp.swap_columns(105,106);
|
||||||
rp.swap_columns(105,107);
|
rp.swap_columns(105,107);
|
||||||
rp.swap_columns(105,108);
|
rp.swap_columns(105,108);
|
||||||
rp.swap_columns(105,109);
|
rp.swap_columns(105,109);
|
||||||
rp.swap_columns(105,110);
|
rp.swap_columns(105,110);
|
||||||
rp.sheet_mask().set_handler(100, gestione_handler);
|
|
||||||
rp.sheet_mask().set_handler(DLG_OK, registra_dati_comuni);
|
|
||||||
rp.sheet_mask().set_handler(DLG_DELREC, elimina_partita);
|
|
||||||
|
|
||||||
_registrato = FALSE;
|
_registrato = FALSE;
|
||||||
_aperti = FALSE;
|
_aperti = FALSE;
|
||||||
|
|
||||||
@ -592,7 +593,9 @@ bool TVar_sc::video_SC()
|
|||||||
_nriga = _msk->get_int (F_NRIGA);
|
_nriga = _msk->get_int (F_NRIGA);
|
||||||
|
|
||||||
setta_campi_maschera(*_mask);
|
setta_campi_maschera(*_mask);
|
||||||
|
|
||||||
|
_mask->force_update();
|
||||||
|
|
||||||
tasto = _mask->run();
|
tasto = _mask->run();
|
||||||
|
|
||||||
switch (tasto)
|
switch (tasto)
|
||||||
@ -1086,7 +1089,7 @@ bool TVar_sc::tipopag_handler(TMask_field& f, KEY k)
|
|||||||
if (tipomov == 1 && tipopag != 0)
|
if (tipomov == 1 && tipopag != 0)
|
||||||
return f.warning_box("In caso di fattura non e' possibile indicare il tipo pagamento");
|
return f.warning_box("In caso di fattura non e' possibile indicare il tipo pagamento");
|
||||||
|
|
||||||
if (tipomov != 1)
|
if (tipomov != 1 && tipomov != 2)
|
||||||
if (tipopag < 1 || tipopag > 9)
|
if (tipopag < 1 || tipopag > 9)
|
||||||
return f.warning_box("Tipo pagamento errato");
|
return f.warning_box("Tipo pagamento errato");
|
||||||
}
|
}
|
||||||
@ -1207,28 +1210,30 @@ bool TVar_sc::codpag_handler(TMask_field& f, KEY k)
|
|||||||
|
|
||||||
TString codpag = f.get();
|
TString codpag = f.get();
|
||||||
|
|
||||||
TTable cpg ("%CPG");
|
if (codpag.not_empty())
|
||||||
TString dep (format("%-4s", (const char*) codpag));
|
{
|
||||||
|
TTable cpg ("%CPG");
|
||||||
|
TString dep (format("%-4s", (const char*) codpag));
|
||||||
|
|
||||||
cpg.zero();
|
cpg.zero();
|
||||||
cpg.put("CODTAB", dep);
|
cpg.put("CODTAB", dep);
|
||||||
if (cpg.read() == NOERR)
|
if (cpg.read() == NOERR)
|
||||||
{
|
{
|
||||||
descr = cpg.get("S0");
|
descr = cpg.get("S0");
|
||||||
tipo = atoi(cpg.get("S4"));
|
tipo = atoi(cpg.get("S4"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return f.warning_box("Codice di pagamento errato o non presente in tabella");
|
return f.warning_box("Codice di pagamento errato o non presente in tabella");
|
||||||
|
|
||||||
int tipopag = f.mask().get_int(112);
|
int tipopag = f.mask().get_int(112);
|
||||||
if (tipopag != 0)
|
if (tipopag != 0)
|
||||||
{
|
{
|
||||||
if (tipopag != tipo)
|
if (tipopag != tipo)
|
||||||
return f.warning_box("Il tipo pagamento della scadenza non e' congruo con il tipo pagamento del codice di pagamento");
|
return f.warning_box("Il tipo pagamento della scadenza non e' congruo con il tipo pagamento del codice di pagamento");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
f.mask().set(112,tipo);
|
f.mask().set(112,tipo);
|
||||||
|
}
|
||||||
TString ultclass = f.mask().get(113);
|
TString ultclass = f.mask().get(113);
|
||||||
if (ultclass.empty())
|
if (ultclass.empty())
|
||||||
f.mask().set(114, descr);
|
f.mask().set(114, descr);
|
||||||
@ -1240,13 +1245,15 @@ bool TVar_sc::tpscad_handler(TMask_field& f, KEY k)
|
|||||||
{
|
{
|
||||||
if ( (k == K_TAB || k == K_ENTER) && f.mask().is_running())
|
if ( (k == K_TAB || k == K_ENTER) && f.mask().is_running())
|
||||||
{
|
{
|
||||||
|
TString codpag = f.mask().get(111);
|
||||||
|
|
||||||
|
if (codpag.empty()) return TRUE;
|
||||||
|
|
||||||
int tipopag = atoi(f.get());
|
int tipopag = atoi(f.get());
|
||||||
|
|
||||||
if (tipopag < 1 || tipopag > 9)
|
if (tipopag < 1 || tipopag > 9)
|
||||||
return f.warning_box("Tipo pagamento errato");
|
return f.warning_box("Tipo pagamento errato");
|
||||||
|
|
||||||
TString codpag = f.mask().get(111);
|
|
||||||
|
|
||||||
TTable cpg ("%CPG");
|
TTable cpg ("%CPG");
|
||||||
TString dep (format("%-4s", (const char*) codpag));
|
TString dep (format("%-4s", (const char*) codpag));
|
||||||
|
|
||||||
@ -2495,3 +2502,5 @@ bool TVar_sc::menu(MENU_TAG m)
|
|||||||
return main_loop();
|
return main_loop();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user