diff --git a/src/fp/fp1100.cpp b/src/fp/fp1100.cpp index 6d4648239..d6d4a4758 100644 --- a/src/fp/fp1100.cpp +++ b/src/fp/fp1100.cpp @@ -117,13 +117,13 @@ void TBolliinfatt_mask::fill() break; const TRectype& doc = rec.cursor()->curr(); const TTipo_documento& td = cached_tipodoc(doc.get(DOC_TIPODOC)); - bool sent = false; + if (chiave_paf(doc, hfatt, bfatt)) { TString qry_paf7 = "SELECT PAF0700F.P7_IMPORTOBOLLO, PAF0100F.P1_GESTIONE FROM PAF0700F JOIN PAF0100F ON P7_KEYPRGINVIO = P1_KEYPRGINVIO AND P7_KEYHEADERFATT = P1_KEYHEADERFATT AND P7_KEYBODYFATT = P1_KEYBODYFATT WHERE P7_KEYHEADERFATT = '"; qry_paf7 << hfatt << "' AND P7_KEYBODYFATT = '" << bfatt << "' AND P7_IMPORTOBOLLO > 0"; - if (!fp_db().sq_set_exec(qry_paf7) || (fp_db().sq_get("P1_GESTIONE") != "N" && (fp_settings().is_f8() ? fp_db().sq_get("P1_GESTIONE") != "X" : true))) + if (!fp_db().sq_set_exec(qry_paf7) || (fp_db().sq_get("P1_GESTIONE") != "N" && (is_f8() ? fp_db().sq_get("P1_GESTIONE") != "X" : true))) { continue; } diff --git a/src/fp/fp1200.cpp b/src/fp/fp1200.cpp index 528635794..89b12bb26 100644 --- a/src/fp/fp1200.cpp +++ b/src/fp/fp1200.cpp @@ -65,14 +65,12 @@ void TMancati_mask::save_all_fields() const int idx = 0; for(const char* row = msg.get(); row; row = msg.get()) - fp_settings().set_body_mail(row, idx++); + set_body_mail(row, idx++); if(idx < _idx) { for(int i=idx; i<_idx; i++) - { - fp_settings().remove_para_ini(idx); - } + remove_para_ini(idx); } } @@ -124,9 +122,9 @@ void TMancati_mask::load_all_fields() // Carico messaggio corpo mail già salvato o vuoto se mai inserito TString msg; - int idx = 0; - for(TString row = fp_settings().get_body_mail(idx); row != "STOpsTOP"; row = fp_settings().get_body_mail(idx)) + + for(TString row = get_body_mail(idx); row != "STOpsTOP"; row = get_body_mail(idx)) { if (idx++ > 0) msg << '\n'; @@ -367,7 +365,7 @@ void TMancati_app::main_loop() TFp_mail_sender mail_sender; const TString& msg = mask.get(F_BODYMAIL); - if ( !mail_sender.set_alleg(fp_settings().get_allega_fat()) ) + if ( !mail_sender.set_alleg(get_allega_fat()) ) { TString msg; msg << "Non è possibile allegare alla fattura:\nAllega in fattura disabilitato nelle impostazioni.\n" << "Inviare lo stesso la mail\nNotifica Mancata Consegna senza allegato?";