feat: update GetById method to preload InvIssue instead of ReturnLines
Deploy Application / deploy (push) Successful in 19s
Details
Deploy Application / deploy (push) Successful in 19s
Details
This commit is contained in:
parent
3d9ad4cff1
commit
afec1c2750
|
|
@ -41,10 +41,7 @@ func (r *inventoryReturnRepository) GetById(ctx context.Context, tx *gorm.DB, id
|
||||||
var ret entities.TInventoryReturnEntity
|
var ret entities.TInventoryReturnEntity
|
||||||
if err := tx.WithContext(ctx).
|
if err := tx.WithContext(ctx).
|
||||||
Preload("Client").
|
Preload("Client").
|
||||||
Preload("ReturnLines").
|
Preload("InvIssue").
|
||||||
Preload("ReturnLines.Product").
|
|
||||||
Preload("ReturnLines.Product.Uom").
|
|
||||||
Preload("ReturnLines.Product.DimUom").
|
|
||||||
First(&ret, "id = ?", id).Error; err != nil {
|
First(&ret, "id = ?", id).Error; err != nil {
|
||||||
return ret, err
|
return ret, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue