cg0500.cpp Aggiustata indentazione
cg2100k.uml Messo acceleratore sul tasto azzera cg2102.cpp Corretto handler della descrizione cg2106.cpp Corretto test sul prorata git-svn-id: svn://10.65.10.50/trunk@4799 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6aacb7e366
commit
0c40176cc3
@ -751,25 +751,22 @@ int TCaus_app::re_write(const TMask& m, bool re)
|
||||
for (int i = 0; i < ss().items(); i++)
|
||||
{
|
||||
TToken_string &riga = ss().row(i);
|
||||
const char sezione = riga.get_char(1);
|
||||
const char tipo_cf = riga.get_char();
|
||||
const int g = riga.get_int();
|
||||
|
||||
const int g = riga.get_int();
|
||||
if (g > 0)
|
||||
{
|
||||
const int row = i + 1 ;
|
||||
TRectype & r = _rcaus_rec->row(row, TRUE);
|
||||
const int c = riga.get_int();
|
||||
const long s = riga.get_long();
|
||||
TRectype & r = _rcaus_rec->row(i+1, TRUE);
|
||||
const char sezione = riga.get_char(1);
|
||||
const char tipo_cf = riga.get_char();
|
||||
const int c = riga.get_int();
|
||||
const long s = riga.get_long();
|
||||
riga.get(); // Salta descrizione conto
|
||||
const TString80 coddesc(riga.get());
|
||||
|
||||
r.put (RCA_CODDESC, coddesc);
|
||||
r.put (RCA_SEZIONE, sezione);
|
||||
r.put (RCA_TIPOCF, tipo_cf);
|
||||
r.put (RCA_GRUPPO , g);
|
||||
r.put (RCA_CONTO , c);
|
||||
r.put (RCA_GRUPPO, g);
|
||||
r.put (RCA_CONTO, c);
|
||||
r.put (RCA_SOTTOCONTO, s);
|
||||
r.put (RCA_CODDESC, coddesc);
|
||||
}
|
||||
}
|
||||
return _rcaus_rec->write(re);
|
||||
|
@ -9,7 +9,7 @@ END
|
||||
|
||||
BUTTON 102 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 "Azzera"
|
||||
PROMPT -13 -1 "~Azzera"
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
|
@ -962,7 +962,7 @@ bool TPrimanota_application::descr_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
TSheet_field& cg = app().cgs();
|
||||
const TString80 old = cg.row(first).get(8);
|
||||
if (old.blank)
|
||||
if (old.blank())
|
||||
{
|
||||
cg.row(first).add(f.get(), 8);
|
||||
cg.force_update(first);
|
||||
|
@ -292,7 +292,7 @@ void TPrimanota_application::set_colors()
|
||||
|
||||
bool TPrimanota_application::test_prorata()
|
||||
{
|
||||
if (iva() != iva_acquisti || !cgs().shown())
|
||||
if (iva() != iva_acquisti || !cgs().shown() || _as400)
|
||||
return TRUE;
|
||||
|
||||
bool esistono_righe_senza_tipo_detrazione = FALSE;
|
||||
@ -301,7 +301,8 @@ bool TPrimanota_application::test_prorata()
|
||||
for (int r = 0; r < righe_iva.items(); r++)
|
||||
{
|
||||
TToken_string& row = righe_iva.row(r);
|
||||
if (!row.empty_items())
|
||||
const real imposta = row.get(3);
|
||||
if (!imposta.is_zero())
|
||||
{
|
||||
const int tipodet = row.get_int(2);
|
||||
if (tipodet == 0)
|
||||
@ -310,20 +311,17 @@ bool TPrimanota_application::test_prorata()
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
bool ok = TRUE;
|
||||
if (esistono_righe_senza_tipo_detrazione)
|
||||
{
|
||||
const bool prorata100 = causale().reg().prorata() >= 100.0;
|
||||
const bool esistono_righe_iva_detraibile = type2pos('D') >= 0;
|
||||
|
||||
const bool esiste_riga_iva_detraibile = type2pos('D') >= 0;
|
||||
if (prorata100)
|
||||
ok = !esistono_righe_iva_detraibile;
|
||||
ok = !esiste_riga_iva_detraibile;
|
||||
else
|
||||
ok = esistono_righe_iva_detraibile;
|
||||
ok = esiste_riga_iva_detraibile;
|
||||
}
|
||||
|
||||
return ok;
|
||||
@ -331,11 +329,11 @@ bool TPrimanota_application::test_prorata()
|
||||
|
||||
bool TPrimanota_application::aggiusta_prorata()
|
||||
{
|
||||
TWait_cursor hourglass;
|
||||
|
||||
if (test_prorata())
|
||||
return FALSE;
|
||||
|
||||
begin_wait();
|
||||
|
||||
TRegistro& reg = causale().reg();
|
||||
const real prorata_attuale = reg.prorata();
|
||||
const real vecchio_prorata = prorata_attuale < 100.0 ? 100.0 : 0.0;
|
||||
@ -364,7 +362,6 @@ bool TPrimanota_application::aggiusta_prorata()
|
||||
break;
|
||||
}
|
||||
|
||||
end_wait();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user