zdavatz / amiko-osx

AmiKo Desitin for AmiKo OS X
https://apps.apple.com/ch/app/amiko-desitin/id708142753?mt=12
GNU General Public License v3.0
3 stars 2 forks source link

Implement General Invoice Request 4.5 #187

Closed zdavatz closed 3 years ago

zdavatz commented 3 years ago
  1. http://sumex1.net/en/xmlmanagers/generalinvoicerequest/api_cpp/v450/IGeneralInvoiceRequest/SetEsrQR_method.html
  2. https://www.forum-datenaustausch.ch/de/forum-datenaustausch/news/05092016-neue-xml-standards-45/
  3. qr_handbuch.pdf
  4. For the QR-Code you need IBAN and Referenznummer in the XML file.
  5. For the IBAN number we still need a new field in the doctors address, so the doctor can add his IBAN (bank account) number. Put the field after Email, this field is not mandatory but it still has to be validated for a correct "IBAN number".
  6. The Referenznummer is generated like this: 0000000000000<rechnungsnr><prüfziffer>
  7. https://www.tkb.ch/download/online/BESR-Handbuch.pdf?CFID=47820077&CFTOKEN=424f34687ce661c4-F068D0D8-DFB5-ED03-100132DED4E96BAD
  8. I guess it is easiest to use a unique Hash for the rechnungsnr.
  9. sample_invoice_61_2021-41-08_084112_254721.xml.txt
  10. XML would look like this:
      <invoice:esrQR iban="CH4431999123000889012" type="esrQR" reference_number="123456000000000000000000610">
        <invoice:bank>
          <invoice:company>
            <invoice:companyname>Muster Bank</invoice:companyname>
            <invoice:postal>
              <invoice:zip countrycode="CH">9000</invoice:zip>
              <invoice:city>St. Gallen</invoice:city>
            </invoice:postal>
          </invoice:company>
        </invoice:bank>
        <invoice:creditor>
          <invoice:company>
            <invoice:companyname>Augenarztpraxis Dr. Muster AG</invoice:companyname>
            <invoice:postal>
              <invoice:street>Strasse</invoice:street>
              <invoice:zip countrycode="CH">9100</invoice:zip>
              <invoice:city>Herisau</invoice:city>
            </invoice:postal>
          </invoice:company>
        </invoice:creditor>
      </invoice:esrQR>