{"id":7991,"date":"2015-11-16T01:01:43","date_gmt":"2015-11-16T01:01:43","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/16\/dasdom-createappstorebill\/"},"modified":"2022-08-30T15:03:04","modified_gmt":"2022-08-30T15:03:04","slug":"dasdom-createappstorebill","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/16\/dasdom-createappstorebill\/","title":{"rendered":"dasdom\/CreateAppStoreBill"},"content":{"rendered":"<p>Apple generates financial reports in txt format. The German tax office wants to see the bills. This script helps to generate the bills from the financial reports.<\/p>\n<h3>Important Note<\/h3>\n<p>Use this at your own risk. I am not responsible for any lost data on your machine. The script removes temporary files after it ran. Therefore you should create a dictionary for your financial reports and run the script in that directory\u2026<\/p>\n<p>To create the bills for the tax office with this script works for me. Before you submit the bills check with your tax consultant! I am not responsible for any problems you have with your tax office because of this script.<\/p>\n<h3>What you need<\/h3>\n<p>You need pdflatex on your machine. And you should be able to edit LaTeX files because you have to add your address in the head.tex file.<\/p>\n<h3>How it works<\/h3>\n<p>Read the Imortant Note. Read it again!<\/p>\n<p>For every month generate a dictionary. Let\u2019s say you want to generate the bills for December 2012. You could do this:<\/p>\n<pre><code>$ cd ~\/Documents\n$ mkdir financial_reports; cd financial_reports\n$ mkdir 1212; cd 1212\n<\/code><\/pre>\n<p>Download all financial reports from iTunes Connect for that month into that directory.<\/p>\n<p>Copy and past the exchange rates from \u201cPayments &amp; Financial Reports &gt; Payments\u201d within your iTunes Connect and put it into a file called factors.txt. Put that file into the directory with the reports (1212\/ in the example). It should look like this:<\/p>\n<pre><code>AUD      0.00    13.97   13.97   0.00    0.00    0.00    13.97   0.77022         10.76  EUR\nCHF      0.00    33.15   33.15   0.00    0.00    0.00    33.15   0.80030         26.53  EUR\nDKK      0.00    23.73   23.73   0.00    0.00    0.00    23.73   0.13359         3.17   EUR\nEUR      0.00    247.84  247.84  0.00    0.00    0.00    247.84  1.00000         247.84 EUR\nGBP      0.00    4.55    4.55    0.00    0.00    0.00    4.55    1.16484         5.30   EUR\nINR      0.00    77.00   77.00   0.00    0.00    0.00    77.00   0.01351         1.04   EUR\nJPY      0       179     179     -37     0       0       142     0.00817         1.16   EUR\nMXN      0.00    18.20   18.20   0.00    0.00    0.00    18.20   0.05824         1.06   EUR\nNOK      0.00    7.84    7.84    0.00    0.00    0.00    7.84    0.13393         1.05   EUR\nNZD      0.00    1.81    1.81    0.00    0.00    0.00    1.81    0.61326         1.11   EUR\nRUB      0.00    138.60  138.60  0.00    0.00    0.00    138.60  0.02395         3.32   EUR\nSEK      0.00    4.26    4.26    0.00    0.00    0.00    4.26    0.11502         0.49   EUR\nSGD      0.00    1.81    1.81    0.00    0.00    0.00    1.81    0.60221         1.09   EUR\nUSD      0.00    58.10   58.10   0.00    0.00    0.00    58.10   0.74200         43.11  EUR\nZAR      0.00    11.19   11.19   0.00    0.00    0.00    11.19   0.08311         0.93   EUR\n<\/code><\/pre>\n<p>Set your address in head.tex: Open head.tex with your favorite text editor and search for Mustermann. Change the template address. Then do:<\/p>\n<pre><code>$ cd ~\/Documents\/financial_reports\n$ perl summarize.pl 1212 head.tex tail.tex\n<\/code><\/pre>\n<p>Now you should have files called bill_1212.pdf and bill_1212.tex in that directory.<\/p>\n<p>Done.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/api.coderwall.com\/dasdom\/endorsecount.png\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apple generates financial reports in txt format. The German tax office wants to see the bills. This script helps to generate the bills from the financial reports. Important Note Use this at your own risk. I am not responsible for any lost data on your machine. The script removes temporary files after it ran. Therefore [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7991","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7991"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7991\/revisions"}],"predecessor-version":[{"id":8717,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7991\/revisions\/8717"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}