feat: implement POS order management system

- Added CreateOrderDto and CreateOrderItemDto for order creation.
- Developed PosOrdersController to handle order-related endpoints.
- Created PosOrdersService for business logic related to orders.
- Implemented PosOrdersWorkflow for order processing workflows.
- Established Prisma integration for database operations in orders.
- Introduced SalesInvoicesModule and related DTOs for sales invoice management.
- Enhanced SalesInvoicesService and SalesInvoicesWorkflow for invoice processing.
This commit is contained in:
2026-01-07 15:25:59 +03:30
parent b05048e62f
commit 5fd6611aca
37 changed files with 1974 additions and 291 deletions
+11 -1
View File
@@ -63,15 +63,25 @@ model StockAdjustment {
model StockReservation {
id Int @id @default(autoincrement())
quantity Decimal @db.Decimal(10, 0)
expiresAt DateTime @db.Timestamp(0)
createdAt DateTime @default(now()) @db.Timestamp(0)
productId Int
inventoryId Int
orderId Int
inventory Inventory @relation(fields: [inventoryId], references: [id])
product Product @relation(fields: [productId], references: [id])
order Order @relation(fields: [orderId], references: [id], onDelete: Cascade)
@@index([inventoryId])
@@index([productId])
@@map("Stock_Reservations")
}
view StockAvailableView {
productId Int
inventoryId Int
physicalQuantity Decimal @db.Decimal(10, 0)
reservedQuantity Decimal @db.Decimal(10, 0)
availableQuantity Decimal @db.Decimal(10, 0)
@@map("Stock_Available_View")
}