Primo debug
Esplosione dei tab git-svn-id: svn://10.65.10.50/trunk@4708 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
710569854d
commit
d7dd466831
@ -3,9 +3,9 @@
|
||||
#include "mag.h"
|
||||
#include <mask.h>
|
||||
|
||||
// libreira per i movimenti
|
||||
// libreria per i movimenti
|
||||
|
||||
char * TNome_valorizz[]= {
|
||||
char * Nome_valorizz[]= {
|
||||
"Ultimo costo", "Media ultimi costi", "Prezzo di listino",
|
||||
"Costo standard", "Costo medio" ,
|
||||
"FIFO annuale", "LIFO annuale",
|
||||
@ -311,7 +311,7 @@ HIDDEN int last_esercizio = -1;
|
||||
real TArticolo_giacenza::ultimo_costo(const char * annoes) const
|
||||
{
|
||||
|
||||
if (last_esercizio != atoi(annoes))
|
||||
if (last_esercizio == atoi(annoes))
|
||||
{
|
||||
const real costo = get_real(ANAMAG_ULTCOS1);
|
||||
return costo == ZERO ? costo_standard(annoes) : costo;
|
||||
@ -319,6 +319,7 @@ real TArticolo_giacenza::ultimo_costo(const char * annoes) const
|
||||
else
|
||||
{
|
||||
const int index = find_storico(annoes, annoes);
|
||||
if (index < 0 ) return ZERO;
|
||||
const real costo = storico(annoes).row(index).get_real(STOMAG_ULTCOS1);
|
||||
return costo == ZERO ? costo_standard(annoes) : costo;
|
||||
}
|
||||
@ -326,7 +327,7 @@ real TArticolo_giacenza::ultimo_costo(const char * annoes) const
|
||||
|
||||
real TArticolo_giacenza::media_costi(const char * annoes) const
|
||||
{
|
||||
if (last_esercizio != atoi(annoes))
|
||||
if (last_esercizio == atoi(annoes))
|
||||
{
|
||||
real costo = get_real(ANAMAG_ULTCOS1);
|
||||
|
||||
@ -336,6 +337,7 @@ real TArticolo_giacenza::media_costi(const char * annoes) const
|
||||
else
|
||||
{
|
||||
const int index = find_storico(annoes, annoes);
|
||||
if (index < 0 ) return ZERO;
|
||||
const TRectype & rec = storico(annoes).row(index);
|
||||
real costo = rec.get_real(STOMAG_ULTCOS1);
|
||||
|
||||
@ -346,7 +348,7 @@ real TArticolo_giacenza::media_costi(const char * annoes) const
|
||||
|
||||
real TArticolo_giacenza::prezzo_listino(const char * annoes, const char * catven, const char * codlist) const
|
||||
{
|
||||
if (last_esercizio != atoi(annoes))
|
||||
if (last_esercizio == atoi(annoes))
|
||||
{
|
||||
static TString16 f;
|
||||
if (f.empty())
|
||||
@ -356,7 +358,7 @@ real TArticolo_giacenza::prezzo_listino(const char * annoes, const char * catven
|
||||
else
|
||||
{
|
||||
const int index = find_storico(annoes, annoes);
|
||||
|
||||
if (index < 0 ) return ZERO;
|
||||
return storico(annoes).row(index).get_real(STOMAG_PRZLIST);
|
||||
}
|
||||
}
|
||||
@ -364,11 +366,12 @@ real TArticolo_giacenza::prezzo_listino(const char * annoes, const char * catven
|
||||
real TArticolo_giacenza::costo_standard(const char * annoes) const
|
||||
{
|
||||
|
||||
if (last_esercizio != atoi(annoes))
|
||||
if (last_esercizio == atoi(annoes))
|
||||
return get_real(ANAMAG_COSTSTD);
|
||||
else
|
||||
{
|
||||
const int index = find_storico(annoes, annoes);
|
||||
if (index < 0 ) return ZERO;
|
||||
return storico(annoes).row(index).get_real(STOMAG_COSTSTD);
|
||||
}
|
||||
}
|
||||
@ -389,6 +392,7 @@ real TArticolo_giacenza::costo_medio(const char * annoes, const char * codmag, c
|
||||
return acq == ZERO ? costo_standard(annoes) : valacq / acq;
|
||||
}
|
||||
|
||||
|
||||
real TArticolo_giacenza::LIFO_annuale(const char * annoes, const char * codmag, const char * livello,
|
||||
bool giacenza_effettiva, bool valorizza_componenti) const
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user