Patch level : 10.0 286
Files correlati : pe0.exe Ricompilazione Demo : [ ] Commento : Preventivi/incarichi (Dinamica) git-svn-id: svn://10.65.10.50/trunk@18735 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1ffc386788
commit
4578193f88
@ -182,9 +182,10 @@ void TGestione_preventivo_msk::highlight_row(int row, bool dirty, bool update)
|
||||
|
||||
TVariable_mask * TGestione_preventivo_msk::riga_mask(int numriga)
|
||||
{
|
||||
const bool is_new = new_mask(numriga);
|
||||
TVariable_mask* m = TDocumento_mask::riga_mask(numriga);
|
||||
|
||||
if ( m != NULL)
|
||||
if (is_new && m != NULL)
|
||||
{
|
||||
const TRiga_documento& riga = doc()[numriga + 1];
|
||||
TEdit_field & tree = m->add_string(FR_JOLLY1, 0, "", 30, 50, 10, "D");
|
||||
|
@ -483,51 +483,41 @@ void TScontrino_mask::on_idle()
|
||||
|
||||
TVariable_mask * TScontrino_mask::riga_mask(int numriga)
|
||||
{
|
||||
const TRiga_documento& riga = doc()[numriga + 1];
|
||||
const TTipo_riga_documento& tiporiga = riga.tipo();
|
||||
TString16 name; tiporiga.mask_name(name);
|
||||
|
||||
TVariable_mask* m = (TVariable_mask *) maskrighe().objptr(name);
|
||||
const bool is_new = new_mask(numriga);
|
||||
TVariable_mask * m = TDocumento_mask::riga_mask(numriga);
|
||||
|
||||
if (m == NULL)
|
||||
if (is_new && m != NULL)
|
||||
{
|
||||
m = TDocumento_mask::riga_mask(numriga);
|
||||
|
||||
if ( m != NULL)
|
||||
const int pos = m->id2pos(FR_CODART);
|
||||
if (pos >= 0)
|
||||
{
|
||||
const int pos = m->id2pos(FR_CODART);
|
||||
if (pos >= 0)
|
||||
const TMask_field & f = m->field(FR_CODART);
|
||||
if (f.is_edit())
|
||||
{
|
||||
const TMask_field & f = m->field(FR_CODART);
|
||||
if (f.is_edit())
|
||||
{
|
||||
TBrowse * browse = ((TEdit_field &) f).browse();
|
||||
const char tipo_r = tiporiga.tipo();
|
||||
|
||||
if (browse )
|
||||
{
|
||||
const TCursor* cur = browse->cursor();
|
||||
|
||||
if (cur)
|
||||
{
|
||||
const int num = cur->file().num();
|
||||
TBrowse * browse = ((TEdit_field &) f).browse();
|
||||
|
||||
if (num == LF_ANAMAG || num == LF_CODCORR)
|
||||
m->set_handler( FR_CODART, scodart_handler );
|
||||
}
|
||||
if (browse)
|
||||
{
|
||||
const TCursor* cur = browse->cursor();
|
||||
|
||||
if (cur)
|
||||
{
|
||||
const int num = cur->file().num();
|
||||
|
||||
if (num == LF_ANAMAG || num == LF_CODCORR)
|
||||
m->set_handler( FR_CODART, scodart_handler );
|
||||
}
|
||||
}
|
||||
}
|
||||
if (m->id2pos(FR_QTA) >= 0)
|
||||
m->set_handler(FR_QTA, sqta_handler);
|
||||
if (m->id2pos(FR_PREZZO) >= 0)
|
||||
m->set_handler(FR_PREZZO, sprezzo_handler);
|
||||
if (m->id2pos(FR_RIDPREZZO) >= 0)
|
||||
m->set_handler(FR_RIDPREZZO, sriduzione_handler);
|
||||
}
|
||||
if (m->id2pos(FR_QTA) >= 0)
|
||||
m->set_handler(FR_QTA, sqta_handler);
|
||||
if (m->id2pos(FR_PREZZO) >= 0)
|
||||
m->set_handler(FR_PREZZO, sprezzo_handler);
|
||||
if (m->id2pos(FR_RIDPREZZO) >= 0)
|
||||
m->set_handler(FR_RIDPREZZO, sriduzione_handler);
|
||||
}
|
||||
return m;
|
||||
|
||||
}
|
||||
|
||||
bool TScontrino_mask::search_art_handler( TMask_field& f, KEY key )
|
||||
|
@ -932,6 +932,7 @@ public:
|
||||
virtual void user_set_row_handler(TMask& rm, short field, int index);
|
||||
|
||||
void reset_masks(const TString& tipo_doc);
|
||||
bool new_mask(int numriga) const;
|
||||
virtual TVariable_mask * riga_mask(int numriga);
|
||||
|
||||
TDocumento& doc() { return _doc; }
|
||||
|
@ -1055,6 +1055,15 @@ void TDocumento_mask::mask2doc()
|
||||
}
|
||||
}
|
||||
|
||||
bool TDocumento_mask::new_mask(int numriga) const
|
||||
{
|
||||
const TRiga_documento& riga = doc()[numriga + 1];
|
||||
const TTipo_riga_documento& tiporiga = riga.tipo();
|
||||
TString16 name; tiporiga.mask_name(name);
|
||||
|
||||
return _maskriga.objptr(name) == NULL;
|
||||
}
|
||||
|
||||
TVariable_mask* TDocumento_mask::riga_mask(int numriga)
|
||||
{
|
||||
const TRiga_documento& riga = doc()[numriga + 1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user