Patch level :10.0 1044
Files correlati : Ricompilazione Demo : [ ] Commento : modificata la stampa per risorsa quando si hanno le commesse nello sheet git-svn-id: svn://10.65.10.50/branches/R_10_00@22353 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
687ce41fa3
commit
0e62628c38
@ -140,6 +140,10 @@ void TRil_ore_ris_mask::elabora_risorsa(const TString& curr_risorsa, const int c
|
|||||||
|
|
||||||
//crea la chiave per l'assoc_array
|
//crea la chiave per l'assoc_array
|
||||||
TToken_string key;
|
TToken_string key;
|
||||||
|
if (ignore)
|
||||||
|
key = OTHER_ACTIVITIES;
|
||||||
|
else
|
||||||
|
{
|
||||||
switch(tipo_ordinamento)
|
switch(tipo_ordinamento)
|
||||||
{
|
{
|
||||||
case 1: key.add(codcms); break;
|
case 1: key.add(codcms); break;
|
||||||
@ -152,7 +156,7 @@ void TRil_ore_ris_mask::elabora_risorsa(const TString& curr_risorsa, const int c
|
|||||||
case 8: key.add(codcosto); key.add(codcms); key.add(codfase); break;
|
case 8: key.add(codcosto); key.add(codcms); key.add(codfase); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//se la chiave non esiste già nell'assoc_array allora crea l'elemento
|
//se la chiave non esiste già nell'assoc_array allora crea l'elemento
|
||||||
TToken_string* record = (TToken_string*)righe.objptr(key);
|
TToken_string* record = (TToken_string*)righe.objptr(key);
|
||||||
if (record == NULL)
|
if (record == NULL)
|
||||||
@ -189,10 +193,8 @@ void TRil_ore_ris_mask::elabora_risorsa(const TString& curr_risorsa, const int c
|
|||||||
|
|
||||||
} //for (int i = 0; i < 2; i++)...
|
} //for (int i = 0; i < 2; i++)...
|
||||||
|
|
||||||
//setta un nuovo recset al report: se non lo facesse il recset sarebbe sempre il medesimo per ogni..
|
//prende il recordset in opera dal report per fargli le set_var
|
||||||
//..risorsa (ovvero assoc_array) e quindi si incrementerebbe all'ignoranza
|
TRil_ore_recordset* recset = (TRil_ore_recordset*)rep.recordset();
|
||||||
TRil_ore_recordset* recset = new TRil_ore_recordset;
|
|
||||||
rep.set_recordset(recset);
|
|
||||||
//tenta la mask2report per far apparire sul report i campi di selezione della maschera
|
//tenta la mask2report per far apparire sul report i campi di selezione della maschera
|
||||||
rep.mask2report(*this);
|
rep.mask2report(*this);
|
||||||
TString4 code;
|
TString4 code;
|
||||||
@ -274,10 +276,8 @@ void TRil_ore_ris_mask::elabora() const
|
|||||||
//poi un successivo su tutte le cms/cdc che non apparivano nella lista
|
//poi un successivo su tutte le cms/cdc che non apparivano nella lista
|
||||||
const int ignore_start = 0;
|
const int ignore_start = 0;
|
||||||
const int ignore_end = !lista.empty();
|
const int ignore_end = !lista.empty();
|
||||||
for (int ignore = ignore_start; ignore <= ignore_end; ignore++)
|
|
||||||
{
|
|
||||||
TProgind pi(recset_ris_att_items, msg, true, true);
|
|
||||||
|
|
||||||
|
TProgind pi(recset_ris_att_items, msg, true, true);
|
||||||
//per ogni risorsa/attrezzatura dell'elenco genera un report singolo che viene riempito nella elabora_risorsa e..
|
//per ogni risorsa/attrezzatura dell'elenco genera un report singolo che viene riempito nella elabora_risorsa e..
|
||||||
//..aggiunto al book per la stampa finale
|
//..aggiunto al book per la stampa finale
|
||||||
for (bool ok = recset_ris_att.move_first(); ok; ok = recset_ris_att.move_next())
|
for (bool ok = recset_ris_att.move_first(); ok; ok = recset_ris_att.move_next())
|
||||||
@ -287,11 +287,18 @@ void TRil_ore_ris_mask::elabora() const
|
|||||||
|
|
||||||
const TString80 curr_risorsa = recset_ris_att.cursor()->curr().get("CODTAB");
|
const TString80 curr_risorsa = recset_ris_att.cursor()->curr().get("CODTAB");
|
||||||
|
|
||||||
elabora_risorsa(curr_risorsa, m, ignore!=0, rep);
|
//setta un nuovo recset al report: se non lo facesse il recset sarebbe sempre il medesimo per ogni..
|
||||||
|
//..risorsa (ovvero assoc_array) e quindi si incrementerebbe all'ignoranza
|
||||||
|
TRil_ore_recordset* recset = new TRil_ore_recordset;
|
||||||
|
rep.set_recordset(recset);
|
||||||
|
|
||||||
|
for (int ignore = ignore_start; ignore <= ignore_end; ignore++)
|
||||||
|
{
|
||||||
|
elabora_risorsa(curr_risorsa, m, ignore!=0, rep);
|
||||||
|
} //for (int ignore = ignore_start..
|
||||||
|
//stampa un report per risorsa
|
||||||
book.add(rep);
|
book.add(rep);
|
||||||
} //for (bool ok = recset_ris_att.move_first()...
|
} ////for (bool ok = recset_ris_att.move_first()...
|
||||||
}
|
|
||||||
|
|
||||||
} //for (int m = da_mese; ..
|
} //for (int m = da_mese; ..
|
||||||
//e alla fine stampa il book
|
//e alla fine stampa il book
|
||||||
|
@ -324,7 +324,7 @@
|
|||||||
<section type="Foot" pattern="1" />
|
<section type="Foot" pattern="1" />
|
||||||
<section type="Foot" level="1" height="6" pattern="1">
|
<section type="Foot" level="1" height="6" pattern="1">
|
||||||
<font face="Arial Narrow" bold="1" size="7" />
|
<font face="Arial Narrow" bold="1" size="7" />
|
||||||
<field border="1" x="13.5" y="0.5" type="Testo" align="right" bg_color="#C0C0C0" width="29" pattern="2" text="Totali">
|
<field border="1" x="14" y="0.5" type="Testo" align="right" bg_color="#C0C0C0" width="29" pattern="2" text="Totali">
|
||||||
<font face="Arial" bold="1" size="8" />
|
<font face="Arial" bold="1" size="8" />
|
||||||
</field>
|
</field>
|
||||||
<field x="128" y="3" type="Testo" width="4" pattern="1" text="Data" />
|
<field x="128" y="3" type="Testo" width="4" pattern="1" text="Data" />
|
||||||
@ -332,8 +332,8 @@
|
|||||||
<source>#SYSTEM.DATE</source>
|
<source>#SYSTEM.DATE</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="150" y="3" type="Testo" width="7" pattern="1" text="Firma" />
|
<field x="150" y="3" type="Testo" width="7" pattern="1" text="Firma" />
|
||||||
<field border="1" x="42.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="7" id="99" pattern="2" text=".2" />
|
<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="49.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="6" id="100" 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="3.5" id="101" pattern="2" hide_zero="1" text=".2" />
|
<field border="1" x="57" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="3.5" id="101" pattern="2" hide_zero="1" text=".2" />
|
||||||
<field border="1" x="60.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="3.5" id="102" pattern="2" hide_zero="1" text=".2" />
|
<field border="1" x="60.5" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="3.5" id="102" pattern="2" hide_zero="1" text=".2" />
|
||||||
<field border="1" x="64" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="3.5" id="103" pattern="2" hide_zero="1" text=".2" />
|
<field border="1" x="64" y="0.5" type="Numero" align="right" bg_color="#C0C0C0" width="3.5" id="103" pattern="2" hide_zero="1" text=".2" />
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include <diction.h>
|
||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
|
|
||||||
#include "../ca/commesse.h"
|
#include "../ca/commesse.h"
|
||||||
@ -130,6 +131,12 @@ long ci_calcola_giorni_lavorativi_intersezione(const TDate& ini_1, const TDate&
|
|||||||
return ci_calcola_giorni_lavorativi(ini_int, fine_int);
|
return ci_calcola_giorni_lavorativi(ini_int, fine_int);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TVariant describe_cms(const TString& chiave1)
|
||||||
|
{
|
||||||
|
if (chiave1 == OTHER_ACTIVITIES)
|
||||||
|
return TR("Altre attivita'");
|
||||||
|
return cache().get(LF_COMMESSE, chiave1, COMMESSE_DESCRIZ);
|
||||||
|
}
|
||||||
|
|
||||||
void ci_fill_recset_from_ass(TAssoc_array& ass, TReport& rep)
|
void ci_fill_recset_from_ass(TAssoc_array& ass, TReport& rep)
|
||||||
{
|
{
|
||||||
@ -204,18 +211,18 @@ void ci_fill_recset_from_ass(TAssoc_array& ass, TReport& rep)
|
|||||||
switch (ordinamento)
|
switch (ordinamento)
|
||||||
{
|
{
|
||||||
case 1: //cms
|
case 1: //cms
|
||||||
recset->set("Des1", cache().get(LF_COMMESSE, chiave1, COMMESSE_DESCRIZ));
|
recset->set("Des1", describe_cms(chiave1));
|
||||||
break;
|
break;
|
||||||
case 2: //cms - cdc
|
case 2: //cms - cdc
|
||||||
recset->set("Des1", cache().get(LF_COMMESSE, chiave1, COMMESSE_DESCRIZ));
|
recset->set("Des1", describe_cms(chiave1));
|
||||||
recset->set("Des2", cache().get(LF_CDC, chiave2, CDC_DESCRIZ));
|
recset->set("Des2", cache().get(LF_CDC, chiave2, CDC_DESCRIZ));
|
||||||
break;
|
break;
|
||||||
case 3: //cms - fase
|
case 3: //cms - fase
|
||||||
recset->set("Des1", cache().get(LF_COMMESSE, chiave1, COMMESSE_DESCRIZ));
|
recset->set("Des1", describe_cms(chiave1));
|
||||||
recset->set("Des2", cache().get(LF_FASI, chiave2, FASI_DESCRIZ));
|
recset->set("Des2", cache().get(LF_FASI, chiave2, FASI_DESCRIZ));
|
||||||
break;
|
break;
|
||||||
case 4: //cms - cdc - fase
|
case 4: //cms - cdc - fase
|
||||||
recset->set("Des1", cache().get(LF_COMMESSE, chiave1, COMMESSE_DESCRIZ));
|
recset->set("Des1", describe_cms(chiave1));
|
||||||
recset->set("Des2", cache().get(LF_CDC, chiave2, CDC_DESCRIZ));
|
recset->set("Des2", cache().get(LF_CDC, chiave2, CDC_DESCRIZ));
|
||||||
recset->set("Des3", cache().get(LF_FASI, chiave3, FASI_DESCRIZ));
|
recset->set("Des3", cache().get(LF_FASI, chiave3, FASI_DESCRIZ));
|
||||||
break;
|
break;
|
||||||
@ -224,7 +231,7 @@ void ci_fill_recset_from_ass(TAssoc_array& ass, TReport& rep)
|
|||||||
break;
|
break;
|
||||||
case 6: //cdc - cms
|
case 6: //cdc - cms
|
||||||
recset->set("Des1", cache().get(LF_CDC, chiave1, CDC_DESCRIZ));
|
recset->set("Des1", cache().get(LF_CDC, chiave1, CDC_DESCRIZ));
|
||||||
recset->set("Des2", cache().get(LF_COMMESSE, chiave2, COMMESSE_DESCRIZ));
|
recset->set("Des2", describe_cms(chiave2));
|
||||||
break;
|
break;
|
||||||
case 7: //cdc - fase
|
case 7: //cdc - fase
|
||||||
recset->set("Des1", cache().get(LF_CDC, chiave1, CDC_DESCRIZ));
|
recset->set("Des1", cache().get(LF_CDC, chiave1, CDC_DESCRIZ));
|
||||||
@ -232,7 +239,7 @@ void ci_fill_recset_from_ass(TAssoc_array& ass, TReport& rep)
|
|||||||
break;
|
break;
|
||||||
case 8: //cdc - cms - fase
|
case 8: //cdc - cms - fase
|
||||||
recset->set("Des1", cache().get(LF_CDC, chiave1, CDC_DESCRIZ));
|
recset->set("Des1", cache().get(LF_CDC, chiave1, CDC_DESCRIZ));
|
||||||
recset->set("Des2", cache().get(LF_COMMESSE, chiave2, COMMESSE_DESCRIZ));
|
recset->set("Des2", describe_cms(chiave2));
|
||||||
recset->set("Des3", cache().get(LF_FASI, chiave3, FASI_DESCRIZ));
|
recset->set("Des3", cache().get(LF_FASI, chiave3, FASI_DESCRIZ));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,8 @@ public:
|
|||||||
TRil_ore_cms_recordset(const char* query) : TISAM_recordset(query) {}
|
TRil_ore_cms_recordset(const char* query) : TISAM_recordset(query) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define OTHER_ACTIVITIES "^ALTRE^"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Metodi liberi per determinare giorni lavorativi e feriali (nati per ci1300 ci1400)
|
// Metodi liberi per determinare giorni lavorativi e feriali (nati per ci1300 ci1400)
|
||||||
// e per formattare e riempire i report corrispondenti
|
// e per formattare e riempire i report corrispondenti
|
||||||
|
@ -115,7 +115,7 @@ bool TRil_ore_cms_mask::elabora_commessa(const TString& curr_commessa, const int
|
|||||||
}
|
}
|
||||||
|
|
||||||
TRil_ore_cms_recordset rilore_recset(query);
|
TRil_ore_cms_recordset rilore_recset(query);
|
||||||
if (curr_commessa == "_ALTRE_")
|
if (curr_commessa == OTHER_ACTIVITIES)
|
||||||
{
|
{
|
||||||
rilore_recset.set_var("#CODICE", "");
|
rilore_recset.set_var("#CODICE", "");
|
||||||
const TSheet_field& lista = sfield(F_RIGHE);
|
const TSheet_field& lista = sfield(F_RIGHE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user