Laravel Invoice Refund System - Implement R-Prefix Consolidation (API Integration)
Budget: $15.0 - $40.0
HOURLY / PART_TIME
⭐ 0.00 (0)
United Kingdom
api-integration, php, laravel-framework
Copilot on GitHub has said:
Laravel Invoice Refund System - Complete Implementation & Deployment (R-Prefix Consolidation)
SKILLS REQUIRED:
Code
- Laravel (3+ years)
- PHP (3+ years)
- MySQL / Database Design
- Git / GitHub
- E-commerce Systems
- API Integration
- Financial/Accounting Logic
- Database Migrations
- Server Deployment Experience
DESCRIPTION:
Code
OVERVIEW
We need you to completely refactor and deploy our order cancellation and
refund system. You will handle ALL technical work from start to finish.
Currently, when API orders fail or are cancelled, the system creates
multiple separate refund invoices (one per product).
We need you to consolidate this into a single R-prefixed refund invoice per order.
Our platform handles high-value digital gift card inventory.
═══════════════════════════════════════════════════════════════════════
WHAT YOU WILL DO (COMPLETE SCOPE)
Phase 1: Development & Testing (You handle locally)
✓ Review current codebase
✓ Design solution
✓ Write all code changes (8 files)
✓ Test all 5 scenarios locally
✓ Create Pull Request on GitHub
✓ Get approval from us
Phase 2: Deployment (You guide, we execute)
✓ Provide clear step-by-step deployment instructions
✓ Guide us through:
- Database backup
- Git pull
- Running migrations
- Clearing cache
- Testing on live site
✓ Be available during deployment (1-2 hours)
✓ Help troubleshoot if any issues arise
Phase 3: Post-Deployment Support (You provide)
✓ Available for 24 hours after deployment
✓ Fix any bugs discovered
✓ Answer questions about the changes
✓ Provide training on the new system (if needed)
═══════════════════════════════════════════════════════════════════════
WHAT WE NEED FIXED
Current Problems:
✗ Multiple refund invoices created per order cancellation
✗ Refund invoice numbers don't link to original invoices
✗ VAT not showing in exports for refunds
✗ Export reports show positive values for both orders AND refunds
✗ Accountants can't match refunds to original invoices for VAT returns
What Success Looks Like:
✓ One R-prefixed refund invoice per order (Invoice #1111 → Refund R-1111)
✓ Multiple product failures in same order add to SAME refund
✓ Invoice exports VAT tracked and shown where VAT was applied (Net, VAT, Total)
✓ Dashboard shows positive values, exports show negative for refunds
✓ Accountants can perfectly match: +$100 invoice with -$100 refund = $0
✓ Email notifications show Net/VAT/Total breakdown for refunds (If there is any email)
✓ No breaking changes to existing payment workflows
═══════════════════════════════════════════════════════════════════════
TECHNICAL REQUIREMENTS
Your Technical Tasks:
✓ Analyze current code and design solution
✓ Create database migration (add vat_amount column)
✓ Update Invoice model
✓ Modify OrdersController.php (consolidation logic)
✓ Modify WgPurchaseHelperTrait.php (refund handling)
✓ Update 3 invoice report resources
✓ Update email template
✓ Write and pass all 5 test scenarios
✓ Create Pull Request with detailed documentation
Stack:
- Laravel 9+
- MySQL
-API Integration
- Private GitHub repository
Files to Modify (8 total):
1. Database migration (NEW)
2. Invoice model
3. OrdersController.php
4. WgPurchaseHelperTrait.php
5. InvoiceReportResource.php
6. InvoiceReportCustomerResource.php
7. InvoiceAdminResource.php
8. Email template
═══════════════════════════════════════════════════════════════════════
TESTING YOU MUST DO LOCALLY
You will test and verify all 5 scenarios work correctly:
1. Single Product Order Success
- Create order with 1 product × 500 units
- Deliver successfully
- Verify: Invoice #1111 created, no refund invoice
2. Multi-Product Order with Partial Failure
- Create order with 3 products (A: 500, B: 500, C: 500)
- Deliver products A & C successfully
- Product B fails
- Verify: Invoice #1111 created for all products
- Verify: Refund R-1111 created for only Product B failure amount
3. Multiple Product Failures Consolidated
- Same order, later Product A fails partially (100 units not delivered)
- Verify: R-1111 refund already exists
- Verify: New failure adds to R-1111 (don't create R-1111-2)
- Final R-1111 = Product B failure + Product A partial failure
4. Full Order Cancellation
- Create order with 1 product × 500 units
- Cancel entire order before delivery
- Verify: Invoice #1111 created
- Verify: Refund R-1111 created with full refund amount
5. Export Report Shows Correct Values
- Export invoice report
- Verify: Invoice #1111 shows Net: +$100, VAT: +$20, Total: +$120
- Verify: Refund R-1111 shows Net: -$100, VAT: -$20, Total: -$120
- When both highlighted together: $0 (perfect match)
═══════════════════════════════════════════════════════════════════════
DEPLOYMENT PROCESS YOU WILL PROVIDE
You will provide us with:
✓ Step-by-step deployment instructions (that we can follow)
✓ List of exact commands to run
✓ Expected results at each step
✓ How to verify everything worked
✓ How to rollback if something goes wrong
✓ Your availability during deployment
Example of what we need:
Step 1: Backup database (command you provide)
Step 2: Pull new code (command you provide)
Step 3: Run migrations (command you provide)
Step 4: Clear cache (command you provide)
Step 5: Test specific features (what we should test)
Step 6: Troubleshooting guide
═══════════════════════════════════════════════════════════════════════
YOUR DELIVERABLES
✓ All code written, tested, and ready to deploy
✓ Pull Request on GitHub with:
- What was changed and why
- Testing results for all 5 scenarios (screenshots/logs)
- Database migration included
- Clear notes for any edge cases
✓ Step-by-step deployment instructions (clear enough for non-technical person)
✓ List of exact commands to run
✓ Expected results at each step
✓ Rollback instructions (if needed)
✓ 24-hour post-deployment support:
- Available via Slack/email
- Fix any bugs discovered on live site
- Answer questions
- Provide training on changes (if needed)
Auf Upwork öffnen