Patch level : 12.0 1072
Files correlati : batbtpe.msk f154.dir f154.trr li0400a.msk li0.exe Commento : Aggiunta la possibilità di definire diversi tipi di esenzione da esportare nelle fatture elettroniche con le modificehe consguenti sull fatturazione e la fatturazione elettronica Interno : aggiunta una nuov tabella da indicare nella letera di intento con tipo dato, descrizione per l'invio fatture e flag di stampa sulle fatture della dicitura di esenzione.
This commit is contained in:
parent
897ca44202
commit
3e8d4d1bec
@ -1601,7 +1601,7 @@ void TStampaDoc_application::set_filter(TDocumento_form& frm)
|
|||||||
if (_clifo_sheet->checked(i))
|
if (_clifo_sheet->checked(i))
|
||||||
{
|
{
|
||||||
key.format("%06ld", _clifo_sheet->row(i).get_long(1)); // Formatta il codice
|
key.format("%06ld", _clifo_sheet->row(i).get_long(1)); // Formatta il codice
|
||||||
_clifo_sel.add(key, NULL);
|
_clifo_sel.add(key, key);
|
||||||
}
|
}
|
||||||
// NB: se _clifo_sel non contiene nulla, non viene effettuato alcun filtro su CLI/FO (non setta la funzione!!)
|
// NB: se _clifo_sel non contiene nulla, non viene effettuato alcun filtro su CLI/FO (non setta la funzione!!)
|
||||||
filtro.format("TIPOCF==\"%c\"", _selection_mask->get(F_TIPOCF)[0]);
|
filtro.format("TIPOCF==\"%c\"", _selection_mask->get(F_TIPOCF)[0]);
|
||||||
|
@ -297,7 +297,7 @@ TCursor* TLista_documenti_recordset::cursor() const
|
|||||||
if (clifo.checked(i))
|
if (clifo.checked(i))
|
||||||
{
|
{
|
||||||
key.format("%06ld", clifo.row(i).get_long(1)); // Formatta il codice
|
key.format("%06ld", clifo.row(i).get_long(1)); // Formatta il codice
|
||||||
_clifo_sel.add(key, NULL);
|
_clifo_sel.add(key, key);
|
||||||
}
|
}
|
||||||
cur->set_filterfunction(clifo.checked() > 0 ? filter_clifo : NULL);
|
cur->set_filterfunction(clifo.checked() > 0 ? filter_clifo : NULL);
|
||||||
// NB: se _clifo_sel non contiene nulla, non viene effettuato alcun filter su CLI/FO (non setta la funzione!!)
|
// NB: se _clifo_sel non contiene nulla, non viene effettuato alcun filter su CLI/FO (non setta la funzione!!)
|
||||||
|
@ -474,6 +474,7 @@ real TDocumento::imponibile_bolli_esenti() const
|
|||||||
}
|
}
|
||||||
return imponibile_esente;
|
return imponibile_esente;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TDocumento::bolli_esenti_dovuti() const
|
bool TDocumento::bolli_esenti_dovuti() const
|
||||||
{
|
{
|
||||||
const real impmin_bolli = ini_get_real(CONFIG_STUDIO, "ve", "IMPMINBOLLI");
|
const real impmin_bolli = ini_get_real(CONFIG_STUDIO, "ve", "IMPMINBOLLI");
|
||||||
@ -1041,53 +1042,59 @@ void TDocumento::set_riga_esenzione()
|
|||||||
esente = check_iva_plafond(row(i).get(RDOC_CODIVA));
|
esente = check_iva_plafond(row(i).get(RDOC_CODIVA));
|
||||||
if (!esente)
|
if (!esente)
|
||||||
safe_delete(_esenzione);
|
safe_delete(_esenzione);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
static TString4 _tipo_riga_es;
|
static TString4 _tipo_riga_es;
|
||||||
static TString80 _des_esenz;
|
static TString80 _des_esenz;
|
||||||
static real _bollo_es;
|
static real _bollo_es;
|
||||||
|
|
||||||
if (_tipo_riga_es.empty())
|
if (_tipo_riga_es.empty())
|
||||||
{
|
{
|
||||||
TConfig conf(CONFIG_STUDIO, "ve");
|
TConfig conf(CONFIG_STUDIO, "ve");
|
||||||
_tipo_riga_es = conf.get("TRESENZ", "ve");
|
_tipo_riga_es = conf.get("TRESENZ", "ve");
|
||||||
_bollo_es = (real)conf.get("BOLLIES", "ve");
|
_bollo_es = (real)conf.get("BOLLIES", "ve");
|
||||||
if (_tipo_riga_es.empty())
|
if (_tipo_riga_es.empty())
|
||||||
{
|
{
|
||||||
_tipo_riga_es = "05";
|
_tipo_riga_es = "05";
|
||||||
conf.set("TRESENZ", _tipo_riga_es);
|
conf.set("TRESENZ", _tipo_riga_es);
|
||||||
warning_box("Il tipo riga esenzione non risultava impostato.\n L'applicazione userà automaticamente il tipo %s", (const char*)_tipo_riga_es);
|
warning_box("Il tipo riga esenzione non risultava impostato.\n L'applicazione userà automaticamente il tipo %s", (const char*)_tipo_riga_es);
|
||||||
}
|
}
|
||||||
_des_esenz = conf.get("DESESENZ", "ve");
|
_des_esenz = conf.get("DESESENZ", "ve");
|
||||||
if (_des_esenz.not_empty())
|
if (_des_esenz.not_empty())
|
||||||
_des_esenz.insert(" ");
|
_des_esenz.insert(" ");
|
||||||
_des_esenz.insert("Fattura non imponibile");
|
_des_esenz.insert("Fattura non imponibile");
|
||||||
}
|
}
|
||||||
if (_esenzione == nullptr)
|
|
||||||
_esenzione = new TRiga_documento(this, _tipo_riga_es);
|
|
||||||
|
|
||||||
TString d = _des_esenz;
|
TString d = _des_esenz;
|
||||||
TToken_string plafs(get(DOC_PLAFOND), ',');
|
const int pos = d.len();
|
||||||
const int items = plafs.items();
|
TLi_manager & plaf = plafond();
|
||||||
|
TString protinf;
|
||||||
|
TString protins;
|
||||||
|
TDate dataprot;
|
||||||
|
TString rif;
|
||||||
|
TString descr;
|
||||||
|
bool to_print;
|
||||||
|
int printed = 0;
|
||||||
|
real utilizzo;
|
||||||
|
|
||||||
d << (items > 1 ? TR("come dalle vostre dichiarazioni:\n") : TR(" come da vostra dichiarazione:\n"));
|
for (int i = plaf.get_plafond_row(*this, protinf, protins, dataprot, utilizzo, rif, descr, to_print); i >= 0; i = plaf.get_plafond_row(*this, protinf, protins, dataprot, utilizzo, rif, descr, to_print, i))
|
||||||
for (int i = 0; i < items; i++)
|
{
|
||||||
{
|
if (to_print)
|
||||||
TToken_string plaf(plafs.get(i));
|
{
|
||||||
real utilizzo = plaf.get_real(_plimporto);
|
printed++;
|
||||||
|
d << descr << " : " << protinf << " - " << protins << TR(" del ") << dataprot;
|
||||||
if (utilizzo != ZERO)
|
if (utilizzo != ZERO && ini_get_bool(CONFIG_DITTA, "li", "ADDUTILIZZATO"))
|
||||||
{
|
|
||||||
TToken_string key(plaf.get(_planno)); key.add(plaf.get(_plnumprot));
|
|
||||||
const TRectype & rec_plaf = cache().get(LF_LETINT, key);
|
|
||||||
|
|
||||||
d << TR("N. di protocollo di invio: ") << rec_plaf.get(LETINT_PROTINTF) << TR("-") << rec_plaf.get(LETINT_PROTINTS) << " del " << rec_plaf.get(LETINT_VSDATA);
|
|
||||||
if (ini_get_bool(CONFIG_DITTA, "li", "ADDUTILIZZATO"))
|
|
||||||
d << TR(" per € ") << utilizzo.stringa(0, decimals());
|
d << TR(" per € ") << utilizzo.stringa(0, decimals());
|
||||||
d << "\n";
|
d << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_esenzione->set_descr(d);
|
if (printed > 0)
|
||||||
|
{
|
||||||
|
if (_esenzione == nullptr)
|
||||||
|
_esenzione = new TRiga_documento(this, _tipo_riga_es);
|
||||||
|
d.insert(printed > 1 ? TR(" come dalle vostre dichiarazioni:\n") : TR(" come da vostra dichiarazione:\n"), pos);
|
||||||
|
_esenzione->set_descr(d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user