Merge branch 'R_10_00' of http://10.65.20.17:7990/scm/campo/campo into R_10_00

This commit is contained in:
Sirio Builder 2019-02-13 17:47:15 +01:00
commit 5786bf2d8d
8 changed files with 19 additions and 82 deletions

View File

@ -586,15 +586,10 @@ bool TLiquidazione_app::ch_year_handler(TMask_field& f, KEY key)
(wht)f.mask().get_int(CG43_RDB_VERS) : all);
TMask& msk = f.mask();
const int vers = msk.get_int(CG43_RDB_VERS);
int m = (vers == 3) ? msk.get_int(CG43_LST_TRIM) : msk.get_int(CG43_LST_MESE);
app()._is_liq_acconto = (m == 20);
if (app()._is_liq_acconto)
m = 12;
const int m = (vers == 3) ? msk.get_int(CG43_LST_TRIM) : msk.get_int(CG43_LST_MESE);
const TRectype & lim = app().get_lim(m);
const bool def = lim.get_bool("B1");
const bool calc = app()._is_liq_acconto || (!def && (lim.empty() || lim.get_bool("B0")));
const bool calc = !def && (lim.empty() || lim.get_bool("B0"));
msk.set(CG43_CHK_CALCULATE, app()._lim_cleared && calc, 0x3);
msk.set(CG43_CHK_FINAL, app()._lim_cleared && def, 0x3);
@ -695,11 +690,6 @@ bool TLiquidazione_app::what_freq_handler(TMask_field& f, KEY key)
if (key == K_SPACE)
{
int month = f.mask().get_int(CG43_LST_MESE);
app()._is_liq_acconto = (month == 20);
if (app()._is_liq_acconto)
month = 12;
if (f.get()[0] == '3') // trimestre intelligente
{
if (month > 3)
@ -788,11 +778,7 @@ bool TLiquidazione_app::chk_calculate_handler(TMask_field& f, KEY key)
TMask& m = f.mask();
// Abilita solo se il mese di ricalcolo e' != 13 (annuale) e non e' checkkato il campo
const int vers = m.get_int(CG43_RDB_VERS);
int mese = vers == 3 ? m.get_int(CG43_LST_TRIM) : m.get_int(CG43_LST_MESE);
app()._is_liq_acconto = (mese == 20);
if (app()._is_liq_acconto)
mese = 12;
const int mese = vers == 3 ? m.get_int(CG43_LST_TRIM) : m.get_int(CG43_LST_MESE);
const bool abilita = m.get_bool(CG43_CHK_CALCULATE) && mese != 13;
m.enable(CG43_LST_CALC, abilita);
}
@ -907,19 +893,10 @@ bool TLiquidazione_app::set_liquidazione()
// handlers have set everything
_month = _what == trimestre ? m.get_int(CG43_LST_TRIM) : m.get_int(CG43_LST_MESE);
app()._is_liq_acconto = (_month == 20);
if (app()._is_liq_acconto)
{
_month = 12;
_recalc = one;
}
else
_recalc = m.get_bool(CG43_CHK_CALCULATE) ? one : never;
_year = m.get(CG43_FLD_ANNO);
_date = m.get(CG43_FLD_DATA);
_isprint = m.get_bool(CG43_CHK_STAMPA);
_recalc = m.get_bool(CG43_CHK_CALCULATE) ? one : never;
_printonly = !m.get_bool(CG43_CHK_CALCULATE);
_definitiva = m.get_bool(CG43_CHK_FINAL);

View File

@ -304,7 +304,6 @@ class TLiquidazione_app : public TPrint_application
int _monthinatt; // mese inizio attivita' (serve per differita)
bool _lim_cleared;
bool _definitiva;
bool _is_liq_acconto;
bool _end_cassa;
real _diff_ven_ap, _diff_ven_ap_iva, _diff_acq_ap, _diff_acq_ap_iva;

View File

@ -27,16 +27,15 @@ BEGIN
CHECKTYPE REQUIRED
END
LIST CG43_LST_MESE 20
LIST CG43_LST_MESE 15
BEGIN
PROMPT 28 3 "Periodo "
HELP "Mese per cui effettuare il calcolo liquidazione"
ITEM "13|13a liquid."
ITEM "20|Acconto Dicembre"
FLAGS "MP"
END
LIST CG43_LST_TRIM 20
LIST CG43_LST_TRIM 15
BEGIN
PROMPT 28 3 "Periodo "
HELP "Trimestre di cui effettuare il calcolo liquidazione"
@ -45,7 +44,6 @@ BEGIN
ITEM "9|3 Trimestre "
ITEM "12|4 Trimestre"
ITEM "13|13a liquid."
ITEM "20|Acconto Dicembre"
END
BOOLEAN CG43_CHK_CALCULATE

View File

@ -57,8 +57,7 @@ bool TLiquidazione_app::is_month_ok(int x, int mtocalc) const
{
// per l'annuale ritorna true per tutti i mesi da liquidare
ret = x <= 13;
}
}
return ret;
}
@ -139,12 +138,7 @@ bool TLiquidazione_app::is_date_ok(const TDate& d, int month, int liqmonth, int
else // Nuova selezione dal 1998 in poi
{
if (month <= 12)
{
if (_is_liq_acconto)
return (regyear == year) && ((regmonth == month && liqmonth == 0) || (liqmonth == month)) && (d.day() <= _ver->giorno_acc());
else
return (regyear == year) && ((regmonth == month && liqmonth == 0) || (liqmonth == month));
}
return (regyear == year) && ((regmonth == month && liqmonth == 0) || (liqmonth == month));
else // Annuale, month == 13
return (regyear == year && liqmonth != 12) || (regyear == year + 1 && liqmonth == 12);
}

View File

@ -1439,9 +1439,6 @@ void TLiquidazione_app::set_firm(_DescrItem& d)
if (d._s2 == "T")
tim_title << format(FR(" del %d° Trimestre %s"), d._f1/3, (const char*) _year);
else
if (_is_liq_acconto)
tim_title << format(FR(" al %d %s %s"), _ver->giorno_acc(), itom(d._f1), (const char*)_year);
else
tim_title << format(FR(" del mese di %s %s"), itom(d._f1), (const char*)_year);
}
@ -1503,9 +1500,6 @@ void TLiquidazione_app::set_att(_DescrItem& d)
if (d._s4 == "T")
tim_title << format(FR(" del %d° Trimestre %s"), d._f1 / 3, (const char*)_year);
else
if (_is_liq_acconto)
tim_title << format(FR(" al %d %s %s"), _ver->giorno_acc(), itom(d._f1), (const char*)_year);
else
tim_title << format(FR(" del mese di %s %s"), itom(d._f1), (const char*)_year);
}

View File

@ -457,14 +457,7 @@ bool TStampa_registri_app::mask_mese (TMask_field& f, KEY k)
if (id == MESE) //Per stampa su libro unico
mese = f.mask().get_int(MESE);
if (id == FINO_A_MESE)
{
mese = m.get_int(FINO_A_MESE); //Per stampa su bollato
if (mese == 20)
mese = 12;
if (mese == 12)
m.show(TIPO_RIEPILOGATIVO);
else m.hide(TIPO_RIEPILOGATIVO);
}
if (id == MESE)
{
if (mese == 12)
@ -477,10 +470,13 @@ bool TStampa_registri_app::mask_mese (TMask_field& f, KEY k)
m.hide (TIPO_RIEPILOGATIVO);
m.hide (RIF_VID);
}
mese = m.get_int(FINO_A_MESE); //Per stampa su bollato
if (mese == 20)
mese = 12;
}
if (id == FINO_A_MESE)
{
if (mese == 12)
m.show (TIPO_RIEPILOGATIVO);
else m.hide (TIPO_RIEPILOGATIVO);
}
}
if (k==K_TAB && f.mask().is_running())
{
@ -605,11 +601,6 @@ bool TStampa_registri_app::mask_libun (TMask_field& f, KEY k)
const TString& cod = f.mask().get(CODICE_LIBRO_IVA);
int fino_a_mese = f.mask().get_int(MESE);
if (fino_a_mese == 12)
f.mask().show(TIPO_RIEPILOGATIVO);
else f.mask().hide(TIPO_RIEPILOGATIVO);
int anno = f.mask().get_int(ANNO);
bool ok = false;
int last_mese = 13;
@ -1642,10 +1633,8 @@ void TStampa_registri_app::set_page_tot_reg()
} // for
}
if (printed)
{
flush();
fine_mese();
}
if (_stampa_plafonds)
stampa_plafonds(rr);
}
@ -2127,7 +2116,7 @@ bool TStampa_registri_app::print_IVAxCassa(int da_month, int a_month)
return false; // Ho stampato qualcosa?
}
int flags = 0x06;
int flags = 0x0;
FOR_EACH_ARRAY_ITEM(_riga_prospettoXcassa, r, obj)
{
const TRiga& ri = *(const TRiga*)obj;
@ -3764,14 +3753,9 @@ bool TStampa_registri_app::set_print(int n)
}
else //stampe definitive
{
_fino_a_mese = m.get_int(FINO_A_MESE);
_stampa_acconto = (_fino_a_mese == 20);
if (_stampa_acconto)
_fino_a_mese = 12;
if (_tipo_stampa == bollato || _tipo_stampa == rif_giornale)
{
_fino_a_mese = m.get_int(FINO_A_MESE);
_data_da = TDate(1, 1, _annoIVA); // Meglio cosi'
}
else //stampa su libro unico
@ -3787,12 +3771,6 @@ bool TStampa_registri_app::set_print(int n)
int giorni_del_mese = 31;
if (_fino_a_mese == 12)
{
TInteressi_IVA_table i; i.read(_annoIVA, _fino_a_mese);
giorni_del_mese = i.get_int("I0");
if (giorni_del_mese == 0)
giorni_del_mese = 20;
if (!_stampa_acconto)
giorni_del_mese = 31;
_tipo_riepilogativo = m.get(TIPO_RIEPILOGATIVO)[0];
}

View File

@ -57,7 +57,6 @@ class TStampa_registri_app : public TPrintapp
long _u_stampata, _primast, __firm, _uprotivap, _ditta;
long _numini, _pagine_stampate;
int _fino_a_mese, _cod_un_loc;
bool _stampa_acconto;
int _annoIVA, _r, _stampa_width, _mese_ultima_liq, _mese_credito;
int _stampa_len, _stampa_mese, _size_header;
real _totale_doc, _credito;
@ -121,7 +120,7 @@ public:
bool ricalcola(int);
bool stampa_riepilogo(int);
void stampa_prospetto_riepilogo(tiporeg, const TString&, const TString&, const bool);
void stampa_progressivi(TRiga_array&, TRigaiva_array&, tiporeg, const int);
void stampa_progressivi(TRiga_array&, TRigaiva_array&, tiporeg, const bool);
void set_choice_limits(TMask&);
void build_ditte_sheet(int flags);
tiporeg cerca_reg(const TString&);

View File

@ -158,20 +158,18 @@ BEGIN
GROUP 3
END
LISTBOX FINO_A_MESE 20
LISTBOX FINO_A_MESE 10
BEGIN
PROMPT 3 9 "Fino al mese "
HELP "Mese fino al quale eseguire la stampa"
ITEM "20|Acconto di dicembre"
FLAGS "M"
GROUP 1
END
LISTBOX MESE 20
LISTBOX MESE 10
BEGIN
PROMPT 3 9 "Mese "
HELP "Mese di cui eseguire la stampa"
ITEM "20|Acconto di dicembre"
FLAGS "M"
GROUP 2
END