feat: add no vat property to customers

This commit is contained in:
2026-04-14 13:12:21 +02:00
parent 26cbdeec0a
commit f55d59a0fd
6 changed files with 54 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ type UICustomerRepo interface {
Find(langId uint, p find.Paging, filt *filters.FiltersList, search string) (*find.Found[model.UserInList], error)
Save(customer *model.Customer) error
Create(customer *model.Customer) error
SetCustomerNoVatStatus(customerID uint, isNoVat bool) error
}
type CustomerRepo struct{}
@@ -111,6 +112,10 @@ func (repo *CustomerRepo) Create(customer *model.Customer) error {
return db.DB.Create(customer).Error
}
func (repo *CustomerRepo) SetCustomerNoVatStatus(customerID uint, isNoVat bool) error {
return db.DB.Model(&model.Customer{}).Where("id = ?", customerID).Update("is_no_vat", isNoVat).Error
}
// func (repo *CustomerRepo) Search(
// customerId uint,
// partnerCode string,