Enhance sales document flow with new service and related functionalities
- Introduced `SalesDocumentFlowService` to manage the lifecycle of sales documents, including packing slips and invoices. - Implemented methods for processing orders, generating invoices, and handling packing slips based on order status. - Updated `SalesOrdersService`, `PackingSlipsService`, and `SalesInvoicesService` to integrate with the new document flow service. - Added new methods for marking drafts processed and checking if invoices are on sales plans. - Enhanced existing services and repositories to support new functionalities, including status transitions and related document management. - Updated DTOs to include new fields for packing slip and invoice IDs in sales order responses. - Added unit tests for the new service and updated existing tests to cover new functionalities.
This commit is contained in:
@@ -36,7 +36,10 @@ describe('PlansService', () => {
|
||||
const employeesService = { findById: jest.fn() };
|
||||
const branchesService = { findById: jest.fn() };
|
||||
const customersService = { findById: jest.fn() };
|
||||
const salesInvoicesService = { findById: jest.fn() };
|
||||
const salesInvoicesService = {
|
||||
findById: jest.fn(),
|
||||
markDraftsProcessed: jest.fn(),
|
||||
};
|
||||
const packingSlipsService = { findById: jest.fn() };
|
||||
const privilegesService = { checkPermission: jest.fn() };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user