From d4b37ac2d5a587a6ed3c589576305e8be45f4cb7 Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Thu, 2 Jan 2020 10:22:42 +0100 Subject: [PATCH] Patch level : 12.0 916 Files correlati : mg1.exe lv0.exe lv1.exe lv3.exe Commento : Corretta ricostruzione saldi per clifogiac sulle dotazioni lv0.exe lv1.exe lv3.exe --- src/lv/lvlib.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/lv/lvlib.cpp b/src/lv/lvlib.cpp index 15bfa0947..db7f87a4f 100755 --- a/src/lv/lvlib.cpp +++ b/src/lv/lvlib.cpp @@ -741,7 +741,8 @@ int TArticolo_lavanderie::find_clifomag(int annoes, const char * livello, int fr TRecord_array & TArticolo_lavanderie::clifomag(int annoes) const { const int es = annoes > 0 ? annoes : esercizi().last_mag(); - const int esprec = esercizi().pred(annoes); +/* +const int esprec = esercizi().pred(annoes); if (esprec != 0) { @@ -769,7 +770,7 @@ TRecord_array & TArticolo_lavanderie::clifomag(int annoes) const { TRecmag_lavanderie & rec = (TRecmag_lavanderie &) recarr[r]; TRecmag_lavanderie & old = (TRecmag_lavanderie &) recarrprec[r1]; - ::update_clifogiac(rec, old); +// ::update_clifogiac(rec, old); recarrprec.destroy_row(r1, true); } } @@ -785,9 +786,20 @@ TRecord_array & TArticolo_lavanderie::clifomag(int annoes) const return recarr; } } + */ ((TArticolo_lavanderie*)this)->set_anno_lav(es); TRecord_array & recarr = body(LF_CLIFOGIAC); + if (recarr.rows() == 0) + { + const int esprec = esercizi().pred(annoes); + + ((TArticolo_lavanderie*)this)->set_anno_lav(esprec); + + TRecord_array & recarr = body(LF_CLIFOGIAC); + + return recarr; + } return recarr; }