From 4ad5200f4c055137571f7b6923f44c3853035bc2 Mon Sep 17 00:00:00 2001 From: luca Date: Wed, 30 Mar 2011 13:16:41 +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@21856 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg7200.cpp | 16 ++++++++++++++++ cg/cg7200a.rep | 8 ++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/cg/cg7200.cpp b/cg/cg7200.cpp index 6b9ea9caa..ad50885ea 100755 --- a/cg/cg7200.cpp +++ b/cg/cg7200.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include "../ba/ba8500.h" @@ -39,6 +40,7 @@ TPrint_x_imponibile_recordset::TPrint_x_imponibile_recordset() create_field("Protiva", -1, 6, _longfld, true); create_field("Tipo", -1, 1, _alfafld, true); create_field("Codcf", -1, 6, _longfld, true); + create_field("Ragsoc", -1, 50, _alfafld, true); create_field("Totdoc", -1, 18, _realfld, true); //campi da LF_RMOVIVA create_field("Imponibile", -1, 18, _realfld, true); @@ -196,6 +198,20 @@ bool TPrint_x_imponibile_mask::aggiungi_movimento(const TRectype& rec, TPrint_x_ output_recordset.set("Protiva", rec.get_long(MOV_PROTIVA)); output_recordset.set("Tipo", rec.get(MOV_TIPO)); output_recordset.set("Codcf", codcf); + TString80 ragsoc; + const TString16 ocfpi = rec.get(MOV_OCFPI); //è uno stupido cliente occasionale? + if (ocfpi.full()) + { + ragsoc = cache().get(LF_OCCAS, ocfpi, OCC_RAGSOC); + } + 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); + } + output_recordset.set("Ragsoc", ragsoc); 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 86e9163b3..38407afe6 100755 --- a/cg/cg7200a.rep +++ b/cg/cg7200a.rep @@ -110,8 +110,11 @@ THEN Codcf MESSAGE RESET,F2 + + Codcf + - MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#151,RAGSOC + Ragsoc MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#151,PAIV @@ -119,9 +122,6 @@ THEN MESSAGE ISAMREAD,20,TIPOCF=#H1.101!CODCF=#151,COFI - - Codcf -