1994-08-12 10:52:49 +00:00
|
|
|
// of course this is -*-C++-*-
|
|
|
|
// Questa e' la famosa palla della liquidazione IVA
|
|
|
|
|
1994-11-16 15:49:47 +00:00
|
|
|
#ifndef __MASK_H
|
|
|
|
#include <mask.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __PRINTAPP_H
|
1994-08-12 10:52:49 +00:00
|
|
|
#include <printapp.h>
|
1994-11-16 15:49:47 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __TABUTIL_H
|
1994-08-12 10:52:49 +00:00
|
|
|
#include <tabutil.h>
|
1994-11-16 15:49:47 +00:00
|
|
|
#endif
|
1994-08-12 10:52:49 +00:00
|
|
|
|
1995-01-03 16:45:39 +00:00
|
|
|
class TProgind;
|
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
// ------------------------------------------------------------------
|
|
|
|
// Parametri modificabili
|
|
|
|
// ------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// da cambiare se la lira si appesantisce o in caso di
|
|
|
|
// inflazione polacca
|
|
|
|
// arrotondamento default
|
|
|
|
#define ROUND_LIRA (0)
|
|
|
|
#define ROUND_MILLELIRE (-3)
|
|
|
|
// picture default per i reali
|
|
|
|
// in caso di inflazione polacca occorrera' modificare la lunghezza
|
|
|
|
// e quindi cambiare le set_row in cg4304.cpp onde evitare overlap
|
|
|
|
#define REAL_PICTURE "###.###.###.###"
|
|
|
|
// IVA a debito da riportare al mese successivo
|
|
|
|
#define IVA_DA_RIPORTARE real(50000)
|
|
|
|
// detrazione per detraibili 6%
|
|
|
|
#define DETRAZIONE_6PERCENTO real(0.06)
|
|
|
|
// soglia che da' diritto alla liquidazione trimestrale per servizi
|
|
|
|
// currently trecentsesantamiliu'
|
|
|
|
#define SOGLIA_TRIM_SERVIZI real(360000000)
|
|
|
|
// soglia che da' diritto alla liquidazione trimestrale per altri
|
|
|
|
// currently un miliardun
|
|
|
|
#define SOGLIA_TRIM_ALTRE real(1000000000)
|
|
|
|
// minima percentuale di operazioni esenti per aver diritto al rimborso
|
|
|
|
// infrannuale
|
|
|
|
#define MIN_PARTE_ESENTE real(0.50)
|
|
|
|
// percentuale IVA da versare in acconto a dicembre
|
|
|
|
#define ACCONTO_DICEMBRE real(0.88)
|
|
|
|
//
|
|
|
|
// ------------------------------------------------------------------
|
|
|
|
// Fine parametri modificabili
|
|
|
|
// do not change below this line if you want me to work
|
1994-11-11 11:26:28 +00:00
|
|
|
// and you to keep your fucking ass healty
|
1994-08-12 10:52:49 +00:00
|
|
|
// ------------------------------------------------------------------
|
|
|
|
|
|
|
|
// per il campo I0 di pim
|
1994-09-02 10:41:59 +00:00
|
|
|
#define NETTO "1"
|
|
|
|
#define LORDO "2"
|
1994-08-12 10:52:49 +00:00
|
|
|
|
|
|
|
enum tiporeg { vendita = 1, acquisto = 2 };
|
|
|
|
enum recalc { needed = 1, one = 2, ever = 3, never = 4 };
|
|
|
|
enum wht { all = 1, mnt = 2, quarter = 3};
|
|
|
|
enum tbc { precedente = 1, incorso = 2};
|
|
|
|
|
|
|
|
// flags per gli items di stampa
|
|
|
|
#define CHG_PARMS 1 // cambiato qualcosa (attivita', ditta...)
|
|
|
|
#define PIM_ROW 2 // riga totali parziali per codiva
|
|
|
|
#define PLAFOND 3 // prospetto plafond
|
|
|
|
#define THE_END 4 // riepilogo finale
|
|
|
|
#define TOT_ROW 5 // totale dei pim (plm)
|
|
|
|
#define MISC_LIQ 6 // altri dati dichiarazione (ptm)
|
|
|
|
#define SET_FIRM 7 // dati ditta (senza attivita')
|
|
|
|
#define ANNUAL 8 // prospetto annuale (prorata etc.)
|
|
|
|
#define VENTILA 9 // prospetto ventilazione
|
|
|
|
#define REGAGR 10 // prospetto regime agricolo
|
|
|
|
#define REGVIA 11 // prospetto agenzie viaggio
|
|
|
|
#define RIMBORSO 12 // prospetto rimborso infraannuale
|
|
|
|
#define ACCONTO 13 // riga prospetto acconti
|
|
|
|
#define ACCHEAD 14 // header prospetto acconti
|
|
|
|
|
|
|
|
// ...............................................................
|
|
|
|
// support structs
|
|
|
|
// ...............................................................
|
1994-09-02 10:41:59 +00:00
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
class _VentItem : public TObject
|
|
|
|
{
|
|
|
|
public: // non e' bello, ma non e' bello neanche dover fare un
|
1994-09-02 10:41:59 +00:00
|
|
|
// TObject per poter mettere una struct in un TArray
|
1994-08-12 10:52:49 +00:00
|
|
|
real _imposta; // per comodita'
|
|
|
|
real _aliquota; // aliquota iva
|
|
|
|
real _totale; // totale acquisti
|
1994-12-07 09:03:51 +00:00
|
|
|
TString _codiva; // codice iva
|
1994-09-02 10:41:59 +00:00
|
|
|
_VentItem() : _imposta(0.0), _totale(0.0) {}
|
1994-08-12 10:52:49 +00:00
|
|
|
virtual ~_VentItem() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
class _VendItem : public TObject
|
|
|
|
{
|
|
|
|
public: // vedi sopra per le fisime morali
|
1994-12-07 09:03:51 +00:00
|
|
|
real _totale; // totale vendite per registro/tipo det.
|
1994-08-12 10:52:49 +00:00
|
|
|
TString _codreg; // codice registro
|
|
|
|
int _month; // mese
|
1994-12-07 09:03:51 +00:00
|
|
|
int _tipodet; // tipo detraibilita'
|
1994-08-12 10:52:49 +00:00
|
|
|
_VendItem() : _codreg(5) {}
|
|
|
|
virtual ~_VendItem() {}
|
|
|
|
};
|
|
|
|
|
1994-10-12 12:01:23 +00:00
|
|
|
class _CorrItem : public TObject
|
|
|
|
{
|
|
|
|
public: // vedi sopra per le fisime morali
|
|
|
|
real _totale; // totale vendite per registro
|
|
|
|
TString _codreg; // codice registro
|
|
|
|
int _month; // mese
|
|
|
|
real _aliquota; // aliquota iva
|
|
|
|
TString _codiva; // codice iva
|
1994-12-07 09:03:51 +00:00
|
|
|
int _tipodet; // tipo detraibilita'
|
1994-10-12 12:01:23 +00:00
|
|
|
_CorrItem() : _codreg(5) {}
|
|
|
|
virtual ~_CorrItem() {}
|
|
|
|
};
|
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
class _DescrItem : public TObject
|
|
|
|
// Sembra triste e brutto esattamente come i files tabella
|
|
|
|
// Ma la verita' e' che non e' affatto inefficiente
|
|
|
|
// e che mi piace, nei limiti dell'entusiasmo concessomi, moltissimo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
word _flags;
|
|
|
|
word _f0, _f1, _f2,
|
1994-09-02 10:41:59 +00:00
|
|
|
_f3;
|
1994-08-12 10:52:49 +00:00
|
|
|
TString _s0, _s1, _s2,
|
1994-09-02 10:41:59 +00:00
|
|
|
_s3, _s4;
|
1994-08-12 10:52:49 +00:00
|
|
|
real _r0, _r1, _r2,
|
1994-09-02 10:41:59 +00:00
|
|
|
_r3, _r4, _r5,
|
|
|
|
_r6, _r7, _r8,
|
|
|
|
_r9, _r10,_r11;
|
1994-08-12 10:52:49 +00:00
|
|
|
TArray _arr;
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
_DescrItem(word f) : _f0(0), _f1(0), _f2(0), _arr(4)
|
1994-09-02 10:41:59 +00:00
|
|
|
{ _flags = f; }
|
1994-08-12 10:52:49 +00:00
|
|
|
virtual ~_DescrItem()
|
1994-09-02 10:41:59 +00:00
|
|
|
{ }
|
1994-08-12 10:52:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class _ErrItem : public TObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TString _err;
|
|
|
|
TString _att;
|
|
|
|
TString _firm;
|
|
|
|
_ErrItem(const char* err, const char* att, const char* firm)
|
1994-09-02 10:41:59 +00:00
|
|
|
{ _err = err; _att = att; _firm = firm; }
|
1994-08-12 10:52:49 +00:00
|
|
|
virtual ~_ErrItem() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
// Application
|
|
|
|
// ------------------------------------------------------------------------
|
|
|
|
|
1994-11-16 15:49:47 +00:00
|
|
|
class TLiquidazione_app : public TPrint_application
|
1994-08-12 10:52:49 +00:00
|
|
|
{
|
|
|
|
TArray_sheet* _ditte;
|
|
|
|
wht _what;
|
|
|
|
TBit_array _selected;
|
|
|
|
TString _year; // anno di calcolo
|
|
|
|
int _month; // mese da calcolare
|
|
|
|
TDate _date; // data di stampa
|
|
|
|
bool _isprint; // vuoi stampare o no?
|
1995-01-18 10:54:05 +00:00
|
|
|
bool _canprint; // PUOI stampare o no?
|
1994-12-29 14:49:03 +00:00
|
|
|
bool _printonly; // calcolo definitivo
|
1994-08-12 10:52:49 +00:00
|
|
|
recalc _recalc; // tipo ricalcolo scelto
|
|
|
|
bool _isplafond; // plafond importatori abituali
|
|
|
|
bool _isvent; // ventilazione
|
|
|
|
bool _isagricolo; // regime agricolo
|
|
|
|
bool _isviaggio; // regime agenzie viaggio
|
|
|
|
bool _isbenzinaro; // regime benzinaro
|
|
|
|
bool _isannual; // dichiarazione annuale
|
|
|
|
bool _mixed; // attivita' mista
|
|
|
|
bool _isriepilogo; // 13a liq
|
|
|
|
bool _isservizio; // servizi, professionisti, artisti
|
|
|
|
bool _isrimborso; // vuole il rimborso infraannuale
|
1995-01-05 12:01:12 +00:00
|
|
|
bool _isricacq; // ricalcolo imposte acq. riv (par. ditta)
|
1995-01-19 12:43:16 +00:00
|
|
|
bool _isdifferita; // liquidazione differita
|
1994-08-12 10:52:49 +00:00
|
|
|
bool _calcall; // tutte le ditte nessuna esclusa
|
|
|
|
bool _isbase; // stampa base di calcolo acconto
|
|
|
|
tbc _basecalc; // tipo base di calcolo acconto
|
|
|
|
TString _freqviva; // frequenza versamenti (M|T}
|
|
|
|
long _n_ditte; // numero ditte
|
|
|
|
bool _comp_acconto; // stiamo calcolando l'acconto
|
|
|
|
TArray _nomiditte; // array descr. ditte per sheet
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
TProgind* _prind;
|
|
|
|
int _row;
|
|
|
|
TArray _vend_arr; // tabella vendite per ventilazione
|
1994-10-07 09:34:13 +00:00
|
|
|
TArray _corr_arr; // tabella corrispettivi
|
1994-08-12 10:52:49 +00:00
|
|
|
TArray _vent_arr; // tabella acquisti per ventilazione
|
|
|
|
TArray _descr_arr; // things to be printed
|
|
|
|
TArray _errors; // errors to notify
|
|
|
|
|
|
|
|
// totali vari per attivita'
|
|
|
|
real _p8, _p8b, _p9; // totali plafond
|
|
|
|
real _prorata; // percentuale indetraibilita' (prorata)
|
1994-11-07 08:12:30 +00:00
|
|
|
long __firm; // ditta selezionata all'inizio
|
1994-12-16 10:14:26 +00:00
|
|
|
bool _is_interactive; // lanciata da menu o da altro prog
|
|
|
|
bool _is_visliq; // lanciata da visualizzazione liquidazione
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-12-16 10:14:26 +00:00
|
|
|
static real CENTO;
|
1994-08-12 10:52:49 +00:00
|
|
|
|
|
|
|
// main cursor
|
|
|
|
TRelation* _rel;
|
|
|
|
TCursor* _cur;
|
|
|
|
|
|
|
|
// files, tables
|
|
|
|
TRelation* _nditte;
|
|
|
|
TLocalisamfile* _mov;
|
|
|
|
TLocalisamfile* _rmoviva;
|
|
|
|
|
|
|
|
TTable* _pim;
|
|
|
|
TTable* _plm;
|
|
|
|
TTable* _ptm;
|
|
|
|
TTable* _lim;
|
|
|
|
TTable* _pla;
|
|
|
|
TTable* _ppa;
|
|
|
|
TTable* _reg;
|
|
|
|
TTable* _iva;
|
|
|
|
TTable* _del;
|
|
|
|
TTable* _lia;
|
|
|
|
|
|
|
|
// a reference rectype per file/table
|
|
|
|
TRectype* _mov_r;
|
|
|
|
TRectype* _rmoviva_r;
|
|
|
|
TRectype* _iva_r;
|
|
|
|
TRectype* _pim_r;
|
|
|
|
TRectype* _reg_r;
|
|
|
|
TRectype* _nditte_r;
|
|
|
|
TRectype* _pla_r;
|
|
|
|
TRectype* _plm_r;
|
|
|
|
TRectype* _ptm_r;
|
|
|
|
TRectype* _ppa_r;
|
1994-11-30 09:33:40 +00:00
|
|
|
TRectype* _lim_r;
|
1994-08-12 10:52:49 +00:00
|
|
|
TRectype* _del_r;
|
|
|
|
TRectype* _att_r;
|
|
|
|
|
|
|
|
// recfields for each stronz codtab
|
|
|
|
TRecfield* _pim_anno;
|
|
|
|
TRecfield* _pim_codatt;
|
|
|
|
TRecfield* _pim_codreg;
|
|
|
|
TRecfield* _pim_mese;
|
|
|
|
TRecfield* _pim_tipocr;
|
|
|
|
TRecfield* _pim_codiva;
|
1994-12-07 09:03:51 +00:00
|
|
|
TRecfield* _pim_tipodet;
|
1994-08-12 10:52:49 +00:00
|
|
|
TRecfield* _ppa_year;
|
|
|
|
TRecfield* _ppa_codatt;
|
|
|
|
TRecfield* _ppa_month;
|
|
|
|
TRecfield* _ppa_kind;
|
|
|
|
TRecfield* _plm_anno;
|
|
|
|
TRecfield* _plm_codatt;
|
|
|
|
TRecfield* _plm_mese;
|
|
|
|
TRecfield* _ptm_anno;
|
|
|
|
TRecfield* _ptm_codatt;
|
|
|
|
TRecfield* _ptm_mese;
|
|
|
|
TRecfield* _pla_anno;
|
|
|
|
TRecfield* _pla_codatt;
|
|
|
|
TRecfield* _del_ditta;
|
|
|
|
TRecfield* _del_anno;
|
|
|
|
TRecfield* _del_mese;
|
|
|
|
TRecfield* _del_tipo;
|
1994-11-30 09:33:40 +00:00
|
|
|
TRecfield* _lim_anno;
|
1995-01-03 16:45:39 +00:00
|
|
|
TRecfield* _lim_mese;
|
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
|
1994-12-29 14:49:03 +00:00
|
|
|
protected:
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-10-13 08:04:02 +00:00
|
|
|
long select_firm_range(long from, long to, wht freq);
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1995-01-03 16:45:39 +00:00
|
|
|
static bool ch_year_handler(TMask_field& f, KEY key);
|
1994-12-29 14:49:03 +00:00
|
|
|
static bool to_ditt_handler(TMask_field& f, KEY key);
|
|
|
|
static bool fr_ditt_handler(TMask_field& f, KEY key);
|
|
|
|
static bool to_butt_handler(TMask_field& f, KEY key);
|
|
|
|
static bool fr_butt_handler(TMask_field& f, KEY key);
|
|
|
|
static bool what_freq_handler(TMask_field& f, KEY key);
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-12-29 14:49:03 +00:00
|
|
|
static TLiquidazione_app& app() { return (TLiquidazione_app&)main_app(); }
|
1994-10-13 08:04:02 +00:00
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
public:
|
1994-09-02 10:41:59 +00:00
|
|
|
|
1994-11-11 11:26:28 +00:00
|
|
|
virtual bool user_create();
|
|
|
|
virtual bool user_destroy();
|
1994-08-12 10:52:49 +00:00
|
|
|
virtual bool set_print(int i);
|
1995-01-03 16:45:39 +00:00
|
|
|
|
1994-12-29 14:49:03 +00:00
|
|
|
// cazzatelle per handlers
|
|
|
|
TArray_sheet* get_ditte_sheet() { return _ditte; }
|
|
|
|
TBit_array& get_selected() { return _selected; }
|
|
|
|
void build_ditte_sheet(wht);
|
|
|
|
void reset_choices(TMask&);
|
|
|
|
void set_choice_limits(TMask&);
|
1995-01-03 16:45:39 +00:00
|
|
|
void build_nomiditte(TProgind* pnd = NULL);
|
|
|
|
void set_year(const char* y) { _year = y; }
|
1994-08-12 10:52:49 +00:00
|
|
|
|
|
|
|
bool set_liquidazione();
|
|
|
|
bool recalc_all();
|
|
|
|
|
|
|
|
// ricalcolo progressivi mese
|
|
|
|
bool update_firm (int month, bool recalc = TRUE);
|
|
|
|
bool update_att (int month, const char* codatt, bool recalc = TRUE);
|
|
|
|
void zero_att (int month, const char* codatt);
|
|
|
|
void recalc_att (int month, const char* codatt);
|
|
|
|
void recalc_annual (const char* codatt);
|
|
|
|
_DescrItem* recalc_rimborso(int month, const char* codatts);
|
1995-01-18 10:54:05 +00:00
|
|
|
|
|
|
|
// ricalcolo liquidazioni dai progressivi mensili
|
1994-08-12 10:52:49 +00:00
|
|
|
void write_liq (int month, const char* atts);
|
1995-01-18 10:54:05 +00:00
|
|
|
|
|
|
|
// ritorna l'eventuale ma sempre appropriato debito (< 50.000)
|
|
|
|
real debt_prec(int month);
|
|
|
|
// ritorna il risultato della liquidazione del mese
|
|
|
|
// non considera il conguaglio prorata (annuale)
|
|
|
|
real result_liq(int month);
|
1994-08-12 10:52:49 +00:00
|
|
|
// ritorna l'appropriato credito precedente al mese in corso
|
|
|
|
real credito_prec(int month);
|
|
|
|
// ritorna l'appropriato credito di costo precedente al mese in corso
|
|
|
|
// (travel agency only)
|
1995-01-18 10:54:05 +00:00
|
|
|
real credito_costo_prec(int month);
|
|
|
|
// ritorna i versamenti effettuati nel mese
|
1995-01-12 14:46:51 +00:00
|
|
|
real versamenti_IVA(int month, bool acconto = FALSE);
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
// supporto stampa
|
|
|
|
void describe_firm(int month);
|
1995-01-18 10:54:05 +00:00
|
|
|
void describe_att(int month, const char* codatt, bool isresult);
|
1994-08-12 10:52:49 +00:00
|
|
|
void describe_name(int month, TToken_string& atts);
|
|
|
|
void describe_plafond(int month, const char* codatt);
|
|
|
|
void describe_ventilation(int month, const char* codatt);
|
|
|
|
void describe_agricolo(int month, const char* codatt);
|
|
|
|
void describe_viaggio(int month, const char* codatt);
|
|
|
|
void describe_pims(int month, const char* codatt);
|
|
|
|
void describe_liq(int month, const char* codatts, _DescrItem* d = NULL);
|
|
|
|
void describe_error(const char* errstr, const char* codatt);
|
|
|
|
void describe_annual(const char* codatt);
|
|
|
|
void describe_consistence(const char* codatt);
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-10-07 09:34:13 +00:00
|
|
|
// corrispettivi
|
|
|
|
void recalc_corrispettivi (int month, const char* codatt);
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
// ventilasiun
|
|
|
|
void recalc_ventilation (int month, const char* codatt);
|
|
|
|
|
|
|
|
// plafond
|
|
|
|
void zero_plafond (int month, const char* codatt);
|
|
|
|
void add_plafond (int month, const char* codatt, int type,
|
1994-09-02 10:41:59 +00:00
|
|
|
real& howmuch, bool intra);
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
// ritorna l'aliquota ordinaria dal
|
|
|
|
// codice IVA apposito immesso nei parametri studio
|
|
|
|
real aliquota_agvia();
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
// ritorna l'interesse per il mese in questione (dai parametri studio)
|
|
|
|
real interesse_trimestrale(int month);
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
// minchia di puro suino
|
1994-12-07 09:03:51 +00:00
|
|
|
void add_vendite (int month, const char* codreg, int tipodet, real& r);
|
1994-08-12 10:52:49 +00:00
|
|
|
void add_ventilation (real iva, real sum, const char* codiva);
|
1994-10-12 12:01:23 +00:00
|
|
|
void add_corrisp (int month, const char* codreg, real& r, real& p,
|
1994-12-07 09:03:51 +00:00
|
|
|
int tipodet, const char * codiva);
|
1994-08-12 10:52:49 +00:00
|
|
|
|
|
|
|
// printappings
|
|
|
|
virtual void set_page(int file, int counter);
|
|
|
|
virtual bool preprocess_page(int file, int counter);
|
|
|
|
virtual print_action postprocess_page(int file, int counter);
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
// settaggio righe per ogni elemento di _descr_arr
|
|
|
|
void set_plafond(_DescrItem& d);
|
|
|
|
void set_ventila(_DescrItem& d);
|
|
|
|
void set_regagr(_DescrItem& d);
|
|
|
|
void set_viaggio(_DescrItem& d);
|
|
|
|
void set_firm(_DescrItem& d);
|
|
|
|
void set_att(_DescrItem& d);
|
|
|
|
void set_pim(_DescrItem& d);
|
|
|
|
void set_plm(_DescrItem& d);
|
|
|
|
void set_ptm(_DescrItem& d);
|
1994-12-27 16:28:35 +00:00
|
|
|
bool set_annual(_DescrItem& d);
|
1994-08-12 10:52:49 +00:00
|
|
|
void set_grand(_DescrItem& d);
|
|
|
|
|
|
|
|
// cercapalle in tabelle con opzione di creazione se serve
|
|
|
|
bool look_pim(int m, const char* a, const char* r, const char* cr,
|
1994-12-07 09:03:51 +00:00
|
|
|
const char* i, int tipodet = 0, bool create = FALSE);
|
1994-08-12 10:52:49 +00:00
|
|
|
bool look_plm(int m, const char* a, bool create = FALSE);
|
|
|
|
bool look_ptm(int m, const char* a, bool create = FALSE);
|
|
|
|
bool look_lim(int m, bool create = FALSE);
|
|
|
|
bool look_pla(const char* a, bool create = FALSE);
|
|
|
|
bool look_ppa(int m, const char* a, int t, bool create = FALSE);
|
|
|
|
bool look_del(int month, int type, bool create = FALSE);
|
|
|
|
bool look_iva(const char* cod);
|
|
|
|
bool look_reg(const char* reg);
|
|
|
|
bool look_lia(bool create = FALSE, int anno = 0);
|
1995-01-18 10:54:05 +00:00
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
_VendItem* look_vendita(int m, const char* codreg);
|
|
|
|
_VentItem* look_ventilation(int m, const char* codreg);
|
|
|
|
|
|
|
|
// tutti i controlli del mondo sui mesi da calcolare
|
1994-12-29 14:49:03 +00:00
|
|
|
static bool is_trim (int x);
|
1995-01-18 10:54:05 +00:00
|
|
|
// is_month_ok controlla che il mese passato sia
|
|
|
|
// da prendere in considerazione per la liquidazione
|
|
|
|
// controllando il regime trimestrale o mensile
|
|
|
|
bool is_month_ok(int x, int mtocalc);
|
|
|
|
// is_month_ok_strict controlla che il mese sia OK per la
|
|
|
|
// liquidazione, ma ritorna TRUE per le trimestrali solo
|
|
|
|
// se il mese cade ESATTAMENTE su un trimestre
|
|
|
|
bool is_month_ok_strict(int x, int month = -1);
|
1994-08-12 10:52:49 +00:00
|
|
|
bool is_date_ok (TDate& d, int month);
|
|
|
|
bool is_first_month (int m);
|
|
|
|
int previous_month (int m);
|
1995-01-18 10:54:05 +00:00
|
|
|
bool check_month(int m, int mref);
|
|
|
|
|
1994-08-12 10:52:49 +00:00
|
|
|
// Funzioni accessorie: estrazione deleghe
|
|
|
|
bool set_deleghe();
|
|
|
|
bool extract_deleghe();
|
|
|
|
bool extract_delega(int m);
|
|
|
|
|
|
|
|
// Funzioni accessorie: calcolo acconto dicembre
|
|
|
|
bool set_acconto();
|
|
|
|
bool recalc_acconti();
|
|
|
|
bool recalc_acconto();
|
|
|
|
// stampa
|
|
|
|
void set_acconto_p(_DescrItem& d);
|
|
|
|
void set_acchead_p(_DescrItem& d);
|
|
|
|
|
|
|
|
// cippiuppiu'
|
1994-11-16 15:49:47 +00:00
|
|
|
TLiquidazione_app();
|
|
|
|
virtual ~TLiquidazione_app() {}
|
1994-08-12 10:52:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|