From 85220d735f4cffcdf7ff106d163547fbfd0ad5cd Mon Sep 17 00:00:00 2001 From: luca83 Date: Thu, 23 Jul 2009 10:21:54 +0000 Subject: [PATCH] =?UTF-8?q?Patch=20level=20=20=20=20=20=20=20=20=20:=2010.?= =?UTF-8?q?0=20patch=20362=20Files=20correlati=20=20=20=20=20:=20lv2=20Ric?= =?UTF-8?q?ompilazione=20Demo=20:=20[=20]=20Commento=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20:=20Corretto=20il=20filtro=20iniziale;=20si=20ip?= =?UTF-8?q?otizza=20di=20considerare=20i=20giri=20partendo=20da=20due=20me?= =?UTF-8?q?si=20prima=20la=20data=20di=20prevista=20consegna=20(eventualme?= =?UTF-8?q?nte=20lo=20si=20render=C3=A0=20configurabile)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.65.10.50/trunk@19128 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- lv/lv2400.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/lv/lv2400.cpp b/lv/lv2400.cpp index 7149cc5d2..089f5559c 100755 --- a/lv/lv2400.cpp +++ b/lv/lv2400.cpp @@ -661,14 +661,17 @@ void TGenera_documenti_app::aggiorna_conguaglio(const long codcli, const long co bool TGenera_documenti_app::transfer() { //leggo i campi dalla maschera - const TDate datacons = _msk->get_date(F_DTCONS); + const TDate adatacons = _msk->get_date(F_DTCONS); + TDate dadatacons = adatacons; + dadatacons.set_month(adatacons.month() - 2); const long coditi = _msk->get_long(F_CODITI); long codcli = _msk->get_long(F_CODCF); + long codaut = _msk->get_long(F_CODAUT); //preparo un recordset che contiene tutti planning per cui voglio creare i documenti relativi TString query = "USE LVRCONSPLAN KEY 2"; - if (coditi || codcli) + if (coditi || codcli || codaut) { query << " SELECT "; if (codcli > 0) @@ -679,10 +682,19 @@ bool TGenera_documenti_app::transfer() query << "&&"; query << "(CODITI=" << coditi << ')'; } + if (codaut > 0) + { + if (codcli > 0 || coditi > 0) + query << "&&"; + query << "(CODAUT=" << codaut << ')'; + } } query << "\n"; - query << "FROM DTCONS=" << datacons << "\n"; - query << "TO DTCONS=" << datacons << "\n"; + if(_msk->get_int(F_TPGEN) == 1) + query << "FROM DTCONS=" << adatacons << "\n"; + else + query << "FROM DTCONS=" << dadatacons << "\n"; + query << "TO DTCONS=" << adatacons << "\n"; TISAM_recordset plan(query);