optima_zatca
# Optima ZATCA **Optima ZATCA** is an Open-source, powerful, feature-rich application designed to ensure full compliance with Saudi Arabia's ZATCA (Zakat, Tax, and Customs Authority) regulations. Covering both Phase 1 and Phase 2 of ZATCA compliance, this app provides a seamless, user-friendly, and highly efficient solution for businesses. --- ## π Main Features Fully compliant with Saudi Arabia's ZATCA E-Invoicing Phase 2 requirements. Includes XML generation, cryptographic stamping, and API integration with the Fatoora portal. Optima ZATCA goes beyond the competition by offering superior performance, unmatched features, and ease of use. Here's what sets it apart: ### **ZATCA Phase 1** - Generate **Simplified Invoices** with embedded QR codes. - ZATCA-compliant print formats for Phase 1. ### **ZATCA Phase 2** - **Automatic CSR generation** and submission to ZATCA. - Securely create and manage **compliance tokens**. - Perform **system compliance tests** as per ZATCA UBL standards. - Real-time **API compliance tests** to ensure readiness. - Obtain **production tokens** for live ZATCA integration. - Submit **Standard Invoices** for clearance and **Simplified Invoices** for reporting. - Handle **credit and debit notes** for both clearance and reporting. - Automatically attach QR codes to invoices. - Maintain **success logs** for future reference. - Access detailed **error logs** for troubleshooting. - ZATCA dashboard with reports to compare statistics with the ZATCA portal. ### **Additional Features** - Easy Self Installation. - Support all Tax Category - Multi-device setup. - Batch and live processing modes. - Embedded XML and QR codes without impacting storage. - Tax exemption reasons support. - Compliance validation logs. - Sandbox testing support. - Simulation test support. - Show the request-response XML - User-friendly onboarding wizard. - ZATCA print formats for both Phase 1 and Phase 2. - Built-in troubleshooting and error detection. --- ## π‘ Why Choose Optima ZATCA? Optima ZATCA is designed to be the **best-in-class ZATCA compliance app**. Here's why: 1. **Speed**: Optimized for fast processing with minimal delays. 2. **Ease of Use**: Simple workflows and an intuitive interface. 3. **Comprehensive Features**: Covers all ZATCA compliance scenarios and more. 4. **Scalability**: Ideal for multi-company and multi-device environments. 5. **Reliability**: Built using clean, modular code for high maintainability. --- ## π¦ Installation ### **Self Hosting** Follow these steps to install Optima ZATCA on your ERPNext setup: 1. Get the app: ```bash bench get-app https://github.com/itsystematic/optima_zatca.git ``` 2. Setup requirements: ```bash bench setup requirements ``` 3. Build the app: ```bash bench build --app optima_zatca ``` 4. Restart the bench: ```bash bench restart ``` 5. Install the app on your site: ```bash bench --site [your.site.name] install-app optima_zatca ``` 6. Run migrations: ```bash bench --site [your.site.name] migrate ``` --- ## β Testing Run Frappe-dependent tests through Bench so they execute inside a real site context. Replace `[your.site.name]` with your own local or CI site name: ```bash bench --site [your.site.name] run-tests --app optima_zatca ``` Run a specific module: ```bash bench --site [your.site.name] run-tests --app optima_zatca --module optima_zatca.zatca.tests.test_invoice ``` Generate coverage data with Bench. Keep `--app optima_zatca` in the command so coverage is collected for the app correctly: ```bash bench --site [your.site.name] run-tests --app optima_zatca --module optima_zatca.zatca.tests.test_invoice --coverage ``` Bench stores coverage files under the `sites/` directory. Generate a terminal report or HTML report from there: ```bash cd ../sites python -m coverage report -m --include="*/apps/optima_zatca/*" python -m coverage html ``` The HTML report will be written to: ```text sites/htmlcov/index.html ``` --- ## π οΈ How to Use Optima ZATCA is designed to be user-friendly and intuitive. ### Documentation For comprehensive setup guides and detailed instructions, visit our **[Documentation](optima_zatca/documentation/)**. ### Video Tutorials Watch our step-by-step tutorials on our **[Youtube channel](https://www.youtube.com/@itsystematic)**. ### Supported ERPNext Versions - ERPNext Version 15 --- ## π Support We offer comprehensive support to ensure you have the best experience with Optima ZATCA: ### **Self Hosting** - For premium support or paid feature requests, email us at: **[email protected]** ### **Issue Reporting** - Found a bug or need a new feature? Create an issue after checking existing ones: [GitHub Issues](https://github.com/itsystematic/optima_zatca/issues) --- ## π€ Contributing We welcome contributions from the community! Please follow the contribution guidelines outlined in our Contributing Guide. Guidelines - Submit issues through GitHub Issues. - Follow best practices for pull requests. - Ensure proper testing before submitting. --- ## π License Optima ZATCA is Open-Source licensed under the **MIT License**. See the full license in the [LICENSE](https://github.com/itsystematic/optima_zatca/blob/version-15/LICENSE) file. --- ## π More Apps by IT Systematic Explore other powerful apps developed by the IT Systematic team: - **[Optima Payment](https://github.com/itsystematic/optima_payment):** Streamline ERPNext payments with integrated PDC (post-dated Cheque), Company expenses, and LC (bank guarantee) management. - **[Optima HR](https://github.com/itsystematic/optima-hr):** Transform HR in Saudi Arabia with our innovative ERPNext-powered solution. - **[ERPNext Themes](https://github.com/itsystematic/themes):** beautifully designed ERPNext with stunning color themes, Arabic Almarai font, and Arabic human translations.