Correzioni gestione saldaconto.
git-svn-id: svn://10.65.10.50/trunk@2056 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
81d76ac704
commit
28806b097d
@ -264,7 +264,7 @@ bool TPrimanota_application::read_caus(const char* cod, int year)
|
||||
if (ins)
|
||||
{
|
||||
const long protiva = causale().reg().protocol() + 1;
|
||||
m->set(F_PROTIVA, protiva); // Aggiorna protocollo IVA
|
||||
m->set(F_PROTIVA, protiva, TRUE); // Aggiorna protocollo IVA
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1685,13 +1685,17 @@ bool TPrimanota_application::clifo_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key == K_TAB && f.active())
|
||||
{
|
||||
const long codice = atol(f.get());
|
||||
if (codice == 0)
|
||||
return TRUE;
|
||||
|
||||
TMask& m = f.mask();
|
||||
|
||||
const char cf = app().clifo();
|
||||
TRelation cliforel(LF_CLIFO); cliforel.add(LF_CFVEN, "TIPOCF=TIPOCF|CODCF=CODCF");
|
||||
TRectype& clifo = cliforel.curr();
|
||||
clifo.put(CLI_TIPOCF, cf);
|
||||
clifo.put(CLI_CODCF, f.get());
|
||||
clifo.put(CLI_CODCF, codice);
|
||||
cliforel.read();
|
||||
|
||||
if (!suspended_handler(f, key))
|
||||
@ -1707,10 +1711,14 @@ bool TPrimanota_application::clifo_handler(TMask_field& f, KEY key)
|
||||
TEdit_field& upi = m.efield(F_RIEPILOGO);
|
||||
upi.check_type(alleg == 3 ? CHECK_REQUIRED : CHECK_NORMAL);
|
||||
|
||||
if (m.get(F_CODPAG).empty())
|
||||
{
|
||||
const TString& s = clifo.get(CLI_CODPAG);
|
||||
if (s.not_empty()) m.set(F_CODPAG, s, TRUE);
|
||||
if (s.not_empty())
|
||||
m.set(F_CODPAG, s, TRUE);
|
||||
}
|
||||
|
||||
if (app().is_saldaconto())
|
||||
if (app().is_saldaconto() && f.focusdirty())
|
||||
{
|
||||
if (m.field(S_VALUTA).active())
|
||||
{
|
||||
@ -1913,7 +1921,11 @@ void TPrimanota_application::add_cgs_rit(bool fiscali)
|
||||
bool TPrimanota_application::protiva_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
bool ok = TRUE;
|
||||
if (key == K_ENTER && f.dirty() && f.mask().mode() == MODE_INS)
|
||||
TMask& m = f.mask();
|
||||
|
||||
if (m.insert_mode())
|
||||
{
|
||||
if (key == K_ENTER && f.dirty())
|
||||
{
|
||||
const long protiva = atol(f.get());
|
||||
const long protocol = app().causale().reg().protocol() + 1;
|
||||
@ -1922,15 +1934,13 @@ bool TPrimanota_application::protiva_handler(TMask_field& f, KEY key)
|
||||
protiva, protocol);
|
||||
|
||||
}
|
||||
else if (key == K_TAB && app().is_saldaconto() && f.mask().get(F_NUMRIF).empty())
|
||||
{
|
||||
if (app().npart_is_prot() && f.mask().is_running())
|
||||
else if (key == K_TAB && app().is_saldaconto() && m.get(F_NUMRIF).empty())
|
||||
{
|
||||
const TString16 piva(f.get());
|
||||
f.mask().set(F_NUMRIF, piva);
|
||||
if (app().npart_is_prot() && piva.not_empty())
|
||||
m.set(F_NUMRIF, piva);
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
@ -110,6 +110,7 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad,
|
||||
enable(S_SALDOACC, sa);
|
||||
|
||||
#ifdef __EXTRA__
|
||||
hide(S_RESIDUOPAG);
|
||||
const bool disabilita = TRUE;
|
||||
#else
|
||||
const bool disabilita = app().causale().tipomov() == 2;
|
||||
@ -1117,8 +1118,9 @@ bool TGame_mask::edit_pagamento(TPartita& p, int nriga, int nrata, int nrigp) co
|
||||
m.reset(S_RITENUTE); // Azzera ritenute
|
||||
}
|
||||
else
|
||||
{
|
||||
somma.put(PART_DESCR, m.get(S_DESCAGG)); // Aggiorna descrizione (comune ai pagamenti)
|
||||
|
||||
}
|
||||
TRectype newpag(oldpag);
|
||||
m.get_pag(newpag);
|
||||
|
||||
|
@ -3,12 +3,14 @@ PAGE "Rata pagamento" -1 -1 50 13
|
||||
DATE 101
|
||||
BEGIN
|
||||
PROMPT 1 1 "Scadenza "
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER 102 15
|
||||
BEGIN
|
||||
PROMPT 1 3 "Importo "
|
||||
PICTURE "."
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
BOOLEAN 111
|
||||
@ -21,6 +23,7 @@ NUMBER 103 15 2
|
||||
BEGIN
|
||||
PROMPT 1 4 "Importo valuta "
|
||||
PICTURE ".2"
|
||||
VALIDATE REQIF_FUNC 1 102
|
||||
END
|
||||
|
||||
NUMBER 104 6 2
|
||||
|
@ -36,17 +36,11 @@ BEGIN
|
||||
ITEM "4|Uguali finche' possibile" MESSAGE DISABLE,FS_NRATE
|
||||
END
|
||||
|
||||
NUMBER FS_NRATE 3
|
||||
BEGIN
|
||||
PROMPT 36 6 "Numero di rate "
|
||||
END
|
||||
|
||||
BOOLEAN FS_RECALC
|
||||
BEGIN
|
||||
PROMPT 58 5 "Ricalcolo automatico"
|
||||
MESSAGE TRUE ENABLE,FS_RDIFFER|ENABLE,FS_MCOMM|K_SPACE,FS_RDIFFER
|
||||
MESSAGE FALSE DISABLE,FS_RDIFFER|DISABLE,FS_MCOMM|DISABLE,FS_NRATE
|
||||
HELP "Attiva/disattiva il ricalcolo automatico delle scadenze"
|
||||
END
|
||||
|
||||
BOOLEAN FS_MCOMM
|
||||
@ -54,6 +48,11 @@ BEGIN
|
||||
PROMPT 36 5 "Mese commerciale"
|
||||
END
|
||||
|
||||
NUMBER FS_NRATE 3
|
||||
BEGIN
|
||||
PROMPT 36 6 "Numero di rate "
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING FS_NAMEPAG 27
|
||||
BEGIN
|
||||
|
@ -1374,19 +1374,17 @@ void TPagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
}
|
||||
}
|
||||
|
||||
if (_tpr > 3)
|
||||
{
|
||||
const bool abilita = _tpr <= 3;
|
||||
// disabilita campi da non toccare sulla prima rata
|
||||
if (_inited)
|
||||
{
|
||||
sf.disable_cell(0,1); // importo
|
||||
sf.disable_cell(0,2); // in valuta
|
||||
sf.disable_cell(0,3); // percentuale
|
||||
sf.enable_cell(0, 1, abilita); // importo
|
||||
sf.enable_cell(0, 2, abilita); // in valuta
|
||||
sf.enable_cell(0, 3, abilita); // percentuale
|
||||
}
|
||||
else
|
||||
{
|
||||
sf.disable_cell(0,1); // percentuale
|
||||
}
|
||||
sf.enable_cell(0, 1, abilita); // percentuale
|
||||
}
|
||||
|
||||
sf.force_update();
|
||||
@ -1395,11 +1393,14 @@ void TPagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
TPagamento::TPagamento(const char* codtab, const char* data) :
|
||||
_slicer(0.0,0), _new(FALSE), _imponibile(0.0), _imposta(0.0),
|
||||
_spese(0.0), _cambio(1.0), _code(codtab), _dirty(FALSE), _inited(FALSE),
|
||||
_def_tpr(1), _def_ulc(""), _round(0), _int_rate(30)
|
||||
_def_tpr(1), _def_ulc(""), _round(0), _int_rate(30), _tpr(0)
|
||||
{
|
||||
_fixd[0] = _fixd[1] = _fixd[2] = 0;
|
||||
if (data != NULL)
|
||||
if (data != NULL && *data)
|
||||
_inizio = data;
|
||||
else
|
||||
_inizio = TDate(TODAY);
|
||||
|
||||
if (_code.blank() || !read())
|
||||
_new = TRUE;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user