From 982c45bbe274f9d23eb4713ffd0a91c8b2fcba4f Mon Sep 17 00:00:00 2001 From: luca Date: Fri, 8 Jul 2011 09:49:00 +0000 Subject: [PATCH] Patch level : Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@22384 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ps/ps1002200.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ps/ps1002200.cpp b/ps/ps1002200.cpp index 2b68e0523..30a2112de 100755 --- a/ps/ps1002200.cpp +++ b/ps/ps1002200.cpp @@ -227,13 +227,13 @@ bool TImporta_produzione_msk::chiudi_bem() if(row.get(RDOC_FASCMS) == codlav) { - row.put(RDOC_CODAGG2, data.string()); - row.put(RDOC_QTAGG2, qta); + row.put(RDOC_DATACONS, data.string()); + row.put(RDOC_QTAGG1, qta); } else if(row.get(RDOC_CODCMS) == codlav) { - row.put(RDOC_DATACONS, data.string()); - row.put(RDOC_QTAGG1, qta); + row.put(RDOC_CODAGG2, data.string()); + row.put(RDOC_QTAGG2, qta); } else warning_box(TR("Riga BEM non trovata")); @@ -297,6 +297,16 @@ bool TImporta_produzione_msk::genera_produzione(const TFilename& file) int prog; TString query; + query << "USE RRILPROD\n" + << "SELECT (DATAINI==" << datafine << ")&&(ORAINI==" << orafine << ")\n" + << "FROM CODART=" << codart << " DATA=#DATA\n" + << "TO CODART=" << codart << " DATA=#DATA"; + TISAM_recordset righe(query); + righe.set_var("#DATA", datafine); + if(righe.items() > 0) + continue; + + query.cut(0); query << "USE RILPROD KEY 4\n" << "SELECT OPERATORE==\"" << codlav << "\"\n" << "FROM PROVV=D ANNO=" << anno << " CODNUM=" << codnum << "NRIGA=" << idriga << "\n" @@ -337,6 +347,7 @@ bool TImporta_produzione_msk::genera_produzione(const TFilename& file) real& qta = testata.get_real(RILPROD_QTA); qta += qtaprod; prog = testata.get_int(RILPROD_PROG); + tprod_ar.add(key, testata); } //creo la riga corrispondente a quella letta da file