mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
feat/BE/US-284/TASK-289-Create API (GET ONE in tab Perhitungan Sapronak),fix approval unclose issue,fix stock allocation issue
This commit is contained in:
@@ -63,13 +63,14 @@ func (r *StockAllocationRepositoryImpl) ReleaseByUsable(
|
||||
updates["note"] = *note
|
||||
}
|
||||
|
||||
q := r.DB().WithContext(ctx).
|
||||
baseDB := r.DB()
|
||||
if modifier != nil {
|
||||
baseDB = modifier(baseDB)
|
||||
}
|
||||
|
||||
q := baseDB.WithContext(ctx).
|
||||
Model(&entity.StockAllocation{}).
|
||||
Where("usable_type = ? AND usable_id = ? AND status = ?", usableType, usableID, entity.StockAllocationStatusActive)
|
||||
|
||||
if modifier != nil {
|
||||
q = modifier(q)
|
||||
}
|
||||
|
||||
return q.Updates(updates).Error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user