diff --git a/lv/lv2500.cpp b/lv/lv2500.cpp index c2c5684c8..9567d23ba 100755 --- a/lv/lv2500.cpp +++ b/lv/lv2500.cpp @@ -543,6 +543,8 @@ void TFatturazione_lavanderie::post_process(TLista_documenti& doc_out, TLista_do doc.put(DOC_NOTE, descr); doc.destroy_row(1, true); } + if (!contr.get_bool(LVCONDV_FORFNOCONS)) + aggiorna_fattura(doc, contr.get_int(LVCONDV_CODCONT)); if (doc.physical_rows() > 0) doc.sort_rows("LVTYPE|" RDOC_CODART); @@ -687,8 +689,6 @@ void TFatturazione_lavanderie::post_process(TLista_documenti& doc_out, TLista_do } else // se il tipo canone è impostato a nessuno o % sul valore convenzionale per cliente vado in ambedue i casi ad eseguire il ciclo che analizza i tipi forfait { - if (!contr.get_bool(LVCONDV_FORFNOCONS)) - aggiorna_fattura(doc, contr.get_int(LVCONDV_CODCONT)); //per ogni documento, scorro tutte le sue righe for (int i = 1; i <= doc.physical_rows() ; i++) { @@ -1218,11 +1218,11 @@ void TFatturazione_lavanderie::post_process(TLista_documenti& doc_out, TLista_do for (int i = 0; i < doc_in.items(); i++) { - TDocumento& doc = doc_in[i]; + TDocumento& docb = doc_in[i]; - if (doc.get_long(DOC_NDOC) == ndoc) + if (docb.get_long(DOC_NDOC) == ndoc) { - TRiga_documento * bolrow = (TRiga_documento *) doc.get_row_id(id); + TRiga_documento * bolrow = (TRiga_documento *) docb.get_row_id(id); if (bolrow != NULL) {