Claude/erp phase 1 foundations 9mi e5#17261
Conversation
|
Hi @sufianbd! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Replace the Phase 32 credit note stub with a full-featured implementation supporting sale/purchase types, void workflow, line-item totals stored in the DB, currency/exchange-rate fields, and amount_applied tracking. https://claude.ai/code/session_01RdUGwo74JXChRCF88Yu27d
Add reference_prefix, interval, currency_code, exchange_rate columns to recurring_invoices table. Add recurring_invoice_id FK to invoices table. Enhance RecurringInvoice model with computeNextRunDate() supporting interval multiplier, invoices() relationship, and updated generateInvoice() that stamps generated invoices with the reference prefix and recurring_invoice_id. Update Invoice model with recurring_invoice_id fillable field and recurringInvoice() relationship. Update controller, request validation, and API resource to expose new fields. Add 10 new Phase 34 tests covering reference prefix numbering, interval multiplier, recurring_invoice_id FK, currency pass-through, and computeNextRunDate for all four frequencies. https://claude.ai/code/session_01RdUGwo74JXChRCF88Yu27d
Adds onboarding template management (admin-defined reusable checklists) and per-employee onboarding instances with task completion tracking, progress calculation, and due-date computation from employee start date. https://claude.ai/code/session_01RdUGwo74JXChRCF88Yu27d
Adds AttendanceRecord and WorkSchedule models with migrations, RBAC-protected controllers, shared AttendancePolicy, Inertia React pages, and 10 Pest tests covering worked_hours computation, duplicate date validation, and permission guards. https://claude.ai/code/session_01RdUGwo74JXChRCF88Yu27d
Implements vendor-specific profiles with credit limits, payment terms, and banking details, plus a vendor evaluation/rating system with per-contact history and overall score computation. https://claude.ai/code/session_01RdUGwo74JXChRCF88Yu27d
Adds vendor evaluation endpoints with rating collection, overall score calculation, and scorecard aggregation. Uses whereDate() for SQLite-safe date range filtering on evaluation_date columns. Co-Authored-By: Claude <noreply@anthropic.com>
- Phase 45: Custom field definitions and values per model type (contact, product, employee, invoice, lead, project, task) with full CRUD - Phase 46: Bulk status update, soft delete, lead assignment, and record export across invoice/contact/product/employee/lead models - Phase 47: Tenant settings API with typed schema validation, per-key get/set, and bulk update endpoint; tenant-isolated via TenantSetting model Co-Authored-By: Claude <noreply@anthropic.com>
- Phase 48: /me endpoints let an authenticated user view their employee profile, update phone, see leave requests, apply for leave with date validation, view payslips, expense claims, and a dashboard summary - Phase 49: Full contract CRUD with activate/terminate/renew lifecycle actions, expiring-soon dashboard endpoint, soft delete, and tenant isolation Co-Authored-By: Claude <noreply@anthropic.com>
Adds stock value calculation endpoints: summary (total cost value by tenant), breakdown (per-product with margin), movement history, and low-value-stock alert. Uses sale_price/cost_price × stock_quantity; excludes zero-stock items. Co-Authored-By: Claude <noreply@anthropic.com>
Adds CRUD for payment terms (Net 30, 2/10 Net 30, etc.) with early-discount display formatting, and a payment schedule API that auto-generates monthly/ quarterly/yearly installments and tracks per-item paid status. Co-Authored-By: Claude <noreply@anthropic.com>
Adds SLA policy CRUD (response/resolution hours per priority level) and a live tracking dashboard showing breach counts, breach rate by priority, overdue ticket list, and at-risk tickets expiring within a configurable time window. Co-Authored-By: Claude <noreply@anthropic.com>
Adds warehouse CRUD, per-warehouse stock level management (set/update qty), cross-warehouse product distribution view, and inter-warehouse stock transfer with available-quantity validation and automatic StockMovement record. Co-Authored-By: Claude <noreply@anthropic.com>
Adds commission rule management (percentage/fixed types per user), commission calculation from invoice totals, approve/mark-paid workflow, and a summary endpoint aggregating pending/paid amounts grouped by sales rep. Co-Authored-By: Claude <noreply@anthropic.com>
Adds price list CRUD with per-product override pricing and quantity-break tiers, a lookup endpoint to resolve effective price for a product+quantity combination, and default price-list management (setting a new default clears the previous one). Co-Authored-By: Claude <noreply@anthropic.com>
- LoyaltyApiController: programs CRUD, enroll contacts, balance lookup,
earn/redeem points using existing model earnPoints()/redeemPoints() methods
- Routes: /api/v1/loyalty/programs, /enroll, /contacts/{id}/balance, /earn, /redeem
- Tests: 11 tests covering all endpoints incl. min-redemption enforcement
Co-Authored-By: Claude <noreply@anthropic.com>
- RecurringInvoiceApiController: CRUD, pause/resume, generate invoice, due listing - Routes: /api/v1/recurring-invoices with /due, /pause, /resume, /generate actions - Tests: 11 tests covering full lifecycle incl. frequency scheduling and generation Co-Authored-By: Claude <noreply@anthropic.com>
- ProductBundleApiController: CRUD, add/remove items, price calculation, savings - Routes: /api/v1/product-bundles with /price and /items management - Tests: 9 tests covering bundle lifecycle, fixed price vs calculated, savings Co-Authored-By: Claude <noreply@anthropic.com>
- TaxApiController: tax rate CRUD, tax group CRUD with multi-rate composition, add/remove rates from groups, tax calculator endpoint - Routes: /api/v1/tax/rates, /api/v1/tax/groups, /api/v1/tax/calculate - Tests: 11 tests covering rates, groups, total rate calc, tax amount calc Co-Authored-By: Claude <noreply@anthropic.com>
- CreditNoteApiController: CRUD, workflow (issue, apply, void), add items, recalculate totals, status-based action guards - Routes: /api/v1/credit-notes with issue/apply/void/items actions - Tests: 11 tests covering full lifecycle incl. void guard for applied notes Co-Authored-By: Claude <noreply@anthropic.com>
- PurchaseRequisitionApiController: CRUD, submit/approve/reject workflow, total estimated cost aggregation, status-based guards - Routes: /api/v1/purchase-requisitions with submit/approve/reject actions - Tests: 11 tests covering full approval workflow incl. guard validations Co-Authored-By: Claude <noreply@anthropic.com>
- FixedAssetApiController: CRUD, straight-line depreciation runner, disposal, depreciation schedule preview, portfolio summary by status and category - Routes: /api/v1/fixed-assets with /depreciate, /dispose, /schedule, /summary - Tests: 10 tests covering asset lifecycle, depreciation calc, disposal Co-Authored-By: Claude <noreply@anthropic.com>
- SalesOrderApiController: CRUD, confirm, cancel, convert-to-invoice workflow - Supports draft → confirmed → invoiced/cancelled status transitions - Routes: /api/v1/sales-orders with confirm/cancel/convert-to-invoice actions - Tests: 11 tests covering full SO lifecycle incl. invoice conversion Co-Authored-By: Claude <noreply@anthropic.com>
- QuoteApiController: CRUD, send/accept/decline workflow, convert-to-invoice - Supports draft → sent → accepted/declined status transitions - Routes: /api/v1/quotes with send/accept/decline/convert-to-invoice actions - Tests: 11 tests covering full quote lifecycle incl. invoice conversion Co-Authored-By: Claude <noreply@anthropic.com>
- BatchPaymentApiController: create batch with multiple invoice payments, list/view/delete batches, summary of received vs made totals - Routes: /api/v1/batch-payments with /summary - Tests: 8 tests covering batch creation, total calculation, type filtering Co-Authored-By: Claude <noreply@anthropic.com>
- DebitNoteApiController: CRUD, issue/apply/void workflow, auto-recalculate totals - Vendor-linked debit notes with optional bill reference - Routes: /api/v1/debit-notes with issue/apply/void actions - Tests: 10 tests covering full lifecycle incl. void guard for applied notes Co-Authored-By: Claude <noreply@anthropic.com>
- makeCreditNote → makeCreditNoteRecord (collision with CreditNoteTest) - makeDebitNote → makeDebitNoteRecord (collision with DebitNoteTest) - makeTaxRate → createTaxRate (collision with TaxManagementTest) - makeSoProduct, makeSalesOrder → createSoProduct, createSalesOrder (collision with SalesOrderTest) All 2813 tests pass. Co-Authored-By: Claude <noreply@anthropic.com>
- QcApiController: checklist CRUD with items, inspection lifecycle (pending→in_progress→passed/failed), result recording with pass rate, NCR management with resolve/close workflow - Routes: /api/v1/qc/checklists, /inspections, /ncr - Tests: 10 tests covering checklist/inspection/NCR full workflow Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…orkflow Co-Authored-By: Claude <noreply@anthropic.com>
…ts, approve/reject Co-Authored-By: Claude <noreply@anthropic.com>
…es, programs Co-Authored-By: Claude <noreply@anthropic.com>
…on changes, exits Co-Authored-By: Claude <noreply@anthropic.com>
…efit plans, enrollments Co-Authored-By: Claude <noreply@anthropic.com>
… MO lifecycle Co-Authored-By: Claude <noreply@anthropic.com>
No description provided.