Wiki source code of 09. ARAccounting
Last modified by Fredrik Nilsson on 2023/12/21 09:20
2.1 | 1 | (% class="jumbotron" %) | |
2 | ((( | ||
3 | (% class="container" %) | ||
4 | ((( | ||
29.1 | 5 | This is a technical overview of the ARAccounting report containing ledger bookkeeping data. The file is created on a daily basis. | |
2.1 | 6 | ))) | |
7 | ))) | ||
8 | |||
57.1 | 9 | = [[image:ARAccounting_[2.0].svg||height="826" width="468"]] = | |
2.1 | 10 | ||
47.1 | 11 | == == | |
2.1 | 12 | ||
10.1 | 13 | == ARAccounting == | |
2.1 | 14 | ||
49.1 | 15 | ARAccounting describes the accounting records (bookkeeping data) on a transactional level. | |
10.1 | 16 | ||
2.1 | 17 | {{warning}} | |
10.1 | 18 | Please note that your ARAccounting file, depending on package type and file version, might only utilize and/or contain a subset of all elements described below. See the XSD for your ARAccounting file version to learn more. | |
2.1 | 19 | {{/warning}} | |
20 | |||
21 | == Encoding == | ||
22 | |||
23 | The file uses [[UTF-8 encoding>>https://en.wikipedia.org/wiki/UTF-8]]. | ||
24 | |||
25 | (% id="HNameconvention" %) | ||
26 | == Name convention == | ||
27 | |||
49.1 | 28 | **For version 1.0** | |
16.1 | 29 | ##ARAccounting10_<CompanyNumber>_<DateTime>_<SerialNumber>.xml## | |
2.1 | 30 | ||
49.1 | 31 | **For version 1.1 and above** | |
32 | ##ARAccounting_<CompanyNumber>_<DateTime>_<SerialNumber>.xml## | ||
33 | |||
2.1 | 34 | ||
35 | (% class="table-bordered table-striped" %) | ||
35.1 | 36 | |=Name components|=Description | |
2.1 | 37 | |CompanyNumber|The company number in our ledger system | |
15.1 | 38 | |DateTime|The date and time that the file was created. Uses ISO 8601 format, ##YYYYMMDDhhmmdd## | |
35.1 | 39 | |SerialNumber|Should follow an uninterrupted number series, 1, 2, 3 and so on. | |
2.1 | 40 | ||
27.1 | 41 | (% id="HImportanttonote21" %) | |
42 | == Important to note! == | ||
43 | |||
44 | * Always use GLAccount and AccountingAction when setting up the processing of ARAccounting in your ERP. | ||
45 | * If necessary, map the default PayEx Book Accounts to your own customized book accounts. | ||
37.1 | 46 | * All accounting actions can be reversed/mirrored, e.g. when payer withdraws a direct debet payment. | |
58.1 | 47 | * The sum of all book records "Short-term receivable from PayEx" (GLAccount 1684, 1390, 6490 or 1760 depending on country), per BookDate, corresponds to the Client asset disbursement reported in the ARSettlement/Balance Report. | |
27.1 | 48 | ||
17.1 | 49 | == Attributes == | |
50 | |||
20.1 | 51 | The ARAccounting contains the following attributes compared to ARAccountingDetail: | |
17.1 | 52 | ||
53 | * InterCompanyCode | ||
54 | * VatCode | ||
55 | * CustomerNo | ||
20.1 | 56 | * GLAccount replacing BookAccount | |
17.1 | 57 | ||
33.1 | 58 | {{display reference="Main.Invoicing.invoice-service.Implementation guide.Technical reference.6\. ARAccountingDetail.WebHome" section="HBookAccounts"/}} | |
21.1 | 59 | ||
33.1 | 60 | {{display reference="Main.Invoicing.invoice-service.Implementation guide.Technical reference.6\. ARAccountingDetail.WebHome" section="HTransactionCause"/}} | |
26.1 | 61 | ||
43.1 | 62 | (% id="HAccountingexamples" %) | |
63 | == Accounting examples == | ||
64 | |||
44.1 | 65 | Examples of typical payment scenarios and corresponding accounting redords (see Book accounts for complete list of accounts) | |
43.1 | 66 | Original invoice amount = 1000 SEK. | |
67 | |||
68 | (% id="HFullpaymentincludingreminderfee2Ccollectionfeeandinterest28resultingininvoicestatus3Dclosed29" %) | ||
69 | === Full payment including reminder fee, collection fee and interest (resulting in invoice status ~= closed) === | ||
70 | |||
71 | <Accounting Amount="-1000.00" GLAccount="1510" AccountingAction="C"/> | ||
72 | <Accounting Amount="-60.00" GLAccount="3591" AccountingAction="C"/> | ||
73 | <Accounting Amount="-180.00" GLAccount="3592" AccountingAction="C"/> | ||
74 | <Accounting Amount="-4.69" GLAccount="8313" AccountingAction="C"/> | ||
75 | <Accounting Amount="1000.00" GLAccount="1684" AccountingAction="D"/> | ||
76 | <Accounting Amount="60.00" GLAccount="1684" AccountingAction="D"/> | ||
77 | <Accounting Amount="180.00" GLAccount="1684" AccountingAction="D"/> | ||
78 | <Accounting Amount="4.69" GLAccount="1684" AccountingAction="D"/> | ||
79 | |||
80 | (% id="HPartpayment" %) | ||
81 | === Part payment === | ||
82 | |||
83 | <Accounting Amount="-500.00" GLAccount="1510" AccountingAction="C"/> | ||
84 | <Accounting Amount="500.00" GLAccount="1684" AccountingAction="D"/> | ||
85 | |||
86 | (% id="HOverpayment28surplusnotaffectingaccounting29" %) | ||
87 | === Over payment (surplus not affecting accounting) === | ||
88 | |||
89 | <Accounting Amount="-1000.00" GLAccount="1510" AccountingAction="C"/> | ||
90 | <Accounting Amount="1000.00" GLAccount="1684" AccountingAction="D"/> | ||
91 | |||
92 | (% id="HSettlecreditinvoiceagainstdebetinvoice28correctionofincorrectinvoices29" %) | ||
93 | === Settle credit invoice against debet invoice (correction of incorrect invoices) === | ||
94 | |||
95 | //Debit invoice// | ||
96 | <Accounting Amount="-125.00" GLAccount="1510" AccountingAction="C"/> | ||
97 | <Accounting Amount="125.00" GLAccount="2499" AccountingAction="D"/> | ||
98 | <Accounting Amount="125.00" GLAccount="1510" AccountingAction="D"/> | ||
99 | <Accounting Amount="-125.00" GLAccount="2499" AccountingAction="C"/> | ||
100 | |||
101 | //Credit invoice// | ||
102 | <Accounting Amount="-125.00" GLAccount="2499" AccountingAction="C"/> | ||
103 | <Accounting Amount="125.00" GLAccount="2490" AccountingAction="D"/> | ||
104 | <Accounting Amount="125.00" GLAccount="2499" AccountingAction="D"/> | ||
105 | <Accounting Amount="-125.00" GLAccount="2490" AccountingAction="C"/> | ||
106 | |||
107 | (% id="HInvoiceadjustment28generallyusedforwritedownoffeesorbaddebtlosses29" %) | ||
108 | === Invoice adjustment (generally used for write down of fees or bad debt losses) === | ||
109 | |||
110 | <Accounting Amount="-150.00" GLAccount="1510" AccountingAction="C"/> | ||
111 | <Accounting Amount="150.00" GLAccount="1519" AccountingAction="D"/> | ||
112 | |||
113 | (% id="HRemissionofresidualbalances" %) | ||
114 | === Remission of residual balances === | ||
115 | |||
116 | <Accounting Amount="-1.00" GLAccount="1510" AccountingAction="C"/> | ||
117 | <Accounting Amount="1.00" GLAccount="3710" AccountingAction="D"/> | ||
118 | |||
26.1 | 119 | (% class="wikigeneratedheader" id="HXSDValidation" %) | |
25.1 | 120 | == (% style="color:inherit; font-family:inherit" %)XSD Validation(%%) == | |
22.1 | 121 | ||
50.1 | 122 | The ARAccounting file must be validated toward an up-to-date[[ >>attach:ARAccountingDetail_[1.1].xsd]]XSD (##ARAccounting_[x.x].xsd##). You can download the latest version below. | |
2.1 | 123 | ||
50.1 | 124 | (% class="box infomessage" %) | |
125 | ((( | ||
126 | Make sure you are using the correct version of the XSD, ie. that it supports the version of the file you receive from PayEx | ||
127 | ))) | ||
128 | |||
2.1 | 129 | == Current XML schema description == | |
130 | |||
131 | (% class="wikigeneratedid" %) | ||
34.1 | 132 | A detailed description of the elements in the current version of the XML schema definition file (XSD) can be found [[here>>doc:Main.Invoicing.invoice-service.Implementation guide.Technical reference.9\. ARAccounting.XML Schema specification.WebHome]] | |
2.1 | 133 | ||
5.1 | 134 | == Download current XML schema file == | |
2.1 | 135 | ||
136 | (% class="row" %) | ||
137 | ((( | ||
138 | (% class="col-xs-12" %) | ||
139 | ((( | ||
51.1 | 140 | (% border="0" class="table-bordered table-striped" style="width:900px" %) | |
2.1 | 141 | |=(% style="width: 267px; background-color: rgb(237, 237, 237);" %)Fileversion|=(% style="width: 121px; background-color: rgb(237, 237, 237);" %)Version|=(% style="width: 207px; background-color: rgb(237, 237, 237);" %)Releasedate|=(% style="width: 331px; background-color: rgb(237, 237, 237);" %)Comment | |
49.1 | 142 | |(% style="width:267px" %)[[ARAccounting_[2.X].xsd>>attach:Main.Invoicing.invoice-service.Implementation guide.Technical reference.WebHome@ARAccounting_[2.X].xsd]]|(% style="width:121px" %)2.0|(% style="width:207px" %)2023-02-14|(% style="width:331px" %)((( | |
143 | * **BookDate** | ||
55.1 | 144 | Added new required field "##BookDate"## | |
49.1 | 145 | * **Change of filename** | |
146 | Generated XML filename is changed ("10" is removed from filename) | ||
54.1 | 147 | ##ARAccounting_<CompanyNumber>_<DateTime>_<SerialNumber>.xml## | |
49.1 | 148 | ))) | |
149 | |(% style="width:267px" %)[[ARAccounting_[1.X].xsd>>attach:Main.Invoicing.invoice-service.Implementation guide.Technical reference.WebHome@ARAccounting_[1.X].xsd]]|(% style="width:121px" %)1.1|(% style="width:207px" %)2023-02-14|(% style="width:331px" %)((( | ||
150 | This version has exactly the same changes as version 2.0 except that the field ##"bookdate"## is optional in the XSD of this version (although it will always be included in the XML content from PayEx in this version). | ||
2.1 | 151 | ||
49.1 | 152 | If you XSD validate the files from PayEx, this version can be used for an easier transition from 1.0 to 2.0, as it is backwards compatible with version 1.0. | |
153 | |||
154 | If you don't XSD validate the files from PayEx, you can go straight to version 2.0 | ||
155 | ))) | ||
156 | |(% style="width:267px" %)[[ARAccounting_[1.0].xsd>>attach:Main.Invoicing.invoice-service.Implementation guide.Technical reference.WebHome@ARAccounting_[1.0].xsd]]|(% style="width:121px" %)1.0|(% style="width:207px" %)2020-01|(% style="width:331px" %) | ||
157 | |||
2.1 | 158 | == ChangeLog == | |
159 | |||
49.1 | 160 | ||
2.1 | 161 | (% id="HVersion1.1" %) | |
49.1 | 162 | ==== **Version 2.0** ==== | |
2.1 | 163 | ||
164 | (% id="HJanuary2C2016" %) | ||
49.1 | 165 | ===== february, 2023 ===== | |
166 | |||
167 | [[ARAccounting_[2.X].xsd>>attach:Main.Invoicing.invoice-service.Implementation guide.Technical reference.WebHome@ARAccounting_[2.X].xsd]] | ||
168 | |||
169 | (% class="box" %) | ||
170 | ((( | ||
171 | * **BookDate** | ||
55.1 | 172 | Added new required field "##BookDate"## | |
49.1 | 173 | ||
174 | * **Change of filename** | ||
175 | Generated XML filename is changed ("10" is removed from filename) | ||
54.1 | 176 | ##ARAccounting_<CompanyNumber>_<DateTime>_<SerialNumber>.xml## | |
49.1 | 177 | ))) | |
178 | |||
179 | (% id="HVersion1.1" %) | ||
180 | ==== | ||
181 | **Version 1.1** ==== | ||
182 | |||
183 | (% id="HJanuary2C2016" %) | ||
184 | ===== february, 2023 ===== | ||
185 | |||
186 | [[ARAccounting_[1.X].xsd>>attach:Main.Invoicing.invoice-service.Implementation guide.Technical reference.WebHome@ARAccounting_[1.X].xsd]] | ||
187 | |||
188 | (% class="box" %) | ||
189 | ((( | ||
190 | This version has exactly the same changes as version 2.0 except that the field "bookdate" is optional in the XSD of this version (although it will always be included in the XML content from PayEx in this version). | ||
191 | |||
192 | If you XSD validate the files from PayEx, this version can be used for an easier transition from 1.0 to 2.0, as it is backwards compatible with version 1.0. | ||
193 | |||
194 | If you don't XSD validate the files from PayEx, you can go straight to version 2.0 | ||
195 | ))) | ||
196 | |||
197 | (% id="HVersion1.1" %) | ||
198 | ==== | ||
199 | **Version 1.0** ==== | ||
200 | |||
201 | (% id="HJanuary2C2016" %) | ||
11.1 | 202 | ===== january, 2020 ===== | |
2.1 | 203 | ||
47.1 | 204 | [[ARAccounting_[1.0].xsd>>attach:ARAccounting_[1.0].xsd]] | |
2.1 | 205 | ||
206 | (% class="box" %) | ||
207 | ((( | ||
208 | Initial version (latest documented version) | ||
209 | ))) | ||
210 | |||
36.1 | 211 | == Download sample file == | |
212 | |||
213 | [[ARAccounting10_141414_20210827073340_0>>attach:Main.Invoicing.invoice-service.Implementation guide.Technical reference.WebHome@ArAccounting10_141414_20210827073340_0.XML]] | ||
2.1 | 214 | ))) | |
215 | ))) |