pricing in app

This commit is contained in:
2026-09-03 15:44:09 +05:30
parent 7ed821e8b0
commit 0d17f46fcf
2 changed files with 26 additions and 6 deletions

View File

@@ -1065,11 +1065,15 @@ func (r *productRepository) GetProductByVariant(tenantid, variantid, locationid,
// query just computed, so the entry cannot disagree with the row it
// came from.
self := models.Productvariant{
Tenantid: data[i].Tenantid,
Productid: data[i].Productid,
Variantproductid: data[i].Productid,
Variantname: variantLabelFor(data[i]),
Status: "Active",
Tenantid: data[i].Tenantid,
Productid: data[i].Productid,
Variantproductid: data[i].Productid,
Variantname: variantLabelFor(data[i]),
Status: "Active",
// The parent is one of its own sizes, so its entry has to carry
// money in the same field the others do. Without this the first
// option in every picker read 0 while the rest were priced.
Price: data[i].Price,
Variantproductname: data[i].Productname,
Variantprice: data[i].Price,
Variantstock: data[i].Productstock,