Patch level : 12.0
Files correlati : fp0700.cpp, fplib01.cpp Commento: "Corretto errore sull'invio integrazioni. Nei dati Riepilogo iva le righe con aliquota non venivano sommate. (Segnalazione Sicart)
This commit is contained in:
parent
cd68564f6c
commit
e499d65d9a
@ -114,6 +114,13 @@ void TPAR_mask::load_sheet(const TString& tipo_sel)
|
|||||||
const TRectype& rec = cur.curr();
|
const TRectype& rec = cur.curr();
|
||||||
const TString& tipodocsdi = rec.get(CAU_TIPODOCSDI);
|
const TString& tipodocsdi = rec.get(CAU_TIPODOCSDI);
|
||||||
|
|
||||||
|
if (tipodocsdi == "TD28")
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//COSA STA SUCCEDENDO QUI? PERCHE VA QUANDO VUOLE LUI?
|
||||||
|
|
||||||
if ((tipo_sel == "T" && tipodocsdi.full()) || tipodocsdi == tipo_sel)
|
if ((tipo_sel == "T" && tipodocsdi.full()) || tipodocsdi == tipo_sel)
|
||||||
{
|
{
|
||||||
int r = scaus.set_row_cell(S_TIPO_SDI, tipodocsdi);
|
int r = scaus.set_row_cell(S_TIPO_SDI, tipodocsdi);
|
||||||
|
@ -84,6 +84,7 @@ BEGIN
|
|||||||
ITEM "TD18|TD18 Integ. acq. beni intracomunitari"
|
ITEM "TD18|TD18 Integ. acq. beni intracomunitari"
|
||||||
ITEM "TD19|TD19 Integ./autof. acq. beni ex art. 17"
|
ITEM "TD19|TD19 Integ./autof. acq. beni ex art. 17"
|
||||||
ITEM "TD20|TD20 Autofattura"
|
ITEM "TD20|TD20 Autofattura"
|
||||||
|
ITEM "TD28|TD28 Fattura cartacea S.Marino"
|
||||||
END
|
END
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 80 3
|
GROUPBOX DLG_NULL 80 3
|
||||||
|
@ -644,6 +644,17 @@ private:
|
|||||||
void reset(TPaf_record& p) const { TPaf_container::set_keys_paf(p, _hfatt, _bfatt); }
|
void reset(TPaf_record& p) const { TPaf_container::set_keys_paf(p, _hfatt, _bfatt); }
|
||||||
bool save_paf();
|
bool save_paf();
|
||||||
|
|
||||||
|
// Classe per gestire le righe di riepilogo
|
||||||
|
class TRiepilogo_agg
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
real imponibile;
|
||||||
|
real imposta;
|
||||||
|
TRiepilogo_agg() : imponibile(ZERO), imposta(ZERO) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
std::map<TString, TRiepilogo_agg> _riepilogo_agg;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
@ -652,27 +663,16 @@ protected:
|
|||||||
bool check_initial(const TMovimento_contabile& mov);
|
bool check_initial(const TMovimento_contabile& mov);
|
||||||
/**< Controllo di riga */
|
/**< Controllo di riga */
|
||||||
bool check_row(const TMovimento_contabile& mov, int n_riga);
|
bool check_row(const TMovimento_contabile& mov, int n_riga);
|
||||||
/**< Controllo riepilogo IVA */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool initialize(const TMovimento_contabile& Reg);
|
bool initialize(const TMovimento_contabile& Reg);
|
||||||
//static bool get_bnp_iban(const TString& abi, const TString& cab, int prg, TString& iban);
|
|
||||||
//bool get_bank(TRegumento& Reg, TString& iban, TString& abi, TString& cab, TString& istituto) const;
|
|
||||||
//bool get_bank_presentazione(const TRegumento& Reg, TString& iban, TString& abi, TString& cab, TString& istituto) const;
|
|
||||||
//bool get_bank_appoggio(const TRegumento& Reg, TString& iban, TString& abi, TString& cab, TString& istituto) const;
|
|
||||||
const TString& descrizione(const TMovimento_contabile& mov, int n_riga) const { return mov.cg()[n_riga].get((RMV_DESCR));}
|
const TString& descrizione(const TMovimento_contabile& mov, int n_riga) const { return mov.cg()[n_riga].get((RMV_DESCR));}
|
||||||
|
|
||||||
|
|
||||||
void save_log() { TReport_book b; b.add(_log); b.export_text(TFilename("fp_err.log")); }
|
void save_log() { TReport_book b; b.add(_log); b.export_text(TFilename("fp_err.log")); }
|
||||||
const TString & natura(const char* codiva) const;
|
const TString & natura(const char* codiva) const;
|
||||||
static const char* get_esigibilita_iva(const TMovimento_contabile& Reg);
|
static const char* get_esigibilita_iva(const TMovimento_contabile& Reg);
|
||||||
void set_IVA(TString codiva, TPaf_record& paf) const;
|
void set_IVA(TString codiva, TPaf_record& paf) const;
|
||||||
void set_IVA(const TMovimento_contabile& mov, int n_row, TPaf_record& paf) const;
|
|
||||||
bool add_row_art(long& riga_art, const TString& codice_tipo, const TString& codice_valore, TPaf_record& paf);
|
bool add_row_art(long& riga_art, const TString& codice_tipo, const TString& codice_valore, TPaf_record& paf);
|
||||||
bool add_row_alleg(TFilename& file, long& nprogr, TPaf_record& paf);
|
bool add_row_alleg(TFilename& file, long& nprogr, TPaf_record& paf);
|
||||||
void set_qta_prezzo(TPaf_record& paf1800f, const TMovimento_contabile& mov, int n_row) const;
|
|
||||||
void add_ritenuta(const TMovimento_contabile & mov, int n_row, TPaf_record& paf0700f) const;
|
|
||||||
bool add_riepilogo_iva(const TMovimento_contabile & mov, int n_riga);
|
bool add_riepilogo_iva(const TMovimento_contabile & mov, int n_riga);
|
||||||
|
|
||||||
const char * stato_paf() const { return _definitivo ? "P" : "D"; }
|
const char * stato_paf() const { return _definitivo ? "P" : "D"; }
|
||||||
|
@ -1726,10 +1726,12 @@ bool TDoc_fp::export_paf0100f()
|
|||||||
paf0100f.set("P1_CODDEST", _coddest);
|
paf0100f.set("P1_CODDEST", _coddest);
|
||||||
|
|
||||||
TString80 tel;
|
TString80 tel;
|
||||||
|
TString80 pec;
|
||||||
|
|
||||||
tel << get_firm().get(NDT_PTEL) << get_firm().get(NDT_TEL);
|
tel << get_firm().get(NDT_PTEL) << get_firm().get(NDT_TEL);
|
||||||
paf0100f.set("P1_TELEFONO", tel);
|
paf0100f.set("P1_TELEFONO", tel);
|
||||||
paf0100f.set("P1_MAIL", get_firm().get(NDT_MAIL));
|
pec << get_firm().get(NDT_MAIL);
|
||||||
|
paf0100f.set("P1_MAIL", pec);
|
||||||
paf0100f.set("P1_GESTIONE", stato_paf());
|
paf0100f.set("P1_GESTIONE", stato_paf());
|
||||||
paf0100f.set("P1_ERRINT", "");
|
paf0100f.set("P1_ERRINT", "");
|
||||||
// </DatiTrassmissione>
|
// </DatiTrassmissione>
|
||||||
@ -3261,6 +3263,7 @@ bool TReg_fp::add_row_alleg(TFilename& file, long& nprogr, TPaf_record& paf)
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool TReg_fp::add_riepilogo_iva(const TMovimento_contabile & mov, int n_riga)
|
bool TReg_fp::add_riepilogo_iva(const TMovimento_contabile & mov, int n_riga)
|
||||||
{
|
{
|
||||||
TPaf_record& paf2200f = _paf_container.get_paf("PAF2200F");
|
TPaf_record& paf2200f = _paf_container.get_paf("PAF2200F");
|
||||||
@ -3270,22 +3273,31 @@ bool TReg_fp::add_riepilogo_iva(const TMovimento_contabile & mov, int n_riga)
|
|||||||
const TString16 cod_aliquota = rec_iva.get(RMI_CODIVA);
|
const TString16 cod_aliquota = rec_iva.get(RMI_CODIVA);
|
||||||
const TCodiceIVA& cod_iva= cached_codIVA(cod_aliquota);
|
const TCodiceIVA& cod_iva= cached_codIVA(cod_aliquota);
|
||||||
const real aliquota = cod_iva.percentuale();
|
const real aliquota = cod_iva.percentuale();
|
||||||
|
const real imponibile = rec_iva.get(RMI_IMPONIBILE);
|
||||||
|
const real imposta = rec_iva.get(RMI_IMPOSTA);
|
||||||
const char * eiva = get_esigibilita_iva(mov);
|
const char * eiva = get_esigibilita_iva(mov);
|
||||||
|
|
||||||
|
TRiepilogo_agg& riepilogo_agg = _riepilogo_agg[cod_aliquota];
|
||||||
|
|
||||||
|
|
||||||
// Aliquota
|
// Aliquota
|
||||||
paf2200f.set("PL_ALIQUOTAIVA", aliquota);
|
paf2200f.set("PL_ALIQUOTAIVA", aliquota);
|
||||||
// Natura
|
// Natura
|
||||||
if (aliquota.is_zero())
|
if (aliquota.is_zero())
|
||||||
paf2200f.set("PL_NATURA", natura(cod_aliquota));
|
paf2200f.set("PL_NATURA", natura(cod_aliquota));
|
||||||
// Imponibile
|
// Imponibile
|
||||||
paf2200f.set("PL_IMPONIBILE", rec_iva.get(RMI_IMPONIBILE));
|
paf2200f.set("PL_IMPONIBILE", (imponibile + riepilogo_agg.imponibile));
|
||||||
// Imposta
|
// Imposta
|
||||||
paf2200f.set("PL_IMPOSTA", rec_iva.get(RMI_IMPOSTA));
|
paf2200f.set("PL_IMPOSTA", (imposta + riepilogo_agg.imposta));
|
||||||
// Esigibilit IVA
|
// Esigibilit IVA
|
||||||
paf2200f.set("PL_ESIGIVA", eiva);
|
paf2200f.set("PL_ESIGIVA", eiva);
|
||||||
|
|
||||||
paf2200f.set("PL_RIFNORMATIVO", cod_iva.descrizione());
|
paf2200f.set("PL_RIFNORMATIVO", cod_iva.descrizione());
|
||||||
|
|
||||||
|
// Aggiorno il riepilogo IVA
|
||||||
|
riepilogo_agg.imponibile += imponibile;
|
||||||
|
riepilogo_agg.imposta += imposta;
|
||||||
|
|
||||||
// Inserisco
|
// Inserisco
|
||||||
return insert(paf2200f);
|
return insert(paf2200f);
|
||||||
}
|
}
|
||||||
@ -3611,6 +3623,7 @@ bool TReg_fp::reg_to_paf(const TMovimento_contabile& mov)
|
|||||||
|
|
||||||
if (ok) ok &= insert(paf0700f);
|
if (ok) ok &= insert(paf0700f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tabella di non invio XML
|
// Tabella di non invio XML
|
||||||
TPaf_record& pafw300f = _paf_container.get_paf("PAFW300F");
|
TPaf_record& pafw300f = _paf_container.get_paf("PAFW300F");
|
||||||
reset(pafw300f);
|
reset(pafw300f);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user