Patch level : 10.0
Files correlati : ve0.exe Ricompilazione Demo : [ ] Commento : Corretto calcolo giacenza e disponibilita' dopo un cambio di stato del documento git-svn-id: svn://10.65.10.50/trunk@19403 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b2a56fe7fb
commit
a2bd847611
@ -187,6 +187,9 @@ void TMotore_application::init_modify_mode( TMask& m )
|
|||||||
}
|
}
|
||||||
m.enable(DLG_ELABORA);
|
m.enable(DLG_ELABORA);
|
||||||
m.disable(F_STATO);
|
m.disable(F_STATO);
|
||||||
|
|
||||||
|
cached_article_balances(NULL); // Azzera cache delle giacenze
|
||||||
|
|
||||||
TString80 key;
|
TString80 key;
|
||||||
key << m.get(F_CODNUM);
|
key << m.get(F_CODNUM);
|
||||||
key << m.get(F_ANNO);
|
key << m.get(F_ANNO);
|
||||||
|
@ -1449,8 +1449,8 @@ void TDocumento_mask::update_giacenza()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TString8 annoes = get(F_ANNO);
|
const TString& annoes = get(F_ANNO);
|
||||||
TArticolo_giacenza & art = cached_article_balances(codart);
|
TArticolo_giacenza& art = cached_article_balances(codart);
|
||||||
|
|
||||||
giac = art.disponibilita(annoes, codmag, livello, TRUE);
|
giac = art.disponibilita(annoes, codmag, livello, TRUE);
|
||||||
disp = art.disponibilita(annoes, codmag, livello, FALSE);
|
disp = art.disponibilita(annoes, codmag, livello, FALSE);
|
||||||
|
@ -803,14 +803,14 @@ class TPrice_sheet : public TArray_sheet
|
|||||||
protected:
|
protected:
|
||||||
virtual bool get_ini_paragraph(const TEdit_field& f, TString& name) const;
|
virtual bool get_ini_paragraph(const TEdit_field& f, TString& name) const;
|
||||||
|
|
||||||
virtual void handler(WINDOW win, EVENT* ep);
|
virtual long handler(WINDOW win, EVENT* ep);
|
||||||
TEdit_field& field() { return _fld; }
|
TEdit_field& field() { return _fld; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TPrice_sheet(TEdit_field& f);
|
TPrice_sheet(TEdit_field& f);
|
||||||
};
|
};
|
||||||
|
|
||||||
void TPrice_sheet::handler(WINDOW win, EVENT* ep)
|
long TPrice_sheet::handler(WINDOW win, EVENT* ep)
|
||||||
{
|
{
|
||||||
if (ep->type == E_MOUSE_DOWN)
|
if (ep->type == E_MOUSE_DOWN)
|
||||||
{
|
{
|
||||||
@ -819,7 +819,7 @@ void TPrice_sheet::handler(WINDOW win, EVENT* ep)
|
|||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
MENU_ITEM* menu = xvt_res_get_menu(BROWSE_BAR);
|
MENU_ITEM* menu = xvt_res_get_menu(BROWSE_BAR);
|
||||||
if (menu)
|
if (menu != NULL && menu->child != NULL)
|
||||||
{
|
{
|
||||||
dictionary_translate_menu(menu);
|
dictionary_translate_menu(menu);
|
||||||
const PNT& p = ep->v.mouse.where;
|
const PNT& p = ep->v.mouse.where;
|
||||||
@ -834,7 +834,7 @@ void TPrice_sheet::handler(WINDOW win, EVENT* ep)
|
|||||||
xvt_menu_popup(menu->child, win, p, pa, NULL);
|
xvt_menu_popup(menu->child, win, p, pa, NULL);
|
||||||
xvt_res_free_menu_tree(menu);
|
xvt_res_free_menu_tree(menu);
|
||||||
}
|
}
|
||||||
return;
|
return 0L;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -848,19 +848,19 @@ void TPrice_sheet::handler(WINDOW win, EVENT* ep)
|
|||||||
{
|
{
|
||||||
case BROWSE_BAR + 1:
|
case BROWSE_BAR + 1:
|
||||||
save_columns_order(field());
|
save_columns_order(field());
|
||||||
return;
|
return 0L;
|
||||||
case BROWSE_BAR + 2:
|
case BROWSE_BAR + 2:
|
||||||
set_columns_order(NULL);
|
set_columns_order(NULL);
|
||||||
return;
|
return 0L;
|
||||||
case BROWSE_BAR + 3:
|
case BROWSE_BAR + 3:
|
||||||
fld(0).on_key(K_F11);
|
fld(0).on_key(K_F11);
|
||||||
return;
|
return 0L;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TArray_sheet::handler(win, ep);
|
return TArray_sheet::handler(win, ep);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TPrice_sheet::get_ini_paragraph(const TEdit_field& field, TString& parag) const
|
bool TPrice_sheet::get_ini_paragraph(const TEdit_field& field, TString& parag) const
|
||||||
@ -1714,29 +1714,22 @@ bool codart_handler(TMask_field& f, KEY key )
|
|||||||
}
|
}
|
||||||
|
|
||||||
const int pos = row_mask.id2pos(FR_CODIVA);
|
const int pos = row_mask.id2pos(FR_CODIVA);
|
||||||
|
|
||||||
if (pos >= 0)
|
if (pos >= 0)
|
||||||
iva_handler(row_mask.fld(pos), 0);
|
iva_handler(row_mask.fld(pos), 0);
|
||||||
|
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
TString16 caus(row_mask.get(FR_CAUS));
|
TString8 caus(row_mask.get(FR_CAUS));
|
||||||
|
if (caus.blank())
|
||||||
if (caus.empty())
|
|
||||||
caus = mask.get(F_CAUSMAG);
|
caus = mask.get(F_CAUSMAG);
|
||||||
|
|
||||||
|
if (caus.full())
|
||||||
if (caus.not_empty())
|
|
||||||
{
|
{
|
||||||
const TCausale_magazzino & c = cached_causale_magazzino(caus);
|
const TCausale_magazzino & c = cached_causale_magazzino(caus);
|
||||||
|
|
||||||
|
|
||||||
if (!c.movimenta_sospesi())
|
if (!c.movimenta_sospesi())
|
||||||
{
|
{
|
||||||
const TRectype & rec = cache().get(LF_ANAMAG, row_mask.get(FR_CODARTMAG));
|
const TRectype & rec = cache().get(LF_ANAMAG, row_mask.get(FR_CODARTMAG));
|
||||||
|
if (rec.get_bool(ANAMAG_SOSPESO))
|
||||||
|
|
||||||
if (rec.get_bool("SOSPESO"))
|
|
||||||
return error_box(TR("Articolo %s sospeso, quindi non movimentabile"), (const char *)codart);
|
return error_box(TR("Articolo %s sospeso, quindi non movimentabile"), (const char *)codart);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user