diff --git a/cg/cg7200.cpp b/cg/cg7200.cpp index f79491e76..2258f3e1a 100755 --- a/cg/cg7200.cpp +++ b/cg/cg7200.cpp @@ -528,9 +528,17 @@ bool TInvioP::i_proforma_righe(TCursor& cur, TInvioP_file* trasfilerighe) const TString16 zio = cur_rmovana.curr().get(RMOVANA_CODCONTO); stringa_grcosot(recrighe, zio); + //procedura per scrivere la fase che deve essere spezzata in due per sottoprogetto ed edizione + const TString& codfase = riga.get(RMOVANA_CODFASE); + if (codfase.full()) + { + recrighe.add(codfase.left(4), 14); + recrighe.add(codfase.mid(4,4), 15); + } + //procedura per ricavare la voce di spesa const TString& vocespesa = get_vocespesa(zio); - recrighe.add(vocespesa, 14); + recrighe.add(vocespesa, 16); //scrive sul file di trasferimento (alla faccia della semplicita'!) trasfilerighe->write(recrighe); @@ -579,7 +587,7 @@ bool TInvioP::i_proforma_righe(TCursor& cur, TInvioP_file* trasfilerighe) //procedura per ricavare la voce di spesa const TString& vocespesa = get_vocespesa(zio); - recrighe.add(vocespesa, 14); + recrighe.add(vocespesa, 16); //e finalmente scrive le righe avanzate... trasfilerighe->write(recrighe); @@ -697,11 +705,19 @@ bool TInvioP::i_proforma_righe(TCursor& cur, TInvioP_file* trasfilerighe) recrigheiva.add(riga.get(RMOVANA_DESCR).left(40), 8); //descrizione riga iva = riga anale corrente recrigheiva.add(riga.get(RMOVANA_CODCMS), 13); //commessa presa dalla riga analitica corrente - + + //procedura per scrivere la fase che deve essere spezzata in due per sottoprogetto ed edizione + const TString& codfase = riga.get(RMOVANA_CODFASE); + if (codfase.full()) + { + recrighe.add(codfase.left(4), 14); + recrighe.add(codfase.mid(4,4), 15); + } + //procedura per ricavare la voce di spesa TString uncle = zio.string(0x8); const TString& vocespesa = get_vocespesa(uncle); - recrighe.add(vocespesa, 14); + recrighe.add(vocespesa, 16); trasfilerighe->write(recrigheiva); } diff --git a/cg/proforma.ini b/cg/proforma.ini index cdaf3b308..4af96de06 100755 --- a/cg/proforma.ini +++ b/cg/proforma.ini @@ -212,10 +212,20 @@ POSITION(13) = 125 LENGTH(13) = 20 FIELD(13) = CODCMS -NAME(14) = VOCE DI SPESA +NAME(14) = SOTTOPROGETTO TYPE(14) = STRINGA POSITION(14) = 145 -LENGTH(14) = 10 +LENGTH(14) = 20 + +NAME(15) = EDIZIONE +TYPE(15) = STRINGA +POSITION(15) = 165 +LENGTH(15) = 20 + +NAME(16) = VOCE DI SPESA +TYPE(16) = STRINGA +POSITION(16) = 185 +LENGTH(16) = 10 [RECORD I] @@ -290,10 +300,21 @@ TYPE(13) = STRINGA POSITION(13) = 125 LENGTH(13) = 20 -NAME(14) = VOCE DI SPESA +NAME(14) = SOTTOPROGETTO TYPE(14) = STRINGA POSITION(14) = 145 -LENGTH(14) = 10 +LENGTH(14) = 20 + +NAME(15) = EDIZIONE +TYPE(15) = STRINGA +POSITION(15) = 165 +LENGTH(15) = 20 + +NAME(16) = VOCE DI SPESA +TYPE(16) = STRINGA +POSITION(16) = 185 +LENGTH(16) = 10 + [RECORD C]