diff --git a/ba/ba3100.cpp b/ba/ba3100.cpp index 54ec1cef0..78f99773c 100755 --- a/ba/ba3100.cpp +++ b/ba/ba3100.cpp @@ -189,7 +189,7 @@ HIDDEN bool tiporeg_handler(TMask_field& f, KEY k) if ((k == K_TAB || k == K_ENTER) && app().exist_journal() && (atoi(f.get()) == REG_JOURNAL) ) - return error_box("Non e' possibile avere due registri giornale nello stesso anno"); + return f.error_box("Non e' possibile avere due registri giornale nello stesso anno"); return TRUE; } @@ -198,24 +198,27 @@ HIDDEN bool printer_handler(TMask_field& f, KEY k) if (k == K_SPACE) { TMask& m = f.mask(); - TString16 config; - config.format("REG%05ld", m.get_long(F_CODDITTA)); - config << m.get(F_CODICE); - - if (config.len() == 11) + if (!m.query_mode()) { - TPrinter& p = printer(); - p.set_printtype(normprinter); // Force configuration update - p.read_configuration(config); - if (p.set()) + TString16 config; + config.format("REG%05ld", m.get_long(F_CODDITTA)); + config << m.get(F_CODICE); + + if (config.len() == 11) // REG+ANNO+CODICE di tre caratteri { - m.enable(F_CONFIG); - m.set(F_CONFIG, "X"); - } - p.read_configuration(); - } - else - return error_box("Nessun registro selezionato"); + TPrinter& p = printer(); + p.set_printtype(normprinter); // Force configuration update + p.read_configuration(config); + if (p.set()) + { + m.enable(F_CONFIG); + m.set(F_CONFIG, "X"); + } + p.read_configuration(); + } + else + return f.error_box("Nessun registro selezionato"); + } } return TRUE; } @@ -277,7 +280,7 @@ HIDDEN bool coddel_handler(TMask_field& f, KEY k) if (!titcf) { f.mask().hide(F_CONCESSIONE); - return error_box("Concessione non ammessa senza conto fiscale"); + return f.error_box("Concessione non ammessa senza conto fiscale"); } f.mask().hide(F_BANCA1); f.mask().hide(F_BANCA2); @@ -304,14 +307,14 @@ HIDDEN bool intdel_handler(TMask_field& f, KEY k) TConfig cnf(CONFIG_DITTA, "cg"); bool isintr = cnf.get_bool("InTrTr"); if (isintr) - return error_box("Interessi non ammessi: ditta con NO calcolo interessi"); + return f.error_box("Interessi non ammessi: ditta con NO calcolo interessi"); } - else return error_box("Interessi non ammessi: ditta con versamenti mensili"); + else return f.error_box("Interessi non ammessi: ditta con versamenti mensili"); if (imp < intr) - return error_box("Incoerenza importo versato e interessi"); + return f.error_box("Incoerenza importo versato e interessi"); else if (!imp.is_zero() && imp == intr) - return error_box("Incoerenza importo versato e interessi"); + return f.error_box("Incoerenza importo versato e interessi"); } return TRUE; } @@ -339,7 +342,7 @@ HIDDEN bool impdel_handler(TMask_field& f, KEY k) else lim = ver.get(I_ACCONTOIVA); const real imp(m.get(F_IMPORTO)); if (imp < lim) - return yesno_box("Importo inferiore a Lit. %s. Registrare ugualmente?", lim.string(".")); + return f.yesno_box("Importo inferiore a Lit. %s. Registrare ugualmente?", lim.string(".")); } } return TRUE; @@ -382,14 +385,14 @@ HIDDEN bool mese_handler(TMask_field& f, KEY k) { TMask* mask = &m; mask->reset(); - return error_box("Ditta trimestrale: indicare trimestre"); + return f.error_box("Ditta trimestrale: indicare trimestre"); } } else if (mese != 3 && mese != 6 && mese != 9 && mese != 13) { TMask* mask = &m; mask->reset(); - return error_box("Ditta trimestrale: indicare trimestre"); + return f.error_box("Ditta trimestrale: indicare trimestre"); } } } @@ -433,7 +436,8 @@ bool TGeneric_table_app::user_create() _ver->put("R2","1.5"); _ver->put("R3","1.5"); _ver->put("R4","1.5"); _ver->put("R5","50500"); _ver->put("R7","200000"); _ver->put("R11","88"); _ver->put("R12","88"); - if (_ver->write() != NOERR) error_box("Errore %d in scrittura sulla tabella %VER",_ver->status()); + if (_ver->write() != NOERR) + error_box("Errore %d in scrittura sulla tabella %VER",_ver->status()); } } diff --git a/ba/batbreg.h b/ba/batbreg.h index 16b48695e..251bcb52b 100755 --- a/ba/batbreg.h +++ b/ba/batbreg.h @@ -39,7 +39,7 @@ #define F_TOT_INCASSI 161 #define F_TOT_PAGAMENTI 162 -#define F_ULTIMA_DATA_DI_STAMPA 154 +#define F_ULTIMA_DATA_DI_STAMPA 170 #define F_CODULC 163 #define F_CODLBU 164