Patch level : 10.0 patch 767
Files correlati : tp0.exe Ricompilazione Demo : [ ] Commento : 0001323: Trasferimento Pack: aggiornare anche la data del documento (DATADOC) in Campo nel caso di ritrasferimento di una bolla Nel caso in Pack venga modificata una bolla tra cui la data del documento quando viene effettuato il ritrasferimento delle bolle il programma deve aggiornare anche la data del documento (DATADOC) della bolla in CAMPO Dalla versione 3.2 git-svn-id: svn://10.65.10.50/trunk@20613 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0828edcf86
commit
6b4ecd83a6
120
ve/velib06.cpp
120
ve/velib06.cpp
@ -1474,88 +1474,90 @@ void TDocumento_mask::update_giacenza()
|
||||
return;
|
||||
}
|
||||
|
||||
TString16 livello;
|
||||
const int db_liv = doc().tipo().dbliv();
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
const char* liv = row.get(sf.cid2index(FR_LIV1+i));
|
||||
|
||||
if (*liv > ' ')
|
||||
livello << liv;
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
TString16 causmag = row.get(sf.cid2index(FR_CAUS));
|
||||
|
||||
if (causmag.blank())
|
||||
causmag = get(F_CAUSMAG);
|
||||
|
||||
if (causmag.full())
|
||||
if ( causmag.full())
|
||||
{
|
||||
const TCausale_magazzino& c = cached_causale_magazzino(causmag);
|
||||
TString16 livello;
|
||||
const int db_liv = doc().tipo().dbliv();
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
const char* liv = row.get(sf.cid2index(FR_LIV1+i));
|
||||
if (*liv > ' ')
|
||||
livello << liv;
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
_fconv_qta = UNO;
|
||||
if (codart.full() && causmag.full())
|
||||
{
|
||||
if (c.scarica_alternativi())
|
||||
_fconv_qta = UNO;
|
||||
if (c.scarica_alternativi())
|
||||
{
|
||||
const TString& alt = cached_article(codart).get(ANAMAG_CODARTALT);
|
||||
|
||||
if (alt.full())
|
||||
codart = alt;
|
||||
}
|
||||
if (db_liv > 0)
|
||||
{
|
||||
const int expl_row = doc().tipo().dbrow()-1; // Sul file .ini l'indice parte da 1!
|
||||
if (expl_row >= 0) // Evito esplosioni inutili in primis
|
||||
{
|
||||
TDistinta_tree db;
|
||||
TArray components;
|
||||
db.set_root(codart, "", 1, livello);
|
||||
const int expl_row = doc().tipo().dbrow()-1; // Sul file .ini l'indice parte da 1!
|
||||
if (expl_row >= 0) // Evito esplosioni inutili in primis
|
||||
{
|
||||
TDistinta_tree db;
|
||||
TArray components;
|
||||
db.set_root(codart, "", 1, livello);
|
||||
|
||||
const int items = db.explode(components, false, RAGGR_EXP_NONE, db_liv);
|
||||
if (items > 0 && expl_row < items) // Controllo se la riga esplosione desiderata e' valida
|
||||
{
|
||||
const TRiga_esplosione& r = (const TRiga_esplosione &)components[expl_row];
|
||||
codart = r.articolo(); // Cambio il codice articola da elaborare
|
||||
_fconv_qta = r.val();
|
||||
}
|
||||
}
|
||||
}
|
||||
const int items = db.explode(components, false, RAGGR_EXP_NONE, db_liv);
|
||||
if (items > 0 && expl_row < items) // Controllo se la riga esplosione desiderata e' valida
|
||||
{
|
||||
const TRiga_esplosione& r = (const TRiga_esplosione &)components[expl_row];
|
||||
codart = r.articolo(); // Cambio il codice articola da elaborare
|
||||
_fconv_qta = r.val();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
real giac, disp;
|
||||
TString8 codmag = row.get(sf.cid2index(FR_CODMAG));
|
||||
if (codmag.full())
|
||||
{
|
||||
const TString4 coddep = row.get(sf.cid2index(FR_CODDEP));
|
||||
if (coddep.full())
|
||||
codmag << coddep;
|
||||
}
|
||||
else
|
||||
{ // Cerca di determinare il magazzino di default, se manca sulla riga
|
||||
if (causmag.full())
|
||||
{
|
||||
const TCausale_magazzino& c = cached_causale_magazzino(causmag);
|
||||
if (c.has_default_mag())
|
||||
{
|
||||
codmag = c.default_mag();
|
||||
if (c.has_default_dep())
|
||||
codmag << c.default_dep();
|
||||
}
|
||||
}
|
||||
}
|
||||
TString8 codmag = row.get(sf.cid2index(FR_CODMAG));
|
||||
|
||||
if (codmag.full())
|
||||
{
|
||||
const TString4 coddep = row.get(sf.cid2index(FR_CODDEP));
|
||||
if (coddep.full())
|
||||
codmag << coddep;
|
||||
}
|
||||
else
|
||||
{ // Cerca di determinare il magazzino di default, se manca sulla riga
|
||||
if (causmag.full())
|
||||
{
|
||||
const TCausale_magazzino& c = cached_causale_magazzino(causmag);
|
||||
if (c.has_default_mag())
|
||||
{
|
||||
codmag = c.default_mag();
|
||||
if (c.has_default_dep())
|
||||
codmag << c.default_dep();
|
||||
}
|
||||
}
|
||||
}
|
||||
const TString& annoes = get(F_ANNO);
|
||||
TArticolo_giacenza& art = cached_article_balances(codart);
|
||||
|
||||
giac = art.disponibilita(annoes, codmag, livello, TRUE);
|
||||
disp = art.disponibilita(annoes, codmag, livello, FALSE);
|
||||
|
||||
if (db_liv == 0)
|
||||
{
|
||||
const TString4 um = row.get(sf.cid2index(FR_UMQTA));
|
||||
art.convert_to_um(giac, um);
|
||||
art.convert_to_um(disp, um);
|
||||
}
|
||||
}
|
||||
if (db_liv == 0)
|
||||
{
|
||||
const TString4 um = row.get(sf.cid2index(FR_UMQTA));
|
||||
art.convert_to_um(giac, um);
|
||||
art.convert_to_um(disp, um);
|
||||
}
|
||||
set(F_CURGIAC, giac.string());
|
||||
set(F_CURDISP, disp.string());
|
||||
}
|
||||
|
@ -2085,12 +2085,12 @@ bool qtaart_handler( TMask_field& f, KEY key )
|
||||
{
|
||||
TSheet_field& sf = mask.sfield(F_SHEET);
|
||||
TToken_string& row = sf.row(sf.selected());
|
||||
const TString codart = row.get(sf.cid2index(FR_CODARTMAG));
|
||||
const TCodice_articolo codart = row.get(sf.cid2index(FR_CODARTMAG));
|
||||
|
||||
if (codart.not_empty())
|
||||
if (codart.full())
|
||||
{
|
||||
TString16 codmag = row.get(sf.cid2index(FR_CODMAG));
|
||||
const TString16 coddep = row.get(sf.cid2index(FR_CODDEP));
|
||||
TString8 codmag = row.get(sf.cid2index(FR_CODMAG));
|
||||
const TString4 coddep = row.get(sf.cid2index(FR_CODDEP));
|
||||
if (!coddep.blank())
|
||||
codmag << coddep;
|
||||
|
||||
@ -2103,30 +2103,7 @@ bool qtaart_handler( TMask_field& f, KEY key )
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
if ((doc.tipo().check_giac() || doc.tipo().check_disp()) &&
|
||||
main_app().has_module(MGAUT, CHK_DONGLE) && doc.tipo().mov_mag())
|
||||
{
|
||||
TSheet_field& sf = mask.sfield(F_SHEET);
|
||||
TToken_string& row = sf.row(sf.selected());
|
||||
const TCodice_articolo codart = row.get(sf.cid2index(FR_CODARTMAG));
|
||||
|
||||
if (codart.full())
|
||||
{
|
||||
TString8 codmag = row.get(sf.cid2index(FR_CODMAG));
|
||||
const TString4 coddep = row.get(sf.cid2index(FR_CODDEP));
|
||||
if (!coddep.blank())
|
||||
codmag << coddep;
|
||||
|
||||
TString16 livello;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
const char* liv = row.get(sf.cid2index(FR_LIV1+i));
|
||||
if (*liv > ' ')
|
||||
livello << liv;
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
real qta(row.get(sf.cid2index(FR_QTA)));
|
||||
const TString16 caus(mask.get(F_CAUSMAG));
|
||||
const TCausale_magazzino & c = cached_causale_magazzino(caus);
|
||||
@ -2986,4 +2963,4 @@ bool datafcomp_handler(TMask_field& f, KEY key)
|
||||
return error_box("La data fine competenza non puo' essere antecedente alla data inizio competenza!");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user