feat: add no vat property to customers
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user