Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Aggiornamento prezzi GRIFFATO git-svn-id: svn://10.65.10.50/branches/R_10_00@22237 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3b392516fa
commit
a487443cd9
@ -31,12 +31,14 @@ bool TAggiorna_mask::on_field_event(TOperable_field& o, TField_event e, long jol
|
|||||||
{
|
{
|
||||||
TMask & m = o.mask();
|
TMask & m = o.mask();
|
||||||
TArticolo & art = cached_article(m.get(F_CODART));
|
TArticolo & art = cached_article(m.get(F_CODART));
|
||||||
|
TCodiceIVA c(art.get(ANAMAG_CODIVA));
|
||||||
real costo(m.get(F_COSTO));
|
real costo(m.get(F_COSTO));
|
||||||
const real perc = cache().get("CVE", m.get(F_RICARICO), "R2");
|
const real perc = cache().get("CVE", m.get(F_RICARICO), "R2");
|
||||||
real prezzo = costo * ( UNO + (perc / CENTO));
|
real prezzo = costo * ( UNO + (perc / CENTO));
|
||||||
|
|
||||||
prezzo.round(TCurrency::get_firm_dec(true));
|
prezzo = c.lordo(prezzo, 20);
|
||||||
m.set(F_PREZZO, prezzo, 0x3);
|
prezzo.round(0);
|
||||||
|
m.set(F_PREZZOL, prezzo, 0x3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_PREZZO :
|
case F_PREZZO :
|
||||||
@ -114,14 +116,15 @@ void TAggiorna_prezzi::aggiorna(TMask & m)
|
|||||||
const real perc = cache().get("CVE", ric, "R2");
|
const real perc = cache().get("CVE", ric, "R2");
|
||||||
real prezzo = costo * ( UNO + (perc / CENTO));
|
real prezzo = costo * ( UNO + (perc / CENTO));
|
||||||
|
|
||||||
prezzo.round(TCurrency::get_firm_dec(true));
|
|
||||||
row.add(prezzo.string(), sh.cid2index(F_PREZZO));
|
|
||||||
|
|
||||||
TCodiceIVA c(art.get(ANAMAG_CODIVA));
|
TCodiceIVA c(art.get(ANAMAG_CODIVA));
|
||||||
|
|
||||||
prezzo = c.lordo(prezzo, 20);
|
prezzo = c.lordo(prezzo, 20);
|
||||||
prezzo.round(TCurrency::get_firm_dec(true));
|
prezzo.round(0);
|
||||||
row.add(prezzo.string(), sh.cid2index(F_PREZZOL));
|
row.add(prezzo.string(), sh.cid2index(F_PREZZOL));
|
||||||
|
|
||||||
|
c.scorpora(prezzo, 20);
|
||||||
|
prezzo.round(TCurrency::get_firm_dec(true));
|
||||||
|
row.add(prezzo.string(), sh.cid2index(F_PREZZO));
|
||||||
row.add(art.get(ANAMAG_DESCR), sh.cid2index(F_DESART));
|
row.add(art.get(ANAMAG_DESCR), sh.cid2index(F_DESART));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user