Patch level : 10.0 224

Files correlati     : ca2.exe
Ricompilazione Demo : [ ]
Commento            :

Utilizzata la data di fine competenza anche per i movimenti normali.
Corretto errore sull' handler dello sheet, accedeva alla commessa anche se non cofigurata


git-svn-id: svn://10.65.10.50/trunk@18228 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2009-02-10 01:35:24 +00:00
parent baa7727c09
commit eb018fbe11
3 changed files with 29 additions and 24 deletions

View File

@ -441,33 +441,37 @@ bool TMovanal_msk::on_field_event(TOperable_field& o, TField_event e, long jolly
const int r = int(jolly);
__codcms.cut(0);
for (short j = _cms_start; j <= _cms_end; j++)
__codcms << s.row(r).get(s.cid2index(j));
if (_cms_start > 0)
for (short j = _cms_start; j <= _cms_end; j++)
__codcms << s.row(r).get(s.cid2index(j));
}
if (e == se_notify_modify)
{
const int r = int(jolly);
TSheet_field & s = sfield(F_RIGHE);
TMask & m = s.sheet_mask();
const TRectype & curr = ((TEdit_field &) m.field(_cms_start)).browse()->cursor()->curr();
const TString & codcms = curr.get(COMMESSE_CODCMS);
if ((_cms_start > 0)&&(_cdc_start > 0)&&(__codcms != codcms))
if (_cms_start > 0)
{
const TString codcosto = curr.get(COMMESSE_CODCOSTO);
for (short i = _cdc_start; i <= _cdc_end; i++)
const TRectype & curr = ((TEdit_field &) m.field(_cms_start)).browse()->cursor()->curr();
const TString & codcms = curr.get(COMMESSE_CODCMS);
if ((_cdc_start > 0)&&(__codcms != codcms))
{
TEdit_field & e = m.efield(i);
const TFieldref * f = e.field();
if (f != NULL)
const TString codcosto = curr.get(COMMESSE_CODCOSTO);
for (short i = _cdc_start; i <= _cdc_end; i++)
{
const int from = f->from();
const int to = f->to();
TEdit_field & e = m.efield(i);
const TFieldref * f = e.field();
m.set(i, codcosto.sub(from, to), 0x2);
s.update_row(r);
s.force_update(r);
if (f != NULL)
{
const int from = f->from();
const int to = f->to();
m.set(i, codcosto.sub(from, to), 0x2);
s.update_row(r);
s.force_update(r);
}
}
}
}

View File

@ -37,9 +37,9 @@ END
LIST F_TIPO 1 25
BEGIN
PROMPT 2 5 "Tipo movimento "
ITEM " |Normale" MESSAGE RESET,F_DATAFCOMP|HIDE,F_DATAFCOMP
ITEM "P|Preventivo" MESSAGE SHOW,F_DATAFCOMP
ITEM "V|Variazione preventivo" MESSAGE SHOW,F_DATAFCOMP
ITEM " |Normale"
ITEM "P|Preventivo"
ITEM "V|Variazione preventivo"
FIELD TIPOMOV
END

View File

@ -1265,9 +1265,10 @@ void TAnal_mov::saldo_set_reset(const TRectype& row, bool reset)
annies.add(esc_iniziale);
const char tipomov = get_char(MOVANA_TIPOMOV);
//se e' un movimento di tipo preventivo potrebbe avere una data di scadenza come la mozzarella
if (tipomov == 'P' || tipomov == 'V')
{
// se e' un movimento di tipo preventivo potrebbe avere una data di scadenza come la mozzarella
// ora tutti
// if (tipomov == 'P' || tipomov == 'V')
// {
const TDate datacomp = get_date(MOVANA_DATACOMP);
const TDate datafcomp = get_date(MOVANA_DATAFCOMP);
if (datafcomp.ok() && datafcomp > datacomp)
@ -1282,7 +1283,7 @@ void TAnal_mov::saldo_set_reset(const TRectype& row, bool reset)
annies.add(a);
}
}
}
// }
TToken_string key;
key.add(tipomov);