Correzioni ad aggiornamento conguaglio su buoni evasione manuale buoni di prelievo
git-svn-id: svn://10.65.10.50/branches/R_10_00@22652 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
52faa371ab
commit
70b7377a24
@ -97,14 +97,14 @@ inline TGestione_bolle_app& gbapp() { return (TGestione_bolle_app &)main_app();
|
||||
//ARROTONDA: metodo che arrotonda la quantità che gli passo se è previsto sul contratto
|
||||
void TGestione_bolle_msk::arrotonda(const TMask& msk, real& quantita)
|
||||
{
|
||||
int perarr = ini_get_int(CONFIG_DITTA, "lv", "Perarr");
|
||||
const int perarr = ini_get_int(CONFIG_DITTA, "lv", "Perarr");
|
||||
|
||||
const TString& codart = msk.get(FR_CODART);
|
||||
//instanzio una cache sulla tabella del magazzino
|
||||
const TRectype& anamag = cache().get(LF_ANAMAG,codart);
|
||||
//recupero i dati di interesse dall'anagrafica di magazzino
|
||||
const long ppconf = anamag.get_long(ANAMAG_PPCONF);
|
||||
if (ppconf > 0)
|
||||
if (ppconf > 1)
|
||||
{
|
||||
TDocumento_mask& dmsk = (TDocumento_mask&) msk.get_sheet()->mask();
|
||||
|
||||
@ -123,14 +123,11 @@ void TGestione_bolle_msk::arrotonda(const TMask& msk, real& quantita)
|
||||
if (rcont.get_int(LVRCONDV_CALCCONS) == 1)
|
||||
{
|
||||
//calcolo di quanti pezzi sforo
|
||||
long arr = quantita.integer() % ppconf;
|
||||
const long arr = quantita.integer() % ppconf;
|
||||
|
||||
//calcolo quanti pezzi in più o in meno gli devo dare e aggiorno la quantità
|
||||
if (arr > ppconf * perarr / 100) //arr <= ppconf*perarr/100 -> formula calcolo congualgio di Tassan
|
||||
{
|
||||
arr = ppconf - arr;
|
||||
quantita += arr;
|
||||
}
|
||||
quantita += ppconf - arr;
|
||||
else
|
||||
quantita -= arr;
|
||||
}
|
||||
|
@ -578,7 +578,9 @@ void TEvasione_msk::genera_documento()
|
||||
|
||||
TLocalisamfile rcondv(LF_LVRCONDV);
|
||||
((TRectype&)rcont).put(LVRCONDV_QTACONG, cong);
|
||||
rcont.rewrite(rcondv);
|
||||
const int err = rcont.rewrite(rcondv);
|
||||
if (err != NOERR)
|
||||
cantwrite_box(rcondv.description());
|
||||
}
|
||||
|
||||
const TRectype& anamag = cache().get(LF_ANAMAG, codart);
|
||||
|
Loading…
x
Reference in New Issue
Block a user