Patch level : 10.0 648

Files correlati     : lv3.exe ve0.exe ve1.exe ve5.exe ve6.exe
Ricompilazione Demo : [ ]
Commento            :

Se il documento ha una causale di lavanderia il magazzino collegato non viene piu' o prende dalla causale quindi)
Per ilaria e robero ( verificare che negli altri casi prenda il magazzino cllegato dal documento)


git-svn-id: svn://10.65.10.50/trunk@20149 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2010-02-21 08:43:38 +00:00
parent bb1ec57722
commit 32a44eaca9

View File

@ -145,6 +145,8 @@ public:
CHECKS(magc && strlen(magc) <= 5, "Invalid CODMAG ", magc);
_codmagc.add(magc);
}
void reset_magc(int r) { _codmagc.add("", r - 1); }
void destroy_magc(int r) { _codmagc.destroy(r - 1); }
};
const char* TMov_mag_doc::codmag_rauto(int r) const
@ -702,7 +704,8 @@ void TDocumento::copy_data(TRectype& dst, const TRectype& src)
// Memorizza tutti i campi chiave
const char provv = dst.get_char(RDOC_PROVV);
const int anno = dst.get_int(RDOC_ANNO);
const TString4 codnum = dst.get(RDOC_CODNUM);
const TString4 codnum = dst.get(RDOC_CODNUM);
const long numdoc = dst.get_long(RDOC_NDOC);
const int nriga = is_riga ? dst.get_int(RDOC_NRIGA) : 0;
const long idriga = is_riga ? dst.get_long(RDOC_IDRIGA) : 0;
@ -1270,9 +1273,15 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const
const TString & causcons = caulav.get("S2");
if (causcons.full())
{
mov[LF_RMOVMAG][j - 1].put(RMOVMAG_CODCAUS, causcons);
mov.reset_magc(j - 1);
}
else
{
mov.destroy_row(--j, true);
mov.destroy_magc(j);
}
}
const real qtarit = r.get(RDOC_QTAGG1);
@ -1282,6 +1291,7 @@ int TDocumento::write_rewrite(TBaseisamfile & f, bool re) const
{
TRectype & rm = mov.insert_row(j++);
mov.add_magc("");
rm.put(RMOVMAG_IMPIANTO, r.get(RDOC_IMPIANTO));
rm.put(RMOVMAG_LINEA, r.get(RDOC_LINEA));
rm.put(RMOVMAG_CODMAG, r.get(RDOC_CODMAGC));