Patch level : 10.0 patch 431
Files correlati : lv2 Ricompilazione Demo : [ ] Commento : Corretta la posizione dell'inerimento del magazzino all'interno della riga documento git-svn-id: svn://10.65.10.50/trunk@19255 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8e6acb7064
commit
b8ee5c499d
@ -248,6 +248,7 @@ void TGenera_documenti_app::crea_riga(const TString& codart, const char modpas,
|
|||||||
const real conguaglio = rcont.get_real(LVRCONDV_QTACONG);
|
const real conguaglio = rcont.get_real(LVRCONDV_QTACONG);
|
||||||
real& qta = *(real*)_quantita.objptr(codart);
|
real& qta = *(real*)_quantita.objptr(codart);
|
||||||
const real& qta1 = *(real*)_quantita_ritirata.objptr(codart);
|
const real& qta1 = *(real*)_quantita_ritirata.objptr(codart);
|
||||||
|
const real przdttmp = rcont.get_real(LVRCONDV_PRZDTTMP);
|
||||||
|
|
||||||
//instanzio una cache sulla tabella del magazzino
|
//instanzio una cache sulla tabella del magazzino
|
||||||
const TRectype& anamag = cache().get(LF_ANAMAG,codart);
|
const TRectype& anamag = cache().get(LF_ANAMAG,codart);
|
||||||
@ -262,17 +263,6 @@ void TGenera_documenti_app::crea_riga(const TString& codart, const char modpas,
|
|||||||
rdoc.put(RDOC_CODARTMAG,codart);
|
rdoc.put(RDOC_CODARTMAG,codart);
|
||||||
rdoc.put(RDOC_CHECKED,'X');
|
rdoc.put(RDOC_CHECKED,'X');
|
||||||
|
|
||||||
//scrivo il magazzino
|
|
||||||
TString8 magazzino;
|
|
||||||
TString8 magazzinoc;
|
|
||||||
|
|
||||||
magazzino << ini_get_string(CONFIG_DITTA, "lv", "CODMAG") << ini_get_string(CONFIG_DITTA, "lv", "CODMAGN");
|
|
||||||
magazzinoc << ini_get_string(CONFIG_DITTA, "lv", "CODMAG") << ini_get_string(CONFIG_DITTA, "lv", "CODMAGC");
|
|
||||||
|
|
||||||
rdoc.put(RDOC_CODMAG, magazzino);
|
|
||||||
rdoc.put(RDOC_CODMAGC, magazzinoc);
|
|
||||||
|
|
||||||
|
|
||||||
if (prinbo)
|
if (prinbo)
|
||||||
rdoc.put(RDOC_PREZZO,rcont.get_real(LVRCONDV_PRZDTTMP)); //prezzo
|
rdoc.put(RDOC_PREZZO,rcont.get_real(LVRCONDV_PRZDTTMP)); //prezzo
|
||||||
|
|
||||||
@ -287,6 +277,7 @@ void TGenera_documenti_app::crea_riga(const TString& codart, const char modpas,
|
|||||||
//leggo il record corrispondente
|
//leggo il record corrispondente
|
||||||
magcli.read();
|
magcli.read();
|
||||||
long dottmp = magcli.get_long(CLIFOGIAC_DOTTM);
|
long dottmp = magcli.get_long(CLIFOGIAC_DOTTM);
|
||||||
|
long dotod = magcli.get_long(CLIFOGIAC_DOTOD);
|
||||||
|
|
||||||
//se ho ritirato un quantitativo di roba maggiore o uguale alla dotazione temporanea
|
//se ho ritirato un quantitativo di roba maggiore o uguale alla dotazione temporanea
|
||||||
//allora creo la nuova riga documento e azzero la dottmp; altrimenti preparo la riga
|
//allora creo la nuova riga documento e azzero la dottmp; altrimenti preparo la riga
|
||||||
@ -298,10 +289,12 @@ void TGenera_documenti_app::crea_riga(const TString& codart, const char modpas,
|
|||||||
rdoc.put(RDOC_GENERATA, true);
|
rdoc.put(RDOC_GENERATA, true);
|
||||||
rdoc.put(RDOC_CODAGG1, ini_get_string(CONFIG_DITTA, "lv", "CAULVRITDT"));
|
rdoc.put(RDOC_CODAGG1, ini_get_string(CONFIG_DITTA, "lv", "CAULVRITDT"));
|
||||||
dottmp = 0;
|
dottmp = 0;
|
||||||
|
dotod -= qta.integer();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dottmp -= qta.integer();
|
dottmp -= qta.integer();
|
||||||
|
dotod -= qta.integer();
|
||||||
rdoc.put(RDOC_QTAGG1, qta); //quantità ritirata
|
rdoc.put(RDOC_QTAGG1, qta); //quantità ritirata
|
||||||
rdoc.put(RDOC_GENERATA, true);
|
rdoc.put(RDOC_GENERATA, true);
|
||||||
rdoc.put(RDOC_CODAGG1, ini_get_string(CONFIG_DITTA, "lv", "CAULVRITDT"));
|
rdoc.put(RDOC_CODAGG1, ini_get_string(CONFIG_DITTA, "lv", "CAULVRITDT"));
|
||||||
@ -321,7 +314,19 @@ void TGenera_documenti_app::crea_riga(const TString& codart, const char modpas,
|
|||||||
magcli.put(CLIFOGIAC_CODART, codart);
|
magcli.put(CLIFOGIAC_CODART, codart);
|
||||||
magcli.put(CLIFOGIAC_NRIGA, 1);
|
magcli.put(CLIFOGIAC_NRIGA, 1);
|
||||||
magcli.put(CLIFOGIAC_DOTTM, dottmp);
|
magcli.put(CLIFOGIAC_DOTTM, dottmp);
|
||||||
|
magcli.put(CLIFOGIAC_DOTOD, dotod);
|
||||||
magcli.rewrite();
|
magcli.rewrite();
|
||||||
|
|
||||||
|
//scrivo il magazzino
|
||||||
|
TString8 magazzino;
|
||||||
|
TString8 magazzinoc;
|
||||||
|
|
||||||
|
magazzino << ini_get_string(CONFIG_DITTA, "lv", "CODMAG") << ini_get_string(CONFIG_DITTA, "lv", "CODMAGN");
|
||||||
|
magazzinoc << ini_get_string(CONFIG_DITTA, "lv", "CODMAG") << ini_get_string(CONFIG_DITTA, "lv", "CODMAGC");
|
||||||
|
|
||||||
|
rdoc.put(RDOC_CODMAG, magazzino);
|
||||||
|
rdoc.put(RDOC_CODMAGC, magazzinoc);
|
||||||
|
rdoc.put(RDOC_PREZZO, przdttmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (qta > ZERO)
|
if (qta > ZERO)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user