feat/order-things: adjust mcu-order to pricing
This commit is contained in:
@@ -62,6 +62,8 @@ type ResponseDto struct {
|
||||
Uom *eu.Uom `json:"uom,omitempty"`
|
||||
Infra_Code *string `json:"infra_code"`
|
||||
Stock *int `json:"stock"`
|
||||
BuyingPrice *float64 `json:"buyingPrice"`
|
||||
SellingPrice *float64 `json:"sellingPrice"`
|
||||
}
|
||||
|
||||
func (d Item) ToResponse() ResponseDto {
|
||||
@@ -73,6 +75,8 @@ func (d Item) ToResponse() ResponseDto {
|
||||
Uom: d.Uom,
|
||||
Infra_Code: d.Infra_Code,
|
||||
Stock: d.Stock,
|
||||
BuyingPrice: d.BuyingPrice,
|
||||
SellingPrice: d.SellingPrice,
|
||||
}
|
||||
resp.Main = d.Main
|
||||
return resp
|
||||
|
||||
@@ -16,4 +16,6 @@ type Item struct {
|
||||
Uom *eu.Uom `json:"uom,omitempty" gorm:"foreignKey:Uom_Code;references:Code"`
|
||||
Infra_Code *string `json:"infra_code" gorm:"size:10"`
|
||||
Stock *int `json:"stock"`
|
||||
BuyingPrice *float64 `json:"buyingPrice"`
|
||||
SellingPrice *float64 `json:"settlingPrice"`
|
||||
}
|
||||
|
||||
@@ -4,11 +4,7 @@ import (
|
||||
"errors"
|
||||
"strconv"
|
||||
|
||||
e "simrs-vx/internal/domain/main-entities/mcu-order-item"
|
||||
|
||||
umo "simrs-vx/internal/use-case/main-use-case/mcu-order"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
"gorm.io/gorm"
|
||||
|
||||
dg "github.com/karincake/apem/db-gorm-pg"
|
||||
d "github.com/karincake/dodol"
|
||||
@@ -16,7 +12,10 @@ import (
|
||||
pl "simrs-vx/pkg/logger"
|
||||
pu "simrs-vx/pkg/use-case-helper"
|
||||
|
||||
"gorm.io/gorm"
|
||||
e "simrs-vx/internal/domain/main-entities/mcu-order-item"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
|
||||
umo "simrs-vx/internal/use-case/main-use-case/mcu-order"
|
||||
)
|
||||
|
||||
const source = "mcu-order-item"
|
||||
|
||||
Reference in New Issue
Block a user