feat(BE-59,60,61): build stock transfer API with validation and audit log

- Implement CreateOne for stock transfer with multi-delivery and validation
- Preload warehouse, location, and area relations in transfer response
- Add audit log for transfer
- Improve transaction handling and error management
This commit is contained in:
aguhh18
2025-10-15 22:25:50 +07:00
parent d1b377ddac
commit 4107cf19ec
10 changed files with 219 additions and 77 deletions
@@ -23,7 +23,7 @@ type TransferDeliveryProduct struct {
type TransferDelivery struct {
DeliveryCost float64 `json:"delivery_cost" validate:"required"`
DeliveryCostPerItem float64 `json:"delivery_cost_per_item" validate:"required"`
Document string `json:"document"`
DocumentIndex int `json:"document_index" validate:"min=0"`
DriverName string `json:"driver_name" validate:"required"`
VehiclePlate string `json:"vehicle_plate" validate:"required"`
SupplierID uint `json:"supplier_id" validate:"required"`