Patch level :2.2 176
Files correlati :ca3.exe ca3700a.rep Ricompilazione Demo : [ ] Commento :aggiunte fantastiche features alla stampa rendiconto! Del tipo: totali per indbil di conto, budget senza righe movimento ed altre amenità! Il tutto per la felicità dello zio adolfo.. git-svn-id: svn://10.65.10.50/trunk@13340 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2aaf0db4cf
commit
c62c3fd8d4
268
ca/ca3700.cpp
268
ca/ca3700.cpp
@ -264,7 +264,7 @@ protected:
|
||||
void crea_righe_da_rdoc(const TPrint_rendiconto_ca_mask& msk);
|
||||
void crea_trr(const TFilename& trr) const;
|
||||
void scrive_riga(const TRectype& rmovana, const TRectype& movana, const TDocumento* doc);
|
||||
real somma_budget(const TString& codconto, const char* tipomovana);
|
||||
real get_budget(const TString& conto, char tipo) const;
|
||||
|
||||
|
||||
public:
|
||||
@ -320,53 +320,42 @@ void TPrint_rendiconto_ca_recordset::set_custom_filter(TCursor& cur) const
|
||||
myself = (TPrint_rendiconto_ca_recordset*)this;
|
||||
}
|
||||
|
||||
//metodo per il calcolo del budget PREVENTIVO o VARIAZIONE (sezione di raggruppamento sul report)
|
||||
real TPrint_rendiconto_ca_recordset::somma_budget(const TString& codconto, const char* tipomovana)
|
||||
//sconvolgente metodo per la normalizzazione dei conti
|
||||
real TPrint_rendiconto_ca_recordset::get_budget(const TString& conto, char tipo) const
|
||||
{
|
||||
real budget = ZERO;
|
||||
|
||||
TRelation rel_rmovana(LF_RMOVANA);
|
||||
rel_rmovana.add(LF_MOVANA, "NUMREG==NUMREG");
|
||||
|
||||
//..crea un cursore su rmovana per avere solo i conti di tipo tipomovana, con il codice conto
|
||||
//selezionato e la datacomp compresa nell'intervallo date
|
||||
TRectype da_rmovana(LF_RMOVANA);
|
||||
TRectype a_rmovana(LF_RMOVANA);
|
||||
|
||||
da_rmovana.put(RMOVANA_CODCONTO, codconto);
|
||||
a_rmovana.put(RMOVANA_CODCONTO, codconto);
|
||||
|
||||
TString filtro;
|
||||
if (_dadata.ok())
|
||||
filtro << "(ANSI(DATACOMP)>=" << _dadata << ")";
|
||||
|
||||
if (_adata.ok())
|
||||
//data del cazzo che però serve per costruire il conto analitico
|
||||
const TDate null_date;
|
||||
//ecco il conto analitico...
|
||||
TAnal_bill zio(conto, _codcosto, _codcms, _codfas);
|
||||
//..adesso si necessita del saldo del conto analitico appena creato..
|
||||
word tipo_movimento = 0;
|
||||
switch (tipo)
|
||||
{
|
||||
if (filtro.not_empty())
|
||||
filtro << "&&";
|
||||
filtro << "(ANSI(DATACOMP)<=" << _adata << ")";
|
||||
case 'P': tipo_movimento |= _saldanal_preventivo; break;
|
||||
case 'V': tipo_movimento |= _saldanal_variazione; break;
|
||||
default: tipo_movimento |= _saldanal_consuntivo; break;
|
||||
}
|
||||
|
||||
if (filtro.not_empty())
|
||||
filtro << "&&";
|
||||
filtro << "(107->TIPOMOV==\"" << tipomovana << "\")";
|
||||
|
||||
TCursor cur_rmovana(&rel_rmovana, filtro, 2, &da_rmovana, &a_rmovana);
|
||||
const long rmovana_items = cur_rmovana.items();
|
||||
cur_rmovana.freeze();
|
||||
|
||||
if (rmovana_items > 0)
|
||||
if (_riclassificato)
|
||||
tipo_movimento |= _saldanal_riclassify;
|
||||
//..ecco quindi il saldo..
|
||||
const TSaldanal& saldo = ca_saldo(zio, null_date, null_date, tipo_movimento);
|
||||
//..che deve essere normalizzato in base alla sua sezione ed all'indicatore di bilancio del conto
|
||||
TImporto imp = saldo._fin;
|
||||
switch (zio.indicatore_bilancio())
|
||||
{
|
||||
const TRectype& movana = rel_rmovana.curr(LF_MOVANA);
|
||||
for (cur_rmovana = 0; cur_rmovana.pos() < rmovana_items; ++cur_rmovana)
|
||||
{
|
||||
if (movana.get_char(MOVANA_SEZIONE) == 'D')
|
||||
budget -= movana.get_real(MOVANA_TOTDOC);
|
||||
if (movana.get_char(MOVANA_SEZIONE) == 'A')
|
||||
budget += movana.get_real(MOVANA_TOTDOC);
|
||||
}
|
||||
case 1:
|
||||
case 3:
|
||||
imp.normalize('D');
|
||||
break;
|
||||
case 2:
|
||||
case 4:
|
||||
imp.normalize('A');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return budget;
|
||||
return imp.valore();
|
||||
}
|
||||
|
||||
const TVariant& TPrint_rendiconto_ca_recordset::get(const char* column_name) const
|
||||
@ -410,29 +399,23 @@ const TVariant& TPrint_rendiconto_ca_recordset::get(const char* column_name) con
|
||||
var = _a_conto_riclas;
|
||||
return var;
|
||||
}
|
||||
if (strcmp(column_name, "#INDBIL") == 0)
|
||||
{
|
||||
const TString& conto = TISAM_recordset::get("CONTO").as_string();
|
||||
TAnal_bill zio(conto);
|
||||
return get_tmp_var() = (long)zio.indicatore_bilancio();
|
||||
}
|
||||
if (strcmp(column_name, "#PREVENTIVO") == 0)
|
||||
{
|
||||
TVariant& var = get_tmp_var();
|
||||
TString80 conto;
|
||||
if (_riclassificato)
|
||||
conto = TISAM_recordset::get("CONTOCG").as_string();
|
||||
else
|
||||
conto = TISAM_recordset::get("CONTO").as_string();
|
||||
|
||||
var = myself->somma_budget(conto, "P");
|
||||
return var;
|
||||
//prende il conto
|
||||
const TString& conto = TISAM_recordset::get("CONTO").as_string();
|
||||
return get_tmp_var() = get_budget(conto, 'P');
|
||||
}
|
||||
if (strcmp(column_name, "#VARIAZIONE") == 0)
|
||||
{
|
||||
TVariant& var = get_tmp_var();
|
||||
TString80 conto;
|
||||
if (_riclassificato)
|
||||
conto = TISAM_recordset::get("CONTOCG").as_string();
|
||||
else
|
||||
conto = TISAM_recordset::get("CONTO").as_string();
|
||||
|
||||
var = myself->somma_budget(conto, "V");
|
||||
return var;
|
||||
//prende il conto
|
||||
const TString& conto = TISAM_recordset::get("CONTO").as_string();
|
||||
return get_tmp_var() = get_budget(conto, 'V');
|
||||
}
|
||||
}
|
||||
return TISAM_recordset::get(column_name);
|
||||
@ -441,83 +424,85 @@ const TVariant& TPrint_rendiconto_ca_recordset::get(const char* column_name) con
|
||||
//compila i campi da stampare
|
||||
void TPrint_rendiconto_ca_recordset::scrive_riga(const TRectype& rmovana, const TRectype& movana, const TDocumento* doc)
|
||||
{
|
||||
//tipo movimento CONSUNTIVO
|
||||
|
||||
TRectype& tmpcurr = _tmp->curr();
|
||||
tmpcurr.zero();
|
||||
TString8 codnum_desc; //codnum da usare sia per compilare il campo "CODNUM"
|
||||
codnum_desc.cut(0);
|
||||
|
||||
// il conto puo' essere analitico o contabile...
|
||||
//se è compilato l'archivio di collegamento PANAPDC
|
||||
//si deve usare come conto il campo codconto del panapdc!!!...
|
||||
if (_riclassificato)
|
||||
{
|
||||
TString conto_riclassificato; //stringa che conterrà il conto riclassificato (se sara' trovato)
|
||||
|
||||
//prende il gruppo dalla riga rmovana in esame
|
||||
const int gruppo = atoi(rmovana.get(RMOVANA_CODCONTO).left(3));
|
||||
const int conto = atoi(rmovana.get(RMOVANA_CODCONTO).mid(3,3));
|
||||
const long sottoconto = atol(rmovana.get(RMOVANA_CODCONTO).mid(6,6));
|
||||
|
||||
//relazione e cursore su panapdc alla ricerca del conto riclassificato corrispondente
|
||||
//alla triade gr/co/sottoc di rmovana
|
||||
TRelation rel_panapdc(LF_PANAPDC);
|
||||
//servono solamente i record con il gruppo = al gruppo di rmovana
|
||||
TRectype da_panapdc(LF_PANAPDC);
|
||||
da_panapdc.put(PANAPDC_GRUPPO, gruppo);
|
||||
|
||||
TString filtro;
|
||||
if (_prefix.not_empty())
|
||||
filtro << "(CODCONTO[1," << _prefix.len() << "]=='" << _prefix << "')";
|
||||
|
||||
TCursor cur_panapdc(&rel_panapdc, filtro, 2, &da_panapdc, &da_panapdc);
|
||||
const long panapdc_items = cur_panapdc.items();
|
||||
cur_panapdc.freeze();
|
||||
if (panapdc_items > 0) //se non ci sono record con il gruppo=rmovana.gruppo ed il prefisso voluto->salta l'rmovana
|
||||
{
|
||||
TRectype& rec_panapdc = cur_panapdc.curr();
|
||||
for (cur_panapdc = 0; cur_panapdc.pos() < panapdc_items; ++cur_panapdc)
|
||||
{
|
||||
int current_conto = rec_panapdc.get_int(PANAPDC_CONTO);
|
||||
long current_sottoconto = rec_panapdc.get_long(PANAPDC_SOTTOCONTO);
|
||||
|
||||
if (current_conto == 0 && current_sottoconto == 0)
|
||||
{
|
||||
conto_riclassificato = rec_panapdc.get(PANAPDC_CODCONTO);
|
||||
tmpcurr.put("CONTO", conto_riclassificato);
|
||||
break; //esce dal casino e passa ai campi successivi
|
||||
}
|
||||
else if (conto == current_conto && current_sottoconto == 0)
|
||||
{
|
||||
conto_riclassificato = rec_panapdc.get(PANAPDC_CODCONTO);
|
||||
tmpcurr.put("CONTO", conto_riclassificato);
|
||||
break; //esce dal casino e passa ai campi successivi
|
||||
}
|
||||
else if (conto == current_conto && sottoconto == current_sottoconto)
|
||||
{
|
||||
conto_riclassificato = rec_panapdc.get(PANAPDC_CODCONTO);
|
||||
tmpcurr.put("CONTO", conto_riclassificato);
|
||||
break; //esce dal casino e passa ai campi successivi
|
||||
}
|
||||
} //for sugli elementi del cursore
|
||||
} //if panapdc_items > 0
|
||||
|
||||
//ATTENZIONE! Se era stata operata una selezione sui conti riclassificati nella maschera
|
||||
//ed il conto riclassificato attuale non ricade nell'intervallo selezionato il programma
|
||||
//non deve aggiungere il record al file!!
|
||||
if ((_da_conto_riclas.not_empty() && conto_riclassificato < _da_conto_riclas) ||
|
||||
(_a_conto_riclas.not_empty() && conto_riclassificato.compare(_a_conto_riclas, _a_conto_riclas.len()) > 0))
|
||||
return;
|
||||
|
||||
} //if(_riclassificato)
|
||||
else //...sennò si usa il normale piano dei conti analitico (cioè tutti tranne che il CRPA)
|
||||
tmpcurr.put("CONTO", rmovana.get(RMOVANA_CODCONTO)); //conto
|
||||
|
||||
//in ogni caso riempio il campo conto_cg
|
||||
tmpcurr.put("CONTOCG", rmovana.get(RMOVANA_CODCONTO)); //conto_cg
|
||||
|
||||
//tipo movimento CONSUNTIVO
|
||||
const char tipomov = movana.get_char(MOVANA_TIPOMOV);
|
||||
if (tipomov <= ' ' || tipomov == 'T')
|
||||
{
|
||||
TRectype& tmpcurr = _tmp->curr();
|
||||
tmpcurr.zero();
|
||||
TString8 codnum_desc; //codnum da usare sia per compilare il campo "CODNUM"
|
||||
codnum_desc.cut(0);
|
||||
|
||||
// il conto puo' essere analitico o contabile...
|
||||
//se è compilato l'archivio di collegamento PANAPDC
|
||||
//si deve usare come conto il campo codconto del panapdc!!!...
|
||||
if (_riclassificato)
|
||||
{
|
||||
TString conto_riclassificato; //stringa che conterrà il conto riclassificato (se sara' trovato)
|
||||
|
||||
//prende il gruppo dalla riga rmovana in esame
|
||||
const int gruppo = atoi(rmovana.get(RMOVANA_CODCONTO).left(3));
|
||||
const int conto = atoi(rmovana.get(RMOVANA_CODCONTO).mid(3,3));
|
||||
const long sottoconto = atol(rmovana.get(RMOVANA_CODCONTO).mid(6,6));
|
||||
|
||||
//relazione e cursore su panapdc alla ricerca del conto riclassificato corrispondente
|
||||
//alla triade gr/co/sottoc di rmovana
|
||||
TRelation rel_panapdc(LF_PANAPDC);
|
||||
//servono solamente i record con il gruppo = al gruppo di rmovana
|
||||
TRectype da_panapdc(LF_PANAPDC);
|
||||
da_panapdc.put(PANAPDC_GRUPPO, gruppo);
|
||||
|
||||
TString filtro;
|
||||
if (_prefix.not_empty())
|
||||
filtro << "(CODCONTO[1," << _prefix.len() << "]=='" << _prefix << "')";
|
||||
|
||||
TCursor cur_panapdc(&rel_panapdc, filtro, 2, &da_panapdc, &da_panapdc);
|
||||
const long panapdc_items = cur_panapdc.items();
|
||||
cur_panapdc.freeze();
|
||||
if (panapdc_items > 0) //se non ci sono record con il gruppo=rmovana.gruppo ed il prefisso voluto->salta l'rmovana
|
||||
{
|
||||
TRectype& rec_panapdc = cur_panapdc.curr();
|
||||
for (cur_panapdc = 0; cur_panapdc.pos() < panapdc_items; ++cur_panapdc)
|
||||
{
|
||||
int current_conto = rec_panapdc.get_int(PANAPDC_CONTO);
|
||||
long current_sottoconto = rec_panapdc.get_long(PANAPDC_SOTTOCONTO);
|
||||
|
||||
if (current_conto == 0 && current_sottoconto == 0)
|
||||
{
|
||||
conto_riclassificato = rec_panapdc.get(PANAPDC_CODCONTO);
|
||||
tmpcurr.put("CONTO", conto_riclassificato);
|
||||
break; //esce dal casino e passa ai campi successivi
|
||||
}
|
||||
else if (conto == current_conto && current_sottoconto == 0)
|
||||
{
|
||||
conto_riclassificato = rec_panapdc.get(PANAPDC_CODCONTO);
|
||||
tmpcurr.put("CONTO", conto_riclassificato);
|
||||
break; //esce dal casino e passa ai campi successivi
|
||||
}
|
||||
else if (conto == current_conto && sottoconto == current_sottoconto)
|
||||
{
|
||||
conto_riclassificato = rec_panapdc.get(PANAPDC_CODCONTO);
|
||||
tmpcurr.put("CONTO", conto_riclassificato);
|
||||
break; //esce dal casino e passa ai campi successivi
|
||||
}
|
||||
} //for sugli elementi del cursore
|
||||
} //if panapdc_items > 0
|
||||
|
||||
//ATTENZIONE! Se era stata operata una selezione sui conti riclassificati nella maschera
|
||||
//ed il conto riclassificato attuale non ricade nell'intervallo selezionato il programma
|
||||
//non deve aggiungere il record al file!!
|
||||
if ((_da_conto_riclas.not_empty() && conto_riclassificato < _da_conto_riclas) ||
|
||||
(_a_conto_riclas.not_empty() && conto_riclassificato.compare(_a_conto_riclas, _a_conto_riclas.len()) > 0))
|
||||
return;
|
||||
|
||||
} //if(_riclassificato)
|
||||
else //...sennò si usa il normale piano dei conti analitico (cioè tutti tranne che il CRPA)
|
||||
tmpcurr.put("CONTO", rmovana.get(RMOVANA_CODCONTO)); //conto
|
||||
|
||||
//in ogni caso riempio il campo conto_cg
|
||||
tmpcurr.put("CONTOCG", rmovana.get(RMOVANA_CODCONTO)); //conto_cg
|
||||
|
||||
//serve un documento da cui ricavare i parametri di stampa
|
||||
TDocumento* newdoc = (TDocumento*)doc;
|
||||
@ -680,11 +665,17 @@ F=IMF*/
|
||||
error_box (msg);
|
||||
}*/
|
||||
|
||||
_tmp->write();
|
||||
|
||||
if (should_delete)
|
||||
delete newdoc;
|
||||
} //if (tipomov == ..)
|
||||
|
||||
} //if (tipomov == ..)
|
||||
else
|
||||
{
|
||||
tmpcurr.put("HIDDEN", "X");
|
||||
}
|
||||
|
||||
_tmp->write();
|
||||
|
||||
}
|
||||
|
||||
//scanning delle righe dei movimenti di analitica
|
||||
@ -908,7 +899,7 @@ void TPrint_rendiconto_ca_recordset::crea_trr(const TFilename& trr) const
|
||||
{
|
||||
ofstream of(trr);
|
||||
of << 1000 << endl;
|
||||
of << 16 << endl;
|
||||
of << 17 << endl;
|
||||
of << "CONTO|1|20|0|Conto analitico" << endl;
|
||||
of << "CODNUM|1|4|0|Numerazione documento" << endl;
|
||||
of << "DATA|5|8|0|Data movimento o documento" << endl;
|
||||
@ -925,6 +916,7 @@ void TPrint_rendiconto_ca_recordset::crea_trr(const TFilename& trr) const
|
||||
of << "MATURATO|4|18|5|Maturato" << endl;
|
||||
of << "IMPEGNATO|4|18|5|Impegnato" << endl;
|
||||
of << "CONTOCG|1|12|0|Conto contabile" << endl;
|
||||
of << "HIDDEN|8|1|0|Record nascosto" << endl;
|
||||
of << 1 << endl;
|
||||
of << "CONTO+CODNUM+DATA+NUMRD+NRIGA" << endl;
|
||||
}
|
||||
|
@ -146,19 +146,32 @@ MESSAGE RESET,F2.103</prescript>
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<prescript description="H2.0 PRESCRIPT">MESSAGE ISAMREAD,PCONANA,CODCONTO=CONTO,DESCR</prescript>
|
||||
</field>
|
||||
<field x="74" y="0.5" type="Testo" align="right" bg_color="#C0C0C0" width="51" text="Budget E;E;E;">
|
||||
<field x="74" y="0.5" type="Testo" align="right" bg_color="#C0C0C0" width="66" text="Budget E;E;E;">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="125" y="0.5" type="Valuta" align="right" bg_color="#C0C0C0" width="15" id="101" hide_zero="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="140" y="0.5" type="Valuta" align="right" bg_color="#C0C0C0" width="15" id="102" hide_zero="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<source>#VARIAZIONE</source>
|
||||
<postscript description="H2.102 POSTSCRIPT">#THIS @ \ prende il proprio valore
|
||||
"F1." \ decide il campo destinazione in base al valore di INDBIL,che gli viene passato dal programma..
|
||||
300 \ ..i campi della somma vanno da 301 a 304 in base a valore INDBIL (che varia da 1 a 4)
|
||||
#INDBIL @
|
||||
+ \ somma valore INDBIL a 300
|
||||
+ \ somma F1. a valore INDBIL
|
||||
+! \ esegue la ADD sul campo di destinazione
|
||||
</postscript>
|
||||
</field>
|
||||
<field x="155" y="0.5" type="Valuta" align="right" bg_color="#C0C0C0" width="15" id="103" hide_zero="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<source>#PREVENTIVO</source>
|
||||
<postscript description="H2.103 POSTSCRIPT">#THIS @ \ prende il proprio valore
|
||||
"F1." \ decide il campo destinazione in base al valore di INDBIL,che gli viene passato dal programma..
|
||||
300 \ ..i campi della somma vanno da 301 a 304 in base a valore INDBIL (che varia da 1 a 4)
|
||||
#INDBIL @
|
||||
+ \ somma valore INDBIL a 300
|
||||
+ \ somma F1. a valore INDBIL
|
||||
+! \ esegue la ADD sul campo di destinazione
|
||||
</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="3">
|
||||
@ -175,6 +188,7 @@ MESSAGE RESET,F2.103</prescript>
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<condition>HIDDEN!='X'</condition>
|
||||
<field x="19" type="Numero" align="right" width="7" pattern="1" hide_zero="1">
|
||||
<source>NUMREG</source>
|
||||
</field>
|
||||
@ -244,7 +258,60 @@ MESSAGE RESET,F2.103</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" />
|
||||
<section type="Foot" level="1" />
|
||||
<section type="Foot" level="1">
|
||||
<field border="2" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="133" y="1" type="Testo" width="25" pattern="1" text="BUDGET DI ATTIVITA' E;E;E;">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="133" y="2.5" type="Testo" width="25" pattern="1" text="BUDGET DI PASSIVITA' E;E;E;">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="133" y="4" type="Testo" width="25" pattern="1" text="BUDGET DI SPESA E;E;E;">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="133" y="5.5" type="Testo" width="25" pattern="1" text="BUDGET DI RICAVO E;E;E;">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="90" y="7" type="Testo" width="42" pattern="1" text="TOTALE FATTURATO, MATURATO, IMPEGNATO E;E;E;">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="90" y="8.5" type="Testo" width="42" pattern="1" text="TOTALE DA FATTURARE, MATURARE, IMPEGNARE E;E;E;">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="132" y="7" type="Valuta" align="right" width="12" id="101" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="145" y="7" type="Valuta" align="right" width="12" id="102" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="158" y="7" type="Valuta" align="right" width="12" id="103" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="132" y="8.5" type="Valuta" align="right" width="12" id="201" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<source>#103-#101</source>
|
||||
</field>
|
||||
<field x="145" y="8.5" type="Valuta" align="right" width="12" id="202" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<source>#103-#102</source>
|
||||
</field>
|
||||
<field x="158" y="8.5" type="Valuta" align="right" width="12" id="203" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<source>#F1.111-#103</source>
|
||||
</field>
|
||||
<field x="158" y="1" type="Valuta" align="right" width="12" id="301" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="158" y="2.5" type="Valuta" align="right" width="12" id="302" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="158" y="4" type="Valuta" align="right" width="12" id="303" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="158" y="5.5" type="Valuta" align="right" width="12" id="304" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="2" height="4">
|
||||
<field border="1" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="90" y="1" type="Testo" width="42" pattern="1" text="Totale fatturato, maturato, impegnato E;E;E;">
|
||||
@ -255,12 +322,15 @@ MESSAGE RESET,F2.103</prescript>
|
||||
</field>
|
||||
<field x="132" y="1" type="Valuta" align="right" width="12" id="101" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<postscript description="F2.101 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
|
||||
</field>
|
||||
<field x="145" y="1" type="Valuta" align="right" width="12" id="102" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<postscript description="F2.102 POSTSCRIPT">MESSAGE ADD,F1.102</postscript>
|
||||
</field>
|
||||
<field x="158" y="1" type="Valuta" align="right" width="12" id="103" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<postscript description="F2.103 POSTSCRIPT">MESSAGE ADD,F1.103</postscript>
|
||||
</field>
|
||||
<field x="132" y="2.5" type="Valuta" align="right" width="12" id="201" pattern="1" text="###.###.###,@@">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
|
@ -459,6 +459,22 @@ void TAnal_bill::reset()
|
||||
_conto = _costo = _commessa = _fase = "";
|
||||
}
|
||||
|
||||
int TAnal_bill::indicatore_bilancio() const
|
||||
{
|
||||
int indbil = 0;
|
||||
const TMultilevel_code_info& info = ca_multilevel_code_info(LF_PCONANA);
|
||||
TString80 conto = _conto;
|
||||
|
||||
for (int i = info.levels() - 1; i >= 0 && indbil <= 0; i--)
|
||||
{
|
||||
const int len = info.total_len(i);
|
||||
conto.cut(len);
|
||||
indbil = atoi(cache().get(LF_PCONANA, conto, PCONANA_INDBIL));
|
||||
}
|
||||
|
||||
return indbil;
|
||||
}
|
||||
|
||||
bool TAnal_bill::get(const TRectype& rec)
|
||||
{
|
||||
bool ok = true;
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
const TString& commessa() const;
|
||||
const TString& fase() const;
|
||||
|
||||
int indicatore_bilancio() const;
|
||||
bool get(const TRectype& rec);
|
||||
void reset();
|
||||
|
||||
@ -39,7 +40,7 @@ public:
|
||||
|
||||
TAnal_bill();
|
||||
TAnal_bill(const TAnal_bill& bill);
|
||||
TAnal_bill(const char* conto, const char* costo, const char* commessa, const char* fase);
|
||||
TAnal_bill(const char* conto, const char* costo = "", const char* commessa = "", const char* fase = "");
|
||||
TAnal_bill(const TRectype& rec);
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user