From ab2f4789211b3bb1600ff32e221f4a242cea34f5 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 9 Mar 2009 09:52:05 +0000 Subject: [PATCH] Patch level : 10.0 254 Files correlati : ve0.exe ve6.exe Ricompilazione Demo : [ ] Commento : Trsformate le tabelle MRE e CMT in tabelle di modulo (ve) git-svn-id: svn://10.65.10.50/trunk@18451 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ve/vearea.men | 4 ++-- ve/velib04b.cpp | 35 +++++++++++++++++------------------ ve/vetbcmt.uml | 4 ++-- ve/vetbmre.uml | 2 +- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/ve/vearea.men b/ve/vearea.men index 94b917804..fa5870f7a 100755 --- a/ve/vearea.men +++ b/ve/vearea.men @@ -57,8 +57,8 @@ Item_11 = "Risorse", "ve0 -4 RSS", "F" Item_12 = "Attrezzature", "ve0 -4 ATR", "F" Item_13 = "Banche di presentazione", "ef0 -6 BNP", "F" Item_14 = "Zone", "ba3 -0 ZON", "F" -Item_15 = "Fatture da emettere/ricevere", "ve0 -4 MRE", "F" -Item_16 = "Conti ricavo dei materiali", "ba3 -0 CMT", "F" +Item_15 = "Fatture da emettere/ricevere", "ve0 -6 &MRE", "F" +Item_16 = "Conti ricavo dei materiali", "ve0 -6 &CMT", "F" [ACQVEN_005] Caption = "Tabelle contabili" diff --git a/ve/velib04b.cpp b/ve/velib04b.cpp index 5374859da..5da4659e9 100755 --- a/ve/velib04b.cpp +++ b/ve/velib04b.cpp @@ -359,15 +359,15 @@ void TMovimentoPN_VE::map_conto_re(TBill& c) TString16 key; key.format("%3d%3d%6ld",c.gruppo(), c.conto(), c.sottoconto()); - const TRectype* rs = &cache().get("MRE", key); + const TRectype* rs = &cache().get("&MRE", key); if (rs->empty()) { key.cut(6); - rs = &cache().get("MRE", key); + rs = &cache().get("&MRE", key); if (rs->empty()) { key.cut(3); - rs = &cache().get("MRE", key); + rs = &cache().get("&MRE", key); } } @@ -599,15 +599,15 @@ error_type TIVA_array::add(const TRiga_documento& r, const TBill& conto, const i if (num.fattura_emettere_ricevere()) { key.format("%3d%3d%6ld", c.gruppo(), c.conto(), c.sottoconto()); - const TRectype* rs = &cache().get("MRE", key); + const TRectype* rs = &cache().get("&MRE", key); if (rs->empty()) { key.cut(6); - rs = &cache().get("MRE", key); + rs = &cache().get("&MRE", key); if (rs->empty()) { key.cut(3); - rs = &cache().get("MRE", key); + rs = &cache().get("&MRE", key); } } if (rs->empty()) @@ -1793,27 +1793,26 @@ error_type TContabilizzazione::search_costo_ricavo_mat(TBill& conto, const TRiga case RIGA_OMAGGI: // righe omaggio come articoli spiaccicato identico (avranno imponibile 0) case RIGA_MERCE: // righe di merce { - TTable cmt("CMT"); TString16 key; - int err; key.format("%03d%03d%06ld", conto.gruppo(), conto.conto(), conto.sottoconto()); - cmt.put("CODTAB", key); - err = cmt.read(); - if (err != NOERR) + const TRectype &t2 = cache().get("&CMT", key); + if (t2.empty()) { key.format("%03d%03d", conto.gruppo(), conto.conto()); - cmt.put("CODTAB", key); - err = cmt.read(); - if (err != NOERR) + const TRectype &t1 = cache().get("&CMT", key); + if (t1.empty()) { key.format("%03d", conto.gruppo()); - cmt.put("CODTAB", key); - err = cmt.read(); + const TRectype &t = cache().get("&CMT", key); + if (!t.empty()) + conto.set(t.get_int("I0"), t.get_int("I1"), t.get_int("I2")); } + else + conto.set(t1.get_int("I0"), t1.get_int("I1"), t1.get_int("I2")); } - if (err == NOERR) - conto.set(cmt.get_int("I0"), cmt.get_int("I1"), cmt.get_int("I2")); + else + conto.set(t2.get_int("I0"), t2.get_int("I1"), t2.get_int("I2")); } break; // case 'M' default : diff --git a/ve/vetbcmt.uml b/ve/vetbcmt.uml index 89c87e7b6..cc5e9b2dd 100755 --- a/ve/vetbcmt.uml +++ b/ve/vetbcmt.uml @@ -16,7 +16,7 @@ NUMBER F_CODRIC 3 BEGIN PROMPT 2 1 "Conto ricavi " FIELD CODTAB[1,3] - USE CMT KEY 2 + USE &CMT FLAGS "Z" INPUT CODTAB[1,3] F_CODRIC INPUT CODTAB[4,6] F_CODRIC1 @@ -78,7 +78,7 @@ BEGIN PROMPT 2 3 "Descrizione " FIELD S0 KEY 2 - USE CMT KEY 2 + USE &CMT KEY 2 INPUT S0 F_DESCR DISPLAY "Descrizione@50" S0 DISPLAY "Gruppo" CODTAB[1,3] diff --git a/ve/vetbmre.uml b/ve/vetbmre.uml index 3ca5f68d7..6a1f624d5 100755 --- a/ve/vetbmre.uml +++ b/ve/vetbmre.uml @@ -18,7 +18,7 @@ STRING F_GRUPPO 3 BEGIN PROMPT 2 3 "Conto origine " FIELD CODTAB[1,3] - USE MRE + USE &MRE JOIN LF_PCON INTO GRUPPO==CODTAB[1,3] CONTO==CODTAB[4,6] SOTTOCONTO==CODTAB[7,12] INPUT CODTAB[1,3] F_GRUPPO INPUT CODTAB[4,6] F_CONTO