FIX[BE]: fixing transfer to laying and implement correct fifo stock

This commit is contained in:
aguhh18
2026-01-11 12:51:37 +07:00
parent 4ee5bf3628
commit 272367d8ef
11 changed files with 403 additions and 344 deletions
+2 -1
View File
@@ -11,7 +11,8 @@ type LayingTransferSource struct {
LayingTransferId uint `gorm:"index;not null"`
SourceProjectFlockKandangId uint `gorm:"not null"`
ProductWarehouseId *uint `gorm:""`
Qty float64 `gorm:"type:numeric(15,3);not null"`
UsageQty float64 `gorm:"type:numeric(15,3);default:0;not null"` // FIFO USABLE field
PendingUsageQty float64 `gorm:"type:numeric(15,3);default:0;not null"` // FIFO USABLE field
Note string `gorm:"type:text"`
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`