From 87e660e6235815383001fbd8eee529a4c389eb7b Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 28 Dec 2010 11:49:22 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : c2100b.msk cg2100c.msk cg2.exe Ricompilazione Demo : [ ] Commento : Corretta lettura / scrittura CUP e CIG git-svn-id: svn://10.65.10.50/branches/R_10_00@21375 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg2100.cpp | 19 +++++++++++-------- cg/cg2100.h | 10 +++++----- cg/cg2100b.uml | 2 +- cg/cg2100c.uml | 2 +- cg/cg2102.cpp | 4 ++-- cg/cg21cg.uml | 6 +++--- 6 files changed, 23 insertions(+), 20 deletions(-) diff --git a/cg/cg2100.cpp b/cg/cg2100.cpp index 9a12c923d..30d092370 100755 --- a/cg/cg2100.cpp +++ b/cg/cg2100.cpp @@ -946,10 +946,12 @@ int TPrimanota_application::read(TMask& m) conto.get(r, true); riga.add(conto.string(0x3)); // Contropartita 110-114 + riga.add(r.get(RMV_CUP), CG_CUP-FIRST_FIELD);// Tipo di riga 115 + riga.add(r.get(RMV_CIG), CG_CIG-FIRST_FIELD);// Tipo di riga 117 + const char tipo = r.get_char(RMV_ROWTYPE); - riga.add(tipo, CG_ROWTYPE-FIRST_FIELD); // Tipo di riga 115 - riga.add(r.get(RMV_CUP), cgs().cid2index(CG_CUP)); - riga.add(r.get(RMV_CIG), cgs().cid2index(CG_CIG)); + riga.add(tipo, CG_ROWTYPE-FIRST_FIELD); // Tipo di riga 119 + disable_cgs_cells(i, tipo); cgs().check_row(i); } @@ -1006,7 +1008,7 @@ int TPrimanota_application::read(TMask& m) "assegnato il segno dell'imponibile")); imposta = -imposta; } - riga.add(imposta.string()); // Imposta 104 + riga.add(imposta.string()); // Imposta 104 TBill c; c.get(r); c.add_to(riga, 4, 0x7); // Conto 105-110 @@ -1096,10 +1098,11 @@ void TPrimanota_application::mask2rel(const TMask& m) r.put(RMV_GRUPPOC, row.get()); r.put(RMV_CONTOC, row.get()); r.put(RMV_SOTTOCONTOC, row.get()); - row.get(); // Descrizione contropartita + + r.put(RMV_CUP, row.get(CG_CUP-FIRST_FIELD)); // CUP + r.put(RMV_CIG, row.get(CG_CIG-FIRST_FIELD)); // CIG + r.put(RMV_ROWTYPE, row.get(CG_ROWTYPE-FIRST_FIELD)); // Tipo riga - r.put(RMV_CUP, row.get()); // CUP - r.put(RMV_CIG, row.get()); // CIG } } @@ -1481,7 +1484,7 @@ void TPrimanota_application::genera_automatico(int tipo, const char* causimm) bool TPrimanota_application::is_percipient(long forn, char& tipper, long& codper) const { - TString16 key; key.format("F|%ld", forn); + TString8 key; key.format("F|%ld", forn); const TRectype& fornitore = cache().get(LF_CLIFO, key); tipper = fornitore.get_char(CLI_TIPOAPER); codper = fornitore.get_long(CLI_CODANAGPER); diff --git a/cg/cg2100.h b/cg/cg2100.h index 99f798570..cba67f6fe 100755 --- a/cg/cg2100.h +++ b/cg/cg2100.h @@ -81,11 +81,11 @@ #define CG_CONTO 105 #define CG_SOTTOCONTO 106 #define CG_DESCR 109 -#define CG_ROWTYPE 115 -#define CG_CUP 116 -#define CG_DCUP 117 -#define CG_CIG 118 -#define CG_DCIG 119 +#define CG_CUP 115 +#define CG_DCUP 116 +#define CG_CIG 117 +#define CG_DCIG 118 +#define CG_ROWTYPE 119 #define CG_MASTRINO 195 #define CG_RATEO 196 #define CG_RISCONTO 197 diff --git a/cg/cg2100b.uml b/cg/cg2100b.uml index 99d119d6a..985e4c3cf 100755 --- a/cg/cg2100b.uml +++ b/cg/cg2100b.uml @@ -386,11 +386,11 @@ BEGIN ITEM "Co./c@3" ITEM "Sott./c@6" ITEM "Descrizione contropartita@30" - ITEM "Tipo@4" ITEM "CUP@15" ITEM "Descrizione CUP@50" ITEM "CIG@10" ITEM "Descrizione CIG@50" + ITEM "Tipo@4" END NUMBER F_GRUPPO 3 diff --git a/cg/cg2100c.uml b/cg/cg2100c.uml index e2b1ffdb3..d8e831c10 100755 --- a/cg/cg2100c.uml +++ b/cg/cg2100c.uml @@ -707,11 +707,11 @@ BEGIN ITEM "Co./c@3" ITEM "Sott./c@6" ITEM "Descrizione contropartita@30" - ITEM "Tipo@4" ITEM "CUP@15" ITEM "Descrizione CUP@50" ITEM "CIG@10" ITEM "Descrizione CIG@50" + ITEM "Tipo@4" END NUMBER F_GRUPPO 3 diff --git a/cg/cg2102.cpp b/cg/cg2102.cpp index 0fe55b4a5..2b66368bf 100755 --- a/cg/cg2102.cpp +++ b/cg/cg2102.cpp @@ -27,9 +27,9 @@ char TPrimanota_application::row_type(const TToken_string& s) { char t = ' '; - if (s.full() && s.items() >= CG_ROWTYPE - 100) + if (s.full()) { - t = s[s.len()-1]; + s.get(CG_ROWTYPE%DLG_USER-1, t); // Can't use cgs().cid2index() here! if (t < 'A' || t > 'Z') t = ' '; } diff --git a/cg/cg21cg.uml b/cg/cg21cg.uml index 7986f5493..57760ded5 100755 --- a/cg/cg21cg.uml +++ b/cg/cg21cg.uml @@ -330,7 +330,7 @@ BEGIN GROUP 64 END -STRING CG_DCUP 50 35 +STRING CG_DCUP 50 32 BEGIN PROMPT 30 12 "" USE %CUP KEY 2 @@ -356,7 +356,7 @@ BEGIN GROUP 64 END -STRING CG_DCIG 50 35 +STRING CG_DCIG 50 32 BEGIN PROMPT 30 13 "" USE %CIG KEY 2 @@ -369,7 +369,7 @@ END LIST CG_ROWTYPE 24 BEGIN - PROMPT 28 14 "Tipo riga " + PROMPT 28 15 "Tipo riga " ITEM " |Sola contabilità" ITEM "A|Abbuoni attivi" ITEM "C|Differenza cambi"