Commit Graph

65 Commits

Author SHA1 Message Date
ahasani af9695e23c refactor: restructure suppliers module and update DTOs
- Removed old supplier DTOs and controller, replacing them with new implementations.
- Introduced new CreateSupplierDto and UpdateSupplierDto in the index directory.
- Updated SuppliersController to handle new routes and methods.
- Implemented SuppliersService with updated logic for creating, finding, updating, and removing suppliers.
- Added new invoices module with corresponding controller and service for handling invoice-related operations.
- Created new DTOs for handling receipt payments and updated the service to manage payment creation and retrieval.
- Updated Prisma migrations to reflect changes in the database schema, including dropping unnecessary columns.
2025-12-27 20:34:00 +03:30
ahasani d98507fc1f fix: update SupplierLedger model to use correct enum casing and adjust types
feat: enhance PosAccountsService to include inventoryBankAccount details in responses

refactor: modify PosService to return structured inventory and bank account data

chore: remove isSettled field from CreatePurchaseReceiptDto and adjust related logic

feat: add payments selection in SuppliersService for better payment tracking

chore: apply database migrations to adjust decimal types and enforce constraints

chore: create index on Pos_Accounts for improved query performance

feat: define Supplier and SupplierLedger models in Prisma schema for better data management
2025-12-26 22:09:46 +03:30
ahasani d59be5995d feat(pos): update POS controller and service to handle posId for stock and product categories 2025-12-26 16:47:34 +03:30
ahasani b4f226fb3a refactor(inventories): restructure inventory and pos account modules, remove deprecated DTOs and controllers
- Removed create and update DTOs for inventory.
- Deleted inventories controller and service.
- Introduced new inventory bank accounts module with controller and service.
- Added new pos accounts module with controller and service.
- Updated Prisma models to reflect changes in bank account relationships.
- Adjusted PosAccount and SalesInvoice models for stricter type definitions.
- Implemented new response mapping for inventory and pos account services.
2025-12-26 01:20:03 +03:30
ahasani cbe51b9343 feat: implement bank accounts, branches, and banks modules with CRUD operations
- Added BankAccountsController, BankAccountsService, and related DTOs for managing bank accounts.
- Implemented BankBranchesController, BankBranchesService, and related DTOs for managing bank branches.
- Created BanksController and BanksService for retrieving bank information.
- Integrated Prisma for database operations across all modules.
- Added response mapping for consistent API responses.
2025-12-24 21:24:59 +03:30
ahasani 89c57a69c1 feat(cardex): enhance stock movement retrieval with additional fields and optimized mapping
refactor(migration): update Stock_Movements table to include counterInventoryId and customerId, add foreign key constraints, and implement triggers for inventory management
2025-12-23 20:35:44 +03:30
ahasani c6a86719dd feat(cardex): implement cardex controller, service, and DTO for stock movements
feat(pos): add POS controller and service for order creation and stock retrieval
refactor(pos): enhance stock and product category retrieval with pagination and mapping
2025-12-21 19:09:41 +03:30
ahasani d514267f58 feat: add inventoryId to SalesInvoice and related models; implement createOrder functionality in POS service 2025-12-16 10:03:49 +03:30
ahasani 687c89c3e1 feat: add salePrice field to Product model and update related files
- Added salePrice field to Product model in Prisma schema and generated files.
- Updated Product scalar field enums in both TypeScript files.
- Modified aggregate output types to include salePrice.
- Enhanced input types for creating and updating products to support salePrice.
- Updated migration file to add salePrice column to Products table.
- Created DTOs for inventory management in POS module.
- Implemented POS controller and service with methods for stock and product categories.
2025-12-14 20:34:07 +03:30
ahasani 9d7d94b5f8 Add SQL query for average cost retrieval and generate TriggerLog model 2025-12-14 10:15:57 +03:30
ahasani 41d7dd8802 feat(database): initialize database schema and triggers
- Created initial database schema with tables for Users, Roles, Products, and related entities.
- Added foreign key constraints to maintain data integrity across tables.
- Implemented triggers for managing stock movements on insert, update, and delete operations.
- Developed scripts to dump existing triggers and pull trigger definitions from the database.
2025-12-10 16:54:08 +03:30
ahasani 807f6c2087 feat: implement purchase receipt items management with create, update, find, and delete functionalities
feat: add purchase receipts management with create, update, find, and delete functionalities

feat: implement sales invoice items management with create, update, find, and delete functionalities

feat: add sales invoices management with create, update, find, and delete functionalities

feat: implement stock adjustments management with create, update, find, and delete functionalities

feat: add stock balance retrieval functionality

feat: implement stock movements management with create, update, find, and delete functionalities
2025-12-09 13:59:07 +03:30
ahasani a782d61890 feat: add product variant management functionality
- Implemented CreateProductVariantDto and UpdateProductVariantDto for product variant data transfer.
- Developed ProductVariantsController to handle CRUD operations for product variants.
- Created ProductVariantsService to interact with the database using Prisma.
- Added ProductVariantsModule to encapsulate the product variant feature.
- Included response mapping for consistent API responses.
2025-12-06 17:48:10 +03:30
ahasani 7cb9d7d037 feat: implement supplier management module with create, update, find, and delete functionalities
- Added CreateSupplierDto for supplier creation
- Added UpdateSupplierDto for supplier updates
- Implemented SuppliersController to handle HTTP requests for suppliers
- Created SuppliersService to manage supplier data using Prisma
- Integrated SuppliersModule to encapsulate suppliers-related components
2025-12-05 00:01:44 +03:30
ahasani 621e15dd02 feat: implement inventory, product brand, product category, product info, product, role, store, user, and vendor modules with CRUD operations
- Added Create and Update DTOs for Inventory, Product Brand, Product Category, Product Info, Product, Role, Store, User, and Vendor.
- Implemented InventoriesController, ProductBrandsController, ProductCategoriesController, ProductInfoController, ProductsController, RolesController, StoresController, UsersController, and VendorsController with respective CRUD endpoints.
- Developed InventoriesService, ProductBrandsService, ProductCategoriesService, ProductInfoService, ProductsService, RolesService, StoresService, UsersService, and VendorsService to handle business logic.
- Created PrismaModule and PrismaService for database interactions using Prisma with MariaDB adapter.
- Configured application with Swagger for API documentation and added global interceptors for logging and response mapping.
- Established e2e testing setup with Jest for the application.
2025-12-04 21:05:57 +03:30