Patch level :2.2 nopatch per ora
Files correlati :rendiconto Ricompilazione Demo : [ ] Commento :Aggiunti dati in testata report. Messa la causale nella colonna numerazione nel caso si tratti di un movimento di analitica puro (richieste adolfo) git-svn-id: svn://10.65.10.50/trunk@13317 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ad8036daaf
commit
69ed72afb7
@ -368,7 +368,7 @@ protected:
|
||||
void crea_righe_da_rmovana();
|
||||
void crea_righe_da_rdoc(const TPrint_rendiconto_ca_mask& msk);
|
||||
void crea_trr(const TFilename& trr) const;
|
||||
void salva_rmovana(const TRectype& rmovana, const TRectype& movana, const TDocumento* doc);
|
||||
void scrive_riga(const TRectype& rmovana, const TRectype& movana, const TDocumento* doc);
|
||||
real somma_budget(const TString& codconto, const char* tipomovana);
|
||||
|
||||
|
||||
@ -489,6 +489,24 @@ const TVariant& TPrint_rendiconto_ca_recordset::get(const char* column_name) con
|
||||
var = _codfas;
|
||||
return var;
|
||||
}
|
||||
if (strcmp(column_name, "#DACONTO") == 0)
|
||||
{
|
||||
TVariant& var = get_tmp_var();
|
||||
if (!_riclassificato)
|
||||
var = _daconto;
|
||||
else
|
||||
var = _da_conto_riclas;
|
||||
return var;
|
||||
}
|
||||
if (strcmp(column_name, "#ACONTO") == 0)
|
||||
{
|
||||
TVariant& var = get_tmp_var();
|
||||
if (!_riclassificato)
|
||||
var = _aconto;
|
||||
else
|
||||
var = _a_conto_riclas;
|
||||
return var;
|
||||
}
|
||||
if (strcmp(column_name, "#PREVENTIVO") == 0)
|
||||
{
|
||||
TVariant& var = get_tmp_var();
|
||||
@ -518,7 +536,7 @@ const TVariant& TPrint_rendiconto_ca_recordset::get(const char* column_name) con
|
||||
}
|
||||
|
||||
//compila i campi da stampare
|
||||
void TPrint_rendiconto_ca_recordset::salva_rmovana(const TRectype& rmovana, const TRectype& movana, const TDocumento* doc)
|
||||
void TPrint_rendiconto_ca_recordset::scrive_riga(const TRectype& rmovana, const TRectype& movana, const TDocumento* doc)
|
||||
{
|
||||
//tipo movimento CONSUNTIVO
|
||||
const char tipomov = movana.get_char(MOVANA_TIPOMOV);
|
||||
@ -620,7 +638,7 @@ void TPrint_rendiconto_ca_recordset::salva_rmovana(const TRectype& rmovana, cons
|
||||
} //..non esiste il campo in movana
|
||||
else //movimento normale (senza documento)
|
||||
{
|
||||
tmpcurr.put("CODNUM", "");
|
||||
tmpcurr.put("CODNUM", movana.get(MOVANA_CODCAUS)); //mette la causale del movimento
|
||||
tmpcurr.put("ANNO", movana.get(MOVANA_ANNOES)); //anno del movimento
|
||||
tmpcurr.put("NUMRD", movana.get(MOVANA_NUMREG)); //numreg del movana
|
||||
tmpcurr.put("DATA", movana.get(MOVANA_DATACOMP)); //data del movana
|
||||
@ -732,6 +750,7 @@ F=IMF*/
|
||||
tmpcurr.put("NRIGA", rmovana.get(RMOVANA_NUMRIG)); //numero riga
|
||||
tmpcurr.put("DESCRIGA", rmovana.get(RMOVANA_DESCR)); //descrizione rmovana
|
||||
|
||||
/* ***La procedura seguente non avra' piu' senso dopo l'eliminazione degli stati!!***
|
||||
int err = _tmp->write(); // aggiunge i record al file temporaneo
|
||||
//procedura di controllo della scrittura su file! se il documento è già stato contbilizzato..
|
||||
//..sul file temporaneo esiste già un record con la chiave del record,dovuto al doc,..
|
||||
@ -743,7 +762,9 @@ F=IMF*/
|
||||
msg.format(FR("Errore di scrittura %d sul file temporaneo.\n"), err);
|
||||
msg << "Documento " << codnum_desc << " " << descr << " gia' contabilizzato.\nControllare lo stato della numerazione.";
|
||||
error_box (msg);
|
||||
}
|
||||
}*/
|
||||
|
||||
_tmp->write();
|
||||
|
||||
if (should_delete)
|
||||
delete newdoc;
|
||||
@ -813,7 +834,7 @@ void TPrint_rendiconto_ca_recordset::crea_righe_da_rmovana()
|
||||
for (cur_rmovana = 0; cur_rmovana.pos() < rmovana_items; ++cur_rmovana)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
salva_rmovana(rmovana, movana, NULL);
|
||||
scrive_riga(rmovana, movana, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -913,19 +934,26 @@ void TPrint_rendiconto_ca_recordset::crea_righe_da_rdoc(const TPrint_rendiconto_
|
||||
{
|
||||
pi.addstatus(1);
|
||||
const TRectype& curr_doc = cur_rdoc.curr(LF_DOC);
|
||||
const TString curr_key = curr_doc.build_key();
|
||||
if (curr_key == old_key)
|
||||
continue;
|
||||
else
|
||||
old_key = curr_key;
|
||||
|
||||
TDocumento doc(curr_doc);
|
||||
TAnal_mov mov;
|
||||
cont_anal.elabora(doc, 0, NULL, false, mov);
|
||||
for (int j = 1; j <= mov.rows(); j++)
|
||||
//controlla se il documento cui appartiene la rigadoc e' stato contabilizzato;
|
||||
//se e' stato contabilizzato lo salta in quanto la riga documento apparira' attraverso le righe
|
||||
//dei movimenti di analitica
|
||||
const long numregca = curr_doc.get_long(DOC_NUMREGCA);
|
||||
if (numregca == 0)
|
||||
{
|
||||
salva_rmovana(mov.body()[j], mov, &doc);
|
||||
} //for int j...
|
||||
const TString curr_key = curr_doc.build_key();
|
||||
if (curr_key == old_key)
|
||||
continue;
|
||||
else
|
||||
old_key = curr_key;
|
||||
|
||||
TDocumento doc(curr_doc);
|
||||
TAnal_mov mov;
|
||||
cont_anal.elabora(doc, 0, NULL, false, mov);
|
||||
for (int j = 1; j <= mov.rows(); j++)
|
||||
{
|
||||
scrive_riga(mov.body()[j], mov, &doc);
|
||||
} //for int j...
|
||||
} //if numregca
|
||||
} //for cur_rdoc..
|
||||
} //if rdoc_items
|
||||
|
||||
@ -1036,8 +1064,9 @@ void TPrint_rendiconto_ca_recordset::set_filter(const TPrint_rendiconto_ca_mask&
|
||||
}
|
||||
}
|
||||
//metodi per riempire il file da cui generare il report
|
||||
//crea_righe_da_rmovana();
|
||||
|
||||
//dati estratti dalle righe movimenti di contabilita' analitica
|
||||
crea_righe_da_rmovana();
|
||||
//dati estratti dalle righe documenti
|
||||
crea_righe_da_rdoc(msk);
|
||||
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Numerazioni doc" -1 -1 78 20
|
||||
PAGE "Num.doc. da escludere" -1 -1 78 20
|
||||
|
||||
SPREADSHEET F_RIGHE_NUM -1 -2
|
||||
BEGIN
|
||||
|
152
ca/ca3700a.rep
152
ca/ca3700a.rep
@ -2,7 +2,7 @@
|
||||
<report libraries="ve1300" name="ca3700a" lpi="8" class="ca3700a">
|
||||
<description>Rendiconto CA</description>
|
||||
<font face="Courier New" size="8" />
|
||||
<section type="Head" height="10">
|
||||
<section type="Head" height="5">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<field x="1" type="Stringa" width="50" pattern="1">
|
||||
<font italic="1" face="Courier New" bold="1" size="10" />
|
||||
@ -14,53 +14,121 @@
|
||||
<field x="165" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field x="1" y="1.5" type="Testo" width="18" pattern="1" text="Centro di Costo:" />
|
||||
<field x="14" y="1.5" type="Stringa" width="23" pattern="1">
|
||||
<source>#COSTO</source>
|
||||
<prescript description="H0.0 PRESCRIPT">CA_FORMAT_COSTO</prescript>
|
||||
</field>
|
||||
<field x="38" y="1.5" type="Stringa" width="50" pattern="1">
|
||||
<prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#COSTO,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field x="1" y="3" type="Testo" width="9" pattern="1" text="Commessa:" />
|
||||
<field x="14" y="3" type="Stringa" width="23" pattern="1">
|
||||
<source>#COMMESSA</source>
|
||||
<prescript description="H0.0 PRESCRIPT">CA_FORMAT_COMMESSA</prescript>
|
||||
</field>
|
||||
<field x="38" y="3" type="Stringa" width="50" pattern="1">
|
||||
<prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field x="1" y="4.5" type="Testo" width="5" pattern="1" text="Fase:" />
|
||||
<field x="14" y="4.5" type="Stringa" width="13" pattern="1">
|
||||
<source>#FASE</source>
|
||||
<prescript description="H0.0 PRESCRIPT">CA_FORMAT_FASE</prescript>
|
||||
</field>
|
||||
<field x="38" y="4.5" type="Stringa" width="50" pattern="1">
|
||||
<prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,FASI,CODFASE=#FASE,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field border="2" x="1" y="6" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="31" y="6.5" type="Testo" width="23" pattern="1" text="Doc. clienteF;fornitore" />
|
||||
<field x="109" y="6.5" type="Testo" align="center" width="12" pattern="1" text="Riferimento" />
|
||||
<field x="141" y="6.5" type="Testo" width="25" pattern="1" text="Avanzamento costiF;ricavi" />
|
||||
<field x="20" y="7.5" type="Testo" align="center" width="11" pattern="1" text="Data" />
|
||||
<field x="31" y="7.5" type="Testo" align="center" width="6" pattern="1" text="Numero" />
|
||||
<field x="41" y="7.5" type="Testo" align="center" width="10" pattern="1" text="Data" />
|
||||
<field x="51" y="7.5" type="Testo" width="25" pattern="1" text="Descrizione testata" />
|
||||
<field x="77" y="7.5" type="Testo" width="4" pattern="1" text="Riga" />
|
||||
<field x="82" y="7.5" type="Testo" width="15" pattern="1" text="Descrizione riga" />
|
||||
<field x="109" y="7.5" type="Testo" align="center" width="12" pattern="1" text="OrdineF;Bolla" />
|
||||
<field x="123" y="7.5" type="Testo" align="right" width="15" pattern="1" text="Fatturato" />
|
||||
<field x="139" y="7.5" type="Testo" align="right" width="15" pattern="1" text="Maturato" />
|
||||
<field x="155" y="7.5" type="Testo" align="right" width="15" pattern="1" text="Impegnato" />
|
||||
<field border="1" x="1.5" y="8.5" type="Linea" width="168" height="0" pattern="1" />
|
||||
<field x="1" y="7.5" type="Testo" width="20" id="121" pattern="1" text="Riferimento Contabile" />
|
||||
<field border="2" x="1" y="2" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="31" y="2.5" type="Testo" width="23" pattern="1" text="Doc. clienteF;fornitore" />
|
||||
<field x="109" y="2.5" type="Testo" align="center" width="12" pattern="1" text="Riferimento" />
|
||||
<field x="141" y="2.5" type="Testo" width="25" pattern="1" text="Avanzamento costiF;ricavi" />
|
||||
<field x="20" y="3.5" type="Testo" align="center" width="11" pattern="1" text="Data" />
|
||||
<field x="31" y="3.5" type="Testo" align="center" width="6" pattern="1" text="Numero" />
|
||||
<field x="41" y="3.5" type="Testo" align="center" width="10" pattern="1" text="Data" />
|
||||
<field x="51" y="3.5" type="Testo" width="25" pattern="1" text="Descrizione testata" />
|
||||
<field x="77" y="3.5" type="Testo" width="4" pattern="1" text="Riga" />
|
||||
<field x="82" y="3.5" type="Testo" width="15" pattern="1" text="Descrizione riga" />
|
||||
<field x="109" y="3.5" type="Testo" align="center" width="12" pattern="1" text="OrdineF;Bolla" />
|
||||
<field x="123" y="3.5" type="Testo" align="right" width="15" pattern="1" text="Fatturato" />
|
||||
<field x="139" y="3.5" type="Testo" align="right" width="15" pattern="1" text="Maturato" />
|
||||
<field x="155" y="3.5" type="Testo" align="right" width="15" pattern="1" text="Impegnato" />
|
||||
<field border="1" x="1" y="4.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="1" y="3.5" type="Testo" width="20" id="121" pattern="1" text="Riferimento Contabile" />
|
||||
</section>
|
||||
<section type="Head" level="1" height="3">
|
||||
<section type="Head" level="1" height="11">
|
||||
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1.101
|
||||
MESSAGE RESET,F1.102</prescript>
|
||||
<field border="1" radius="100" x="1" type="Testo" valign="center" align="center" shade_offset="25" width="167" height="2.5" text="RENDICONTO">
|
||||
<font face="Courier New" bold="1" size="16" />
|
||||
</field>
|
||||
<field x="1" y="3" type="Testo" width="18" pattern="1" text="Centro di Costo:" />
|
||||
<field x="14" y="3" type="Stringa" width="23" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<source>#COSTO</source>
|
||||
<prescript description="H1.0 PRESCRIPT">CA_FORMAT_COSTO</prescript>
|
||||
</field>
|
||||
<field x="38" y="3" type="Stringa" width="50" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#COSTO,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field x="110" y="3" type="Testo" width="14" pattern="1" text="Anno:" />
|
||||
<field x="126" y="3" type="Stringa" width="4" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,ANNO</prescript>
|
||||
</field>
|
||||
<field x="140" y="3" type="Testo" width="14" pattern="1" text="Regime IVA:" />
|
||||
<field x="156" y="3" type="Stringa" width="2" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,REGIVA</prescript>
|
||||
</field>
|
||||
<field x="14" y="4.5" type="Stringa" width="23" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<source>#COMMESSA</source>
|
||||
<prescript description="H1.0 PRESCRIPT">CA_FORMAT_COMMESSA</prescript>
|
||||
</field>
|
||||
<field x="38" y="4.5" type="Stringa" width="50" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field x="110" y="4.5" type="Testo" width="14" pattern="1" text="Data inizio:" />
|
||||
<field x="126" y="4.5" type="Data" width="10" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DATAINIZIO</prescript>
|
||||
</field>
|
||||
<field x="140" y="4.5" type="Testo" width="14" pattern="1" text="Da rendicontare:" />
|
||||
<field x="156" y="4.5" type="Stringa" width="1" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,RENDIC</prescript>
|
||||
</field>
|
||||
<field x="1" y="4.58" type="Testo" width="9" pattern="1" text="Commessa:" />
|
||||
<field x="14" y="6" type="Stringa" width="13" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<source>#FASE</source>
|
||||
<prescript description="H1.0 PRESCRIPT">CA_FORMAT_FASE</prescript>
|
||||
</field>
|
||||
<field x="38" y="6" type="Stringa" width="50" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,FASI,CODFASE=#FASE,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field x="110" y="6" type="Testo" width="14" pattern="1" text="Fine prevista:" />
|
||||
<field x="126" y="6" type="Data" width="10" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DATAFINE</prescript>
|
||||
</field>
|
||||
<field x="140" y="6" type="Testo" width="14" pattern="1" text="Chiusa:" />
|
||||
<field x="156" y="6" type="Stringa" width="1" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,CHIUSA</prescript>
|
||||
</field>
|
||||
<field x="1" y="6.08" type="Testo" width="5" pattern="1" text="Fase:" />
|
||||
<field x="1" y="7.5" type="Testo" width="10" pattern="1" text="Da conto:" />
|
||||
<field x="14" y="7.5" type="Stringa" width="23" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<source>#DACONTO</source>
|
||||
<prescript description="H1.0 PRESCRIPT">CA_FORMAT_CONTO</prescript>
|
||||
</field>
|
||||
<field x="40" y="7.5" type="Testo" width="10" pattern="1" text="A conto:" />
|
||||
<field x="50" y="7.5" type="Stringa" width="23" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<source>#ACONTO</source>
|
||||
<prescript description="H1.0 PRESCRIPT">CA_FORMAT_CONTO</prescript>
|
||||
</field>
|
||||
<field x="110" y="7.5" type="Testo" width="14" pattern="1" text="Fine proroga:" />
|
||||
<field x="126" y="7.5" type="Data" width="10" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DATAPROR</prescript>
|
||||
</field>
|
||||
<field x="140" y="7.5" type="Testo" width="14" pattern="1" text="Prorogata:" />
|
||||
<field x="156" y="7.5" type="Stringa" width="1" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,PROROGA</prescript>
|
||||
</field>
|
||||
<field x="1" y="9" type="Testo" width="18" pattern="1" text="Cliente principale:" />
|
||||
<field border="2" x="1" y="10.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="20" y="9" type="Stringa" width="6" id="101" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.101 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,CODCF</prescript>
|
||||
</field>
|
||||
<field x="30" y="9" type="Stringa" width="50" id="102" pattern="1">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H1.102 PRESCRIPT">MESSAGE ISAMREAD,CLIFO,TIPOCF=C!CODCF=#101,RAGSOC</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section repeat="1" type="Head" level="2" height="2">
|
||||
<groupby>CONTO</groupby>
|
||||
|
Loading…
x
Reference in New Issue
Block a user