feat/order-things: adjust mcu-order to pricing

This commit is contained in:
2025-12-02 11:46:02 +07:00
parent 72e45ad5fc
commit 2ebe23f943
5 changed files with 18 additions and 9 deletions
@@ -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"`
}