Task #17572
Updated by Redmine Admin 4 months ago
### **Acceptance Criteria:**
1. **Report Generation**
* The system should provide a **Sales Report VAT** under the reports module.
* Users should be able to generate the report for **a specific date range**.
* The report should be exportable in **PDF, Excel, and CSV formats**.
2. **Filter Options**
* Users should be able to filter the report by:
* **Date Range** (Daily, Weekly, Monthly, Custom Date Selection)
* **Client**
* **Invoice Status** (Paid, Unpaid, Partially Paid)
* **Salesperson**
* **~~Department~~**~~ **Department** (Freight, Clearing, Warehousing, etc.).~~ since we do not have a department, list the Service (ocean import, ocean export, air import, air export, sea clearing, Air clearing, etc.) here.
* **VAT Type** (Standard, Zero-Rated, Exempt)
3. **Report Header:**
* Company Name, Logo, Address, Contact Info, VAT Registration Number
* Report Title: "Sales Report (VAT)"
* Reporting Period (clearly stated From - To dates)
4. **Fields:**
* **Invoice Date:** The date the invoice was generated.
* **Invoice #:** Unique Invoice Reference.
* **VAT #:** VAT Registration or reference number related to client(if applicable).
* **Client BRN:** Business Registration Number of the client.
* **Client Name:** Clearly identifies customer: Code + Name.
* **FC Used:** Foreign currency used for the transaction (e.g., MUR, USD).
* **FC Rate:** Exchange rate applied for the foreign currency.
* **Invoice Amount FC:** Total invoice amount in Foreign Currency.
* **Zero Rated, Exempted, Taxable:** Clearly separated amounts per VAT classification.
* **VAT Amount:** VAT amount calculated per invoice.
* **Invoice Amount (MUR):** Invoice amount in local currency.
* **Invoice Status:** (Paid, Unpaid, Partially Paid)
* **Salesperson:** Salesperson responsible for the sale/invoice.
* **Department:** Clearly shows operational division (Freight, Clearing, Warehousing).
* **Description/Job Ref:** MBL number/HBL number or BOE number/s in case of clearing.
5. **Formatting and readability:**
* Clearly aligned numeric columns for easy readability.
* Amounts formatted clearly to two decimal points.
6. **Permissions & Access Control**
* Only **authorised users (e.g., finance team, management)** should have access to generate this report.
7. **Footer**
* Page numbering (Page X of Y)
* Printed by \<user\>
* Report generation Date & Time
8. **Error Handling & Notifications**
* If no data is available for the selected date range, display a message:
_"No data found for the selected period."_
* If the report fails to generate, log an error and notify the user.
9. **Report Contents**\
The report should include the columns as per the samples given below:

{width="779" height="551"}
{width="662" height="399"}
**Proposed Format:**
<table>
<tr>
<td>
**#**
</td>
<td>
**Invoice Date**
</td>
<td>
**Invoice #**
</td>
<td>
**Client VAT #**
</td>
<td>
**Client BRN**
</td>
<td>
**Client Name**
</td>
<td>
**Department**
</td>
<td>
**Salesperson**
</td>
<td>
**Description/Job Ref**
</td>
<td>
**FC Used**
</td>
<td>
**FC Rate**
</td>
<td>
**Invoice Amount FC**
</td>
<td>
**Zero Rated**
</td>
<td>
**Exempted**
</td>
<td>Taxable</td>
<td>Invoice Amount (MUR)</td>
<td>VAT Amount</td>
<td>Invoice Status</td>
</tr>
<tr>
<td align="right">1</td>
<td align="right">07/03/2024</td>
<td>INV12452</td>
<td>VAT123</td>
<td>C06041409</td>
<td>AC001 -ABC Ltd</td>
<td>Clearing</td>
<td>John Doe</td>
<td align="right">7202405272</td>
<td>USD</td>
<td align="right">45.12</td>
<td align="right">1,000.00</td>
<td align="right">500</td>
<td align="right">0</td>
<td align="right">500</td>
<td align="right">45,120.00</td>
<td align="right">75</td>
<td>Paid</td>
</tr>
<tr>
<td align="right">2</td>
<td align="right">08/03/2024</td>
<td>INV12453</td>
<td>VAT124</td>
<td>C07014066</td>
<td>XY001- XYZ Ltd</td>
<td>Freight</td>
<td>Jane Smith</td>
<td align="right">7202403187</td>
<td>MUR</td>
<td align="right">1</td>
<td align="right">2,000.00</td>
<td align="right">0</td>
<td align="right">1,000.00</td>
<td align="right">1,000.00</td>
<td align="right">2,150.00</td>
<td align="right">150</td>
<td>Unpaid</td>
</tr>
<tr>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
<tr>
<td colspan="14"> </td> colspan="14">
</td>
<td>
**Total**
</td>
<td>
**XX,XXX.XX**
</td>
<td>
**XX,XXX.XX**
</td>
<td> </td>
</tr>
</table>