This project provides a solution for automating the generation of invoices for orders in Salesforce. It includes Apex classes and a scheduler to generate invoices for activated orders with associated products.
- Automated Invoicing: Invoices are generated automatically for activated orders.
- Batch Processing: Invoices are generated in batch to handle large volumes of orders efficiently.
- Scheduler: Includes a scheduler to run the batch process daily at midnight.
- Error Logging: Errors during the batch process are logged for debugging and monitoring.
- ECGenerateInvoiceBatch: Batch class responsible for generating invoices.
- ECInvoiceGeneratorScheduler: Schedulable class to schedule the batch process and update scheduler logs.
- EC_ScheduleController: Apex controller for handling scheduling and stopping the scheduler via Lightning Web Components.
- Invoice__c: Custom object to store generated invoices.
- Order: Standard Salesforce Object to store Order Details.
- OrderItem: Standard Salesforce Object to store Order Item / Product Details.
- Invoice_Item__c: Custom object to store invoice line items.
- Scheduler_Log__c: Custom object to log scheduler run details.
- Error_Log__c: Custom object to keep track of the Error Logs Generated Across the Org
- SchedulerControl: LWC to start and stop the scheduler and display last run details.
-
Clone the repository:
git clone https://github.com/your-username/salesforce-order-invoicing.git