stocks change

This commit is contained in:
2026-07-27 18:54:40 +05:30
parent f57127444f
commit c2f7d2481c
2 changed files with 16 additions and 7 deletions

View File

@@ -124,11 +124,16 @@ type Locationproducts struct {
Productcombo int `json:"productcombo" gorm:"default:0"`
Variants int `json:"variants" gorm:"default:0"`
Quantity int `json:"quantity"`
Retailprice float64 `json:"retailprice,omitempty"`
Diffprice float64 `json:"diffprice,omitempty"`
Diffpercent float64 `json:"diffpercent,omitempty"`
Othercost float64 `json:"othercost,omitempty"`
Approve int `json:"approve" gorm:"default:0"`
// Price is the per-store selling price from productlocations.price — the one
// CreateProductLocation upserts. Read-only here: it comes from the joined
// productlocations row, not from products. Without it a store could set a
// price and never read it back, so the UI always showed the master price.
Price float64 `json:"price" gorm:"->"`
Retailprice float64 `json:"retailprice,omitempty"`
Diffprice float64 `json:"diffprice,omitempty"`
Diffpercent float64 `json:"diffpercent,omitempty"`
Othercost float64 `json:"othercost,omitempty"`
Approve int `json:"approve" gorm:"default:0"`
// Productstatus string `json:"productstatus" gorm:"default:available"`
Status string `json:"status" gorm:"default:outofstock"`
}