Patch level : 10.0 patch ???
Files correlati : lv3 Ricompilazione Demo : [ ] Commento : Aggiunta lock dei documenti in uso git-svn-id: svn://10.65.10.50/trunk@20487 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1a65352873
commit
9e0c3d1683
@ -370,7 +370,15 @@ bool TGestione_bolle_msk::lv_bolla_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
f.set_focusdirty(false);
|
||||
|
||||
TDocumento& doc = dmsk.doc();
|
||||
TDocumento& doc = dmsk.doc();
|
||||
|
||||
TLocalisamfile fdoc(LF_DOC);
|
||||
int err = doc.read(fdoc, _isequal, _testandlock);
|
||||
if(err != NOERR)
|
||||
{
|
||||
warning_box(TR("Il documento è già in uso"));
|
||||
return false;
|
||||
}
|
||||
|
||||
TSheet_field& sheet = dmsk.sfield(F_SHEET);
|
||||
int nrighe = sheet.items();
|
||||
|
@ -364,7 +364,15 @@ bool TGestione_buoni_msk::set_righe_buono_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
f.set_focusdirty(false);
|
||||
|
||||
TDocumento& doc = dmsk.doc();
|
||||
TDocumento& doc = dmsk.doc();
|
||||
|
||||
TLocalisamfile fdoc(LF_DOC);
|
||||
int err = doc.read(fdoc, _isequal, _testandlock);
|
||||
if(err != NOERR)
|
||||
{
|
||||
warning_box(TR("Il documento è già in uso"));
|
||||
return false;
|
||||
}
|
||||
|
||||
TSheet_field& sheet = dmsk.sfield(F_SHEET);
|
||||
int nrighe = sheet.items();
|
||||
@ -506,7 +514,7 @@ bool TGestione_buoni_msk::set_righe_buono_handler(TMask_field& f, KEY k)
|
||||
sheet.destroy( );
|
||||
for (int i = 1; i <= righe; i++)
|
||||
{
|
||||
TRiga_documento & r = doc[i];
|
||||
TRiga_documento& r = doc[i];
|
||||
|
||||
doc[i].autoload(sheet);
|
||||
sheet.check_row(i - 1, 0x3);
|
||||
|
@ -247,6 +247,14 @@ bool TEvasione_ter_msk::precarica_righe()
|
||||
return false;
|
||||
}
|
||||
|
||||
TLocalisamfile fdoc(LF_DOC);
|
||||
int err = doc.read(fdoc, _isequal, _testandlock);
|
||||
if(err != NOERR)
|
||||
{
|
||||
warning_box(TR("Il documento è già in uso"));
|
||||
return false;
|
||||
}
|
||||
|
||||
const TString4 stato = cache().get("%TIP", ini_get_string(CONFIG_DITTA, "lv", "TIPODOC_PRE", NULL, 0), "S2").mid(2,1);
|
||||
|
||||
if (doc.get(DOC_STATO) == stato)
|
||||
|
@ -178,6 +178,14 @@ bool TInventario_ter_msk::precarica_righe()
|
||||
TDoc_key kinv(get_int(F_ANNO), ini_get_string(CONFIG_DITTA, "lv", "NUM_INV", NULL), get_long(F_NINV));
|
||||
TDoc_inventario inv(kinv);
|
||||
|
||||
TLocalisamfile fdoc(LF_DOC);
|
||||
int err = inv.read(fdoc, _isequal, _testandlock);
|
||||
if(err != NOERR)
|
||||
{
|
||||
warning_box(TR("L'inventario già in uso"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (inv.empty())
|
||||
{
|
||||
warning_box(TR("L'inventario cercato è inesistente"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user