From 1e3e665e63cca90fb0aaa39f7d00176efc8750ee Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 28 Oct 1997 08:52:24 +0000 Subject: [PATCH] cg2100.cpp Corretto errore di genrazione righe contabili da .ini f26.* Aggiornato tracciato record causali git-svn-id: svn://10.65.10.50/trunk@5470 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg2100.cpp | 11 +++++++---- cg/f26.dir | 2 +- cg/f26.trr | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cg/cg2100.cpp b/cg/cg2100.cpp index 4cf71ac79..6e6d12bad 100755 --- a/cg/cg2100.cpp +++ b/cg/cg2100.cpp @@ -1491,13 +1491,16 @@ void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query) for (i = 0; ini.set_paragraph(format("%d,%d", LF_RMOV, i+1)); i++) { char tipo = ini.get_char(RMV_ROWTYPE); + if (tipo == '\0') tipo = ' '; + TBill conto; ini2bill(ini, conto, FALSE); - int numrig = -1; + int numrig = -1; // Normalmente aggiungi la riga in fondo - if (strchr("DINT", tipo) != NULL) + // Cerca una riga che abbia gia' il tipo ed il conto richiesto + if (strchr(" DINT", tipo) != NULL) { - if (tipo == 'I') + if (tipo == 'I' || tipo == ' ') numrig = bill2pos(conto, tipo); else numrig = type2pos(tipo); @@ -1507,7 +1510,7 @@ void TPrimanota_application::ini2mask(TConfig& ini, TMask& msk, bool query) TToken_string& riga = cg.row(numrig); - if (numrig < 0 || !cg.cell_disabled(numrig, 0)) + if (numrig < 0 || !(cg.cell_disabled(numrig, 0) && cg.cell_disabled(numrig, 1))) { TImporto import(ini.get_char(RMV_SEZIONE), real(ini.get(RMV_IMPORTO))); if (!import.is_zero()) diff --git a/cg/f26.dir b/cg/f26.dir index 1f20934e4..35e009ceb 100755 --- a/cg/f26.dir +++ b/cg/f26.dir @@ -1,3 +1,3 @@ 26 0 -$caus|196|196|77|7|Causali contabili|60|| +$caus|0|0|77|7|Causali contabili|60|| diff --git a/cg/f26.trr b/cg/f26.trr index a0ee3aaf6..d0022f4bb 100755 --- a/cg/f26.trr +++ b/cg/f26.trr @@ -19,7 +19,7 @@ M770|1|1|0|Collegamento al 770 CODCAUSIM|1|3|0|Codice causale incasso immediato SOSPESO|8|1|0|Causale sospesa VALINTRA|8|1|0|Gestione valuta intra-comunitaria -MOVIND|1|1|0|Contabilita' industriale +MOVIND|1|1|0|Causale per contabilita' industriale 2 CODCAUS| UPPER(DESCR)|X