# Fix sales paid_amount migrate error

## Why you still see the error

Laravel reads:

`database/migrations/2026_06_27_140000_add_paid_amount_to_sales_table.php`

If that file on the SERVER still contains `after('net_amount')`, migrate WILL fail.
Uploading new files without **overwriting / deleting** that old file does not help.

## Do this on live (cPanel File Manager)

1. Go to: `public_html/azin/database/migrations/`
2. Find: `2026_06_27_140000_add_paid_amount_to_sales_table.php`
3. Open it — search for `after('net_amount')`
4. If found: **DELETE** that file
5. Upload these from your PC `database/migrations/` folder:
   - `2026_06_27_140000_add_paid_amount_to_sales_table.php`  (empty / no-op)
   - `2026_06_27_140001_ensure_sales_amount_and_paid_columns.php` (new safe migration)
   - `2026_06_27_135000_add_amount_fields_to_sales_table.php`
6. Run: `php artisan migrate --force`

## Emergency SQL (phpMyAdmin) — unblock migrate now

```sql
ALTER TABLE sales ADD COLUMN total_amount DECIMAL(12,2) NOT NULL DEFAULT 0;
ALTER TABLE sales ADD COLUMN discount DECIMAL(12,2) NOT NULL DEFAULT 0;
ALTER TABLE sales ADD COLUMN net_amount DECIMAL(12,2) NOT NULL DEFAULT 0;
ALTER TABLE sales ADD COLUMN paid_amount DECIMAL(12,2) NOT NULL DEFAULT 0;
```

Skip any column that already exists, then:

```bash
php artisan migrate --force
```

If `140000` still fails because of the old file, delete that PHP file on the server first.
