Patch level : 10.0 508

Files correlati     : cg3.exe
Ricompilazione Demo : [ ]
Commento            :
0001434: Visualizzazione mastrini
Dalla visualizzazione mastrini , mi collego ad una registrazione senza modificarla : premo il tasto annulla per tirnare alla visualizzazione e da li non riesco piu' ad uscire, ne premere altro tasto funzionale. Si è di fatto bloccati su quella videata.


git-svn-id: svn://10.65.10.50/trunk@19601 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-11-10 14:30:36 +00:00
parent 9bc1a827a6
commit 2e123105ff
3 changed files with 30 additions and 20 deletions

View File

@ -2121,7 +2121,7 @@ class TGrid_mask : public TMask
protected: // TMask protected: // TMask
virtual TMask_field* parse_field(TScanner& sc); virtual TMask_field* parse_field(TScanner& sc);
virtual bool on_key(KEY k); virtual bool on_key(KEY k);
virtual void handler(WINDOW win, EVENT* ep); virtual long handler(WINDOW win, EVENT* ep);
static bool link_handler(TMask_field& f, KEY k); static bool link_handler(TMask_field& f, KEY k);
static bool new_handler(TMask_field& f, KEY k); static bool new_handler(TMask_field& f, KEY k);
@ -2244,7 +2244,7 @@ bool TGrid_mask::on_key(KEY k)
return TMask::on_key(k); return TMask::on_key(k);
} }
void TGrid_mask::handler(WINDOW win, EVENT* ep) long TGrid_mask::handler(WINDOW win, EVENT* ep)
{ {
static TGrid_field* _last_grid = NULL; static TGrid_field* _last_grid = NULL;
@ -2267,7 +2267,7 @@ void TGrid_mask::handler(WINDOW win, EVENT* ep)
xvt_menu_popup(menu->child, win, p, XVT_POPUP_CENTER, 0); xvt_menu_popup(menu->child, win, p, XVT_POPUP_CENTER, 0);
xvt_res_free_menu_tree(menu); xvt_res_free_menu_tree(menu);
} }
return; return 0L;
} }
} }
if (ep->type == E_COMMAND) if (ep->type == E_COMMAND)
@ -2281,10 +2281,10 @@ void TGrid_mask::handler(WINDOW win, EVENT* ep)
case BROWSE_BAR+3: _last_grid->on_key(K_F11); break; case BROWSE_BAR+3: _last_grid->on_key(K_F11); break;
default: break; default: break;
} }
return; return 0L;
} }
} }
TMask::handler(win, ep); return TMask::handler(win, ep);
} }

View File

@ -1018,8 +1018,14 @@ int TBalance::indicatore_bilancio(const TBill& b) const
TString16 str; TString16 str;
str.format("%d|%d", b.gruppo(), b.conto()); str.format("%d|%d", b.gruppo(), b.conto());
const int ib = atoi(cache().get(LF_PCON, str, PCN_INDBIL)); const int ib = atoi(cache().get(LF_PCON, str, PCN_INDBIL));
if (ib == 0) #ifdef DBG
NFCHECK("Impossibile stabilire l'indicatore di bilancio"); if (ib < 1 || ib > 5)
{
TString msg;
msg << "Impossibile stabilire l'indicatore di bilancio del conto " << b.gruppo() << ' ' << b.conto();
NFCHECK(msg);
}
#endif
return ib; return ib;
} }

View File

@ -34,20 +34,24 @@ static int codind2tipodet(const TString & codind, real& perc)
real indetraibile_al(const TString& codind, const TCausale& caus, int annodoc, int & tipodet) real indetraibile_al(const TString& codind, const TCausale& caus, int annodoc, int & tipodet)
{ {
real perc; real perc;
tipodet = 0;
if (caus.iva() == iva_acquisti || caus.iva() == nessuna_iva || caus.iva() == iva_errata) // Vendite sempre detraibili switch (caus.iva())
{ {
// Se prorata = 100% e' indetraibile case iva_acquisti:
const bool prorata100 = caus.reg().prorata100(annodoc); case nessuna_iva:
if (prorata100) case iva_errata:
{ if (caus.reg().prorata100(annodoc)) // Se prorata = 100% e' indetraibile
perc = CENTO; {
tipodet = 9; perc = CENTO;
} tipodet = 9;
else }
tipodet = codind2tipodet(codind, perc); else
} tipodet = codind2tipodet(codind, perc);
break;
default:
tipodet = 0; // Vendite sempre detraibili
break;
}
return perc; return perc;
} }