Corretta gestione causali contabili:
git-svn-id: svn://10.65.10.50/trunk@23 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a041c09044
commit
33be7ac1be
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
TPrimanota_application::TPrimanota_application()
|
||||
: _rel(NULL), _lastreg(0), _mode(0), _iva(nessuna_iva)
|
||||
: _rel(NULL), _lastreg(0), _mode(0), _iva(nessuna_iva)
|
||||
{
|
||||
memset(_msk, 0, sizeof(_msk));
|
||||
}
|
||||
@ -58,13 +58,14 @@ TMask* TPrimanota_application::load_mask(int n)
|
||||
{
|
||||
TSheet_field& is = (TSheet_field&)m->field(F_SHEETIVA);
|
||||
is.set_notify(iva_notify);
|
||||
is.sheet_mask().set_handler(101, imponibile_handler);
|
||||
is.sheet_mask().set_handler(102, codiva_handler);
|
||||
is.sheet_mask().set_handler(103, imposta_handler);
|
||||
is.sheet_mask().set_handler(108, conto_handler);
|
||||
is.sheet_mask().set_handler(109, suspended_handler);
|
||||
is.sheet_mask().set_handler(209, suspended_handler);
|
||||
is.sheet_mask().set_handler(309, suspended_handler);
|
||||
TMask& ism = is.sheet_mask();
|
||||
ism.set_handler(101, imponibile_handler);
|
||||
ism.set_handler(102, codiva_handler);
|
||||
ism.set_handler(104, imposta_handler);
|
||||
ism.set_handler(108, conto_handler);
|
||||
ism.set_handler(109, suspended_handler);
|
||||
ism.set_handler(209, suspended_handler);
|
||||
ism.set_handler(309, suspended_handler);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
@ -176,7 +177,7 @@ bool TPrimanota_application::changing_mask(int mode)
|
||||
_iva = nessuna_iva;
|
||||
|
||||
TString16 causale;
|
||||
// TString16 registro;
|
||||
// TString16 registro;
|
||||
int annoes = 0, annoiva = 0;
|
||||
|
||||
switch (mode)
|
||||
@ -192,9 +193,9 @@ bool TPrimanota_application::changing_mask(int mode)
|
||||
annoiva = _rel->lfile()->get_int("ANNOIVA");
|
||||
causale = _rel->lfile()->get("CODCAUS");
|
||||
giornale().read(annoes);
|
||||
// registro = _rel->lfile()->get("REG");
|
||||
// _causale.read(causale, 0);
|
||||
// _causale.reg().read(registro, annoiva);
|
||||
// registro = _rel->lfile()->get("REG");
|
||||
// _causale.read(causale, 0);
|
||||
// _causale.reg().read(registro, annoiva);
|
||||
read_caus(causale, annoiva);
|
||||
break;
|
||||
default:
|
||||
@ -224,11 +225,11 @@ void TPrimanota_application::init_mask(TMask& m)
|
||||
|
||||
if (_iva != nessuna_iva)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
TString16 fil; fil = "I0="; fil << (_iva == iva_acquisti ? '2' : '1');
|
||||
TEdit_field& f = (TEdit_field&)m.field(F_CODREG);
|
||||
f.browse()->cursor()->filter(fil);
|
||||
*/
|
||||
*/
|
||||
const int g = (_iva == iva_acquisti) ? 2 : 1;
|
||||
m.send_key(K_SHIFT+K_CTRL+'s', -g); // if iva_vendite show group 1
|
||||
m.send_key(K_SHIFT+K_CTRL+'h', g-3); // hide group 2
|
||||
@ -452,9 +453,9 @@ int TPrimanota_application::read(TMask& m)
|
||||
|
||||
riga.add(r.get("IMPONIBILE")); // Imponibile 101
|
||||
riga.add(r.get("CODIVA")); // IVA 102
|
||||
riga.add(r.get("IMPOSTA")); // Imposta 103
|
||||
riga.add(r.get("TIPOCR")); // C/R 104
|
||||
riga.add(r.get("TIPODET")); // Detrazione 105
|
||||
riga.add(r.get("TIPODET")); // Detrazione 103
|
||||
riga.add(r.get("IMPOSTA")); // Imposta 104
|
||||
riga.add(r.get("TIPOCR")); // C/R 105
|
||||
|
||||
int rigaimp = solaiva ? 0 : r.get_int("RIGAIMP");
|
||||
if (rigaimp > 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user