Patch level : 4.0
Files correlati : cg3.exe Ricompilazione Demo : [ ] Commento : Corretta gestione reverse charge su acquisti in elenco clifo git-svn-id: svn://10.65.10.50/trunk@16389 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1c5d7fd097
commit
41f77f9a47
@ -34,7 +34,6 @@ struct TAllegato_importi : public TObject
|
||||
real _impNI, _impES, _ivaNE; // Non imponibili, esenti, Non esposti
|
||||
real _ind; // Valore indecifrabile valido solo per i fornitori fino al 2008
|
||||
real _impNA; // Pattumiera per tutti valori NON in allegato
|
||||
|
||||
bool is_not_null(bool strict) const;
|
||||
};
|
||||
|
||||
@ -209,7 +208,6 @@ TAllegato_info::TAllegato_info(const TRecordset& mov)
|
||||
CHECKD(_codice > 0, "Codice C/F errato ", _codice);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TAllegati_set
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -849,14 +847,15 @@ bool TAlleg_mask::scan_iva_rows(const TRecordset& mov, TAssoc_array& clifi,
|
||||
|
||||
const TDate datareg = mov.get(MOV_DATAREG).as_date();
|
||||
const TDate datadoc = mov.get(MOV_DATADOC).as_date();
|
||||
const int anno = get_int(F_ANNO);;
|
||||
const int anno = get_int(F_ANNO);
|
||||
const int annoiva = datareg.year();
|
||||
const TString& codcaus = mov.get(MOV_CODCAUS).as_string();
|
||||
const TCausale& caus = _causali.causale(codcaus, annoiva);
|
||||
const bool vendite = clifo.tipo() == 'C';
|
||||
const bool movintra = caus.intra();
|
||||
const int reg_spec = caus.regime_speciale();
|
||||
const bool reverse_charge = (reg_spec == 13) || (reg_spec == 50) || (reg_spec == 51);
|
||||
const bool non_esposti = movintra || reverse_charge;
|
||||
const bool non_esposti = vendite && (movintra || reverse_charge);
|
||||
const bool prorata100 = caus.reg().prorata100(annoiva);
|
||||
|
||||
TISAM_recordset righe_iva("USE RMOVIVA\nFROM NUMREG=#NR\nTO NUMREG=#NR");
|
||||
@ -1046,7 +1045,6 @@ void TAlleg_mask::add_0_9(int trc, TPadoaSchioppa_set& pss, TAlleg_log& log)
|
||||
}
|
||||
|
||||
const long anno = get_int(F_ANNO);
|
||||
pss.set("IdentificativoAnno", TVariant(anno-2006L)); // 00=2006, 01=2007, 02=2008, ...
|
||||
pss.set("AnnoRiferimento", TVariant(anno)); // 2006, 2007, 2008, ...
|
||||
|
||||
// Compilare solo se diverso da dichiarante
|
||||
@ -1054,7 +1052,7 @@ void TAlleg_mask::add_0_9(int trc, TPadoaSchioppa_set& pss, TAlleg_log& log)
|
||||
|
||||
// Dati dell'intermediario che si cucca 50 Euro senza fare una mazza!
|
||||
const TString& inter = get(F_INTR);
|
||||
if (inter.full() && codfis != inter)
|
||||
if (inter.full())
|
||||
{
|
||||
pss.set("CodiceIntermediario" , inter);
|
||||
pss.set("NumeroIscrizioneAlboCAF", get(F_CAF));
|
||||
@ -1329,7 +1327,7 @@ void TAlleg_mask::generazione()
|
||||
book.preview();
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
delete cli;
|
||||
delete acq;
|
||||
}
|
||||
@ -1410,9 +1408,9 @@ void TAlleg_mask::import_clifo(const TFilename& name,
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
error.replace('\n', ' ');
|
||||
@ -1522,8 +1520,8 @@ void TAlleg_mask::fusione()
|
||||
{
|
||||
TFilename fname;
|
||||
if (build_output_name(fname))
|
||||
pss.save_as(fname);
|
||||
|
||||
pss.save_as(fname);
|
||||
|
||||
TReport_book book;
|
||||
TAlleg_report rep(all, *this, true);
|
||||
book.add(rep);
|
||||
@ -1691,7 +1689,7 @@ bool TAlleg_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
if (check_fields())
|
||||
{
|
||||
if (curr_page() == 0)
|
||||
generazione();
|
||||
generazione();
|
||||
else
|
||||
fusione();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user