Aggiustata maschera

git-svn-id: svn://10.65.10.50/trunk@2715 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-04-10 09:47:15 +00:00
parent 2eebffdbb6
commit 9eca2ff4ec
2 changed files with 14 additions and 4 deletions

View File

@ -202,7 +202,6 @@ BEGIN
OUTPUT S_SOTTOCONTO SOTTOCONTO
OUTPUT S_DESCRCONTO DESCR
CHECKTYPE NORMAL
VALIDATE REQIF_FUNC 1 S_IMPORTO
WARNING "Contropartita assente"
GROUP 2
END
@ -217,7 +216,7 @@ BEGIN
DISPLAY "Conto" CONTO
DISPLAY "Sottoconto" SOTTOCONTO
COPY OUTPUT S_SOTTOCONTO
CHECKTYPE REQUIRED
CHECKTYPE NORMAL
GROUP 2
END

View File

@ -114,6 +114,8 @@ protected:
static bool conto_handler(TMask_field& f, KEY k);
static bool descr_handler(TMask_field& f, KEY k);
void gioca_cambi(int force = 0x0);
static bool sottoconto_handler(TMask_field& f, KEY k);
#ifdef __EXTRA__
static bool datareg_handler(TMask_field& f, KEY k);
static bool datadoc_handler(TMask_field& f, KEY k);
@ -147,6 +149,7 @@ TPay_mask::TPay_mask(const TGame_mask& parent, int mod)
{
set_mode(mod);
enable(DLG_DELREC, edit_mode());
set_handler(S_SOTTOCONTO, sottoconto_handler);
#ifdef __EXTRA__
xvt_statbar_set(mod == MODE_MOD ? "Modifica" : "Inserimento", TRUE);
@ -498,7 +501,13 @@ bool TPay_mask::saldo_handler(TMask_field& f, KEY k)
return TRUE;
}
bool TPay_mask::sottoconto_handler(TMask_field& f, KEY k)
{
bool ok = TRUE;
if (k == K_ENTER && f.mask().insert_mode() && f.get().empty())
ok = f.error_box("Contropartita obbligatoria");
return ok;
}
bool TPay_mask::datapag_handler(TMask_field& f, KEY k)
{
@ -1788,8 +1797,10 @@ bool TPrimanota_application::edit_partite(const TMask& m, int riga)
const int conto = m.get_int(CG_CONTO);
const long sottoconto = m.get_int(CG_SOTTOCONTO);
const TBill b(gruppo, conto, sottoconto, tipo); // Legge il conto della riga selezionata
// Esci se il conto della riga cliente non e' valido
if (!b.ok())
return FALSE; // Esci se il conto della riga cliente non e' valido
return m.field(CG_SOTTOCONTO).error_box("Conto incompleto");
const char rt = m.get(CG_ROWTYPE)[0];
if (rt == 'T' && tipo <= ' ') // Nelle note di credito DEVE essere un clifo