Patch level :4.0 776
Files correlati : Ricompilazione Demo : [ ] Commento :aggiunta stampa bilancio di commessa riassuntivo di ogni fase (crpa request) git-svn-id: svn://10.65.10.50/trunk@15578 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8a1a187ba3
commit
f0648d77a7
@ -6,6 +6,7 @@
|
|||||||
#include "calib01.h"
|
#include "calib01.h"
|
||||||
#include "calib02.h"
|
#include "calib02.h"
|
||||||
#include "pconana.h"
|
#include "pconana.h"
|
||||||
|
#include "fasi.h"
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
@ -26,7 +27,10 @@ public:
|
|||||||
const TString& TPrint_bilancio_cms_mask::get_report_class() const
|
const TString& TPrint_bilancio_cms_mask::get_report_class() const
|
||||||
{
|
{
|
||||||
TString& classe = get_tmp_string();
|
TString& classe = get_tmp_string();
|
||||||
classe = "ca3800a";
|
if (get_bool(F_FASI_GROUP))
|
||||||
|
classe = "ca3800b";
|
||||||
|
else
|
||||||
|
classe = "ca3800a";
|
||||||
return classe;
|
return classe;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +63,15 @@ bool TPrint_bilancio_cms_mask::on_field_event(TOperable_field& o, TField_event e
|
|||||||
{
|
{
|
||||||
switch (o.dlg())
|
switch (o.dlg())
|
||||||
{
|
{
|
||||||
|
/* case F_FASE:
|
||||||
|
if (e == fe_init || e == fe_modify)
|
||||||
|
{
|
||||||
|
if (get(F_FASE) == "")
|
||||||
|
enable(F_FASI_GROUP);
|
||||||
|
else
|
||||||
|
disable(F_FASI_GROUP);
|
||||||
|
}
|
||||||
|
break;*/
|
||||||
case F_REPORT:
|
case F_REPORT:
|
||||||
if (e == fe_button)
|
if (e == fe_button)
|
||||||
{
|
{
|
||||||
@ -163,7 +176,7 @@ protected:
|
|||||||
virtual bool get_usr_val(const TString& name, TVariant& var) const;
|
virtual bool get_usr_val(const TString& name, TVariant& var) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void set_filter(const TPrint_bilancio_cms_mask& msk);
|
void set_filter(const TPrint_bilancio_cms_mask& msk, const TString& curr_fase);
|
||||||
TPrint_bilancio_cms_rep(const char* rep_name, const TString& prefix, const int depth);
|
TPrint_bilancio_cms_rep(const char* rep_name, const TString& prefix, const int depth);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -178,11 +191,11 @@ bool TPrint_bilancio_cms_rep::set_recordset()
|
|||||||
return TReport::set_recordset(rs);
|
return TReport::set_recordset(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TPrint_bilancio_cms_rep::set_filter(const TPrint_bilancio_cms_mask& msk)
|
void TPrint_bilancio_cms_rep::set_filter(const TPrint_bilancio_cms_mask& msk, const TString& curr_fase)
|
||||||
{
|
{
|
||||||
TPrint_bilancio_cms_recordset* recset = new TPrint_bilancio_cms_recordset();
|
TPrint_bilancio_cms_recordset* recset = new TPrint_bilancio_cms_recordset();
|
||||||
|
|
||||||
recset->set_filter(msk);
|
recset->set_filter(msk, curr_fase);
|
||||||
TReport::set_recordset(recset);
|
TReport::set_recordset(recset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,13 +223,61 @@ void TPrint_bilancio_cms::main_loop()
|
|||||||
const TString& prefix = mask.get(F_PRE1);
|
const TString& prefix = mask.get(F_PRE1);
|
||||||
const int depth = mask.get_int(F_DEPTH);
|
const int depth = mask.get_int(F_DEPTH);
|
||||||
TString path = mask.get(F_REPORT);
|
TString path = mask.get(F_REPORT);
|
||||||
if (path.empty())
|
const bool use_fasi = mask.get_bool(F_FASI);
|
||||||
path = "ca3800a";
|
const TString& fase = mask.get(F_FASE);
|
||||||
TPrint_bilancio_cms_rep rep(path, prefix, depth);
|
const bool group_fasi = mask.get_bool(F_FASI_GROUP);
|
||||||
|
const bool fasi_crpa = use_fasi && fase.empty() && group_fasi;
|
||||||
|
|
||||||
rep.set_filter(mask);
|
if (path.empty())
|
||||||
book.add(rep);
|
{
|
||||||
book.print_or_preview();
|
if (fasi_crpa)
|
||||||
|
path = "ca3800b"; //report riassuntivo con fasi raggruppate (crpa special edition)
|
||||||
|
else
|
||||||
|
path = "ca3800a"; //report standard
|
||||||
|
}
|
||||||
|
|
||||||
|
//crea il report in base ai parametri (tipo report,struttura,profondita' di stampa)
|
||||||
|
TPrint_bilancio_cms_rep rep(path, prefix, depth);
|
||||||
|
|
||||||
|
//se e' una stampa di tipo fasi riassunte (crpa special edition) deve fare lo scanning di tutte le fasi..
|
||||||
|
//..singolarmente e stampare un report per ogni fase.Senno' stampa un solo report
|
||||||
|
if (fasi_crpa)
|
||||||
|
{
|
||||||
|
//stampa tutte le fasi distinte in modo riassuntivo (crpa dedicate)
|
||||||
|
TString_array lista_fasi;
|
||||||
|
//crea un TString_array con tutte le fasi distinte non ripetute
|
||||||
|
TISAM_recordset file_fasi("USE FASI");
|
||||||
|
for (TRecnotype j = 0; file_fasi.move_to(j); j++)
|
||||||
|
{
|
||||||
|
const TString16 curr_fase = file_fasi.get(FASI_CODFASE).as_string();
|
||||||
|
|
||||||
|
if (!curr_fase.empty() && lista_fasi.find(curr_fase) < 0)
|
||||||
|
lista_fasi.add(curr_fase);
|
||||||
|
}
|
||||||
|
lista_fasi.sort(); //ordina alfabeticamente l'arrayone
|
||||||
|
const long fasi_distinte = lista_fasi.items(); //numero di controllo
|
||||||
|
|
||||||
|
//se la stampa e' con tutte le fasi distinte riassunte (crpa dedicate) fa un rep per fase...
|
||||||
|
if (!lista_fasi.empty())
|
||||||
|
{
|
||||||
|
//per ogni fase crea un report e lo aggiunge al book
|
||||||
|
FOR_EACH_ARRAY_ROW(lista_fasi, i, row)
|
||||||
|
{
|
||||||
|
TString16 fase = lista_fasi.row(i);
|
||||||
|
rep.set_filter(mask, fase);
|
||||||
|
book.add(rep);
|
||||||
|
}
|
||||||
|
book.print_or_preview(); //***MESSO QUI DA' ERRORE MA STAMPA 1 SOLO GIRO
|
||||||
|
}
|
||||||
|
|
||||||
|
} //if(fasi_crpa...
|
||||||
|
else //...senno' stampa standard in un giro solo
|
||||||
|
{
|
||||||
|
rep.set_filter(mask, "");
|
||||||
|
book.add(rep);
|
||||||
|
book.print_or_preview();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,13 +92,22 @@ END
|
|||||||
BOOLEAN F_FASI
|
BOOLEAN F_FASI
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 8 "Esplodere Fasi"
|
PROMPT 2 8 "Esplodere Fasi"
|
||||||
MESSAGE FALSE CLEAR,F_FASE
|
MESSAGE FALSE CLEAR,F_FASE|CLEAR,F_FASI_GROUP
|
||||||
MESSAGE TRUE ENABLE,F_FASE
|
MESSAGE TRUE ENABLE,F_FASE|ENABLE,F_FASI_GROUP
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_FASE 10
|
STRING F_FASE 10
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 9 "Fase "
|
PROMPT 2 9 "Fase "
|
||||||
|
// MESSAGE CLEAR,F_FASI_GROUP
|
||||||
|
// MESSAGE EMPTY ENABLE,F_FASI_GROUP
|
||||||
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_FASI_GROUP
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 10 "Riassuntiva per Fase"
|
||||||
|
MESSAGE FALSE ENABLE,F_FASE
|
||||||
|
MESSAGE TRUE CLEAR,F_FASE
|
||||||
END
|
END
|
||||||
|
|
||||||
GROUPBOX F_PRE0 76 5
|
GROUPBOX F_PRE0 76 5
|
||||||
|
252
ca/ca3800b.rep
Executable file
252
ca/ca3800b.rep
Executable file
@ -0,0 +1,252 @@
|
|||||||
|
|
||||||
|
<report libraries="ve1300" name="ca3800b" orientation="2" lpi="6" class="ca3800b">
|
||||||
|
<description>Bilancio commessa CA per fasi</description>
|
||||||
|
<font face="Arial Narrow" size="8" />
|
||||||
|
<section type="Head">
|
||||||
|
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||||
|
<field x="1" type="Stringa" width="50" pattern="1">
|
||||||
|
<source>#SYSTEM.RAGSOC</source>
|
||||||
|
</field>
|
||||||
|
<field x="80" type="Data" width="12" pattern="1">
|
||||||
|
<source>#SYSTEM.DATE</source>
|
||||||
|
</field>
|
||||||
|
<field x="165" type="Numero" align="right" width="3" pattern="1">
|
||||||
|
<source>#REPORT.PAGE</source>
|
||||||
|
</field>
|
||||||
|
<field x="80" y="1.25" type="Testo" align="center" width="13" pattern="1" text="Margine" />
|
||||||
|
<field x="10" y="2" type="Stringa" width="12" pattern="1">
|
||||||
|
<font face="Arial" bold="1" size="10" />
|
||||||
|
<source>FASESPEC</source>
|
||||||
|
</field>
|
||||||
|
<field x="54" y="2" type="Testo" align="center" width="6" pattern="1" text="% Av." />
|
||||||
|
<field x="80" y="2" type="Testo" align="center" width="13" pattern="1" text=" Contribuz. " />
|
||||||
|
<field border="1" x="1" y="3" type="Linea" width="169" height="0" pattern="1" />
|
||||||
|
<field x="59" y="1" type="Testo" valign="bottom" align="right" width="13" height="2" id="69" pattern="1" text="Testata" />
|
||||||
|
<field x="1" y="2" type="Testo" width="8" id="121" pattern="1" text="Fase" />
|
||||||
|
</section>
|
||||||
|
<section type="Head" level="1">
|
||||||
|
<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 PER ESERCIZIO RAGGRUPPATO PER FASI">
|
||||||
|
<font face="Courier New" bold="1" size="16" />
|
||||||
|
</field>
|
||||||
|
<field x="10" y="3" type="Testo" width="35" pattern="1" text="Costi e ricavi di Commessa maturati nell'esercizio">
|
||||||
|
<font italic="1" face="Arial Narrow" size="9" />
|
||||||
|
</field>
|
||||||
|
<field x="45" y="3" type="Stringa" width="4" pattern="1">
|
||||||
|
<font face="Arial Narrow" bold="1" size="9" />
|
||||||
|
<source>ANNO</source>
|
||||||
|
</field>
|
||||||
|
<field x="60" y="3" type="Testo" width="15" pattern="1" text="Stima avanzamento ">
|
||||||
|
<font italic="1" face="Arial Narrow" size="9" />
|
||||||
|
</field>
|
||||||
|
<field x="75" y="3" type="Array" width="30" pattern="1">
|
||||||
|
<font face="Arial Narrow" bold="1" size="9" />
|
||||||
|
<source>TIPOSTIMA</source>
|
||||||
|
<list>
|
||||||
|
<li Value="TEMPO" Code="T" />
|
||||||
|
<li Value="COSTI Consuntivi \ RICAVI Preventivi" Code="C" />
|
||||||
|
<li Value="COSTI Consuntivi \ RICAVI Consuntivi" Code="R" />
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
<field x="120" y="3" type="Testo" width="25" pattern="1" text="Profondita' della struttura in esame">
|
||||||
|
<font italic="1" face="Arial Narrow" size="9" />
|
||||||
|
</field>
|
||||||
|
<field x="145" y="3" type="Array" width="7" pattern="1">
|
||||||
|
<font face="Arial Narrow" bold="1" size="9" />
|
||||||
|
<source>DEPTH</source>
|
||||||
|
<list>
|
||||||
|
<li Value="Gruppo" Code="1" />
|
||||||
|
<li Value="Conto" Code="2" />
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
<field x="10" y="4.25" type="Testo" width="20" pattern="1" text="Include esercizi successivi">
|
||||||
|
<font italic="1" face="Arial Narrow" size="9" />
|
||||||
|
</field>
|
||||||
|
<field x="30" y="4.25" type="Stringa" width="3" pattern="1">
|
||||||
|
<font face="Arial Narrow" bold="1" size="9" />
|
||||||
|
<source>VITAINTERA</source>
|
||||||
|
</field>
|
||||||
|
<field x="60" y="4.25" type="Testo" width="15" pattern="1" text="Fase">
|
||||||
|
<font italic="1" face="Arial Narrow" size="9" />
|
||||||
|
</field>
|
||||||
|
<field x="75" y="4.25" type="Stringa" width="10" pattern="1">
|
||||||
|
<font face="Arial Narrow" bold="1" size="9" />
|
||||||
|
<source>FASESPEC</source>
|
||||||
|
</field>
|
||||||
|
<field border="2" x="1" y="5.5" type="Linea" width="169" height="0" pattern="1" />
|
||||||
|
</section>
|
||||||
|
<section type="Head" level="2" height="1.5">
|
||||||
|
<groupby>LEVEL C; 2</groupby>
|
||||||
|
<font italic="1" face="Arial Narrow" size="8" />
|
||||||
|
<field x="1" type="Array" bg_color="#C0C0C0" width="22">
|
||||||
|
<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="23" type="Numero" align="right" bg_color="#C0C0C0" width="6">
|
||||||
|
<source>ANNO</source>
|
||||||
|
</field>
|
||||||
|
<field 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="29" 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" hidden="1" height="1.5">
|
||||||
|
<groupby>LEVEL</groupby>
|
||||||
|
<font italic="1" face="Arial Narrow" size="8" />
|
||||||
|
<field x="3" type="Array" bg_color="#C0C0C0" width="40" pattern="1">
|
||||||
|
<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="1.25" type="Linea" width="169" height="0" pattern="1" />
|
||||||
|
<field 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="Head" level="4" hidden="1">
|
||||||
|
<condition>STAMPAFASI != ""</condition>
|
||||||
|
<groupby>CODCMS</groupby>
|
||||||
|
<font italic="1" face="Arial Narrow" size="8" />
|
||||||
|
<field type="Stringa" width="1" id="1" pattern="1">
|
||||||
|
<source>STAMPAFASI</source>
|
||||||
|
</field>
|
||||||
|
<field x="2" type="Stringa" bg_color="#C0C0C0" width="20" id="2" pattern="1">
|
||||||
|
<source>CODCMS</source>
|
||||||
|
</field>
|
||||||
|
<field x="23" type="Numero" align="right" width="2" id="3" pattern="1">
|
||||||
|
<source>0</source>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section type="Body" />
|
||||||
|
<section type="Body" level="1" hidden="1">
|
||||||
|
<prescript description="B1 PRESCRIPT">1 #H4.3 \ incrementa il contatore per il numero di righe di fase
|
||||||
|
+!</prescript>
|
||||||
|
<field x="1" type="Stringa" width="20" pattern="1">
|
||||||
|
<source>CODCMS</source>
|
||||||
|
</field>
|
||||||
|
<field x="21" type="Stringa" width="25" pattern="1">
|
||||||
|
<font face="Arial Narrow" size="7" />
|
||||||
|
<source>IF(#H4.3=0;DESCRIZ;"")</source>
|
||||||
|
</field>
|
||||||
|
<field x="47" type="Stringa" width="9" pattern="1">
|
||||||
|
<source>FASE</source>
|
||||||
|
</field>
|
||||||
|
<field x="56" type="Numero" align="right" width="3" pattern="1">
|
||||||
|
<font italic="1" face="Arial Narrow" size="8" />
|
||||||
|
<source>ROUND(AVANZAMENTO;0)</source>
|
||||||
|
</field>
|
||||||
|
<field x="91" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||||
|
<field x="59" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||||
|
<postscript description="B1.69 POSTSCRIPT">MESSAGE ADD,F4.69
|
||||||
|
MESSAGE ADD,F3.69</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="73" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||||
|
<source>#RICAVI-#COSTI</source>
|
||||||
|
<postscript description="B1.169 POSTSCRIPT">MESSAGE ADD,F4.169
|
||||||
|
MESSAGE ADD,F3.169</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="87" type="Numero" align="right" width="4" id="170" pattern="1">
|
||||||
|
<font italic="1" face="Arial Narrow" size="8" />
|
||||||
|
<prescript description="B1.170 PRESCRIPT">#RICAVI @
|
||||||
|
EMPTY= IF
|
||||||
|
0
|
||||||
|
ELSE
|
||||||
|
1
|
||||||
|
#COSTI @
|
||||||
|
#RICAVI @
|
||||||
|
F;
|
||||||
|
-
|
||||||
|
100
|
||||||
|
*
|
||||||
|
0
|
||||||
|
ROUND
|
||||||
|
THEN
|
||||||
|
#THIS !</prescript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section type="Foot" />
|
||||||
|
<section type="Foot" level="1" height="3">
|
||||||
|
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||||
|
<field border="2" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
|
||||||
|
<field x="1" y="1" type="Testo" valign="center" fg_color="#FFFFFF" bg_color="#000000" width="25" height="1.5" text="TOTALI GENERALI " />
|
||||||
|
<field x="59" y="1.25" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@" />
|
||||||
|
<field x="73" y="1.25" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@" />
|
||||||
|
</section>
|
||||||
|
<section type="Foot" level="2" height="3.5">
|
||||||
|
<font italic="1" face="Courier New" size="8" />
|
||||||
|
<field border="1" x="1" y="0.5" type="Linea" width="100" height="0" pattern="1" />
|
||||||
|
<field x="1" y="1" type="Array" bg_color="#C0C0C0" width="28">
|
||||||
|
<font italic="1" face="Arial Narrow" size="8" />
|
||||||
|
<source>H2.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="29" y="1" type="Numero" align="right" bg_color="#C0C0C0" width="6">
|
||||||
|
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||||
|
<source>H2.102</source>
|
||||||
|
</field>
|
||||||
|
<field x="59" y="1" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||||
|
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||||
|
<postscript description="F2.69 POSTSCRIPT">MESSAGE ADD,F1.69</postscript>
|
||||||
|
</field>
|
||||||
|
<field y="1" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1" />
|
||||||
|
<field x="35" y="1" type="Numero" hidden="1" align="right" width="4" id="102" pattern="1">
|
||||||
|
<postscript description="F2.102 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="73" y="1" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||||
|
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||||
|
<postscript description="F2.169 POSTSCRIPT">MESSAGE ADD,F1.169
|
||||||
|
MESSAGE RESET,169</postscript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section type="Foot" level="3" height="2">
|
||||||
|
<font italic="1" face="Arial Narrow" size="8" />
|
||||||
|
<field x="2" y="0.5" type="Array" bg_color="#C0C0C0" width="40" pattern="1">
|
||||||
|
<source>H3.101</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 x="59" y="0.5" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F3.69 POSTSCRIPT">MESSAGE ADD,F2.69</postscript>
|
||||||
|
</field>
|
||||||
|
<field y="0.5" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1" />
|
||||||
|
<field x="73" y="0.5" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F3.169 POSTSCRIPT">MESSAGE ADD,F2.169
|
||||||
|
MESSAGE RESET,169</postscript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section type="Foot" level="4" height="1.25">
|
||||||
|
<condition>(STAMPAFASI != "")(#H4.3 E; 0)(TIPOSTIMA!='T')(FASESPEC=="")</condition>
|
||||||
|
<font italic="1" face="Arial Narrow" size="8" />
|
||||||
|
<field x="22" type="Testo" width="20" pattern="1" text="Totali commessa" />
|
||||||
|
<field x="2" type="Stringa" bg_color="#C0C0C0" width="20" id="2" pattern="1">
|
||||||
|
<source>H4.2</source>
|
||||||
|
</field>
|
||||||
|
<field x="59" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@" />
|
||||||
|
<field x="73" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F4.169 POSTSCRIPT">MESSAGE RESET,169</postscript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<sql>USE SALDANA</sql>
|
||||||
|
</report>
|
@ -308,9 +308,9 @@ bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testa
|
|||||||
else
|
else
|
||||||
offset_and_fill_columns(foot, codici, model_id);
|
offset_and_fill_columns(foot, codici, model_id);
|
||||||
}
|
}
|
||||||
#ifdef DBG
|
/*#ifdef DBG
|
||||||
save("cazzone.rep");
|
save("cazzone.rep");
|
||||||
#endif
|
#endif*/
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -637,29 +637,17 @@ void TPrint_saldana_recordset::aggiorna_importi(TAssoc_array& riga_array,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TPrint_saldana_recordset::requery()
|
void TPrint_saldana_recordset::create_lines_to_print(TString& query)
|
||||||
{
|
{
|
||||||
//prende le date di inizio e fine dell'eserizio selezionato sulla maschera
|
//prende le date di inizio e fine dell'eserizio selezionato sulla maschera
|
||||||
TEsercizi_contabili esc;
|
TEsercizi_contabili esc;
|
||||||
TDate datainiesc, datafinesc;
|
TDate datainiesc, datafinesc;
|
||||||
esc.code2range(_anno, datainiesc, datafinesc);
|
esc.code2range(_anno, datainiesc, datafinesc);
|
||||||
|
//deve procedere al confronto tra le date inizio-fine esercizio e quelle inizio-fine commessa..
|
||||||
//deve procedere al confronto tra le date inizio-fine esercizio e quelle inizio-fine commessa..
|
|
||||||
//..per spostare il record in esame nell'array corretto
|
//..per spostare il record in esame nell'array corretto
|
||||||
TAssoc_array cms[4];
|
TAssoc_array cms[4];
|
||||||
|
|
||||||
TString query;
|
TISAM_recordset saldana(query);
|
||||||
query = "USE SALDANA";
|
|
||||||
if (_tipo == 8)
|
|
||||||
{
|
|
||||||
if (_use_fasi && _fase.full())
|
|
||||||
query << " SELECT FASE=\"" << _fase << "\"";
|
|
||||||
//stampa standard non a vita intera per la 3800
|
|
||||||
if (!_vitaintera)
|
|
||||||
query << "\nTO ANNO=" << _anno;
|
|
||||||
}
|
|
||||||
|
|
||||||
TISAM_recordset saldana(query);
|
|
||||||
|
|
||||||
const long saldana_items = saldana.items();
|
const long saldana_items = saldana.items();
|
||||||
|
|
||||||
@ -761,8 +749,8 @@ void TPrint_saldana_recordset::requery()
|
|||||||
} //if (datafine >= datainiesc &&...
|
} //if (datafine >= datainiesc &&...
|
||||||
} //if (saldop != ZERO..
|
} //if (saldop != ZERO..
|
||||||
} //if (indbil == 3 ||...
|
} //if (indbil == 3 ||...
|
||||||
|
} //for(bool ok=saldana.move_first()..
|
||||||
|
|
||||||
}
|
|
||||||
//merging dei 4 arrayini cms nell'arrayone _righe da mandare in stampa
|
//merging dei 4 arrayini cms nell'arrayone _righe da mandare in stampa
|
||||||
_righe.destroy();
|
_righe.destroy();
|
||||||
for (int i = 0; i < 4; i++)
|
for (int i = 0; i < 4; i++)
|
||||||
@ -784,6 +772,26 @@ void TPrint_saldana_recordset::requery()
|
|||||||
_righe.sort(righe_compare); //sorting delle commesse
|
_righe.sort(righe_compare); //sorting delle commesse
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TPrint_saldana_recordset::requery()
|
||||||
|
{
|
||||||
|
TString query;
|
||||||
|
query = "USE SALDANA"; //vale sia per la 8 che per la 9
|
||||||
|
|
||||||
|
if (_tipo == 8)
|
||||||
|
{
|
||||||
|
//stampa per una singola fase in modo dettagliato
|
||||||
|
if (_use_fasi && _fase.full())
|
||||||
|
query << " SELECT FASE=\"" << _fase << "\"";
|
||||||
|
//stampa standard non a vita intera per la 3800
|
||||||
|
if (!_vitaintera)
|
||||||
|
query << "\nTO ANNO=" << _anno;
|
||||||
|
}
|
||||||
|
|
||||||
|
//crea effettivamente la stampa !!!
|
||||||
|
create_lines_to_print(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const TVariant& TPrint_saldana_recordset::get(unsigned int column) const
|
const TVariant& TPrint_saldana_recordset::get(unsigned int column) const
|
||||||
{
|
{
|
||||||
return NULL_VARIANT;
|
return NULL_VARIANT;
|
||||||
@ -868,7 +876,7 @@ const TVariant& TPrint_saldana_recordset::get(const char* column_name) const
|
|||||||
return NULL_VARIANT;
|
return NULL_VARIANT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TPrint_saldana_recordset::set_filter(const TMask& msk)
|
void TPrint_saldana_recordset::set_filter(const TMask& msk, const TString& curr_fase)
|
||||||
{
|
{
|
||||||
//tira su un po' di parametri dalla maschera...
|
//tira su un po' di parametri dalla maschera...
|
||||||
_anno = msk.get_int(F_ESERCIZIO);
|
_anno = msk.get_int(F_ESERCIZIO);
|
||||||
@ -886,12 +894,21 @@ void TPrint_saldana_recordset::set_filter(const TMask& msk)
|
|||||||
//trattazione delle fasi
|
//trattazione delle fasi
|
||||||
_use_fasi = msk.get_bool(F_FASI);
|
_use_fasi = msk.get_bool(F_FASI);
|
||||||
_fase.cut(0);
|
_fase.cut(0);
|
||||||
|
|
||||||
if (_use_fasi)
|
if (_use_fasi)
|
||||||
{
|
{
|
||||||
/* ***gestione fasi multilivello
|
/* ***gestione fasi multilivello
|
||||||
for (short id = F_FASE1; msk.id2pos(id) > 0; id++)
|
for (short id = F_FASE1; msk.id2pos(id) > 0; id++)
|
||||||
_fase << msk.get(id);*/
|
_fase << msk.get(id);*/
|
||||||
_fase = msk.get(F_FASE);
|
|
||||||
|
//usa le fasi e ne seleziona una per la stampa completa
|
||||||
|
if (curr_fase.empty())
|
||||||
|
_fase = msk.get(F_FASE);
|
||||||
|
|
||||||
|
//usa le fasi ma le stampa tutte, una alla volta, con stampa riassuntiva
|
||||||
|
_fasi_group = msk.get_bool(F_FASI_GROUP);
|
||||||
|
if (_fase.empty() && _fasi_group && !curr_fase.empty())
|
||||||
|
_fase = curr_fase;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ class TPrint_saldana_recordset : public TRecordset
|
|||||||
int _tipo;
|
int _tipo;
|
||||||
int _anno;
|
int _anno;
|
||||||
int _depth;
|
int _depth;
|
||||||
bool _vitaintera, _use_fasi;
|
bool _vitaintera, _use_fasi, _fasi_group;
|
||||||
char _tipostima;
|
char _tipostima;
|
||||||
TString16 _fase;
|
TString16 _fase;
|
||||||
|
|
||||||
@ -84,8 +84,9 @@ protected:
|
|||||||
TImporto& saldo, TImporto& saldop) const;
|
TImporto& saldo, TImporto& saldop) const;
|
||||||
//per il solo ca3800
|
//per il solo ca3800
|
||||||
void aggiorna_importo(TAssoc_array& riga_array, const TString& livello,
|
void aggiorna_importo(TAssoc_array& riga_array, const TString& livello,
|
||||||
const int indbil, const TRecordset& saldana, const bool inverti = false) const;
|
const int indbil, const TRecordset& saldana, const bool inverti = false) const;
|
||||||
real calcola_avanzamento_tempo() const;
|
real calcola_avanzamento_tempo() const;
|
||||||
|
void create_lines_to_print(TString& query);
|
||||||
//per il solo ca3900
|
//per il solo ca3900
|
||||||
void aggiorna_importi(TAssoc_array& riga_array, const int indbil, const TRecordset& saldana,
|
void aggiorna_importi(TAssoc_array& riga_array, const int indbil, const TRecordset& saldana,
|
||||||
const bool inverti = false) const;
|
const bool inverti = false) const;
|
||||||
@ -97,7 +98,7 @@ protected:
|
|||||||
const TString& descrizione);
|
const TString& descrizione);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void set_filter(const TMask& msk);
|
virtual void set_filter(const TMask& msk, const TString& curr_fase);
|
||||||
TPrint_saldana_recordset(int tipo) : _tipo(tipo) { }
|
TPrint_saldana_recordset(int tipo) : _tipo(tipo) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#define F_FASI 110
|
#define F_FASI 110
|
||||||
#define F_DEPTH 111
|
#define F_DEPTH 111
|
||||||
#define F_FASE 112
|
#define F_FASE 112
|
||||||
|
#define F_FASI_GROUP 113
|
||||||
/* campi per la generazione automatica
|
/* campi per la generazione automatica
|
||||||
#define F_FASE1 112
|
#define F_FASE1 112
|
||||||
#define F_FASE2 113
|
#define F_FASE2 113
|
||||||
|
@ -169,7 +169,7 @@ void TPrint_stima_ricavi_rep::set_filter(const TPrint_stima_ricavi_mask& msk)
|
|||||||
{
|
{
|
||||||
TPrint_stima_ricavi_recordset* recset = new TPrint_stima_ricavi_recordset();
|
TPrint_stima_ricavi_recordset* recset = new TPrint_stima_ricavi_recordset();
|
||||||
|
|
||||||
recset->set_filter(msk);
|
recset->set_filter(msk, "");
|
||||||
TAnal_report::set_recordset(recset);
|
TAnal_report::set_recordset(recset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user