Patch level : 12.0 1036

Files correlati     : fp0.exe fp0100a.msk fp0300a.msk
Commento :
Aggiunto un parametro per inviare i dati di tutti i documenti di riferimento e non solo delle note di credito
This commit is contained in:
Alessandro Bonazzi 2021-02-28 22:08:10 +01:00
parent de6b6e9fd1
commit dc4db7972c
2 changed files with 7 additions and 9 deletions

View File

@ -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;
}

View File

@ -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?";