changes fixed in the catalogue

This commit is contained in:
2026-08-11 17:10:21 +05:30
parent fba42259ea
commit ff72af9a8a
4 changed files with 65 additions and 14 deletions

View File

@@ -35,7 +35,7 @@ type ProductService interface {
ImportCatalogueProduct(reqs []models.ImportCatalogueProductRequest) error
GetImportedCatalogueRefs(tenantid int, brand string) ([]models.ImportedCatalogueRef, error)
GetTenantCategories(tenantid int) ([]models.TenantCategory, error)
PublishProduct(tenantID, productID int, price float64) (int, error)
PublishProduct(tenantID, productID int, price, taxPercent float64) (int, error)
UnpublishProduct(tenantID, productID int) (int, error)
}
type productService struct {
@@ -352,8 +352,8 @@ func (s *productService) GetTenantCategories(tenantid int) ([]models.TenantCateg
//
// The price check lives in the repository rather than here, so it holds for any
// caller — the console form is a convenience, not the rule.
func (s *productService) PublishProduct(tenantID, productID int, price float64) (int, error) {
return s.repo.PublishProduct(tenantID, productID, price)
func (s *productService) PublishProduct(tenantID, productID int, price, taxPercent float64) (int, error) {
return s.repo.PublishProduct(tenantID, productID, price, taxPercent)
}
func (s *productService) UnpublishProduct(tenantID, productID int) (int, error) {