Patch level : 12.00 1404

Files correlati     : ve01.exe fp01.exe

Commento                : eliminati check moduli
This commit is contained in:
Alessandro Bonazzi 2026-02-18 10:54:14 +01:00
parent 86eaaab96b
commit cce605d220
2 changed files with 31 additions and 39 deletions

View File

@ -342,12 +342,11 @@ TDocumento_mask::TDocumento_mask(const char* td, short cust_height)
}
}
}
// if (main_app().has_module(CTAUT, CHK_DONGLE) || main_app().has_module(PAAUT, CHK_DONGLE))
{
if (_ges_ca && id2pos(F_CUP) > 0) // Se gestisco l'analtica ...
if (_ges_ca && id2pos(F_CUP) > 0) // Se gestisco l'analtica ...
{
TLocalisamfile cfcms(LF_CFCMS);
if (cfcms.first() == NOERR) // ... ed i clienti per commessa (alias sono Dinamica)
if (cfcms.first() == NOERR) // ... ed i clienti per commessa (alias sono Dinamica)
{
// Allora impongo la scelta di CIG e CUP in base alla commessa
TBrowse* bp = efield(F_CUP).browse();
@ -422,15 +421,11 @@ TDocumento_mask::TDocumento_mask(const char* td, short cust_height)
bgd->copy_output(bg);
bgd->set_insert("Rca0 -5");
}
}
show(F_PATIPOCON);
enable(F_PATIPOCON);
show(F_PACONTRATTO);
enable(F_PACONTRATTO);
}
/* else
{
hide(F_CUP);
hide(F_DESCRCUP);
hide(F_CIG);
hide(F_DESCRCIG);
}*/
const bool gesoff = cfg.get_bool("GES", "ve", 3);
enable(F_CODCAMP, gesoff);

View File

@ -2253,36 +2253,33 @@ bool TDocumento::add_allegati(TXmlItem & body)
if (get_fp_bool_var(FP_ALLEG_FAT))
{
if (!dongle().active(RSAUT))
get_xml_log()->log(1, "Impossibile generare la fattura, il modulo RS non abilitato!");
if (!tipo().main_print_profile(rep, 2))
get_xml_log()->log(1, "Impossibile generare la fattura, non disponibile un profilo di stampa per questo tipo documento!");
else
if (!tipo().main_print_profile(rep, 2))
get_xml_log()->log(1, "Impossibile generare la fattura, non disponibile un profilo di stampa per questo tipo documento!");
{
//ve1 -2 {CODNUM} {ANNO} {PROVV} {NDOC}(-{ANDOC}) {TIPO_ELABORAZIONE} {TIPO_STAMPA} {NUM_COPIE} {ARCHIVIAZIONE}
// Costruisco la chiamata
TString commandline = "ve011 -2 ";
commandline << get(DOC_CODNUM) << ' ' << get(DOC_ANNO) << ' ' << get(DOC_PROVV) << ' ' << get(DOC_NDOC) << " X P 1 D"; // X: stampa su disco, P: provvisorio, 1: 1 copia, D: disabilita archiviazione
TExternal_app interattivo(commandline);
if (interattivo.run() != NOERR)
{
TString msgerr = "Fallita generazione PDF documento ";
msgerr << get(DOC_CODNUM) << ' ' << get(DOC_ANNO) << ' ' << get(DOC_PROVV) << ' ' << get(DOC_NDOC);
error_box(msgerr);
}
else
{
//ve1 -2 {CODNUM} {ANNO} {PROVV} {NDOC}(-{ANDOC}) {TIPO_ELABORAZIONE} {TIPO_STAMPA} {NUM_COPIE} {ARCHIVIAZIONE}
// Costruisco la chiamata
TString commandline = "ve011 -2 ";
commandline << get(DOC_CODNUM) << ' ' << get(DOC_ANNO) << ' ' << get(DOC_PROVV) << ' ' << get(DOC_NDOC) << " X P 1 D"; // X: stampa su disco, P: provvisorio, 1: 1 copia, D: disabilita archiviazione
TExternal_app interattivo(commandline);
if (interattivo.run() != NOERR)
{
TString msgerr = "Fallita generazione PDF documento ";
msgerr << get(DOC_CODNUM) << ' ' << get(DOC_ANNO) << ' ' << get(DOC_PROVV) << ' ' << get(DOC_NDOC);
error_box(msgerr);
}
else
{
TFilename pdf; pdf.tempdir();
pdf << SLASH << get(DOC_ANNO) << '_' << get(DOC_CODNUM) << '_' << get(DOC_NDOC) << ".pdf";
if (!pdf.exist() && !yesno_box("Attenzione! Non stato possibile creare il pdf, continuare?"))
return false;
add_allegato(body, pdf, "Fattura di cortesia");
}
}
TFilename pdf; pdf.tempdir();
pdf << SLASH << get(DOC_ANNO) << '_' << get(DOC_CODNUM) << '_' << get(DOC_NDOC) << ".pdf";
if (!pdf.exist() && !yesno_box("Attenzione! Non stato possibile creare il pdf, continuare?"))
return false;
add_allegato(body, pdf, "Fattura di cortesia");
}
}
}
TToken_string allegati(get(DOC_CARTACEI), '\n');