Archive and verify e-invoice files
alameen ERP 10 keeps for every processed Saudi invoice an XML file, and a PDF file if you wish, in a folder on the computer. You generate these files, check that they did not change, and send them to the customer, from the Tax Invoices List and from the Archives window.
Before you begin
- Your licence includes automatic archiving of the Saudi e-invoice, and you turned it on in E-Invoice Settings: saving XML files in a folder, and saving the invoice as PDF if you want. Without it the command Archives is not available.
- The local storage folder exists and can be written to. Otherwise neither the invoice list nor the Archives window opens ("Error in local archive").
- The invoice is in a status that is archived: Ready for reporting, Reported, Cleared by the authority, the warning versions of these, Reporting - Error, or Approved in phase one.
- To send messages: the notifications system is in your licence and sending messages is on in the settings.
Steps
Generate archive files
The program generates the archive files by itself when an invoice is prepared, approved or sent. Use these steps if they were not generated, or their records were deleted.
- Open Systems > KSA Taxes > E-invoice > Tax Invoices List.
- Set the period and the status. You can use the check boxes Not autoarchived as XML and Not autoarchived as PDF to show the invoices that lack a file. Click Refresh.
- Clear the invoices you do not want to archive, then click Operations > Invoice Archiving. The command appears if a ticked row lacks a file.
- The program shows a confirmation box titled "Invoice Archiving" with no question text. Click Ok.
- Read the summary and the column Operation Status: Succeeded for an invoice whose files were generated, Succeeded - No change for one that has both files, Error in archiving file if the generation failed, and Invoice status does not allow if its status is not archived.
For one invoice: open Archives, type its serial number, click Refresh, and click Generate Archive Files. The button shows if the invoice has no record from automatic archiving.
Validate an archive file
- Open Systems > KSA Taxes > E-invoice > Archives, or open the invoice and choose Archives from its Taxes menu.
- Type the serial number of the invoice and click Refresh. Its files appear. A file that is no longer on the disk shows in the error colour, with No in the column Exists.
- Select an XML file that exists and click Validate. The result is one of these:
- "Operation successfully completed, the archival file is completely match the invoice." The file is sound.
- "File error: The archive file is invalid while the invoice is correct." The file changed after it was generated. Generate it again (see below).
- "Invoice error: The archive file is not compliant with invoice, but it was matching it the moment when generated." The invoice changed after the file was generated (phase one).
- The question "The file is valid for the invoice... Do you want to see details?": the difference is in fields that are allowed to differ. Yes shows Field Details.
- If the note "Archival file name does not match the required format" appears, the file is sound but its name does not follow the archive name format.
For a file that is not in the records: in the same window click Validate Specific File, choose the file with Browse, then Validate. If an empty message box appears, or one line with only the note about the name, the file does not match the invoice.
Open an archive file
Select the file in the list and click Open. The program opens it with the application linked to its type on the computer. The button works for an existing file only.
Send the archive message and set the cloud link
- In the Archives window select the automatic file of the format that is sent (XML or PDF, as the Messages Settings at the top of the window show).
- If the sending type is Dynamic path set by user: click Cloud URL, type the link of the file in E-invoice Path, then Ok. The link shows in the column Cloud URL. If you leave the link empty before sending, the program asks for it before it sends.
- Click Send Archives. On success the message "Operation successfully completed" appears with the title "E-invoice", and the column Sent becomes Yes.
For several invoices: in the list use Operations > Sending messages. The command appears if a ticked row has no sent message, and asks for confirmation "Are you sure you want to send the messages along with the selected invoices".
Result
- An archive file in the local storage folder, named: the company tax number, then the date and time of the last event of the invoice, then its serial number. The file is recorded for the invoice in Archives with its fingerprint.
- In the list the columns Auto archived and PDF become Yes, and Sent after sending.
- If you deleted the archive records with an administration tool (Administration Tools) and want to generate them again, delete or move the old files from the folder first: the program does not replace a file with the same name that has no record, and the row shows Error in archiving file.
If something goes wrong
| Message or wording | Why it appears | What to do |
|---|---|---|
| Error in local archive | The folder for XML or PDF files is empty in the settings or cannot be reached. | Correct the folder on the Local Storage page of the e-invoice settings. |
| Error in archiving file | The generation failed: the folder holds a file with the same name and no record, or no print template was set for PDF archiving, or saving failed. | Move the old file, set the print template ("Please select the print template to use for archiving."), and repeat. |
| Invoice status does not allow | The status of the invoice is not archived. | Process the invoice first. |
| Serial Number is required | You clicked Refresh with the field empty. | Type the number. |
| No record found | The invoice has no archive record. | Generate the files or validate a specific file. |
| Error sending | The message could not be sent from the list. | Check the messages settings and the archive file, and repeat. |
| No archive record to send | There is no automatic file of the format set in the messages settings. | Generate the file first. |
| Message not sent | The message went but was not recorded as sent. | Check the messages settings. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.