# Configure electronic invoicing and local reporting

## Electronic invoicing and ETA reporting

Egypt ETA electronic invoicing connects invoice preparation, signing, submission, and
status review. ETA E-Invoicing Statistics gives you a reporting view of submitted customer
invoices and refunds.

Use this page according to the job you need to complete:

| If you need to… | Go to |
|---|---|
| configure integration and submission timing | [Configure ETA integration and submission](#configure-eta-integration-and-submission) |
| prepare the personal signing device | [Prepare invoice signing](#prepare-invoice-signing) |
| submit an invoice and read its status | [Submit invoices and monitor ETA status](#submit-invoices-and-monitor-eta-status) |
| review submitted-invoice totals and groupings | [Review ETA invoice statistics](#review-eta-invoice-statistics) |
| fix a connection, credential, signing, or submission problem | [Troubleshoot ETA setup and submission](#troubleshoot-eta-setup-and-submission) |
| configure the invoice, customer, or product data used before submission | the **Configure customers, products, and invoices** page |
| configure country-specific reports and certificates | the **Configure country statutory reports and certificates** page |
| continue into broader accounting reports and audit work | the **Reports and audit work** page |

**Result:** You know which part of the ETA work to open next.

## Before you start

**Prerequisites**

| Have or confirm | Why it matters |
|---|---|
| An Egyptian company | The ETA settings block and invoice actions use the company country. |
| An invoice that is posted and not yet signed | This is the condition for **Sign Invoice**. |
| An Egyptian posted invoice with no Submission ID | This is the condition for **Submit to ETA**. |
| ETA credentials for the selected integration mode | The selected mode determines which credentials the connection and submission use. |
| A personal signing record for the company | Signing checks for a drive associated with you and the company. |
| An ETA Certificate, ETA USB Pin, and Access Token | These are the fields used by the signing setup. |
| The host of the local signing tool | The certificate action and invoice signing action use the configured signing host. |

Permissions also affect what you can do. **Sign Invoice** is restricted to the accounting
manager group, while **Submit to ETA** and **Get ETA Invoice PDF** are restricted to the
accounting invoice group.

**Steps**

1. Confirm that the invoice is posted before you begin signing or submission.
2. Confirm that the invoice is Egyptian before you look for the ETA actions.
3. Enter the company's tax information.
4. Enter the ETA information on the invoice journal.
5. Complete the branch details.
6. Complete the customer details.
7. Set the unit codes on the invoice lines.
8. Set the ETA tax codes on the invoice-line taxes.
9. Set the EGS/GS1 barcode on each product.

**Result:** You have the company, access, invoice state, credentials, certificate information,
and signing setup needed for the ETA procedures.

## Find the ETA administration and reporting surfaces

ETA Configurations is the administration list for company-specific ETA settings. Thumb Drive
is the signing setup list. ETA E-Invoicing Statistics is the reporting surface for customer
invoices and refunds that have a Submission ID.

**Steps**

1. Open **Accounting** and **Configuration**.
2. Open **ETA Configurations** to manage company-specific integration settings.
3. Open **Thumb Drive** under **ETA** to manage signing information.
4. Open **Accounting** and **Reporting**.
5. Open **ETA E-Invoicing Statistics** to review submitted invoices.

The landed screen displayed **Menu Style**, **Font Type**, **Preloader Option**, **Theme Colors**,
**Brand Color**, **Background Color**, **Sidebar Color**, and **Chatter Position**, together with
**Save** and **Reset To Default**. These are workspace controls, not ETA administration controls.

**Result:** The required ETA administration or reporting surface is open, ready for configuration
or reporting.

## Configure ETA integration and submission

ETA configuration controls how the company connects to the Egypt Tax Authority and when an
invoice is submitted. Direct Mode uses the company's ETA credentials. Service Provider Mode
uses service-provider credentials.

**Prerequisites**

- You have access to the ETA configuration for the company.
- You have the credentials for the mode you select.

**Steps**

1. Open **ETA Configurations**.
2. Select the company in **Company**.
3. Choose one integration mode in **ETA Integration Mode**:

   | If you need to… | Choose |
   |---|---|
   | use the company's own ETA credentials | `Direct Mode - Use My Own ETA Credentials` |
   | use service-provider credentials | `Service Provider Mode - Use Sherkety Credentials` |

4. Complete the credentials for the selected mode:

   | Selected mode | Complete |
   |---|---|
   | Direct Mode | **ETA Client ID** and **ETA Secret** |
   | Service Provider Mode | **Service Provider Client ID** and **Service Provider Secret** |

5. Choose one option in **Submission Mode**:

   | If you need to… | Choose |
   |---|---|
   | submit when the invoice is confirmed | `Automatic - Submit to ETA when invoice is confirmed` |
   | choose when to submit after confirmation | `Manual - Submit to ETA manually using button` |

6. Select **In Production Environment** when the company is ready to send invoices to the
   production environment.
7. Enter the threshold in **Invoicing Threshold**.
8. Select **Test ETA Connection** after the credentials are configured.

**Result:** The company's ETA integration mode, credentials, submission timing, production
setting, and invoicing threshold are configured for signing setup.

## Prepare invoice signing

Use the Thumb Drive record for signing setup before sending an invoice to ETA. The certificate
action starts the certificate retrieval path through the configured signing host.

**Prerequisites**

- You have the accounting manager permission required by **Sign Invoice**.
- You have the company's signing information and the local signing tool host.

**Steps**

1. Open **Thumb Drive**.
2. Create or open the record for your company.
3. Complete **ETA USB Pin**.
4. Complete **Access Token**.
5. Select **Get certificate**.
6. Confirm that **ETA Certificate** is available before signing an invoice.

**Result:** The personal Thumb Drive record has the signing information and certificate path
needed by **Sign Invoice**, so you can submit the posted invoice.

## Submit invoices and monitor ETA status

An ETA E-Invoice is the Egyptian invoice record together with its ETA identifiers and submission
status. Use this procedure after the invoice is posted and the required company, journal,
branch, customer, product, unit, tax, and signing information is ready.

**Prerequisites**

- The invoice is Egyptian and posted.
- The invoice has no Submission ID when you select **Submit to ETA**.
- A personal Thumb Drive and certificate are ready when you select **Sign Invoice**.

**Steps**

1. Open the posted invoice.
2. Select **Sign Invoice** when the invoice is Egyptian, posted, and unsigned.
3. Select **Submit to ETA** when the invoice is Egyptian, posted, and has no Submission ID.
4. Open the **ETA E-Invoice** tab.
5. Read **Document UUID** and **Submission ID** in that tab.
6. Read the invoice ribbon for its ETA status:

   | If the invoice shows… | The status is |
   |---|---|
   | `Not Submitted to ETA` | `Not Submitted` |
   | `Submitted to ETA` | `Submitted` |
   | `Valid ETA Invoice` | `Valid` |
   | the invoice is marked invalid by ETA | `Invalid` |

7. Select **Get ETA Invoice PDF** when the invoice EDI state is `sent`.

**Result:** The invoice has its ETA identifiers and status available in the **ETA E-Invoice**
tab, and the ETA PDF action is available when the invoice EDI state is `sent` for reporting.

## Review ETA invoice statistics

ETA E-Invoicing Statistics is a reporting surface for customer invoices and refunds with a
Submission ID. It opens with pivot, graph, and tree views and provides filters and groupings for
the submitted invoice population.

**Prerequisites**

- Submitted customer invoices or refunds are available for the selected company.

**Steps**

1. Open **ETA E-Invoicing Statistics**.
2. Read the available invoice columns: `Invoice Number`, **Invoice Date**, **Customer**,
   `ETA UUID`, `Submission ID`, **Total**, **Status**, and `Company`.
3. Filter by `Invoice Number`, **Customer**, `ETA UUID`, or `Submission ID` when you need
   to locate a particular invoice.
4. Select one reporting filter:

   | If you need to… | Select |
   |---|---|
   | show records submitted to ETA | **Submitted to ETA** |
   | show records with an ETA identifier | **With ETA UUID** |
   | limit the date range to the current month | **This Month** |
   | limit the date range to the current year | **This Year** |

5. Select `Group By` and choose **Customer**, **Invoice Date**, **Status**, or `Company`.
6. Switch among the pivot, graph, and tree views when you need a different presentation of the
   same reporting population.

**Result:** The ETA statistics show the submitted invoice population with the selected filter,
grouping, and view; use the next section when a message requires corrective action.

## Troubleshoot ETA setup and submission

Use the exact message on screen to choose the corrective path. The messages below cover ETA
connection, credentials, invoice data, certificate setup, signing, and submission.

| Message | What to do |
|---|---|
| `Please configure your ETA credentials before testing the connection.` | Complete the credentials for the selected integration mode, then select **Test ETA Connection** again. |
| `ETA EDI format not found. Please ensure the module is properly installed.` | Ask your administrator to check the ETA EDI installation. |
| `Connection Successful!` | Continue with invoice preparation or submission. |
| `Successfully connected to Egypt Tax Authority API. Your credentials are valid.` | Continue with invoice preparation or submission. |
| `Connection failed.` | Check the connection details and the error text that follows the message. |
| `Connection timeout. Please check your internet connection and try again.` | Check the internet connection and try again. |
| `Cannot connect to ETA server. Please check your internet connection.` | Check the internet connection and try again. |
| `An error occurred: %s` | Read the inserted error text and correct the indicated problem. |
| `No eligible invoices to submit. Invoices must be: Posted; Egyptian invoices (country code EG); Not already submitted to ETA; Customer invoices or credit notes` | Post an Egyptian customer invoice or credit note that has not already been submitted. |
| `Please only sign invoices from one company at a time` | Select invoices belonging to one company before selecting **Sign Invoice**. |
| `Please setup a personal drive for company %s` | Open **Thumb Drive** and set up your personal drive for the company. |
| `Please setup the certificate on the thumb drive menu` | Open **Thumb Drive** and obtain the certificate before signing. |
| `%d invoice(s) successfully submitted to ETA.` | Continue by reading the invoice ETA identifiers and status. |
| `%d invoice(s) skipped (already submitted or locked).` | Review the skipped invoices and their Submission IDs or locks. |
| `%d invoice(s) failed to submit.` | Review the error details shown with the submission result. |
| `This invoice has been marked as invalid by the ETA. Please check the ETA website for more information` | Check the ETA website for the invoice's validation details. |
| `This invoice has been sent to the ETA, but we are still awaiting validation` | Wait for ETA validation before treating the invoice as valid. |
| `Document Cancelled` | Treat the ETA document as cancelled. |
| `an Unknown error has occured` | Review the invoice and ETA response details before retrying. |
| `Direct Mode is selected but ETA credentials are not configured. Please configure your ETA Client ID and Secret in Settings > Accounting > ETA E-Invoicing Settings.` | Configure **ETA Client ID** and **ETA Secret** in the ETA settings. |
| `Service Provider Mode is selected but Sherkety's credentials are not configured. Please contact your system administrator to configure the service provider credentials.` | Contact the system administrator to configure the service-provider credentials. |
| `The company's Tax Registration Number (VAT/TaxRIN) is not configured.` | Configure the company's Tax Registration Number. |
| `Invoice date (%s) cannot be in the future. Please use today's date or earlier.` | Correct the invoice date to today or an earlier date. |
| `Invoice date (%s) is too old. ETA only accepts invoices from the last 2 years.` | Correct the invoice date to a date within the last two years. |
| `You cannot issue an invoice to a partner with the same VAT number as the branch.` | Correct the partner or branch VAT information. |
| `Please configure the token domain from the system parameters` | Configure the token domain in system parameters. |
| `Please configure the API domain from the system parameters` | Configure the API domain in system parameters. |
| `Please set the all the ETA information on the invoice's journal` | Complete the ETA information on the invoice journal. |
| `Please add all the required fields in the branch details` | Complete the required branch details. |
| `Please add all the required fields in the customer details` | Complete the required customer details. |
| `Please make sure the invoice lines UoM codes are all set up correctly` | Correct the unit-of-measure codes on the invoice lines. |
| `Please make sure the invoice lines taxes all have the correct ETA tax code` | Correct the ETA tax codes on the invoice-line taxes. |
| `Please make sure the EGS/GS1 Barcode is set correctly on all products` | Correct the EGS/GS1 barcode on each product. |
| `An error occured in created the ETA invoice, please retry signing` | Retry signing after checking the invoice data. |
| `Please make sure the invoice is signed` | Select **Sign Invoice** before submitting. |
| `Please define the host of sign tool.` | Define the host of the local signing tool. |

The ETA JSON attachment and signing flag are not part of the visible **ETA E-Invoice** tab.
The certificate and access-token columns are not part of the visible **Thumb Drive** list.
The statistics tree is for reading and does not create or edit records.

The administration route can land on the theme customizer instead of the requested settings
screen. When that happens, use **Accounting**, **Configuration**, and the relevant ETA entry
to reach the intended surface.

**Result:** You have a corrective action for the message or route you encountered.

## What to do next

After configuration, continue with the invoice and product data maintained on the **Configure
customers, products, and invoices** page. After a country-specific certificate or statutory
variant becomes part of the task, continue with the **Configure country statutory reports and
certificates** page. After reviewing ETA totals and groupings, continue with the **Reports and
audit work** page for broader accounting reporting.

**Result:** You have the next page or task for the work that follows ETA administration.
