From ed36aea3abecfd9de60601c8741a6cbfcbd0aad5 Mon Sep 17 00:00:00 2001 From: luca Date: Tue, 8 Nov 2005 18:07:06 +0000 Subject: [PATCH] =?UTF-8?q?Patch=20level=20=20=20=20=20=20=20=20=20:2.2=20?= =?UTF-8?q?214=20Files=20correlati=20=20=20=20=20:cg2.exe=20Ricompilazione?= =?UTF-8?q?=20Demo=20:=20[=20]=20Commento=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20:=20=200000521:=20gestione=20primanota=20Dopo=20avere=20inse?= =?UTF-8?q?rito=20un=20movimento=20iva,=20con=20saldaconto=20(rate=20compi?= =?UTF-8?q?late=20in=20automatico=20e=20visibili),=20si=20registra=20l'ope?= =?UTF-8?q?razione.=20Riaccedendo=20al=20movimento,=20le=20rate=20non=20so?= =?UTF-8?q?no=20pi=C3=B9=20visibili,=20e=20non=20compare=20alcun=20errore.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.65.10.50/trunk@13479 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg2100.cpp | 12 +++++++----- cg/cgsaldac.cpp | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/cg/cg2100.cpp b/cg/cg2100.cpp index 5883e60c2..c50e05016 100755 --- a/cg/cg2100.cpp +++ b/cg/cg2100.cpp @@ -234,17 +234,19 @@ bool TPrimanota_application::read_caus(const char* cod, int year) const TipoIVA iva = ok ? causale().iva() : nessuna_iva; TMask* m = _msk[iva == nessuna_iva ? 1 : 2]; - // Se sono chiamato dai campi di query ho belle che finito - if (_mode == MODE_QUERY || m == NULL) - return true; + const TDate datareg = m ? m->get(F_DATAREG) : _rel->curr().get(MOV_DATAREG); if (ok) { - _is_saldaconto = gestione_saldaconto() && causale().saldaconto(m->get_date(F_DATAREG)); + _is_saldaconto = gestione_saldaconto() && causale().saldaconto(datareg); dob = is_fattura() || causale().data_doc(); nob = is_fattura() || causale().num_doc(); } + // Se sono chiamato dai campi di query ho belle che finito + if (_mode == MODE_QUERY || m == NULL) + return true; + const bool ins = m->insert_mode(); m->efield(F_NUMDOC).check_type(nob ? CHECK_REQUIRED : CHECK_NORMAL); // Num. doc. obbligatorio @@ -739,7 +741,7 @@ int TPrimanota_application::read(TMask& m) const long numreg = _rel->curr().get_long(MOV_NUMREG); partite().destroy(); // Azzera tutte le partite - if (gestione_saldaconto() && causale().tipomov()) + if (gestione_saldaconto() && causale().tipomov() != 0) partite().add_numreg(numreg); // Carica le partite interessate cgs().reset(); // Azzera tutte le righe contabili diff --git a/cg/cgsaldac.cpp b/cg/cgsaldac.cpp index 91d5ce4ea..f9f5c74fd 100755 --- a/cg/cgsaldac.cpp +++ b/cg/cgsaldac.cpp @@ -2067,7 +2067,7 @@ int TPartite_array::add_numreg(long nreg) part.zero(); part.put(PART_NREG, nreg); - // Uso un cursore per evitare conflitti di lettura con l'oggetta partita + // Uso un cursore per evitare conflitti di lettura con l'oggetto partita TCursor cur(&rel, "", 2, &part, &part); cur.freeze(); for (cur = 0; cur.ok(); ++cur)