Patch level : 12.0 502
Files correlati : cg2.exe cg2100c.msk cg4.exe cg0500a.msk f23.dir f23.trr f26.dir f26.trr Nuova versione delle fatture in ritardo (18-01-2017) git-svn-id: svn://10.65.10.50/branches/R_10_00@24286 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
924cc768f1
commit
e36a10c5ef
@ -38,7 +38,6 @@
|
||||
#define F_MOVCGIND 235
|
||||
#define F_RIL_FT_EM_RI 236
|
||||
#define F_DATAREG_PREC 237
|
||||
#define F_FAT_RITARDO_IND 238
|
||||
|
||||
#define SS_TIPO 101
|
||||
#define SS_SEZIONE 102
|
||||
|
@ -251,13 +251,6 @@ BEGIN
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
BOOLEAN F_FAT_RITARDO_IND
|
||||
BEGIN
|
||||
PROMPT 34 8 "Fattura in ritardo indeducibile"
|
||||
FIELD RITFATTIND
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
STRING F_COD_CAUS_IM 3
|
||||
BEGIN
|
||||
PROMPT 34 9 "Codice causale collegata "
|
||||
|
@ -853,6 +853,7 @@ void TPrimanota_application::init_insert_mode(TMask& m)
|
||||
m.field(F_RITFIS).set_prompt(PR("IVA intracomun. "));
|
||||
else
|
||||
m.field(F_RITFIS).set_prompt(PR("Ritenute fiscali "));
|
||||
m.set(F_RITFATT, app().causale().fattura_in_ritardo() ? "X" : " ");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -19,6 +19,7 @@
|
||||
#define F_DATACOMP 116
|
||||
#define F_ANNOIVA 117
|
||||
#define F_NUMDOCEXT 130
|
||||
#define F_RITFATT 231
|
||||
|
||||
#define F_CLIFO 128
|
||||
#define F_CLIENTE 151
|
||||
|
@ -573,6 +573,12 @@ BEGIN
|
||||
FIELD REVCHARGE
|
||||
END
|
||||
|
||||
BOOLEAN F_RITFATT
|
||||
BEGIN
|
||||
PROMPT 25 17 "Fattura in ritardo "
|
||||
FIELD RITFATT
|
||||
END
|
||||
|
||||
DATE F_DATA74TER
|
||||
BEGIN
|
||||
PROMPT 52 15 "Data 74/ter "
|
||||
|
@ -1294,7 +1294,7 @@ bool TPrimanota_application::codiva_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
TBill b; app().IVA2bill(iva, b);
|
||||
|
||||
char cr[2] = { b.tipo_cr() + '0', '\0' };
|
||||
char cr[2] = { ((char) b.tipo_cr()) + '0', '\0' };
|
||||
m.set(105, *cr > '0' ? cr : "");
|
||||
|
||||
const char tipo[2] = { b.tipo(), '\0' };
|
||||
@ -2318,6 +2318,7 @@ bool TPrimanota_application::caus_modify_handler(TMask_field& f, KEY key)
|
||||
const long protocol = app().causale().reg().protocol() + 1;
|
||||
|
||||
m.set(F_PROTIVA, protocol);
|
||||
m.set(F_RITFATT, app().causale().fattura_in_ritardo() ? "X" : " ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -268,13 +268,18 @@ char TCausale::sezione_ritfis() const
|
||||
|
||||
char TCausale::sezione_revcharge() const
|
||||
{
|
||||
if (_sezione_revcharge <= ' ')
|
||||
{
|
||||
(char&)_sezione_revcharge = sezione(RIGA_REVERSE_CHARGE);
|
||||
if (_sezione_revcharge < 'A')
|
||||
(char&)_sezione_revcharge = sezione_clifo();
|
||||
}
|
||||
return _sezione_revcharge;
|
||||
if (_sezione_revcharge <= ' ')
|
||||
{
|
||||
(char&)_sezione_revcharge = sezione(RIGA_REVERSE_CHARGE);
|
||||
if (_sezione_revcharge < 'A')
|
||||
(char&)_sezione_revcharge = sezione_clifo();
|
||||
}
|
||||
return _sezione_revcharge;
|
||||
}
|
||||
|
||||
bool TCausale::fattura_in_ritardo() const
|
||||
{
|
||||
return _rec.get_bool(CAU_RITFATT);
|
||||
}
|
||||
|
||||
|
||||
|
@ -73,6 +73,7 @@ public:
|
||||
char sezione_ritsoc() const;
|
||||
char sezione_ritfis() const;
|
||||
char sezione_revcharge() const ;
|
||||
bool fattura_in_ritardo() const;
|
||||
|
||||
virtual bool reread();
|
||||
virtual bool read(const char* cod, int year);
|
||||
|
@ -1146,15 +1146,16 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
if (date.year() != year_int) // Controlla anno di appartenenza, altrimenti is_date_ok potrebbe non funzionare
|
||||
continue;
|
||||
}
|
||||
const TRectype& rcs = _cur->curr(LF_CAUSALI);
|
||||
const TDate datareg = _mov->get_date(MOV_DATAREG);
|
||||
const TDate datadoc = _mov->get_date(MOV_DATADOC);
|
||||
const bool dataritind = ((tipomov == acquisto) && (_year >= 2018)) && ((datareg.year() - datadoc.year()) > 1 ) ||
|
||||
(((datareg.year() - datadoc.year()) == 1) && datareg.month() >= 5);
|
||||
const bool datarit = ((tipomov == acquisto) && !dataritind) && ((datareg.year() - datadoc.year()) == 1);
|
||||
const bool fattritind = (_year >= 2018) && (rcs.get_bool(CAU_RITFATTIND) || dataritind);
|
||||
const bool fattrit = rcs.get_bool(CAU_RITFATT) || datarit;
|
||||
const bool cau_intra = rcs.get_bool(CAU_INTRACOM);
|
||||
const TRectype& rcs = _cur->curr(LF_CAUSALI);
|
||||
const TDate datareg = _mov->get_date(MOV_DATAREG);
|
||||
const TDate datadoc = _mov->get_date(MOV_DATADOC);
|
||||
const bool fatt_rit_2018 = atoi(_year) >= 2018 && _mov->get_bool(MOV_RITFATT);
|
||||
const int year_diff = datareg.year() - datadoc.year();
|
||||
const bool dataritind = ((tipomov == acquisto) && fatt_rit_2018) &&
|
||||
((year_diff > 2) || ((year_diff >= 1) && datareg.month() >= 5));
|
||||
const bool fattrit = ((tipomov == acquisto) && !dataritind) && (year_diff >= 1);
|
||||
const bool fattritind = (rcs.get_bool(CAU_RITFATT) && atoi(_year) < 2018) || dataritind;
|
||||
const bool cau_intra = rcs.get_bool(CAU_INTRACOM);
|
||||
const bool cau_valintra = rcs.get_bool(CAU_VALINTRA);
|
||||
|
||||
/*
|
||||
|
@ -1,3 +1,3 @@
|
||||
23
|
||||
0
|
||||
$mov|89161|89161|477|0|Movimenti di prima nota|NMOV||
|
||||
$mov|0|0|478|0|Movimenti di prima nota|NMOV||
|
||||
|
@ -1,10 +1,11 @@
|
||||
23
|
||||
57
|
||||
58
|
||||
ANNOES|9|4|0|Codice esercizio
|
||||
NUMREG|3|7|0|Numero di operazione
|
||||
DATAREG|5|8|0|Data operazione
|
||||
DATACOMP|5|8|0|Data competenza
|
||||
DATADOC|5|8|0|Data documento
|
||||
RITFATT|8|1|0|Fattura in ritardo
|
||||
DATA74TER|5|8|0|Data per art. 74 ter
|
||||
MESELIQ|2|2|0|Mese per liquidazione differita
|
||||
NUMDOC|1|7|0|Numero documento
|
||||
|
@ -1,3 +1,3 @@
|
||||
26
|
||||
0
|
||||
$caus|0|0|89|0|Causali contabili|60||
|
||||
$caus|0|0|88|0|Causali contabili|60||
|
||||
|
@ -1,5 +1,5 @@
|
||||
26
|
||||
29
|
||||
28
|
||||
CODCAUS|1|3|0|Codice causale
|
||||
DESCR|1|50|0|Descrizione causale
|
||||
TIPODOC|1|2|0|Tipo documento
|
||||
@ -14,7 +14,6 @@ AUTOFATT|8|1|0|Autofattura art. ??
|
||||
MOVSEZ|8|1|0|Movimento sezionale ??
|
||||
TIPOMOV|2|1|0|Tipo movimento saldaconto
|
||||
RITFATT|8|1|0|Fattura in ritardo
|
||||
RITFATTIND|8|1|0|Fattura in ritardo indeducibile
|
||||
COLLCESP|1|1|0|Collegamnto ai cespiti
|
||||
M770|1|1|0|Collegamento al 770
|
||||
CODCAUSIM|1|3|0|Codice causale incasso immediato
|
||||
|
Loading…
x
Reference in New Issue
Block a user