Patch level : 10.952
Files correlati : mg4.exe Ricompilazione Demo : [ ] Commento : Bug 0001806: Diana2000 - chiusure di magazzino dopo la chiusura di magazzino, lanciando l'inventario non vengono reperiti i costi se selezionato ultimo costo. Ho verificato che : su stomag nel campo ultcos1 ci sono degli importi corretti; il record di stomag ha anno di riferimento = 2011 e anno costo = 2010, lanciando l'inventario per il 2010 i costi sono a 0, lanciando l'inventario i valori ci sono ma viene giustamente esposta la giacenza del 2011. Inolte chiedono di poter selezionare anche il deposito oltre al magazzino (ora è possibile solo richiedere la stampa di tutti i magazzini) Nota : L'inventario e' per magazzino. Per questa parte si dovrebbe aprire una segnalazione per poi discuterla git-svn-id: svn://10.65.10.50/branches/R_10_00@21775 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
afd9c24b3e
commit
e0be8dc3ec
@ -854,12 +854,17 @@ real TArticolo_giacenza::ultimo_costo(int annoes) const
|
||||
}
|
||||
else
|
||||
{
|
||||
const int index = find_storico(annoes);
|
||||
|
||||
if (index >= 0 )
|
||||
const int nextes = esercizi().next(annoes);
|
||||
|
||||
if (nextes > 0)
|
||||
{
|
||||
const real costo = storico(annoes).row(index).get_real(STOMAG_ULTCOS1);
|
||||
return costo.is_zero() ? costo_standard(annoes) : costo;
|
||||
const int index = find_storico(nextes);
|
||||
|
||||
if (index >= 0 )
|
||||
{
|
||||
const real costo = storico(nextes).row(index).get_real(STOMAG_ULTCOS1);
|
||||
return costo.is_zero() ? costo_standard(annoes) : costo;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ZERO;
|
||||
@ -875,18 +880,23 @@ real TArticolo_giacenza::media_costi(int annoes) const
|
||||
}
|
||||
else
|
||||
{
|
||||
const int index = find_storico(annoes);
|
||||
|
||||
if (index >= 0 )
|
||||
const int nextes = esercizi().next(annoes);
|
||||
|
||||
if (nextes > 0)
|
||||
{
|
||||
const TRectype & rec = storico(annoes).row(index);
|
||||
real costo = rec.get_real(STOMAG_ULTCOS1);
|
||||
|
||||
costo = (costo + rec.get_real(STOMAG_ULTCOS2)) / 2.0;
|
||||
return costo.is_zero() ? costo_standard(annoes) : costo;
|
||||
const int index = find_storico(nextes);
|
||||
|
||||
if (index >= 0 )
|
||||
{
|
||||
const TRectype & rec = storico(nextes).row(index);
|
||||
real costo = rec.get_real(STOMAG_ULTCOS1);
|
||||
|
||||
costo = (costo + rec.get_real(STOMAG_ULTCOS2)) / 2.0;
|
||||
return costo.is_zero() ? costo_standard(annoes) : costo;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ZERO;
|
||||
return ZERO;
|
||||
}
|
||||
|
||||
real TArticolo_giacenza::prezzo_listino(int annoes, const char * catven, const char * codlist) const
|
||||
@ -909,11 +919,16 @@ real TArticolo_giacenza::prezzo_listino(int annoes, const char * catven, const c
|
||||
}
|
||||
else
|
||||
{
|
||||
const int index = find_storico(annoes);
|
||||
const int nextes = esercizi().next(annoes);
|
||||
|
||||
if (nextes > 0)
|
||||
{
|
||||
const int index = find_storico(nextes);
|
||||
|
||||
if (index >= 0 )
|
||||
return storico(annoes).row(index).get_real(STOMAG_PRZLIST);
|
||||
}
|
||||
if (index >= 0 )
|
||||
return storico(nextes).row(index).get_real(STOMAG_PRZLIST);
|
||||
}
|
||||
}
|
||||
return ZERO;
|
||||
}
|
||||
|
||||
@ -923,10 +938,14 @@ real TArticolo_giacenza::costo_standard(int annoes) const
|
||||
return get_real(ANAMAG_COSTSTD);
|
||||
else
|
||||
{
|
||||
const int index = find_storico(annoes);
|
||||
|
||||
if (index >= 0 )
|
||||
return storico(annoes).row(index).get_real(STOMAG_COSTSTD);
|
||||
const int nextes = esercizi().next(annoes);
|
||||
if (nextes > 0)
|
||||
{
|
||||
const int index = find_storico(nextes);
|
||||
|
||||
if (index >= 0 )
|
||||
return storico(nextes).row(index).get_real(STOMAG_COSTSTD);
|
||||
}
|
||||
}
|
||||
return ZERO;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user