mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Feat[BE]: refactor stock log handling and introduce new log types for adjustments and transfers
This commit is contained in:
@@ -259,7 +259,7 @@ func (s *transferService) CreateOne(c *fiber.Ctx, req *validation.TransferReques
|
||||
}
|
||||
|
||||
if s.DocumentSvc != nil && len(files) > 0 {
|
||||
// Upload documents for each delivery
|
||||
|
||||
for idx, file := range files {
|
||||
documentFiles := []commonSvc.DocumentFile{
|
||||
{
|
||||
@@ -296,7 +296,7 @@ func (s *transferService) CreateOne(c *fiber.Ctx, req *validation.TransferReques
|
||||
decreaseLog := &entity.StockLog{
|
||||
Decrease: product.ProductQty,
|
||||
Notes: "",
|
||||
LoggableType: entity.LogTypeTransfer,
|
||||
LoggableType: string(utils.StockLogTypeTransfer),
|
||||
LoggableId: uint(entityTransfer.Id),
|
||||
ProductWarehouseId: sourcePW.Id,
|
||||
CreatedBy: actorID,
|
||||
@@ -335,7 +335,7 @@ func (s *transferService) CreateOne(c *fiber.Ctx, req *validation.TransferReques
|
||||
|
||||
increaseLog := &entity.StockLog{
|
||||
Increase: product.ProductQty,
|
||||
LoggableType: entity.LogTypeTransfer,
|
||||
LoggableType: string(utils.StockLogTypeTransfer),
|
||||
LoggableId: uint(entityTransfer.Id),
|
||||
Notes: "",
|
||||
ProductWarehouseId: destPW.Id,
|
||||
|
||||
Reference in New Issue
Block a user