feat: general ledger, automatic posting, VAT settlement, withholdings and F24 (#62 #63 #64 #65 #66 #67 #68)
M7 adds the double-entry ledger so that the documents of M5 and M6 reach the accounts without retyping, and the Italian VAT obligations can be prepared from the same data. - Chart of accounts on three levels with the Italian "PMI standard" model in the fiscal pack, journal templates with proposed lines, VAT registers; the chart import now writes the accounts and exports them (#62, ADR 0036). - Journal entries: draft, posted, final with the libro giornale number, reversal; recurring entries with the nightly ledger.recurring job (#63). - Documents post their entry inside the document transaction (PostingEngine, LedgerPoster) with VAT lines, open items and withholdings; a change rewrites the same entry, a cancellation removes or reverses it (#64, ADR 0037). - VAT registers with final print, monthly or quarterly settlement with pro rata, interest, minimum and advance, confirmation with the LIQ entry, period lock and F24 line, LIPE file and F24 data (#65). - Operated and suffered withholdings, CU data, stamp duty by quarter with the 5,000 euro threshold, F24 summary with its payment entry (#66). - Party ledgers, account ledgers, trial balance and libro giornale (#67). - Demo accounting with the settlements of the past months confirmed and checked by hand in a test; wiki Contabilita, IVA, Fiscalita italiana completed with screenshots; CHANGELOG 0.7.0, STATUS, ADR 0036-0037 (#68). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
838362bfe1
commit
9e3ba92993
83 files changed
+13838
-497
No files matched your search
@@ -0,0 +1,238 @@
|
||||
codice;descrizione;natura;tipo;voce_cee;partitario;iva
|
||||
01;Immobilizzazioni immateriali;A;;B.I;;
|
||||
01.01;Immobilizzazioni immateriali;A;;B.I;;
|
||||
01.01.001;Costi di impianto e di ampliamento;A;;B.I.1;;
|
||||
01.01.002;Costi di sviluppo;A;;B.I.2;;
|
||||
01.01.003;Software e diritti di utilizzazione;A;;B.I.3;;
|
||||
01.01.004;Marchi e brevetti;A;;B.I.4;;
|
||||
01.01.005;Avviamento;A;;B.I.5;;
|
||||
01.01.006;Altre immobilizzazioni immateriali;A;;B.I.7;;
|
||||
02;Immobilizzazioni materiali;A;;B.II;;
|
||||
02.01;Terreni e fabbricati;A;;B.II.1;;
|
||||
02.01.001;Terreni;A;;B.II.1;;
|
||||
02.01.002;Fabbricati;A;;B.II.1;;
|
||||
02.02;Impianti e macchinari;A;;B.II.2;;
|
||||
02.02.001;Impianti generici;A;;B.II.2;;
|
||||
02.02.002;Macchinari;A;;B.II.2;;
|
||||
02.03;Attrezzature;A;;B.II.3;;
|
||||
02.03.001;Attrezzature industriali e commerciali;A;;B.II.3;;
|
||||
02.04;Altri beni;A;;B.II.4;;
|
||||
02.04.001;Mobili e arredi;A;;B.II.4;;
|
||||
02.04.002;Macchine d'ufficio elettroniche;A;;B.II.4;;
|
||||
02.04.003;Autovetture;A;;B.II.4;;
|
||||
02.04.004;Autocarri;A;;B.II.4;;
|
||||
02.04.005;Beni di costo unitario non superiore a 516,46 euro;A;;B.II.4;;
|
||||
03;Immobilizzazioni finanziarie;A;;B.III;;
|
||||
03.01;Partecipazioni e crediti immobilizzati;A;;B.III;;
|
||||
03.01.001;Partecipazioni;A;;B.III.1;;
|
||||
03.01.002;Depositi cauzionali;A;;B.III.2;;
|
||||
04;Rimanenze;A;;C.I;;
|
||||
04.01;Rimanenze di magazzino;A;;C.I;;
|
||||
04.01.001;Rimanenze di merci;A;;C.I.4;;
|
||||
04.01.002;Rimanenze di materie prime;A;;C.I.1;;
|
||||
04.01.003;Rimanenze di prodotti finiti;A;;C.I.4;;
|
||||
04.01.004;Acconti a fornitori per merci;A;;C.I.5;;
|
||||
05;Crediti verso clienti;A;;C.II.1;;
|
||||
05.01;Clienti;A;CL;C.II.1;;
|
||||
05.01.001;Clienti Italia;A;CL;C.II.1;S;
|
||||
05.01.002;Clienti esteri;A;CL;C.II.1;S;
|
||||
05.01.003;Clienti c/fatture da emettere;A;;C.II.1;;
|
||||
05.02;Effetti e rettifiche;A;;C.II.1;;
|
||||
05.02.001;Effetti attivi e RiBa all'incasso;A;;C.II.1;;
|
||||
05.02.002;Fondo svalutazione crediti;A;;C.II.1;;
|
||||
06;Altri crediti;A;;C.II;;
|
||||
06.01;Crediti diversi;A;;C.II.5-quater;;
|
||||
06.01.001;Crediti diversi;A;;C.II.5-quater;;
|
||||
06.01.002;Anticipi a fornitori;A;;C.II.5-quater;;
|
||||
06.01.003;Crediti verso dipendenti;A;;C.II.5-quater;;
|
||||
06.02;Crediti per IVA;A;IV;C.II.5-bis;;
|
||||
06.02.001;IVA su acquisti;A;IV;C.II.5-bis;;
|
||||
06.02.002;Erario c/IVA a credito annuale;A;IV;C.II.5-bis;;
|
||||
06.03;Crediti tributari;A;ER;C.II.5-bis;;
|
||||
06.03.001;Erario c/ritenute subite;A;ER;C.II.5-bis;;
|
||||
06.03.002;Erario c/acconti IRES;A;ER;C.II.5-bis;;
|
||||
06.03.003;Erario c/acconti IRAP;A;ER;C.II.5-bis;;
|
||||
07;Disponibilità liquide;A;;C.IV;;
|
||||
07.01;Banche;A;BA;C.IV.1;;
|
||||
07.01.001;Banca c/c;A;BA;C.IV.1;;
|
||||
07.01.002;Banca c/c secondo conto;A;BA;C.IV.1;;
|
||||
07.01.003;Conto postale;A;BA;C.IV.1;;
|
||||
07.02;Cassa;A;CA;C.IV.3;;
|
||||
07.02.001;Cassa contanti;A;CA;C.IV.3;;
|
||||
07.02.002;Carte di pagamento prepagate;A;CA;C.IV.3;;
|
||||
08;Ratei e risconti attivi;A;;D;;
|
||||
08.01;Ratei e risconti attivi;A;;D;;
|
||||
08.01.001;Ratei attivi;A;;D;;
|
||||
08.01.002;Risconti attivi;A;;D;;
|
||||
09;Fondi di ammortamento;A;;B.II;;
|
||||
09.01;Fondi di ammortamento immobilizzazioni immateriali;A;;B.I;;
|
||||
09.01.001;Fondo ammortamento immobilizzazioni immateriali;A;;B.I;;
|
||||
09.02;Fondi di ammortamento immobilizzazioni materiali;A;;B.II;;
|
||||
09.02.001;Fondo ammortamento fabbricati;A;;B.II.1;;
|
||||
09.02.002;Fondo ammortamento impianti e macchinari;A;;B.II.2;;
|
||||
09.02.003;Fondo ammortamento attrezzature;A;;B.II.3;;
|
||||
09.02.004;Fondo ammortamento mobili e arredi;A;;B.II.4;;
|
||||
09.02.005;Fondo ammortamento macchine d'ufficio;A;;B.II.4;;
|
||||
09.02.006;Fondo ammortamento automezzi;A;;B.II.4;;
|
||||
10;Patrimonio netto;P;;A;;
|
||||
10.01;Capitale e riserve;P;;A;;
|
||||
10.01.001;Capitale sociale;P;;A.I;;
|
||||
10.01.002;Riserva legale;P;;A.IV;;
|
||||
10.01.003;Riserva straordinaria;P;;A.VI;;
|
||||
10.01.004;Versamenti in conto capitale;P;;A.VI;;
|
||||
10.02;Risultati;P;;A;;
|
||||
10.02.001;Utili (perdite) portati a nuovo;P;;A.VIII;;
|
||||
10.02.002;Utile (perdita) dell'esercizio;P;;A.IX;;
|
||||
11;Fondi per rischi e oneri;P;;B;;
|
||||
11.01;Fondi per rischi e oneri;P;;B;;
|
||||
11.01.001;Fondo rischi su crediti;P;;B.4;;
|
||||
11.01.002;Fondo imposte anche differite;P;;B.2;;
|
||||
11.01.003;Altri fondi per rischi e oneri;P;;B.4;;
|
||||
12;Trattamento di fine rapporto;P;;C;;
|
||||
12.01;Trattamento di fine rapporto;P;;C;;
|
||||
12.01.001;Fondo trattamento di fine rapporto;P;;C;;
|
||||
13;Debiti verso banche e finanziatori;P;;D.4;;
|
||||
13.01;Debiti verso banche;P;;D.4;;
|
||||
13.01.001;Banche c/anticipi su fatture;P;;D.4;;
|
||||
13.01.002;Mutui passivi;P;;D.4;;
|
||||
13.01.003;Finanziamenti bancari a breve;P;;D.4;;
|
||||
13.02;Altri finanziatori;P;;D.3;;
|
||||
13.02.001;Finanziamenti dei soci;P;;D.3;;
|
||||
14;Debiti verso fornitori;P;;D.7;;
|
||||
14.01;Fornitori;P;FO;D.7;;
|
||||
14.01.001;Fornitori Italia;P;FO;D.7;S;
|
||||
14.01.002;Fornitori esteri;P;FO;D.7;S;
|
||||
14.01.003;Fornitori c/fatture da ricevere;P;;D.7;;
|
||||
14.02;Acconti ed effetti;P;;D.6;;
|
||||
14.02.001;Acconti da clienti;P;;D.6;;
|
||||
14.02.002;Effetti passivi;P;;D.9;;
|
||||
15;Debiti tributari e previdenziali;P;;D.12;;
|
||||
15.01;Debiti per IVA;P;IV;D.12;;
|
||||
15.01.001;IVA su vendite;P;IV;D.12;;
|
||||
15.01.002;Erario c/liquidazione IVA;P;IV;D.12;;
|
||||
15.01.003;Erario c/IVA in sospensione;P;IV;D.12;;
|
||||
15.02;Erario c/ritenute;P;ER;D.12;;
|
||||
15.02.001;Erario c/ritenute lavoro autonomo;P;ER;D.12;;
|
||||
15.02.002;Erario c/ritenute provvigioni;P;ER;D.12;;
|
||||
15.02.003;Erario c/ritenute lavoro dipendente;P;ER;D.12;;
|
||||
15.03;Debiti previdenziali;P;;D.13;;
|
||||
15.03.001;INPS c/contributi;P;;D.13;;
|
||||
15.03.002;Enasarco c/contributi;P;;D.13;;
|
||||
15.03.003;INAIL c/premi;P;;D.13;;
|
||||
15.04;Imposte;P;ER;D.12;;
|
||||
15.04.001;Erario c/IRES;P;ER;D.12;;
|
||||
15.04.002;Erario c/IRAP;P;ER;D.12;;
|
||||
15.04.003;Erario c/imposta di bollo;P;ER;D.12;;
|
||||
16;Altri debiti;P;;D.14;;
|
||||
16.01;Debiti diversi;P;;D.14;;
|
||||
16.01.001;Debiti diversi;P;;D.14;;
|
||||
16.01.002;Dipendenti c/retribuzioni;P;;D.14;;
|
||||
16.01.003;Amministratori c/compensi;P;;D.14;;
|
||||
17;Ratei e risconti passivi;P;;E;;
|
||||
17.01;Ratei e risconti passivi;P;;E;;
|
||||
17.01.001;Ratei passivi;P;;E;;
|
||||
17.01.002;Risconti passivi;P;;E;;
|
||||
20;Acquisti di materie e merci;C;;B.6;;
|
||||
20.01;Acquisti;C;;B.6;;
|
||||
20.01.001;Merci c/acquisti;C;;B.6;;S
|
||||
20.01.002;Materie prime c/acquisti;C;;B.6;;S
|
||||
20.01.003;Materiale di consumo;C;;B.6;;S
|
||||
20.01.004;Imballaggi;C;;B.6;;S
|
||||
20.01.005;Carburanti e lubrificanti;C;;B.6;;S
|
||||
20.01.006;Cancelleria;C;;B.6;;S
|
||||
20.02;Rettifiche degli acquisti;C;;B.6;;
|
||||
20.02.001;Resi e sconti su acquisti;C;;B.6;;S
|
||||
21;Costi per servizi;C;;B.7;;
|
||||
21.01;Utenze;C;;B.7;;
|
||||
21.01.001;Energia elettrica;C;;B.7;;S
|
||||
21.01.002;Gas e riscaldamento;C;;B.7;;S
|
||||
21.01.003;Acqua;C;;B.7;;S
|
||||
21.01.004;Telefonia e internet;C;;B.7;;S
|
||||
21.02;Servizi professionali;C;;B.7;;
|
||||
21.02.001;Consulenze tecniche;C;;B.7;;S
|
||||
21.02.002;Consulenze legali e notarili;C;;B.7;;S
|
||||
21.02.003;Compensi per la contabilità;C;;B.7;;S
|
||||
21.02.004;Compensi agli amministratori;C;;B.7;;
|
||||
21.02.005;Provvigioni ad agenti;C;;B.7;;S
|
||||
21.03;Servizi commerciali e generali;C;;B.7;;
|
||||
21.03.001;Trasporti su acquisti;C;;B.7;;S
|
||||
21.03.002;Trasporti su vendite;C;;B.7;;S
|
||||
21.03.003;Manutenzioni e riparazioni;C;;B.7;;S
|
||||
21.03.004;Pubblicità e promozione;C;;B.7;;S
|
||||
21.03.005;Assicurazioni;C;;B.7;;
|
||||
21.03.006;Servizi software e cloud;C;;B.7;;S
|
||||
21.03.007;Pulizia e vigilanza;C;;B.7;;S
|
||||
21.03.008;Viaggi e trasferte;C;;B.7;;S
|
||||
21.03.009;Spese postali e di spedizione;C;;B.7;;S
|
||||
21.03.010;Formazione del personale;C;;B.7;;S
|
||||
21.03.011;Spese e commissioni bancarie;C;;B.7;;
|
||||
22;Godimento di beni di terzi;C;;B.8;;
|
||||
22.01;Godimento di beni di terzi;C;;B.8;;
|
||||
22.01.001;Affitti passivi;C;;B.8;;S
|
||||
22.01.002;Canoni di leasing;C;;B.8;;S
|
||||
22.01.003;Noleggi;C;;B.8;;S
|
||||
23;Costi del personale;C;;B.9;;
|
||||
23.01;Costi del personale;C;;B.9;;
|
||||
23.01.001;Salari e stipendi;C;;B.9.a;;
|
||||
23.01.002;Oneri sociali;C;;B.9.b;;
|
||||
23.01.003;Trattamento di fine rapporto;C;;B.9.c;;
|
||||
24;Ammortamenti e svalutazioni;C;;B.10;;
|
||||
24.01;Ammortamenti;C;;B.10;;
|
||||
24.01.001;Ammortamento immobilizzazioni immateriali;C;;B.10.a;;
|
||||
24.01.002;Ammortamento immobilizzazioni materiali;C;;B.10.b;;
|
||||
24.02;Svalutazioni;C;;B.10.d;;
|
||||
24.02.001;Svalutazione dei crediti;C;;B.10.d;;
|
||||
25;Variazioni delle rimanenze;C;;B.11;;
|
||||
25.01;Variazioni delle rimanenze;C;;B.11;;
|
||||
25.01.001;Rimanenze iniziali di merci;C;;B.11;;
|
||||
25.01.002;Rimanenze finali di merci;C;;B.11;;
|
||||
26;Accantonamenti;C;;B.12;;
|
||||
26.01;Accantonamenti;C;;B.12;;
|
||||
26.01.001;Accantonamento per rischi;C;;B.12;;
|
||||
26.01.002;Altri accantonamenti;C;;B.13;;
|
||||
27;Oneri diversi di gestione;C;;B.14;;
|
||||
27.01;Oneri diversi di gestione;C;;B.14;;
|
||||
27.01.001;Imposte e tasse diverse;C;;B.14;;
|
||||
27.01.002;Imposta di bollo;C;;B.14;;
|
||||
27.01.003;IVA indetraibile;C;;B.14;;
|
||||
27.01.004;Abbuoni e arrotondamenti passivi;C;;B.14;;
|
||||
27.01.005;Sopravvenienze passive;C;;B.14;;
|
||||
27.01.006;Minusvalenze ordinarie;C;;B.14;;
|
||||
27.01.007;Sanzioni e interessi su tributi;C;;B.14;;
|
||||
27.01.008;Quote associative e abbonamenti;C;;B.14;;S
|
||||
28;Oneri finanziari;C;;C.17;;
|
||||
28.01;Interessi e oneri finanziari;C;;C.17;;
|
||||
28.01.001;Interessi passivi bancari;C;;C.17;;
|
||||
28.01.002;Interessi passivi su mutui;C;;C.17;;
|
||||
28.01.003;Interessi sulla liquidazione IVA trimestrale;C;;C.17;;
|
||||
28.01.004;Oneri finanziari diversi;C;;C.17;;
|
||||
29;Imposte sul reddito;C;;20;;
|
||||
29.01;Imposte sul reddito dell'esercizio;C;;20;;
|
||||
29.01.001;IRES dell'esercizio;C;;20;;
|
||||
29.01.002;IRAP dell'esercizio;C;;20;;
|
||||
30;Ricavi delle vendite e delle prestazioni;R;;A.1;;
|
||||
30.01;Ricavi;R;;A.1;;
|
||||
30.01.001;Ricavi per vendita di merci;R;;A.1;;S
|
||||
30.01.002;Ricavi per vendita di prodotti;R;;A.1;;S
|
||||
30.01.003;Ricavi per prestazioni di servizi;R;;A.1;;S
|
||||
30.01.004;Ricavi per cessioni intracomunitarie ed esportazioni;R;;A.1;;S
|
||||
30.02;Rettifiche dei ricavi;R;;A.1;;
|
||||
30.02.001;Resi e sconti su vendite;R;;A.1;;S
|
||||
31;Altri ricavi e proventi;R;;A.5;;
|
||||
31.01;Altri ricavi e proventi;R;;A.5;;
|
||||
31.01.001;Rimborso spese di trasporto;R;;A.5;;S
|
||||
31.01.002;Rimborso spese di bollo;R;;A.5;;
|
||||
31.01.003;Rivalsa contributi previdenziali;R;;A.5;;S
|
||||
31.01.004;Abbuoni e arrotondamenti attivi;R;;A.5;;
|
||||
31.01.005;Plusvalenze ordinarie;R;;A.5;;
|
||||
31.01.006;Sopravvenienze attive;R;;A.5;;
|
||||
31.01.007;Contributi in conto esercizio;R;;A.5;;
|
||||
32;Proventi finanziari;R;;C.16;;
|
||||
32.01;Proventi finanziari;R;;C.16;;
|
||||
32.01.001;Interessi attivi bancari;R;;C.16;;
|
||||
32.01.002;Altri proventi finanziari;R;;C.16;;
|
||||
90;Conti di apertura e chiusura;O;;;;
|
||||
90.01;Conti di apertura e chiusura;O;;;;
|
||||
90.01.001;Stato patrimoniale di apertura;O;;;;
|
||||
90.01.002;Stato patrimoniale di chiusura;O;;;;
|
||||
90.01.003;Conto economico di chiusura;O;;;;
|
||||
|
@@ -0,0 +1,256 @@
|
||||
using Khaemhat.Core.Accounting;
|
||||
using Khaemhat.Fiscal.Abstractions;
|
||||
using Khaemhat.Infrastructure.Files;
|
||||
|
||||
namespace Khaemhat.Fiscal.Italy;
|
||||
|
||||
/// <summary>
|
||||
/// The Italian ledger of the base data (SPEC §11.7, issue #62, ADR 0036): a chart of accounts for small and medium
|
||||
/// companies in three levels (mastro, conto, sottoconto) linked to the lines of the financial statements of art.
|
||||
/// 2424-2425 of the Civil Code, the VAT registers, the journal templates (causali contabili) and the template of each
|
||||
/// document type. The chart is the embedded file <c>Data/piano-dei-conti.csv</c>.
|
||||
/// </summary>
|
||||
public sealed class ItalianLedgerTemplate : ILedgerTemplate
|
||||
{
|
||||
/// <summary>The account of trade receivables from Italian customers.</summary>
|
||||
public const string Customers = "05.01.001";
|
||||
|
||||
/// <summary>The account of trade payables to Italian suppliers.</summary>
|
||||
public const string Suppliers = "14.01.001";
|
||||
|
||||
/// <summary>VAT on purchases.</summary>
|
||||
public const string PurchaseVat = "06.02.001";
|
||||
|
||||
/// <summary>VAT on sales.</summary>
|
||||
public const string SalesVat = "15.01.001";
|
||||
|
||||
/// <summary>The VAT settlement account.</summary>
|
||||
public const string VatSettlement = "15.01.002";
|
||||
|
||||
/// <summary>The main bank account.</summary>
|
||||
public const string Bank = "07.01.001";
|
||||
|
||||
/// <summary>Cash.</summary>
|
||||
public const string Cash = "07.02.001";
|
||||
|
||||
/// <summary>Sales of goods.</summary>
|
||||
public const string Revenue = "30.01.001";
|
||||
|
||||
/// <summary>Purchases of goods.</summary>
|
||||
public const string Cost = "20.01.001";
|
||||
|
||||
/// <summary>Withholdings operated on fees of self-employed workers, to pay.</summary>
|
||||
public const string WithholdingPayable = "15.02.001";
|
||||
|
||||
/// <summary>Withholdings suffered on the company's fees.</summary>
|
||||
public const string WithholdingCredit = "06.03.001";
|
||||
|
||||
/// <summary>Social security charged on fees.</summary>
|
||||
public const string SocialSecurity = "31.01.003";
|
||||
|
||||
/// <summary>Stamp duty charged to customers.</summary>
|
||||
public const string StampDutyCharged = "31.01.002";
|
||||
|
||||
/// <summary>Stamp duty as a cost.</summary>
|
||||
public const string StampDutyCost = "27.01.002";
|
||||
|
||||
/// <summary>Rounding and allowances.</summary>
|
||||
public const string Rounding = "27.01.004";
|
||||
|
||||
/// <summary>The interest of quarterly VAT payers.</summary>
|
||||
public const string VatInterest = "28.01.003";
|
||||
|
||||
private readonly Lazy<IReadOnlyList<AccountTemplate>> _accounts = new(ReadAccounts);
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Name => "PMI standard";
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<AccountTemplate> Accounts => _accounts.Value;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<VatRegisterTemplate> VatRegisters { get; } =
|
||||
[
|
||||
new("VEN1", "Registro fatture emesse", VatRegisterKind.Sales),
|
||||
new("ACQ1", "Registro fatture acquisti", VatRegisterKind.Purchases),
|
||||
new("CORR", "Registro dei corrispettivi", VatRegisterKind.Receipts),
|
||||
new("VEN-RC", "Registro fatture emesse - autofatture e integrazioni", VatRegisterKind.Sales, ReverseCharge: true),
|
||||
new("ACQ-RC", "Registro fatture acquisti - autofatture e integrazioni", VatRegisterKind.Purchases, ReverseCharge: true),
|
||||
];
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<JournalTemplateTemplate> JournalTemplates { get; } = BuildTemplates();
|
||||
|
||||
/// <inheritdoc />
|
||||
public IReadOnlyList<DocumentPostingTemplate> DocumentPostings { get; } = BuildDocumentPostings();
|
||||
|
||||
/// <inheritdoc />
|
||||
public string? AccountOf(PostingRole role) => role switch
|
||||
{
|
||||
PostingRole.Customer => Customers,
|
||||
PostingRole.Supplier => Suppliers,
|
||||
PostingRole.Revenue => Revenue,
|
||||
PostingRole.Cost => Cost,
|
||||
PostingRole.SalesVat or PostingRole.SplitPaymentVat => SalesVat,
|
||||
PostingRole.PurchaseVat => PurchaseVat,
|
||||
PostingRole.Bank => Bank,
|
||||
PostingRole.Cash => Cash,
|
||||
PostingRole.WithholdingPayable => WithholdingPayable,
|
||||
PostingRole.WithholdingCredit => WithholdingCredit,
|
||||
PostingRole.SocialSecurity => SocialSecurity,
|
||||
PostingRole.StampDuty => StampDutyCost,
|
||||
PostingRole.Rounding => Rounding,
|
||||
PostingRole.VatSettlement => VatSettlement,
|
||||
_ => null,
|
||||
};
|
||||
|
||||
private static List<JournalTemplateTemplate> BuildTemplates()
|
||||
{
|
||||
static JournalTemplateLineTemplate L(PostingRole role, AccountSide side, string? account = null, string? description = null) =>
|
||||
new(role, side, account, description);
|
||||
|
||||
return
|
||||
[
|
||||
new("FV", "Fattura di vendita", JournalArea.Sales, "VEN1", OpensItems: true, Reverses: false,
|
||||
[
|
||||
L(PostingRole.Customer, AccountSide.Debit, Customers),
|
||||
L(PostingRole.Revenue, AccountSide.Credit, Revenue),
|
||||
L(PostingRole.SocialSecurity, AccountSide.Credit, SocialSecurity),
|
||||
L(PostingRole.StampDuty, AccountSide.Credit, StampDutyCharged),
|
||||
L(PostingRole.SalesVat, AccountSide.Credit, SalesVat),
|
||||
]),
|
||||
new("NCV", "Nota di credito a cliente", JournalArea.Sales, "VEN1", OpensItems: true, Reverses: true,
|
||||
[
|
||||
L(PostingRole.Customer, AccountSide.Debit, Customers),
|
||||
L(PostingRole.Revenue, AccountSide.Credit, "30.02.001"),
|
||||
L(PostingRole.SocialSecurity, AccountSide.Credit, SocialSecurity),
|
||||
L(PostingRole.StampDuty, AccountSide.Credit, StampDutyCharged),
|
||||
L(PostingRole.SalesVat, AccountSide.Credit, SalesVat),
|
||||
]),
|
||||
new("FA", "Fattura di acquisto", JournalArea.Purchases, "ACQ1", OpensItems: true, Reverses: false,
|
||||
[
|
||||
L(PostingRole.Supplier, AccountSide.Credit, Suppliers),
|
||||
L(PostingRole.Cost, AccountSide.Debit, Cost),
|
||||
L(PostingRole.StampDuty, AccountSide.Debit, StampDutyCost),
|
||||
L(PostingRole.PurchaseVat, AccountSide.Debit, PurchaseVat),
|
||||
]),
|
||||
new("NCA", "Nota di credito da fornitore", JournalArea.Purchases, "ACQ1", OpensItems: true, Reverses: true,
|
||||
[
|
||||
L(PostingRole.Supplier, AccountSide.Credit, Suppliers),
|
||||
L(PostingRole.Cost, AccountSide.Debit, "20.02.001"),
|
||||
L(PostingRole.StampDuty, AccountSide.Debit, StampDutyCost),
|
||||
L(PostingRole.PurchaseVat, AccountSide.Debit, PurchaseVat),
|
||||
]),
|
||||
new("AFRC", "Autofattura e integrazione reverse charge", JournalArea.Purchases, "VEN-RC", OpensItems: false, Reverses: false,
|
||||
[
|
||||
L(PostingRole.PurchaseVat, AccountSide.Debit, PurchaseVat),
|
||||
L(PostingRole.Cost, AccountSide.Debit, "27.01.003", "IVA indetraibile"),
|
||||
L(PostingRole.SalesVat, AccountSide.Credit, SalesVat),
|
||||
]),
|
||||
new("CORR", "Corrispettivi giornalieri", JournalArea.Sales, "CORR", OpensItems: false, Reverses: false,
|
||||
[
|
||||
L(PostingRole.Cash, AccountSide.Debit, Cash),
|
||||
L(PostingRole.Revenue, AccountSide.Credit, Revenue),
|
||||
L(PostingRole.SalesVat, AccountSide.Credit, SalesVat),
|
||||
]),
|
||||
new("INC", "Incasso da cliente", JournalArea.Treasury, null, OpensItems: false, Reverses: false,
|
||||
[
|
||||
L(PostingRole.Bank, AccountSide.Debit, Bank),
|
||||
L(PostingRole.Customer, AccountSide.Credit, Customers),
|
||||
]),
|
||||
new("PAG", "Pagamento a fornitore", JournalArea.Treasury, null, OpensItems: false, Reverses: false,
|
||||
[
|
||||
L(PostingRole.Supplier, AccountSide.Debit, Suppliers),
|
||||
L(PostingRole.Bank, AccountSide.Credit, Bank),
|
||||
]),
|
||||
new("RIT", "Ritenuta d'acconto operata", JournalArea.Taxes, null, OpensItems: false, Reverses: false,
|
||||
[
|
||||
L(PostingRole.Supplier, AccountSide.Debit, Suppliers),
|
||||
L(PostingRole.WithholdingPayable, AccountSide.Credit, WithholdingPayable),
|
||||
]),
|
||||
new("RITS", "Ritenuta d'acconto subita", JournalArea.Taxes, null, OpensItems: false, Reverses: false,
|
||||
[
|
||||
L(PostingRole.WithholdingCredit, AccountSide.Debit, WithholdingCredit),
|
||||
L(PostingRole.Customer, AccountSide.Credit, Customers),
|
||||
]),
|
||||
new("LIQ", "Liquidazione IVA periodica", JournalArea.Taxes, null, OpensItems: false, Reverses: false,
|
||||
[
|
||||
L(PostingRole.SalesVat, AccountSide.Debit, SalesVat),
|
||||
L(PostingRole.PurchaseVat, AccountSide.Credit, PurchaseVat),
|
||||
L(PostingRole.Account, AccountSide.Debit, VatInterest, "Interessi trimestrali"),
|
||||
L(PostingRole.Cost, AccountSide.Debit, "27.01.003", "IVA indetraibile da pro rata"),
|
||||
L(PostingRole.VatSettlement, AccountSide.Credit, VatSettlement),
|
||||
]),
|
||||
new("F24", "Versamento con modello F24", JournalArea.Taxes, null, OpensItems: false, Reverses: false,
|
||||
[
|
||||
L(PostingRole.VatSettlement, AccountSide.Debit, VatSettlement),
|
||||
L(PostingRole.WithholdingPayable, AccountSide.Debit, WithholdingPayable),
|
||||
L(PostingRole.Account, AccountSide.Debit, StampDutyCost, "Imposta di bollo"),
|
||||
L(PostingRole.Bank, AccountSide.Credit, Bank),
|
||||
]),
|
||||
new("GIRO", "Giroconto", JournalArea.General, null, OpensItems: false, Reverses: false,
|
||||
[
|
||||
L(PostingRole.Account, AccountSide.Debit),
|
||||
L(PostingRole.Account, AccountSide.Credit),
|
||||
]),
|
||||
new("SPB", "Spese e commissioni bancarie", JournalArea.Treasury, null, OpensItems: false, Reverses: false,
|
||||
[
|
||||
L(PostingRole.Account, AccountSide.Debit, "21.03.011"),
|
||||
L(PostingRole.Bank, AccountSide.Credit, Bank),
|
||||
]),
|
||||
new("STO", "Storno di scrittura", JournalArea.General, null, OpensItems: false, Reverses: true, []),
|
||||
];
|
||||
}
|
||||
|
||||
private static List<DocumentPostingTemplate> BuildDocumentPostings()
|
||||
{
|
||||
var postings = new List<DocumentPostingTemplate>();
|
||||
foreach (var code in new[] { "FI", "FA", "FD", "FACC", "ND", "PAR" })
|
||||
{
|
||||
postings.Add(new(code, "FV", "VEN1"));
|
||||
}
|
||||
|
||||
postings.Add(new("NC", "NCV", "VEN1"));
|
||||
postings.Add(new("FF", "FA", "ACQ1"));
|
||||
postings.Add(new("NCF", "NCA", "ACQ1"));
|
||||
for (var n = 16; n <= 29; n++)
|
||||
{
|
||||
postings.Add(new("AF" + n.ToString(System.Globalization.CultureInfo.InvariantCulture), "AFRC", "VEN-RC"));
|
||||
}
|
||||
|
||||
return postings;
|
||||
}
|
||||
|
||||
private static IReadOnlyList<AccountTemplate> ReadAccounts()
|
||||
{
|
||||
using var stream = typeof(ItalianLedgerTemplate).Assembly.GetManifestResourceStream("Khaemhat.Fiscal.Italy.Data.piano-dei-conti.csv")
|
||||
?? throw new InvalidOperationException("The file piano-dei-conti.csv is missing from the assembly.");
|
||||
using var reader = new StreamReader(stream);
|
||||
return [.. CsvReader.Parse(reader.ReadToEnd(), ';').Skip(1).Where(l => l.Count >= 3 && l[0].Length > 0).Select(ToAccount)];
|
||||
}
|
||||
|
||||
private static AccountTemplate ToAccount(IReadOnlyList<string> l)
|
||||
{
|
||||
string Field(int i) => l.Count > i ? l[i].Trim() : string.Empty;
|
||||
var nature = Field(2) switch
|
||||
{
|
||||
"A" => AccountNature.Asset,
|
||||
"P" => AccountNature.Liability,
|
||||
"C" => AccountNature.Cost,
|
||||
"R" => AccountNature.Revenue,
|
||||
_ => AccountNature.Memorandum,
|
||||
};
|
||||
var type = Field(3) switch
|
||||
{
|
||||
"CL" => AccountType.Customers,
|
||||
"FO" => AccountType.Suppliers,
|
||||
"BA" => AccountType.Bank,
|
||||
"CA" => AccountType.Cash,
|
||||
"IV" => AccountType.Vat,
|
||||
"ER" => AccountType.Tax,
|
||||
_ => AccountType.Generic,
|
||||
};
|
||||
var line = Field(4);
|
||||
return new AccountTemplate(Field(0), Field(1), nature, type, line.Length == 0 ? null : line, Field(5) == "S", Field(6) == "S");
|
||||
}
|
||||
}
|
||||
@@ -115,6 +115,40 @@ public sealed class F24Exporter : ITaxPaymentFormExporter
|
||||
return (2520 + quarter).ToString(System.Globalization.CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public string FileName(TaxPaymentForm form)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(form);
|
||||
return $"F24_{form.TaxCode}_{form.DueDate.ToString("yyyyMMdd", System.Globalization.CultureInfo.InvariantCulture)}.csv";
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <remarks>
|
||||
/// A semicolon file in UTF-8: a header line with due date, tax code and name, then one line per code of the Erario
|
||||
/// section (sezione <c>ER</c>) with code, installment or month, reference year, debit and credit with a comma, and the
|
||||
/// description; the last line is the balance. Intermediaries and home banking import it or copy it into the form.
|
||||
/// </remarks>
|
||||
public byte[] Export(TaxPaymentForm form)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(form);
|
||||
var culture = System.Globalization.CultureInfo.InvariantCulture;
|
||||
static string Amount(decimal value) =>
|
||||
value == 0m ? string.Empty : value.ToString("0.00", System.Globalization.CultureInfo.InvariantCulture).Replace('.', ',');
|
||||
static string Clean(string value) => value.Replace(';', ',').Replace('\n', ' ').Replace('\r', ' ');
|
||||
var text = new System.Text.StringBuilder();
|
||||
text.Append("F24;").Append(form.DueDate.ToString("dd/MM/yyyy", culture)).Append(';').Append(form.TaxCode).Append(';').Append(Clean(form.Name)).Append('\n');
|
||||
text.Append("Sezione;Codice tributo;Rateazione/mese;Anno di riferimento;Importo a debito;Importo a credito;Descrizione\n");
|
||||
foreach (var line in form.Lines)
|
||||
{
|
||||
text.Append("ER;").Append(line.Code).Append(';').Append(line.Period ?? string.Empty).Append(';')
|
||||
.Append(line.Year.ToString(culture)).Append(';').Append(Amount(line.Debit)).Append(';').Append(Amount(line.Credit)).Append(';')
|
||||
.Append(Clean(line.Description)).Append('\n');
|
||||
}
|
||||
|
||||
text.Append("Saldo;;;;").Append(form.Balance.ToString("0.00", culture).Replace('.', ',')).Append(";;\n");
|
||||
return new System.Text.UTF8Encoding(false).GetBytes(text.ToString());
|
||||
}
|
||||
|
||||
private static List<TaxPaymentCode> BuildCodes()
|
||||
{
|
||||
string[] months = ["gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"];
|
||||
@@ -135,6 +169,7 @@ public sealed class F24Exporter : ITaxPaymentFormExporter
|
||||
codes.Add(new("1040", "Ritenute su redditi di lavoro autonomo"));
|
||||
codes.Add(new("1038", "Ritenute su provvigioni"));
|
||||
codes.Add(new("1019", "Ritenute del 4% operate dal condominio a titolo di acconto IRPEF"));
|
||||
codes.Add(new("1001", "Ritenute su retribuzioni, pensioni, trasferte, mensilita' aggiuntive"));
|
||||
for (var q = 1; q <= 4; q++)
|
||||
{
|
||||
codes.Add(new((2520 + q).ToString(System.Globalization.CultureInfo.InvariantCulture), $"Imposta di bollo sulle fatture elettroniche, {q}° trimestre"));
|
||||
|
||||
@@ -24,6 +24,9 @@ public sealed class ItalyFiscalPack : FiscalPackBase
|
||||
AddFeature<ITaxIdentifierRules>(new ItalianTaxIdentifierRules());
|
||||
AddFeature<IBaseTablesTemplate>(new ItalianBaseTables());
|
||||
AddFeature<IPlaceDirectory>(new ItalianPlaces());
|
||||
AddFeature<ILedgerTemplate>(new ItalianLedgerTemplate());
|
||||
AddFeature<IVatSettlementRules>(new VatSettlementRulesIt());
|
||||
AddFeature<IPeriodicVatReturnWriter>(new LipeWriter());
|
||||
|
||||
// ABI and CAB are read from every Italian IBAN; bank names and BICs arrive with the ABI list (ADR 0026).
|
||||
AddFeature<IBankDirectory>(new ItalianBankDirectory([]));
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using Khaemhat.Core.Tax;
|
||||
using Khaemhat.Fiscal.Abstractions;
|
||||
|
||||
namespace Khaemhat.Fiscal.Italy;
|
||||
|
||||
/// <summary>
|
||||
/// The Italian rules of the periodic VAT settlement and of the other payments of the ledger (issue #65, ADR 0037):
|
||||
/// <list type="bullet">
|
||||
/// <item>payments below 25.82 euro are not made and move to the next period (art. 1 c. 4 DPR 100/1998);</item>
|
||||
/// <item>the December advance is 88% of the base, not due below 103.29 euro, paid by 27 December (L. 405/1990);</item>
|
||||
/// <item>the last quarter of quarterly payers is paid with the annual return, code 6099 installment <c>0101</c>;</item>
|
||||
/// <item>withholdings are paid by the 16th of the month after the payment of the fee;</item>
|
||||
/// <item>the stamp duty of e-invoices of a quarter by 31 May, 30 September, 30 November and 28 February (DM 17/06/2014);</item>
|
||||
/// <item>the communication of the settlements (LIPE) by 31 May, 16 September, 30 November and the end of February.</item>
|
||||
/// </list>
|
||||
/// Deadlines on Saturdays, Sundays and holidays move to the next working day; payments due from 1 to 20 August to the 20th.
|
||||
/// </summary>
|
||||
public sealed class VatSettlementRulesIt : IVatSettlementRules
|
||||
{
|
||||
private readonly ItalianFiscalCalendar _calendar = new();
|
||||
|
||||
/// <inheritdoc />
|
||||
public decimal MinimumPayment => 25.82m;
|
||||
|
||||
/// <inheritdoc />
|
||||
public decimal AdvancePercent => 88m;
|
||||
|
||||
/// <inheritdoc />
|
||||
public decimal AdvanceMinimum => 103.29m;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string PaymentCode(TaxPeriod period)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(period);
|
||||
return period.Periodicity == VatPeriodicity.Monthly
|
||||
? (6000 + period.Number).ToString(CultureInfo.InvariantCulture)
|
||||
: period.Number == 4 ? "6099" : (6030 + period.Number).ToString(CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public string? PaymentPeriod(TaxPeriod period)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(period);
|
||||
return period.Periodicity == VatPeriodicity.Quarterly && period.Number == 4 ? "0101" : null;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateOnly AdvanceDue(int year) => _calendar.NextWorkingDay(new DateOnly(year, 12, 27));
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateOnly WithholdingDue(int year, int month) => Payment(new DateOnly(year, month, 16).AddMonths(1));
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateOnly StampDutyDue(int year, int quarter) => Payment(quarter switch
|
||||
{
|
||||
1 => new DateOnly(year, 5, 31),
|
||||
2 => new DateOnly(year, 9, 30),
|
||||
3 => new DateOnly(year, 11, 30),
|
||||
4 => new DateOnly(year + 1, 2, 28),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(quarter)),
|
||||
});
|
||||
|
||||
/// <inheritdoc />
|
||||
public DateOnly PeriodicReturnDue(int year, int quarter) => _calendar.NextWorkingDay(quarter switch
|
||||
{
|
||||
1 => new DateOnly(year, 5, 31),
|
||||
2 => new DateOnly(year, 9, 16),
|
||||
3 => new DateOnly(year, 11, 30),
|
||||
4 => new DateOnly(year + 1, 3, 1).AddDays(-1),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(quarter)),
|
||||
});
|
||||
|
||||
private DateOnly Payment(DateOnly due) =>
|
||||
_calendar.NextWorkingDay(due.Month == 8 && due.Day <= 20 ? new DateOnly(due.Year, 8, 20) : due);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The communication of the periodic VAT settlements (LIPE, art. 21-bis DL 78/2010) in the XML of the technical
|
||||
/// specifications <c>IVP18</c> of the Agenzia delle Entrate: one <c>Modulo</c> per month or quarter, amounts with a comma
|
||||
/// and two decimals. The file is meant for the intermediary or for the web services of the Agenzia, which sign and send it.
|
||||
/// </summary>
|
||||
public sealed class LipeWriter : IPeriodicVatReturnWriter
|
||||
{
|
||||
/// <summary>The namespace of the schema.</summary>
|
||||
public const string Namespace = "urn:www.agenziaentrate.gov.it:specificheTecniche:sco:ivp";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Name => "LIPE";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string FileName(PeriodicVatReturn data)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(data);
|
||||
return string.Create(CultureInfo.InvariantCulture, $"IT{data.TaxCode}_LI_{data.Year}_T{data.Quarter}.xml");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public byte[] Write(PeriodicVatReturn data)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(data);
|
||||
var settings = new XmlWriterSettings { Encoding = new UTF8Encoding(false), Indent = true };
|
||||
using var buffer = new MemoryStream();
|
||||
using (var xml = XmlWriter.Create(buffer, settings))
|
||||
{
|
||||
xml.WriteStartDocument();
|
||||
xml.WriteStartElement("iv", "Fornitura", Namespace);
|
||||
xml.WriteStartElement("iv", "Intestazione", Namespace);
|
||||
Element(xml, "CodiceFornitura", "IVP18");
|
||||
if (data.DeclarantTaxCode is { Length: > 0 } declarant)
|
||||
{
|
||||
Element(xml, "CodiceFiscaleDichiarante", declarant);
|
||||
Element(xml, "CodiceCarica", "1");
|
||||
}
|
||||
|
||||
xml.WriteEndElement();
|
||||
xml.WriteStartElement("iv", "Comunicazione", Namespace);
|
||||
xml.WriteAttributeString("identificativo", "00001");
|
||||
xml.WriteStartElement("iv", "Frontespizio", Namespace);
|
||||
Element(xml, "CodiceFiscale", data.TaxCode);
|
||||
Element(xml, "AnnoImposta", data.Year.ToString(CultureInfo.InvariantCulture));
|
||||
Element(xml, "PartitaIVA", data.VatNumber);
|
||||
if (data.DeclarantTaxCode is { Length: > 0 } signer)
|
||||
{
|
||||
Element(xml, "CFDichiarante", signer);
|
||||
Element(xml, "CodiceCaricaDichiarante", "1");
|
||||
}
|
||||
|
||||
Element(xml, "FirmaDichiarazione", "1");
|
||||
if (data.IntermediaryTaxCode is { Length: > 0 } intermediary)
|
||||
{
|
||||
Element(xml, "CFIntermediario", intermediary);
|
||||
Element(xml, "ImpegnoPresentazione", "1");
|
||||
Element(xml, "DataImpegno", data.CommitmentDate.ToString("ddMMyyyy", CultureInfo.InvariantCulture));
|
||||
Element(xml, "FirmaIntermediario", "1");
|
||||
}
|
||||
|
||||
xml.WriteEndElement();
|
||||
xml.WriteStartElement("iv", "DatiContabili", Namespace);
|
||||
var number = 0;
|
||||
foreach (var module in data.Modules)
|
||||
{
|
||||
xml.WriteStartElement("iv", "Modulo", Namespace);
|
||||
Element(xml, "NumeroModulo", (++number).ToString(CultureInfo.InvariantCulture));
|
||||
Element(
|
||||
xml,
|
||||
module.Period.Periodicity == VatPeriodicity.Monthly ? "Mese" : "Trimestre",
|
||||
module.Period.Number.ToString(CultureInfo.InvariantCulture));
|
||||
Amount(xml, "TotaleOperazioniAttive", module.ActiveTotal);
|
||||
Amount(xml, "TotaleOperazioniPassive", module.PassiveTotal);
|
||||
Amount(xml, "IvaEsigibile", module.TaxDue);
|
||||
Amount(xml, "IvaDetratta", module.TaxDeducted);
|
||||
var difference = module.TaxDue - module.TaxDeducted;
|
||||
Amount(xml, difference >= 0m ? "IvaDovuta" : "IvaCredito", Math.Abs(difference));
|
||||
Amount(xml, "DebitoPrecedente", module.PreviousDebit);
|
||||
Amount(xml, "CreditoPeriodoPrecedente", module.PreviousCredit);
|
||||
Amount(xml, "InteressiDovuti", module.Interest);
|
||||
Amount(xml, "Acconto", module.Advance);
|
||||
Amount(xml, module.Balance >= 0m ? "ImportoDaVersare" : "ImportoACredito", Math.Abs(module.Balance), always: true);
|
||||
xml.WriteEndElement();
|
||||
}
|
||||
|
||||
xml.WriteEndElement();
|
||||
xml.WriteEndElement();
|
||||
xml.WriteEndElement();
|
||||
xml.WriteEndDocument();
|
||||
}
|
||||
|
||||
return buffer.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>An amount as the schema wants it: comma and two decimals, no thousands separator.</summary>
|
||||
/// <param name="amount">The amount.</param>
|
||||
/// <returns>The text, such as <c>1234,50</c>.</returns>
|
||||
public static string FormatAmount(decimal amount) =>
|
||||
Math.Round(amount, 2, MidpointRounding.AwayFromZero).ToString("0.00", CultureInfo.InvariantCulture).Replace('.', ',');
|
||||
|
||||
private static void Element(XmlWriter xml, string name, string value) => xml.WriteElementString("iv", name, Namespace, value);
|
||||
|
||||
private static void Amount(XmlWriter xml, string name, decimal value, bool always = false)
|
||||
{
|
||||
if (value != 0m || always)
|
||||
{
|
||||
Element(xml, name, FormatAmount(value));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user