Patch level : 10.0 patch 639
Files correlati : lv3 verig 24 Ricompilazione Demo : [ ] Commento : Corretto calcolo conguaglio git-svn-id: svn://10.65.10.50/trunk@20113 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0c2c76d65a
commit
0631df7108
@ -1218,7 +1218,6 @@ void TGestione_bolle_app::salva_conguaglio( const TMask& m)
|
||||
const real conat = rdoc.get_real(RDOC_QTA);
|
||||
rdoc.put(RDOC_QTAGG4, ritat);
|
||||
rdoc.put(RDOC_QTAGG3, conat);
|
||||
|
||||
}
|
||||
rcondv.rewrite();
|
||||
}
|
||||
|
@ -735,9 +735,8 @@ bool TGestione_buoni_msk::pre_codart_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
const real congor = rcont.get_real(LVRCONDV_QTACONG);
|
||||
|
||||
const real congat = conat - ritat + congor;
|
||||
|
||||
rdoc.put(RDOC_QTAGG5, congat); //conguaglio dopo modifica manuale
|
||||
const real congat = conat - conor - ritat + ritor + congor;
|
||||
msk.set(FR_QTAGG5, congat);
|
||||
|
||||
TLocalisamfile rcondv(LF_LVRCONDV);
|
||||
rcondv.put(LVRCONDV_CODCF,codcf);
|
||||
@ -1178,29 +1177,36 @@ void TGestione_buoni_app::elimina_vuote( const TMask& m)
|
||||
|
||||
void TGestione_buoni_app::salva_conguaglio( const TMask& m)
|
||||
{
|
||||
TDocumento_mask& mask = (TDocumento_mask&) m;
|
||||
TDocumento& d = mask.doc();
|
||||
if (ini_get_bool(CONFIG_DITTA, "lv", "Aggcong"))
|
||||
{
|
||||
TDocumento_mask& mask = (TDocumento_mask&) m;
|
||||
TDocumento& d = mask.doc();
|
||||
|
||||
TSheet_field& sheet = mask.sfield(F_SHEET);
|
||||
const long codcf = mask.get_long(F_CODCF);
|
||||
const int indsped = mask.get_int(F_CODINDSP);
|
||||
TDate datadoc = mask.get_date(F_DATADOC);
|
||||
TSheet_field& sheet = mask.sfield(F_SHEET);
|
||||
const long codcf = mask.get_long(F_CODCF);
|
||||
const int indsped = mask.get_int(F_CODINDSP);
|
||||
TDate datadoc = mask.get_date(F_DATADOC);
|
||||
|
||||
const TLaundry_contract cont(codcf, indsped, datadoc);
|
||||
const int codcont = cont.get_int(LVCONDV_CODCONT);
|
||||
const TLaundry_contract cont(codcf, indsped, datadoc);
|
||||
const int codcont = cont.get_int(LVCONDV_CODCONT);
|
||||
|
||||
TLocalisamfile rcondv(LF_LVRCONDV);
|
||||
|
||||
FOR_EACH_DOC_ROW_BACK(d, r, row)
|
||||
{
|
||||
TRiga_documento& rdoc = (TRiga_documento&)*row;
|
||||
rcondv.put(LVRCONDV_CODCF,codcf);
|
||||
rcondv.put(LVRCONDV_CODCONT, codcont);
|
||||
rcondv.put(LVRCONDV_CODART, rdoc.get(RDOC_CODART));
|
||||
if (rcondv.read() == NOERR)
|
||||
rcondv.put(LVRCONDV_QTACONG, rdoc.get_real(RDOC_QTAGG5));
|
||||
}
|
||||
rcondv.rewrite();
|
||||
TLocalisamfile rcondv(LF_LVRCONDV);
|
||||
|
||||
FOR_EACH_DOC_ROW_BACK(d, r, row)
|
||||
{
|
||||
TRiga_documento& rdoc = (TRiga_documento&)*row;
|
||||
rcondv.put(LVRCONDV_CODCF,codcf);
|
||||
rcondv.put(LVRCONDV_CODCONT, codcont);
|
||||
rcondv.put(LVRCONDV_CODART, rdoc.get(RDOC_CODART));
|
||||
if (rcondv.read() == NOERR)
|
||||
rcondv.put(LVRCONDV_QTACONG, rdoc.get_real(RDOC_QTAGG5));
|
||||
const real ritat = rdoc.get_real(RDOC_QTAGG1);
|
||||
const real conat = rdoc.get_real(RDOC_QTA);
|
||||
rdoc.put(RDOC_QTAGG4, ritat);
|
||||
rdoc.put(RDOC_QTAGG3, conat);
|
||||
}
|
||||
rcondv.rewrite();
|
||||
}
|
||||
}
|
||||
|
||||
//ridefinisco il metodo write delle TMotore_application
|
||||
|
@ -460,6 +460,13 @@ BEGIN
|
||||
FIELD RIFBCON
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER FR_QTAGG5 6 0
|
||||
BEGIN
|
||||
PROMPT 60 20 "Cong. "
|
||||
FLAGS "H"
|
||||
FIELD QTAGG5
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user