Commit Graph

13 Commits

Author SHA1 Message Date
ahasani 9170d8cd5a feat: enhance sales invoice processing with correction and return functionalities 2026-06-15 17:14:54 +03:30
ahasani 5f70b95589 feat: refactor sales invoice services and introduce pagination and filtering
- Added SharedSaleInvoicePaginationService for handling pagination logic.
- Introduced SharedSaleInvoiceFilterService to centralize filtering logic for sales invoices.
- Updated SalesInvoicesService to utilize the new pagination and filtering services.
- Refactored findAll methods in SalesInvoicesService, CustomerSaleInvoicesService, and other related services to support pagination and filtering.
- Enhanced DTOs for sales invoice filtering to extend shared filter properties.
- Updated module imports to include new services.
- Cleaned up redundant code related to filtering and pagination across various services.
2026-06-14 16:34:00 +03:30
ahasani 23bfe1ecbe Refactor: Remove stored procedures and replace with direct database operations
feat: Add economic code and guild information to sales invoice selection

fix: Update error messages for invoice access and creation to use "صورت‌حساب"

fix: Change error messages in SaleInvoicesService to use "صورت‌حساب" instead of "فاکتور"

fix: Update error messages in SalesInvoicesService for not found cases to use "صورت‌حساب"

fix: Modify TSP service to handle invoice updates and error messages consistently with "صورت‌حساب"

fix: Update common DTO descriptions to refer to "صورت‌حساب" instead of "فاکتور"

fix: Adjust utility functions to handle invoice references and error messages with "صورت‌حساب"
2026-06-11 16:13:17 +03:30
ahasani f61100bf25 feat: enhance CustomerIndividual and CustomerLegal models with new unique input types
feat: add cache invalidation method for POS middleware

feat: implement Redis caching in POS middleware for improved performance

feat: refactor sales invoice DTOs for POS to include correction functionality

feat: extend SalesInvoicesController to handle invoice corrections and returns

feat: update SalesInvoicesService to support invoice correction and return operations

feat: enhance TSP provider correction functionality with new DTOs and utility methods

fix: improve error handling and logging in Nama provider switch adapter

refactor: streamline invoice payload building in TSP provider utilities
2026-06-06 19:53:00 +03:30
ahasani 5ce560ce97 feat(customers): enhance customer retrieval with filtering options
- Updated `findAll` method in `CustomersController` to accept filtering parameters.
- Implemented filtering logic in `CustomersService` to retrieve customers based on type and search query.
- Added `PosCustomerFilterDto` for query validation.
- Updated customer-related DTOs to make fields optional and added length validation where necessary.
- Modified customer-related logic in `sales-invoice-tsp.utils.ts` to accommodate new DTO structure.
- Added unique constraints to `customer_individuals` and `customer_legal` tables in the database migration.
- Removed commented-out code in `PosMiddleware` for cleaner codebase.
- Set default value for `is_default_guild_good` to false in `OwnedGoodsService`.
2026-06-03 18:00:06 +03:30
ahasani c11166b365 some update 2026-05-30 19:05:56 +03:30
ahasani 7ae027633b update migrations and create base migration. set discount and tax to sale invoices 2026-05-28 18:27:21 +03:30
ahasani a975f9d02a update migrations and create base migration. set discount and tax to sale invoices 2026-05-28 16:39:07 +03:30
ahasani cd3492d625 update get status of tsp provider 2026-05-27 22:44:01 +03:30
ahasani 816c5ebb50 update switch providers and nama provider. fix original send 2026-05-27 21:55:02 +03:30
ahasani 4836ee4d01 feat: include settlement_type in buildCorrectionPayload and buildPayload functions 2026-05-24 20:16:04 +03:30
ahasani afa83895a2 Refactor code structure for improved readability and maintainability 2026-05-10 09:44:49 +03:30
ahasani 4e61ff618e refactor: remove SalesInvoiceItemsService and update sales invoice handling
- Deleted SalesInvoiceItemsService as it was not implemented.
- Changed variable declaration from `const` to `let` in SalesInvoicesService for sales invoice creation.
- Updated response handling after sending to TSP provider in SalesInvoicesService.
- Renamed payload properties in TspProvider DTOs for clarity.
- Enhanced error handling in SalesInvoiceTspSwitchService for unsupported providers.
- Refactored SalesInvoiceTspService to utilize utility functions for payload building and sending.
- Updated PrismaService to increase connection limit and utilize dynamic options.
- Added new migration scripts to update database schema for sale_invoice_tsp_attempts.
- Introduced utility functions for building payloads and handling responses in sales invoice processing.
2026-05-08 18:09:13 +03:30