Proposal For E-Invoice Generation for Zeyut

Proposal summary

This proposal describes the E-invoice generation and validation of e-invoice in Zatca.

Requirement

In the Phase 1 we have added the QR code in Invoice PDF which will display the following information once it is scanned:

  • Company name: This can be populated from Subsidiary.
  • Company VAT Registration number: This can be populated from Subsidiary.
  • Timestamp of the invoice (date and time): The time at which the Print is generated.
  • Invoice total: Total Invoice Amount (Can fetch from the corresponding transaction)
  • VAT total: Total Tax Amount (Can fetch from the corresponding transaction)

As per our understanding, we can use the QR code invoices we implemented in the Arab Malysia account can be used for Tax invoices. In Phase 2 (Integration Phase) Tax Invoices must be submitted in XML format (not PDF/A-3) to the FATOORA Platform for “Clearance “using APIs. FATOORA Platform will validate whether the Tax Invoice is compliant with XML Implementation Standard and run additional referential checks. Once the Tax Invoice passes validation checks, the FATOORA Platform will “Clear” the Tax Invoice by including a Cryptographic Stamp and a QR Code to the XML.

Development portal of Zatca: Zatca

Deliverables

We have included the details for implementing phase 2 of the ZATCA integration below.

Key Requirements for Phase 2 Integration

  • Previous invoice hash to be included within the subsequent electronic invoice or note document.
  • Universal Unique Identifier generation   
  • E-Invoice generation in XML Format
  • Management of Cryptographic stamp identifier for tax invoice
  • Generation of cryptographic stamp for simplified invoice
  • Inclusion of Cryptographic stamp in the QR Code
  • Invoice Counter
  • Sharing of Invoices with the E-Invoice portal in real-time for Electronic/Tax Invoice
  • Reports a single SIMPLIFIED invoice by sending the e-invoice xml to Zatca. If the request is a success, the reporting status will change to “Reported”.
  • Clears a single Standard invoice. Specifically, Zatca accepts standard invoices, encoded in base64, and validates them. On successful validation, the API then signs the invoice, applies a QR code, and returns. If the validation is a success, the status in the response will be Cleared.
  • Script will Issue compliance CSID (CCSID)/certificate to complete the compliance steps.
  • The Compliance request id which was generated from the previous step, is used to sign e-invoice documents and authenticate e-invoicing API calls.

Field setup in Company information and subsidiary

We will add the following mandatory fields in the company information and subsidiary records to generate the e-invoice xml and attached the details below:

  • Street name
  • Building number
  • Plot identification
  • City subdivision name
  • City name
  • Party tax scheme company id
  • Postal code
  • Country subentity
  • Country code id

We must fill in these valid field values along with the VAT registration number to generate the e-invoice XML.

Field setup in the customer

The following mandatory fields will be added to the customer record to populate the values to the e-invoice XML:

  • Street name
  • Building Number
  • Plot identification
  • City subdivision name
  • City name
  • Party tax scheme company id
  • Party legal registration name
  • Postal code
  • Country Sub entity
  • Country code ID

Users must enter these values in the customer record.

Field setup in Invoice, Credit memo and Cash sale

We will add following new fields in the Invoice, credit memo and cash sale record to store the e-invoice details.

  • XML Attachment: The field will store the XML of the e-invoice.
  • E-invoice status: verification status of e-invoice
  • E-invoice Hash
  • E-invoice UUID: The unique identifier of the invoice

Custom record setup

We will create following two custom records in NetSuite:

  • “E-invoice setting”: We can create multiple custom record instances for different subsidiaries. The custom record will store the API authentication details for e-invoice verification.  
  • “E-invoice interface status”: The custom record will store the invoice details with status after completing invoice verification in the Zatca.

E-invoice verification:

A button will be added to the invoice. Credit memo and cash sale record to proceed with the invoice verification. Once the user clicks this button, the script will generate the e-invoice XML using data entered in subsidiary, customer, and invoice/credit memo/cash sale. And the e-invoice will be sent to Zatca for verification. And a custom record “E-invoice interface status” will be created with the invoice details. The custom record will store the Generated XML, Zatca validation status, QR code, and invoice details.

Assumptions

  • The E-invoice will be verified on Zatca in every time the user clicks the Button in invoice/credit memo/cash sale record.
  • We will do the verification only for the invoice, credit memo, and cash sale in this scope.
  • The script will do the following operations:
    • The script will create the E-invoice XML using the invoice data
    • Reports a single SIMPLIFIED invoice by sending the e-invoice xml to Zatca. If the request is a success, the reporting status will change to “Reported”.
    • Clears a single Standard invoice. Specifically, zatca accepts standard invoices, encoded in base64, and validates them. On successful validation, the API then signs the invoice, applies a QR code and returns. If the validation is a success, the status in the response will be Cleared.
    • Script will Issue compliance CSID (CCSID)/certificate to complete the compliance steps.
    • The Compliance request id, which was generated from the previous step, is used to sign e-invoice documents, and authenticate e-invoicing API calls.
  • We will use the VAT registration numbers added to the company information and subsidiary records for invoice verification in the development stage. And we assume that these VAT registration numbers are valid in Zatca.

Risk

  • The values in new fields in company information and subsidiary and the VAT registration numbers should be valid. Otherwise, the script will show an error when sending the e-invoice XML to Zatca for verification.

Leave a comment

Your email address will not be published. Required fields are marked *