# Saudi Tax Invoice Pro - Quick Installation

## What Was Created

I've created a professional Saudi Tax Invoice layout that exactly matches your reference image with:

1. **Invoice Template File**: `resources/views/sale_pos/receipts/saudi-tax-invoice-pro.blade.php`
2. **SQL Installation File**: `add_saudi_tax_invoice_pro_layout.sql`
3. **Complete Guide**: `SAUDI_TAX_INVOICE_PRO_GUIDE.md`

## Quick Installation (3 Steps)

### Step 1: Add Layout to Database

Open your MySQL/phpMyAdmin and run this SQL:

```sql
INSERT INTO `invoice_layouts` (
    `name`,
    `design`,
    `invoice_heading`,
    `show_logo`,
    `show_qr_code`,
    `qr_code_fields`,
    `footer_text`,
    `created_at`,
    `updated_at`
) VALUES (
    'Saudi Tax Invoice Pro',
    'saudi-tax-invoice-pro',
    'Tax Invoice / فاتورة ضريبية',
    1,
    1,
    '["business_name","invoice_no","invoice_date","total_amount","tax_1"]',
    'Thank you for your business! / شكراً لتعاملكم معنا',
    NOW(),
    NOW()
);
```

### Step 2: Select in POS

1. Go to your POS page: `http://127.0.0.1:8000/pos-pro`
2. In the header, find the **Invoice Layout** dropdown
3. Select **"Saudi Tax Invoice Pro"**
4. The selection will be saved automatically

### Step 3: Test Print

1. Create a test sale in POS
2. Click **Print Invoice**
3. The new Saudi Tax Invoice format will appear

## What the Invoice Includes

✅ Professional "HEADER" section
✅ Invoice details grid (Invoice No, Date, Payment Terms, etc.)
✅ QR Code (top-right corner)
✅ Seller Information (CR, VAT, Address)
✅ Buyer Information (Customer details)
✅ Items table with tax breakdown
✅ Totals section (Subtotal, VAT, Total)
✅ Signature section (Seller & Buyer)
✅ Bilingual (Arabic/English) throughout

## Customization

### To Change Business Details

Edit your business settings in the admin panel:
- Settings → Business Settings
- Fill in CR Number, VAT Number, Address details

### To Modify the Layout

Edit the file: `resources/views/sale_pos/receipts/saudi-tax-invoice-pro.blade.php`

### To Change Colors

Find the `<style>` section in the template and modify:
```css
.info-box-red {
    color: #d32f2f; /* Change this color */
}
```

## Files Created

1. `resources/views/sale_pos/receipts/saudi-tax-invoice-pro.blade.php` - Main template
2. `add_saudi_tax_invoice_pro_layout.sql` - Database installation
3. `SAUDI_TAX_INVOICE_PRO_GUIDE.md` - Detailed guide
4. `INSTALLATION_INSTRUCTIONS.md` - This file

## Need Help?

Refer to `SAUDI_TAX_INVOICE_PRO_GUIDE.md` for:
- Detailed configuration options
- Troubleshooting
- ZATCA compliance information
- Advanced customization

---

**Ready to use!** Just run the SQL and select the layout in POS.
