Patch level : 12.0 476
Files correlati : cg0500a.msk cg4.exe Implementata nuova gestione delle fatture in ritardo. Nella causale si poteva forzare fattura in ritardo. Ho aggiunto nella causale la forzatura di fattura in ritardo indeducibile. git-svn-id: svn://10.65.10.50/branches/R_10_00@24196 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
453f14b9ce
commit
3f91d55a6d
@ -38,6 +38,7 @@
|
||||
#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
|
||||
|
@ -245,9 +245,16 @@ 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 8 "Codice causale collegata "
|
||||
PROMPT 34 9 "Codice causale collegata "
|
||||
FLAGS "UZ"
|
||||
FIELD CODCAUSIM
|
||||
USE LF_CAUSALI
|
||||
|
@ -1146,7 +1146,13 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
continue;
|
||||
}
|
||||
const TRectype& rcs = _cur->curr(LF_CAUSALI);
|
||||
const bool fattrit = rcs.get_bool(CAU_RITFATT);
|
||||
const TDate datareg = _mov->get_date(MOV_DATAREG);
|
||||
const TDate datadoc = _mov->get_date(MOV_DATADOC);
|
||||
const bool dataritind = ((datareg.year() - datadoc.year()) > 1 ) ||
|
||||
(((datareg.year() - datadoc.year()) == 1) && datareg.month() >= 5);
|
||||
const bool datarit = !dataritind && ((datareg.year() - datadoc.year()) == 1);
|
||||
const bool fattritind = 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 bool cau_valintra = rcs.get_bool(CAU_VALINTRA);
|
||||
|
||||
@ -1440,9 +1446,12 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
// da evitare di dover controllare mese e anno sul PIM
|
||||
const bool was_riv = (tipoiva != "NS") && (tipocr == 1 || tipocr ==5);
|
||||
real percind;
|
||||
const int tipoind = get_tipodet_from_rmi(_rmoviva->curr(), _mov->curr(), percind, true);
|
||||
int tipoind = get_tipodet_from_rmi(_rmoviva->curr(), _mov->curr(), percind, true);
|
||||
const int decimals = TCurrency::get_firm_dec();
|
||||
|
||||
if (tipoind == 0 && fattritind)
|
||||
tipoind = 9;
|
||||
|
||||
const real imponibile_orig = _rmoviva->get_real(RMI_IMPONIBILE);
|
||||
real imposta_orig = _rmoviva->get_real(RMI_IMPOSTA);
|
||||
const real lordo_orig = imponibile_orig + imposta_orig;
|
||||
@ -1485,6 +1494,13 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
|
||||
analizza_IVA(imponibile_orig, imposta_orig, percind, corrisp, false, codiva,
|
||||
impon_det, impos_det, impon_ind, impos_ind);
|
||||
if (fattritind)
|
||||
{
|
||||
impon_ind += impon_det;
|
||||
impon_det = ZERO;
|
||||
impos_ind += impos_det;
|
||||
impos_det = ZERO;
|
||||
}
|
||||
for (int is_detr_diff = 1; is_detr_diff >= 0; is_detr_diff--)
|
||||
{
|
||||
real diff_impr = (is_detr_diff == 0) ? impon_det : impon_ind;
|
||||
@ -1949,7 +1965,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
}
|
||||
|
||||
// Le fatture in ritardo non vanno considerate nel periodo ma solo nell'annuale
|
||||
if (!fattrit || (fattrit /*&& _isagricolo*/ && _month == 13)) // normale
|
||||
if (!fattrit || (fattrit && _month == 13)) // normale
|
||||
{
|
||||
|
||||
// *****************************************
|
||||
|
@ -1,3 +1,3 @@
|
||||
26
|
||||
0
|
||||
$caus|0|0|88|0|Causali contabili|60||
|
||||
$caus|0|0|89|0|Causali contabili|60||
|
||||
|
@ -1,5 +1,5 @@
|
||||
26
|
||||
28
|
||||
29
|
||||
CODCAUS|1|3|0|Codice causale
|
||||
DESCR|1|50|0|Descrizione causale
|
||||
TIPODOC|1|2|0|Tipo documento
|
||||
@ -13,7 +13,8 @@ NUMDOC|8|1|0|Numero documento
|
||||
AUTOFATT|8|1|0|Autofattura art. ??
|
||||
MOVSEZ|8|1|0|Movimento sezionale ??
|
||||
TIPOMOV|2|1|0|Tipo movimento saldaconto
|
||||
RITFATT|8|1|0|
|
||||
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