Patch level : 10.1016
Files correlati : ci2.exe Ricompilazione Demo : [ ] Commento : Aggiunto controllo sulla durata commessa git-svn-id: svn://10.65.10.50/branches/R_10_00@22276 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7d1edf774a
commit
551ab4408c
@ -555,6 +555,7 @@ void TRilevamento_prev_msk::riempi_nuova_riga(int r)
|
||||
get_anal_fields(codcosto, codcms, codfase);
|
||||
put_row_anal_fields(riga, codcosto, codcms, codfase);
|
||||
sheet.select(r);
|
||||
sheet.update_mask(r);
|
||||
sheet.check_row(r);
|
||||
riga.add(proponi_costo(riga), sheet.cid2index(S_COSTO));
|
||||
sheet.force_update(r);
|
||||
@ -740,6 +741,19 @@ bool TRilevamento_prev_msk::on_field_event(TOperable_field& f, TField_event e, l
|
||||
|
||||
if (m.get(S_CODLIST).blank())
|
||||
m.set(S_CODLIST, commesse.get(COMMESSE_LISRILPR), 3);
|
||||
if (codcms.full())
|
||||
{
|
||||
TDate inizio;
|
||||
TDate fine;
|
||||
const TDate datai = f.mask().get_date(S_DADATA);
|
||||
const TDate dataf = f.mask().get_date(S_DADATA);
|
||||
|
||||
ca_durata_commessa(commesse, inizio, fine);
|
||||
if (datai < inizio)
|
||||
return error_box(FR("Commessa %s non iniziata"), (const char *) codcms);
|
||||
if (datai > fine)
|
||||
return error_box(FR("Commessa %s terminata"), (const char *) codcms);
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (f.dlg())
|
||||
|
@ -1008,6 +1008,7 @@ void TRilevamento_cons_msk::riempi_nuova_riga(int r)
|
||||
get_anal_fields(codcosto, codcms, codfase);
|
||||
put_row_anal_fields(riga, codcosto, codcms, codfase);
|
||||
sheet.select(r);
|
||||
sheet.update_mask(r);
|
||||
sheet.check_row(r);
|
||||
riga.add(proponi_costo(riga), sheet.cid2index(S_COSTO));
|
||||
sheet.force_update(r);
|
||||
@ -1222,6 +1223,18 @@ bool TRilevamento_cons_msk::on_field_event(TOperable_field& f, TField_event e, l
|
||||
m.set(S_CODLIST, commesse.get(COMMESSE_LISRILCN), 3);
|
||||
if (e == fe_modify)
|
||||
{
|
||||
if (codcms.full())
|
||||
{
|
||||
TDate inizio;
|
||||
TDate fine;
|
||||
const TDate data(_giorno, _mese, _anno);
|
||||
|
||||
ca_durata_commessa(commesse, inizio, fine);
|
||||
if (data < inizio)
|
||||
return error_box(FR("Commessa %s non iniziata"), (const char *) codcms);
|
||||
if (data > fine)
|
||||
return error_box(FR("Commessa %s terminata"), (const char *) codcms);
|
||||
}
|
||||
if (main_app().has_module(CUAUT))
|
||||
{
|
||||
TToken_string key;
|
||||
|
Loading…
x
Reference in New Issue
Block a user