From eb018fbe11c54f02820f94ee1fe6c15e56a239cb Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 10 Feb 2009 01:35:24 +0000 Subject: [PATCH] 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 --- ca/ca2100.cpp | 38 +++++++++++++++++++++----------------- ca/ca2100a.uml | 6 +++--- ca/calib01.cpp | 9 +++++---- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/ca/ca2100.cpp b/ca/ca2100.cpp index 9cda1b484..65fcac9d5 100755 --- a/ca/ca2100.cpp +++ b/ca/ca2100.cpp @@ -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); + } } } } diff --git a/ca/ca2100a.uml b/ca/ca2100a.uml index 19b7216a2..15096309d 100755 --- a/ca/ca2100a.uml +++ b/ca/ca2100a.uml @@ -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 diff --git a/ca/calib01.cpp b/ca/calib01.cpp index 9e78f8564..eaf0609a5 100755 --- a/ca/calib01.cpp +++ b/ca/calib01.cpp @@ -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);