Patch level :4.0 nopatch
Files correlati : Ricompilazione Demo : [ ] Commento :prima stampa dell'elenco commesse suddiviso per tipologia di date inizio/fine git-svn-id: svn://10.65.10.50/trunk@14129 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
803247f5d7
commit
0f88b5e265
@ -96,7 +96,7 @@ TPrint_bilancio_cms_mask::TPrint_bilancio_cms_mask()
|
||||
///////////////////////////////////////////////////////////////
|
||||
class TPrint_bilancio_cms_recordset : public TRecordset
|
||||
{
|
||||
TArray _righe;
|
||||
TString_array _righe;
|
||||
TRecnotype _curr;
|
||||
TArray _colonne;
|
||||
|
||||
@ -127,12 +127,44 @@ bool TPrint_bilancio_cms_recordset::move_to(TRecnotype pos)
|
||||
|
||||
void TPrint_bilancio_cms_recordset::requery()
|
||||
{
|
||||
TArray cms1_1, cms1_2, cms2_1, cms2_2;
|
||||
//prende le date di inizio e fine dell'eserizio selezionato sulla maschera
|
||||
TString4 anno;
|
||||
anno << _anno;
|
||||
const TRectype& esc = cache().get("ESC", anno);
|
||||
const TDate datainiesc = esc.get("D0");
|
||||
const TDate datafinesc = esc.get("D1");
|
||||
|
||||
//deve procedere al confronto tra le date inizio-fine esercizio e quelle inizio-fine commessa..
|
||||
//..per spostare il record in esame nell'array corretto
|
||||
TString_array cms[4];
|
||||
TISAM_recordset commesse("USE COMMESSE");
|
||||
for (bool ok = commesse.move_first(); ok; ok = commesse.move_next())
|
||||
{
|
||||
const TDate dataini = commesse.get(COMMESSE_DATAINIZIO).as_date();
|
||||
const TDate datafine = commesse.get(COMMESSE_DATAFINE).as_date();
|
||||
//e' inutile considerare le commesse terminate prima dell'esercizio selezionato..
|
||||
//..cioe' nel passato oppure che iniziano nel futuro!
|
||||
if (datafine >= datainiesc && dataini <= datafinesc)
|
||||
{
|
||||
int indice = datafine <= datafinesc ? 0 : 2;
|
||||
if (dataini >= datainiesc)
|
||||
indice++;
|
||||
TToken_string riga_array;
|
||||
riga_array << indice;
|
||||
riga_array.add(commesse.get(COMMESSE_CODCMS).as_string());
|
||||
riga_array.add(commesse.get(COMMESSE_DESCRIZ).as_string());
|
||||
cms[indice].add(riga_array);
|
||||
}
|
||||
}
|
||||
//merging dei 4 arrayini cms nell'arrayone _righe da mandare in stampa
|
||||
_righe.destroy();
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
const int tot = cms[i].items();
|
||||
for (int j = 0; j < tot; j++)
|
||||
{
|
||||
_righe.TArray::add(cms[i].remove(j));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,6 +175,32 @@ const TVariant& TPrint_bilancio_cms_recordset::get(unsigned int column) const
|
||||
|
||||
const TVariant& TPrint_bilancio_cms_recordset::get(const char* column_name) const
|
||||
{
|
||||
if (_curr >= 0 && _curr < items())
|
||||
{
|
||||
TToken_string& riga = (TToken_string&)_righe.row(_curr);
|
||||
|
||||
if (*column_name == '#')
|
||||
column_name++;
|
||||
|
||||
TVariant& var = get_tmp_var();
|
||||
if (strcmp(column_name, "ANNO") == 0)
|
||||
{
|
||||
var.set(_anno);
|
||||
} else
|
||||
if (strcmp(column_name, "LEVEL") == 0)
|
||||
{
|
||||
var.set(riga.get_int(0));
|
||||
} else
|
||||
if (strcmp(column_name, "CODCMS") == 0)
|
||||
{
|
||||
var = riga.get(1);
|
||||
} else
|
||||
if (strcmp(column_name, "DESCRIZ") == 0)
|
||||
{
|
||||
var = riga.get(2);
|
||||
}
|
||||
return var;
|
||||
}
|
||||
return NULL_VARIANT;
|
||||
}
|
||||
|
||||
|
112
ca/ca3800a.rep
112
ca/ca3800a.rep
@ -3,7 +3,7 @@
|
||||
<description>Bilancio commessa CA</description>
|
||||
<font face="Courier New" size="8" />
|
||||
<section type="Head">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<font italic="1" face="Courier New" bold="1" size="9" />
|
||||
<field x="1" type="Stringa" width="50" pattern="1">
|
||||
<font italic="1" face="Courier New" bold="1" size="9" />
|
||||
<source>#SYSTEM.RAGSOC</source>
|
||||
@ -15,34 +15,68 @@
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field border="2" x="1" y="2" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="70" y="2.5" type="Testo" width="70" pattern="1" text="Costi e ricavi di Commessa maturati nell'esercizio - Stima avanzamento TEMPO" />
|
||||
<field x="70" y="2.5" type="Testo" width="80" pattern="1" text="Costi e ricavi di Commessa maturati nell'esercizio - Stima avanzamento TEMPO" />
|
||||
<field x="70" y="3.75" type="Testo" width="8" pattern="1" text="Ricavi" />
|
||||
<field x="80" y="3.75" type="Testo" align="center" width="60" pattern="1" text="Costi" />
|
||||
<field border="1" x="1" y="5.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="1" y="3.5" type="Testo" width="15" id="121" pattern="1" text="Commessa" />
|
||||
</section>
|
||||
<section type="Head" level="1">
|
||||
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1.101
|
||||
MESSAGE RESET,F1.102</prescript>
|
||||
<section type="Head" level="1" height="6">
|
||||
<field border="1" radius="100" x="1" type="Testo" valign="center" align="center" shade_offset="25" width="167" height="2.5" text="BILANCIO DI COMMESSA F; CDC PER ESERCIZIO">
|
||||
<font face="Courier New" bold="1" size="16" />
|
||||
</field>
|
||||
<field border="2" x="1" y="4" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="1" y="3.25" type="Testo" width="12" pattern="1" text="Esercizio">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="13" y="3.25" type="Numero" align="right" width="5" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>ANNO</source>
|
||||
</field>
|
||||
<field border="2" x="1" y="5" type="Linea" width="169" height="0" pattern="1" />
|
||||
</section>
|
||||
<section repeat="1" type="Head" level="2" height="2">
|
||||
<groupby>CONTO</groupby>
|
||||
<section type="Head" level="2" height="3" page_break="1">
|
||||
<groupby>LEVEL C; 2</groupby>
|
||||
<font italic="1" face="Courier New" size="8" />
|
||||
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2.101
|
||||
MESSAGE RESET,F2.102
|
||||
MESSAGE RESET,F2.103</prescript>
|
||||
<field x="1" y="0.5" type="Testo" bg_color="#C0C0C0" width="20" pattern="1" text="Commesse terminate nel">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<field x="1" y="0.5" type="Array" bg_color="#C0C0C0" width="35" height="1.5">
|
||||
<font italic="1" face="Courier New" bold="1" size="10" />
|
||||
<source>LEVEL</source>
|
||||
<list>
|
||||
<li Value="Commesse terminate nel" Code="0" />
|
||||
<li Value="Commesse terminate nel" Code="1" />
|
||||
<li Value="Commesse in corso entro fine" Code="2" />
|
||||
<li Value="Commesse in corso entro fine" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="36" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="6" height="1.5">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>ANNO</source>
|
||||
</field>
|
||||
<field border="1" x="1" y="2.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field y="0.5" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1">
|
||||
<source>LEVEL</source>
|
||||
<postscript description="H2.101 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||
</field>
|
||||
<field x="42" y="0.75" type="Numero" hidden="1" align="right" width="4" id="102" pattern="1">
|
||||
<source>ANNO</source>
|
||||
<postscript description="H2.102 POSTSCRIPT">MESSAGE COPY,F2.102</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="3">
|
||||
<groupby>CODNUM+ANNO+NUMRD</groupby>
|
||||
<field y="0.5" type="Testo" bg_color="#C0C0C0" width="35" pattern="1" text="Commesse avviate in esercizi precedenti">
|
||||
<section type="Head" level="3" height="4">
|
||||
<groupby>LEVEL</groupby>
|
||||
<field x="3" y="1.25" type="Array" bg_color="#C0C0C0" width="45" pattern="1">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<source>LEVEL</source>
|
||||
<list>
|
||||
<li Value="Commesse avviate in esercizi precedenti" Code="0" />
|
||||
<li Value="Commesse avviate nell'esercizio selezionato" Code="1" />
|
||||
<li Value="Commesse avviate in esercizi precedenti" Code="2" />
|
||||
<li Value="Commesse avviate nell'esercizio selezionato" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field border="1" x="2" y="3" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field y="1.25" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1">
|
||||
<source>LEVEL</source>
|
||||
<postscript description="H3.101 POSTSCRIPT">MESSAGE COPY,F3.101</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Body" />
|
||||
@ -52,27 +86,51 @@ MESSAGE RESET,F2.103</prescript>
|
||||
<source>CODCMS</source>
|
||||
</field>
|
||||
<field x="22" y="0.5" type="Stringa" dynamic_height="1" width="30" height="2" pattern="1">
|
||||
<source>DESCR</source>
|
||||
<source>DESCRIZ</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" />
|
||||
<section type="Foot" level="1">
|
||||
<field border="2" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="1" y="1" type="Testo" width="15" pattern="1" text="TOTALI GENERALI ">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
<section type="Foot" level="1" height="3">
|
||||
<field border="2" x="1" y="0.75" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="1" y="1.5" type="Testo" width="25" height="1.5" pattern="1" text="TOTALI GENERALI ">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="2">
|
||||
<section type="Foot" level="2" height="3.5">
|
||||
<font face="Courier New" size="10" />
|
||||
<field border="1" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="1" y="1" type="Testo" bg_color="#C0C0C0" width="25" pattern="1" text="TOTALI Commesse terminate nel">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<field x="1" y="1" type="Array" bg_color="#C0C0C0" width="45" height="1.5">
|
||||
<font italic="1" face="Courier New" bold="1" size="10" />
|
||||
<source>F2.101</source>
|
||||
<list>
|
||||
<li Value="TOTALI Commesse terminate nel" Code="0" />
|
||||
<li Value="TOTALI Commesse terminate nel" Code="1" />
|
||||
<li Value="TOTALI Commesse in corso entro fine" Code="2" />
|
||||
<li Value="TOTALI Commesse in corso entro fine" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="46" y="1" type="Numero" align="right" bg_color="#C0C0C0" width="6" height="1.5">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>F2.102</source>
|
||||
</field>
|
||||
<field y="1" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1" />
|
||||
<field x="52" y="1.25" type="Numero" hidden="1" align="right" width="4" id="102" pattern="1">
|
||||
<postscript description="F2.102 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="3">
|
||||
<prescript description="F3 PRESCRIPT">0 #B1.100 !</prescript>
|
||||
<field x="1.03" y="0.43" type="Testo" bg_color="#C0C0C0" width="50" pattern="1" text="TOTALI Commesse avviate in esercizi precedenti">
|
||||
<section type="Foot" level="3" height="3.5">
|
||||
<field border="1" x="2" y="0.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="3" y="1" type="Array" bg_color="#C0C0C0" width="50" pattern="1">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<source>F3.101</source>
|
||||
<list>
|
||||
<li Value="TOTALI Commesse avviate in esercizi precedenti" Code="0" />
|
||||
<li Value="TOTALI Commesse avviate nell'esercizio selezionato" Code="1" />
|
||||
<li Value="TOTALI Commesse avviate in esercizi precedenti" Code="2" />
|
||||
<li Value="TOTALI Commesse avviate nell'esercizio selezionato" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field y="1" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1" />
|
||||
</section>
|
||||
<sql>USE COMMESSE</sql>
|
||||
</report>
|
Loading…
x
Reference in New Issue
Block a user