From a812862374aa3bbfa5f35e3b257864eb4c1f9c40 Mon Sep 17 00:00:00 2001 From: luca Date: Wed, 30 Mar 2011 13:37:00 +0000 Subject: [PATCH] Patch level :10.0 966 Files correlati : Ricompilazione Demo : [ ] Commento : aggiunta la trattazione degli occasionali git-svn-id: svn://10.65.10.50/branches/R_10_00@21858 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg7200.cpp | 15 +++++++++++++-- cg/cg7200a.rep | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/cg/cg7200.cpp b/cg/cg7200.cpp index ad50885ea..423e5a4ff 100755 --- a/cg/cg7200.cpp +++ b/cg/cg7200.cpp @@ -41,6 +41,8 @@ TPrint_x_imponibile_recordset::TPrint_x_imponibile_recordset() create_field("Tipo", -1, 1, _alfafld, true); create_field("Codcf", -1, 6, _longfld, true); create_field("Ragsoc", -1, 50, _alfafld, true); + create_field("Piva", -1, 13, _alfafld, false); + create_field("Cofi", -1, 16, _alfafld, false); create_field("Totdoc", -1, 18, _realfld, true); //campi da LF_RMOVIVA create_field("Imponibile", -1, 18, _realfld, true); @@ -199,19 +201,28 @@ bool TPrint_x_imponibile_mask::aggiungi_movimento(const TRectype& rec, TPrint_x_ output_recordset.set("Tipo", rec.get(MOV_TIPO)); output_recordset.set("Codcf", codcf); TString80 ragsoc; + TString16 piva, cofi; const TString16 ocfpi = rec.get(MOV_OCFPI); //è uno stupido cliente occasionale? if (ocfpi.full()) { - ragsoc = cache().get(LF_OCCAS, ocfpi, OCC_RAGSOC); + const TRectype& rec_occas = cache().get(LF_OCCAS, ocfpi); + ragsoc = rec_occas.get(OCC_RAGSOC); + piva = rec_occas.get(OCC_PAIV); + cofi = rec_occas.get(OCC_COFI); } else { TToken_string key_clifo; key_clifo.add(rec.get(MOV_TIPO)); key_clifo.add(codcf); - ragsoc = cache().get(LF_CLIFO, key_clifo, CLI_RAGSOC); + const TRectype& rec_clifo = cache().get(LF_CLIFO, key_clifo); + ragsoc = rec_clifo.get(CLI_RAGSOC); + piva = rec_clifo.get(CLI_PAIV); + cofi = rec_clifo.get(CLI_COFI); } output_recordset.set("Ragsoc", ragsoc); + output_recordset.set("Piva", piva); + output_recordset.set("Cofi", cofi); output_recordset.set("Totdoc", rec.get_real(MOV_TOTDOC)); output_recordset.set("Imponibile", tot_imponibile); output_recordset.set("Imposta", tot_imposta); diff --git a/cg/cg7200a.rep b/cg/cg7200a.rep index 38407afe6..f3f7a713b 100755 --- a/cg/cg7200a.rep +++ b/cg/cg7200a.rep @@ -117,10 +117,10 @@ THEN Ragsoc - MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#151,PAIV + Piva - MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#151,COFI + Cofi