Patch level :10.0

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
sistemata stampa impazzita se usava lo sheet delle esclusioni dopo il primo giro


git-svn-id: svn://10.65.10.50/branches/R_10_00@22275 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2011-06-16 10:29:27 +00:00
parent e97e13ae4c
commit 7d1edf774a
4 changed files with 73 additions and 58 deletions

View File

@ -43,17 +43,23 @@ bool ci_is_ferial_day(const TDate& data)
long ci_calcola_giorni_lavorativi(const TDate& dataini, const TDate& datafine)
{
long num_giorni_lav = datafine - dataini + 1;
if (datafine < dataini)
return 0L;
if (datafine == dataini)
return 1L;
return datafine - dataini + 1;
//per ora viene congeleta la versione figa che considera i ferial day
//e qui si parrà l'ultima stilla di nobilitate! deve eliminare i giorni festivi dal mucchio!
if (num_giorni_lav > 1)
/*if (num_giorni_lav > 1)
{
for (TDate data = dataini; data <= datafine; ++data)
{
if (!ci_is_ferial_day(data))
num_giorni_lav--;
}
}
return num_giorni_lav;
}*/
}
void ci_inizio_fine_periodo(const char tipo_stampa, const int anno, const int mese, TDate& inizio_periodo, TDate& fine_periodo)

View File

@ -7,6 +7,7 @@
#include "../ca/calib01.h"
#include "../ca/commesse.h"
#include "../ca/cdc.h"
#include "rilore.h"
#include "ci1350.h"
@ -36,7 +37,13 @@ bool TRil_ore_cms_recordset::cms_cdc_ignore(const TRelation* rel)
{
const TRectype& curr_rec = rel->curr();
const TString& curr_codcms = curr_rec.get(RILORE_CODCMS);
return _ignore_list.find(curr_codcms) < 0;
FOR_EACH_ARRAY_ROW(_ignore_list, r, riga)
{
const char* lista_codcms = riga->get(0);
if (curr_codcms == lista_codcms)
return false;
}
return true;
}
@ -156,7 +163,11 @@ bool TRil_ore_cms_mask::elabora_commessa(const TString& curr_commessa, const int
rilore_recset.ignore(lista.rows_array());
}
else
{
rilore_recset.set_var("#CODICE", curr_commessa);
TString_array lista_vuota;
rilore_recset.ignore(lista_vuota); //azzera la lista di ignoramento nel caso standard e la resetta!
}
//un giro con le ore a 'P'reventivo, uno con quelle a 'C'onsuntivo
for (int i = 0; i < 2; i++)
@ -288,7 +299,7 @@ void TRil_ore_cms_mask::elabora() const
query_cms_cdc << "\nFROM CODCMS=#CODICE";
query_cms_cdc << "\nTO CODCMS=#CODICE";
msg << "Scansione commesse...";
code_name = "CODCMS";
code_name = COMMESSE_CODCMS;
}
else
{
@ -297,7 +308,7 @@ void TRil_ore_cms_mask::elabora() const
query_cms_cdc << "\nFROM CODCOSTO=#CODICE";
query_cms_cdc << "\nTO CODCOSTO=#CODICE";
msg << "Scansione centri di costo...";
code_name = "CODCOSTO";
code_name = CDC_CODCOSTO;
}
TISAM_recordset recset_cms_cdc(query_cms_cdc);
@ -306,7 +317,7 @@ void TRil_ore_cms_mask::elabora() const
//..con tutte le altre
TSheet_field& lista = sfield(F_RIGHE);
const int lista_items = lista.items();
if (lista_items > 0)
if (lista_items > 0 && cms_cdc.blank())
{
TProgind pi_lista(lista_items, msg, true, true);
@ -322,10 +333,9 @@ void TRil_ore_cms_mask::elabora() const
book.add(rep);
}
recset_cms_cdc.set_var("#CODICE", "");
elabora_commessa("_ALTRE_", m, rep);
book.add(rep);
//e stampiamo questo book!
book.preview();
}
else //programma standard senza lista commesse
{

View File

@ -169,10 +169,9 @@ BEGIN
PROMPT 1 1 ""
END
BUTTON DLG_USER 2 2
BUTTON DLG_DELREC 2 2
BEGIN
PROMPT 2 1 "A~zzera"
PICTURE TOOL_CELLULAR
PROMPT 2 1 ""
END
BUTTON DLG_CANCEL 2 2

View File

@ -4,24 +4,24 @@
<font face="Arial" size="8" />
<section type="Head" pattern="1">
<font face="Arial Narrow" bold="1" size="8" />
<field x="50" y="1" type="Testo" align="center" width="6" height="2" pattern="1" text="Totale PREV" />
<field x="56" y="1" type="Testo" align="center" width="6" height="2" pattern="1" text="Totale CONS" />
<field x="44" y="1" type="Testo" align="center" width="6" height="2" pattern="1" text="Totale PREV" />
<field x="50" y="1" type="Testo" align="center" width="6" height="2" pattern="1" text="Totale CONS" />
<field x="1" y="2" type="Stringa" width="18" pattern="1">
<font face="Arial" bold="1" size="8" />
<source>Des1</source>
</field>
<field border="1" x="63" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="101" pattern="2" text="Gen" />
<field border="1" x="67.5" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="102" pattern="2" text="Feb" />
<field border="1" x="72" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="103" pattern="2" text="Mar" />
<field border="1" x="76.5" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="104" pattern="2" text="Apr" />
<field border="1" x="81" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="105" pattern="2" text="Mag" />
<field border="1" x="85.5" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="106" pattern="2" text="Giu" />
<field border="1" x="90" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="107" pattern="2" text="Lug" />
<field border="1" x="94.5" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="108" pattern="2" text="Ago" />
<field border="1" x="99" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="109" pattern="2" text="Set" />
<field border="1" x="103.5" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="110" pattern="2" text="Ott" />
<field border="1" x="108" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="111" pattern="2" text="Nov" />
<field border="1" x="112.5" y="1" type="Testo" valign="center" align="center" width="4.5" height="2" id="112" pattern="2" text="Dic" />
<field border="1" x="57" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="101" pattern="2" text="Gen" />
<field border="1" x="62" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="102" pattern="2" text="Feb" />
<field border="1" x="67" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="103" pattern="2" text="Mar" />
<field border="1" x="72" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="104" pattern="2" text="Apr" />
<field border="1" x="77" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="105" pattern="2" text="Mag" />
<field border="1" x="82" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="106" pattern="2" text="Giu" />
<field border="1" x="87" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="107" pattern="2" text="Lug" />
<field border="1" x="92" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="108" pattern="2" text="Ago" />
<field border="1" x="97" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="109" pattern="2" text="Set" />
<field border="1" x="102" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="110" pattern="2" text="Ott" />
<field border="1" x="107" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="111" pattern="2" text="Nov" />
<field border="1" x="112" y="1" type="Testo" valign="center" align="center" width="5" height="2" id="112" pattern="2" text="Dic" />
</section>
<section type="Head" level="1" pattern="1">
<font face="Arial" size="10" />
@ -71,74 +71,74 @@
<section type="Body" pattern="1" />
<section type="Body" level="1" pattern="1">
<font face="Arial Narrow" size="7" />
<field border="1" x="49.5" type="Numero" align="right" width="6" pattern="1" text="###@,@@">
<field border="1" x="43.5" type="Numero" align="right" width="6" pattern="1" text=".2">
<source>TotPrev</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.99</prescript>
</field>
<field border="1" x="56" type="Numero" align="right" width="6" pattern="1" text="###@,@@">
<field border="1" x="50" type="Numero" align="right" width="6" pattern="1" text=".2">
<source>TotCons</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.100</prescript>
</field>
<field border="1" x="63" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="57" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G01</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.101</prescript>
</field>
<field border="1" x="67.5" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="62" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G02</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.102</prescript>
</field>
<field border="1" x="72" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="67" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G03</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.103</prescript>
</field>
<field border="1" x="76.5" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="72" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G04</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.104</prescript>
</field>
<field border="1" x="81" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="77" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G05</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.105</prescript>
</field>
<field border="1" x="85.5" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="82" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G06</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.106</prescript>
</field>
<field border="1" x="90" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="87" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G07</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.107</prescript>
</field>
<field border="1" x="94.5" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="92" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G08</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.108</prescript>
</field>
<field border="1" x="99" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="97" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G09</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.109</prescript>
</field>
<field border="1" x="103.5" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="102" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G10</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.110</prescript>
</field>
<field border="1" x="108" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="107" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G11</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.111</prescript>
</field>
<field border="1" x="112.5" type="Numero" align="right" width="4.5" pattern="1" hide_zero="1" text="##@,@@">
<field border="1" x="112" type="Numero" align="right" width="5" pattern="1" hide_zero="1" text=".2">
<source>G12</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.112</prescript>
</field>
<field border="1" x="1" type="Stringa" width="13" id="90" pattern="1">
<field border="1" x="1" type="Stringa" width="12" id="90" pattern="1">
<font face="Arial Narrow" bold="1" size="8" />
<source>Key2</source>
</field>
<field border="1" x="14" type="Stringa" width="35" id="91" pattern="1">
<field border="1" x="13" type="Stringa" width="30" id="91" pattern="1">
<source>Des2</source>
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" height="6" pattern="1">
<font face="Arial Narrow" bold="1" size="7" />
<field border="1" x="14" y="0.5" type="Testo" align="right" bg_color="#C0C0C0" width="35" pattern="2" text="Totali">
<field border="1" x="8" y="0.5" type="Testo" align="right" bg_color="#C0C0C0" width="35" pattern="2" text="Totali">
<font face="Arial" bold="1" size="8" />
</field>
<field x="88" y="3" type="Testo" width="4" pattern="1" text="Data" />
@ -146,19 +146,19 @@
<source>#SYSTEM.DATE</source>
</field>
<field x="110" y="3" type="Testo" width="7" pattern="1" text="Firma" />
<field border="1" x="49.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="6" id="99" pattern="2" text="##@,@@" />
<field border="1" x="56" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="6" id="100" pattern="2" text="##@,@@" />
<field border="1" x="63" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="101" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="67.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="102" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="72" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="103" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="76.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="104" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="81" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="105" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="85.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="106" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="90" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="107" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="94.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="108" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="99" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="109" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="103.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="110" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="108" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="111" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="112.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="4.5" id="112" pattern="2" hide_zero="1" text="#@,@@" />
<field border="1" x="43.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="6" id="99" pattern="2" text=".2" />
<field border="1" x="50" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="6" id="100" pattern="2" text=".2" />
<field border="1" x="57" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="101" pattern="2" hide_zero="1" text=".2" />
<field border="1" x="62" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="102" pattern="2" hide_zero="1" text=".2" />
<field border="1" x="67" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="103" pattern="2" hide_zero="1" text=".2" />
<field border="1" x="72" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="104" pattern="2" hide_zero="1" text=".2" />
<field border="1" x="77" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="105" pattern="2" hide_zero="1" text=".2" />
<field border="1" x="82" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="106" pattern="2" hide_zero="1" text=".2" />
<field border="1" x="87" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="107" pattern="2" hide_zero="1" text=".2" />
<field border="1" x="92" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="108" pattern="2" hide_zero="1" text=".2" />
<field border="1" x="97" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="109" pattern="2" hide_zero="1" text=".2" />
<field border="1" x="102" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="110" pattern="2" hide_zero="1" text=".2" />
<field border="1" x="107" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="111" pattern="2" hide_zero="1" text=".2" />
<field border="1" x="112" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="5" id="112" pattern="2" hide_zero="1" text=".2" />
</section>
</report>