Patch level : 10.0 368

Files correlati     : ve0.exe
Ricompilazione Demo : [ ]
Commento            :

0001404: Selezionando la commessa scompare il centro di costo nei documenti
Stessa correzione per righe documento


git-svn-id: svn://10.65.10.50/trunk@19102 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-07-09 15:31:20 +00:00
parent d778bfcf4e
commit 6579bdfc1a
2 changed files with 27 additions and 23 deletions

View File

@ -1194,7 +1194,7 @@ TVariable_mask* TDocumento_mask::riga_mask(int numriga)
m->set_handler(DLG_USER, link_handler);
// Quasi qualsiasi cosa analitica va bene
const bool ca_active = _ges_ca && !(riga.is_descrizione() || riga.is_omaggio() || riga.is_sconto());
const bool ca_active = _ges_ca && !(riga.is_descrizione() || riga.is_sconto() /*|| riga.is_omaggio()*/);
if (ca_active)
{
const int page = m->win2page(m->fld(m->fields()-1).parent()); // Calcolo bastardo dell'ultima pagina

View File

@ -419,21 +419,21 @@ bool iva_handler( TMask_field& f, KEY key )
if (key == 0 || (key == K_ENTER && f.empty()))
{
const TString16 codiva = mask.condv().clifo().vendite().get(CFV_ASSFIS);
if (codiva.not_empty())
const TString& codiva = mask.condv().clifo().vendite().get(CFV_ASSFIS);
if (codiva.full())
f.set(codiva);
f.check();
}
if (key == 0 || (key == K_ENTER && f.empty()))
{
const TString4 codiva = mask.doc().codesiva();
if (codiva.not_empty())
const TString& codiva = mask.doc().codesiva();
if (codiva.full())
f.set(codiva);
f.check();
}
if (key == K_ENTER && /*f.focusdirty() &&*/ f.get().empty())
if (key == K_ENTER && /*f.focusdirty() &&*/ f.empty())
{
TMask & row_mask = f.mask();
const int r = row_mask.get_sheet()->selected() + 1;
@ -2557,25 +2557,29 @@ bool cms_mag_handler(TMask_field& f, KEY key)
const TSheet_field & s = *m.get_sheet();
TDocumento_mask & mask = (TDocumento_mask & )s.mask();
const TRectype & curr = m.efield(mask.cms_start_sh()).browse()->cursor()->curr();
const TString codcosto = curr.get(COMMESSE_CODCOSTO);
const TString & codcms = curr.get(COMMESSE_CODCMS);
const TString codcms = curr.get(COMMESSE_CODCMS);
if (mask.cdc_start_sh() >= 0 && mask.codcms_sh() != codcms) // && codcosto.full())
if (mask.codcms_sh() != codcms) // Cambio commessa
{
for (short i = mask.cdc_start_sh(); i <= mask.cdc_end_sh(); i++)
{
TEdit_field & e = m.efield(i);
const TFieldref * f = e.field();
if (f != NULL)
{
const int from = f->from();
const int to = f->to();
m.set(i, codcosto.sub(from, to), 0x2);
}
}
mask.codcms_sh() = codcms;
const TString codcosto = curr.get(COMMESSE_CODCOSTO);
if (mask.cdc_start_sh() > mask.cms_start_sh() && codcosto.full())
{
for (short i = mask.cdc_start_sh(); i <= mask.cdc_end_sh(); i++)
{
TEdit_field & e = m.efield(i);
const TFieldref * f = e.field();
if (f != NULL)
{
const int from = f->from();
const int to = f->to();
m.set(i, codcosto.sub(from, to), 0x2);
}
}
}
}
}
return true;
@ -2590,7 +2594,7 @@ bool cdc_mag_handler(TMask_field& f, KEY key)
bool codcms_handler(TMask_field& f, KEY key)
{
TDocumento_mask & mask = (TDocumento_mask & )f.mask();
TDocumento_mask& mask = (TDocumento_mask&)f.mask();
if ((key == K_TAB && f.focusdirty()) || key == K_ENTER)
{
const TRectype& curr = mask.efield(mask.cms_start()).browse()->cursor()->curr();