Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@21815 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ad96e05162
commit
36cb5a9165
@ -8,7 +8,7 @@
|
||||
//#include <reprint.h>
|
||||
//#include <reputils.h>
|
||||
//#include <tabutil.h>
|
||||
//#include <utility.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "../mg/mglib.h"
|
||||
#include "../mg/movmag.h"
|
||||
@ -25,14 +25,13 @@ class THardy_movmag : public THardy_transfer
|
||||
int _anno; // parametri per la query
|
||||
TDate _dadata, _adata; // parametri per la query
|
||||
int _protocollo; // numero protocollo del mov.mag.
|
||||
//TMov_mag _mov; // Tmov_mag per scrivere il movimento di magazzino con tutti gli annessi e connessi
|
||||
|
||||
protected:
|
||||
bool scrivi_righe(TMov_mag& mov);
|
||||
bool scrivi_testata(const TRecordset& recset, TMov_mag& mov);
|
||||
void recset2rec(const TODBC_recordset& recset, TRectype& rec, const TString_array& lista_campi);
|
||||
void conto2campo(const TString& hd_tipoc, const TString& hd_key, TString4& tipoc, int& gr, int& co, long& so);
|
||||
|
||||
void get_lotto(const int kmovmag, TString& idlotto);
|
||||
public:
|
||||
virtual bool trasferisci();
|
||||
THardy_movmag(const int anno, const TDate dadata, const TDate adata);
|
||||
@ -217,14 +216,33 @@ bool THardy_movmag::scrivi_righe(TMov_mag& mov)
|
||||
TString8 codcaus_riga = recset_righe.get("IdCausale").as_string();
|
||||
if (codcaus != codcaus_riga)
|
||||
rmov.put(RMOVMAG_CODCAUS, codcaus_riga);
|
||||
rmov.put(RMOVMAG_CODMAG, recset_righe.get("IdMagazzino1").as_string());
|
||||
const int codmag = recset_righe.get("IdMagazzino1").as_int();
|
||||
rmov.put(RMOVMAG_CODMAG, format("%02d", codmag));
|
||||
rmov.put(RMOVMAG_CODART, recset_righe.get("IdProdotto").as_string());
|
||||
rmov.put(RMOVMAG_QUANT, recset_righe.get("Quantita").as_string());
|
||||
rmov.put(RMOVMAG_UM, recset_righe.get("IdUmDoc").as_string());
|
||||
rmov.put(RMOVMAG_PREZZO, recset_righe.get("Prezzo").as_string());
|
||||
const int kmovmag = recset_righe.get("KMovmag").as_int();
|
||||
TString80 idlotto;
|
||||
get_lotto(kmovmag, idlotto);
|
||||
rmov.put(RMOVMAG_LIVGIAC, idlotto);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void THardy_movmag::get_lotto(const int kmovmag, TString& idlotto)
|
||||
{
|
||||
TString query_lotto;
|
||||
query_lotto << query_header();
|
||||
query_lotto << "SELECT * "
|
||||
"FROM dbo.DettQtaDoc "
|
||||
"WHERE KRigoDoc=";
|
||||
query_lotto << kmovmag;
|
||||
TODBC_recordset recset_lotto(query_lotto);
|
||||
for (bool ok=recset_lotto.move_first();ok;ok=recset_lotto.move_next())
|
||||
idlotto = recset_lotto.get("IdLotto").as_string();
|
||||
}
|
||||
|
||||
// procedura principale di conversione
|
||||
bool THardy_movmag::trasferisci()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user