Patch level : 12.0 1032

Files correlati     : 770.exe 773100a.msk 771mod.exe 777.exe

Commento :

Certificazione Unica 2021
Aggiunto parametro di studio per leggere nella generazione la causale quadro dalla causale e non dalla scheda percipiente.
Nella generazione separate le schede per causale oltre che per causale quadro.
La certificazione mette anche gli importi con tipo 12 e 13 nella altre somme non soggette.
This commit is contained in:
Alessandro Bonazzi 2021-02-23 22:14:15 +01:00
parent 8773bc65e4
commit 15d020a2cb
6 changed files with 36 additions and 13 deletions

View File

@ -787,6 +787,13 @@ void TSchedaPercipienti::init_modify_mode(TMask& m)
// inizilizza maschera
init_mask(m, false);
if (ini_get_bool(CONFIG_STUDIO, "77", "CauQFCau"))
{
const TRectype& caus = cache().get("%CA7", m.get(F_CODCAUS));
build_causqua_items(m, caus.get("S1"));
m.set(F_CAUSQUA, caus.get("S2"));
}
}
void TSchedaPercipienti::init_insert_mode(TMask& m)
@ -796,6 +803,7 @@ void TSchedaPercipienti::init_insert_mode(TMask& m)
// La proposta causale è valida con e senza collegamneto da prima nota
TToken_string key; key.format("%c|%ld", m.get(F_TIPOA)[0], m.get_long(F_CODANAGR));
TString4 codcaus = cache().get(LF_ANAG, key, "CAUSQUA");
if (codcaus.blank())
{
key.format("%ld|%c|%ld|%d",

View File

@ -6,7 +6,7 @@
void TSchedaPercipienti::init_mask(TMask& m, bool inserimento)
{
update_lasts(m);
m.enable(F_CAUSQUA, !ini_get_bool(CONFIG_STUDIO, "77", "CauQFCau"));
// se collegamento
if (tipo_coll() != nessuno)
{
@ -747,6 +747,7 @@ bool TSchedaPercipienti::check_causale(TMask_field& f, KEY k)
{
// forzo causale quadro con il valore in tabella
TEdit_field& f_causqua = m.efield(F_CAUSQUA);
f_causqua.reset();
if (cod_qua == "LA")
f_causqua.set(m.get(F_TABCAUSQUASC));

View File

@ -99,6 +99,7 @@ void TRighe_riepilogo::genera_la(TRectype& quadro, const TRectype& riga, const T
quadro.put(QUD_CODCAUS, codcaus);
real somme = compenso;
somme -= imponibile;
somme += riga.get_real(PAG_SPESA);
somme -= riga.get_real(PAG_IMPCPA);
@ -108,10 +109,9 @@ void TRighe_riepilogo::genera_la(TRectype& quadro, const TRectype& riga, const T
// 26/01/17: Spostato qua questo blocco per aggiungere somme e tenere un filo logico di tutto insieme
real ammlordo = imponibile;
real snsar = riga.get_real(PAG_SOMNSRIT);
if (snsar > -0.02 && snsar < 0.02)
{
snsar = ZERO;
}
ammlordo += snsar;
ammlordo += riga.get_real(PAG_CONTROBB);
ammlordo += riga.get_real(PAG_SOMREGCONV);
@ -142,6 +142,7 @@ void TRighe_riepilogo::genera_la(TRectype& quadro, const TRectype& riga, const T
if (somme.is_zero() && quadro.get(QUD_TOTALE) == quadro.get(QUD_IMPONIBILE))
{
const TRectype& ca7 = cache().get("%CA7", codcaus);
if (ca7.get_int("I1") == 3)
{
quadro.put(QUD_SOMME, quadro.get(QUD_IMPONIBILE));
@ -153,14 +154,20 @@ void TRighe_riepilogo::genera_la(TRectype& quadro, const TRectype& riga, const T
bool TRighe_riepilogo::add_riga_pag(const TRectype& riga, const TRectype& scheda)
{
const TString8 codcaus = scheda.get(SPR_CODCAUS);
const TString8 causqua = scheda.get(SPR_CAUSQUA);
TString8 causqua = scheda.get(SPR_CAUSQUA);
if (ini_get_bool(CONFIG_STUDIO, "77", "CauQFCau"))
causqua = cache().get("%CA7", codcaus, "S2");
// cerca riga compatibile
int i = 0;
for (i = last(); i >= 0; i--)
{
const TRectype* rr = (const TRectype*)objptr(i);
if (rr->get("CAUSALE") == causqua)
if (rr->get("CAUSALE") == causqua &&
rr->get(QUD_CODCAUS) == codcaus)
break;
}
if (i < 0)

View File

@ -2,5 +2,6 @@
#define F_CODCAU1015 101
#define F_FSTAMPAQL 102
#define F_FSTAMPAQCQD 103
#define F_ANNO 104
#define F_QUAFROMCAUS 103
#define F_FSTAMPAQCQD 104
#define F_ANNO 105

View File

@ -31,9 +31,15 @@ BEGIN
ADD RUN 773mod -3 %ca7
END
BOOLEAN F_QUAFROMCAUS
BEGIN
PROMPT 3 6 "Nella generazione leggi la causale quadro dalla causale 770"
FIELD CauQFCau
END
LIST F_FSTAMPAQL 35
BEGIN
PROMPT 3 6 "Flag per stampa quadro L "
PROMPT 3 8 "Flag per stampa quadro L "
ITEM "1|Ordine primario data versamento"
ITEM "2|Ordine primario periodo riferimento"
FIELD FlStQl
@ -42,7 +48,7 @@ END
LIST F_FSTAMPAQCQD 29
BEGIN
PROMPT 3 8 "Flag per stampa quadri C/D/D1 "
PROMPT 3 10 "Flag per stampa quadri C/D/D1 "
ITEM "1|Per codice causale e aliquota"
ITEM "2|Per codice tributo e aliquota"
FIELD FlStQcQd

View File

@ -816,9 +816,8 @@ bool TTrasferimentoCU::append_record_h(const TRectype& qla, int modulo, TLog_rep
if (perc.estero())
rec.np_put("AU001005", qla.get_real("SOMREGCONV"));
real imponibile = qla.get_real("IMPONIBILE");
const TString4 codcaus = qla.get("CODCAUS");
real imponibile = qla.get_real(QUD_IMPONIBILE);
const TString4 codcaus = qla.get(QUD_CODCAUS);
long codice = atol(cache().get("%CA7", codcaus, "I1")); // 1, 2, 5, 6, 7 // EDIT 2020: aggiunti 8, 9, 10, 11 // Edit 2021 aggiunti 12,13
real altre_somme = qla.get_real("SOMME");
@ -826,7 +825,8 @@ bool TTrasferimentoCU::append_record_h(const TRectype& qla, int modulo, TLog_rep
{
altre_somme = ZERO;
}
if (altre_somme.is_zero() && codice == 7)
if (altre_somme.is_zero() &&
((codice == 7) || (codice == 12) || (codice == 13)))
{
altre_somme = imponibile;
imponibile = ZERO;