Patch level : 10.1004
Files correlati : ci1.exe Ricompilazione Demo : [ ] Commento : Corrette le stampe rilavazione ore selezionavano male per mese git-svn-id: svn://10.65.10.50/branches/R_10_00@22153 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0fe6774d4c
commit
49b4371a15
@ -70,7 +70,8 @@ void TRil_ore_ris_mask::elabora_risorsa(const TString& curr_risorsa, TReport& re
|
||||
const int tipo_ordinamento = get_int(F_ORDINAMENTO);
|
||||
const char tipo_stampa = get(F_TIPOSTAMPA)[0];
|
||||
const bool split = get_bool(F_RIPARTISCI);
|
||||
|
||||
const int anno = get_int(F_ANNO);
|
||||
const int mese = tipo_stampa == 'M' ? get_int(F_MESE) : 0;
|
||||
|
||||
//creare un assoc_array con chiave TToken_string cms-sede-fase(1) o sede-cms-fase(2) in base ai parametri..
|
||||
//..indicati sulla maschera
|
||||
@ -115,14 +116,19 @@ void TRil_ore_ris_mask::elabora_risorsa(const TString& curr_risorsa, TReport& re
|
||||
TDate dataini = rilore_recset.get(RILORE_DADATA).as_date();
|
||||
TDate datafine = rilore_recset.get(RILORE_ADATA).as_date();
|
||||
|
||||
if (i == 1)
|
||||
{
|
||||
if (anno != rilore_recset.get(RILORE_ANNO).as_int())
|
||||
continue;
|
||||
if (tipo_stampa == 'M' && mese != rilore_recset.get(RILORE_MESE).as_int())
|
||||
continue;
|
||||
}
|
||||
//adatta le date alla commessa se quest'ultima è contenuta nell'intervallo (può essere più breve..
|
||||
//..dell'intervallo selezionato, oppure sovrapporsi solo parzialmente)
|
||||
if (fine_cms < datafine)
|
||||
datafine = fine_cms;
|
||||
if (ini_cms > dataini)
|
||||
dataini = ini_cms;
|
||||
if (i == 1 && (dataini.month() != get_int(F_MESE) || dataini.year() != get_int(F_ANNO)))
|
||||
continue;
|
||||
//se la commessa fosse tutta nel futuro o nel passato -> lascia perdere
|
||||
const long giorni_lavorativi = split ? ci_calcola_giorni_lavorativi(dataini, datafine) : 1L;
|
||||
if (giorni_lavorativi <= 0)
|
||||
@ -131,8 +137,6 @@ void TRil_ore_ris_mask::elabora_risorsa(const TString& curr_risorsa, TReport& re
|
||||
//metodo semidivino per calcolare, dati l'anno ed il il mese selezionati, la commessa corrente, le date inizio e fine,..
|
||||
//..quanti sono i giorni di lavoro lavorativi per suddividere la quantità di ore
|
||||
TDate ini_lav, fine_lav;
|
||||
const int anno = get_int(F_ANNO);
|
||||
const int mese = tipo_stampa == 'M' ? get_int(F_MESE) : 0;
|
||||
long giorni_lavorativi_cms = ci_calcola_giorni_lavorativi_cms(anno, mese, ini_cms, fine_cms, dataini, datafine, ini_lav, fine_lav);
|
||||
|
||||
//adesso deve riproporzionare il monte ore sul record sul mese selezionato (fa tutto il lavoro se ci sono giorni..
|
||||
|
@ -70,15 +70,14 @@ bool TRil_ore_cms_mask::elabora_commessa(const TString& curr_commessa, TReport&
|
||||
const bool per_commessa = tipo_cms_cdc.as_string() == "C";
|
||||
const char tipo_stampa = get(F_TIPOSTAMPA)[0];
|
||||
const bool split = get_bool(F_RIPARTISCI);
|
||||
const int anno = get_int(F_ANNO);
|
||||
const int mese = tipo_stampa == 'M' ? get_int(F_MESE) : 0;
|
||||
|
||||
//date del periodo
|
||||
const int anno = get_int(F_ANNO);
|
||||
int mese = 0;
|
||||
TDate inizio, fine;
|
||||
|
||||
if (tipo_stampa == 'M')
|
||||
{
|
||||
mese = get_int(F_MESE);
|
||||
TDate ini_mese(1, mese, anno);
|
||||
TDate fine_mese = ini_mese;
|
||||
fine_mese.set_end_month();
|
||||
@ -136,7 +135,14 @@ bool TRil_ore_cms_mask::elabora_commessa(const TString& curr_commessa, TReport&
|
||||
const TString16 risorsa = rilore_recset.get(RILORE_CODICE).as_string();
|
||||
const char tipo_ris_att = rilore_recset.get(RILORE_TIPORA).as_string()[0];
|
||||
|
||||
//date limite qta ore sul record del file LF_RILORE
|
||||
if (i == 1)
|
||||
{
|
||||
if (anno != rilore_recset.get(RILORE_ANNO).as_int())
|
||||
continue;
|
||||
if (tipo_stampa == 'M' && mese != rilore_recset.get(RILORE_MESE).as_int())
|
||||
continue;
|
||||
}
|
||||
//date limite qta ore sul record del file LF_RILORE
|
||||
TDate dataini = rilore_recset.get(RILORE_DADATA).as_date();
|
||||
TDate datafine = rilore_recset.get(RILORE_ADATA).as_date();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user