diff options
| author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2025-10-12 13:38:07 +0530 | 
|---|---|---|
| committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2025-10-12 13:38:07 +0530 | 
| commit | fd863aadf34b9837bd77587c1d36eb49000a8de7 (patch) | |
| tree | c1ba13e609134451b8956b92f618d5e36c272839 /customer/hooks.go | |
| parent | a356803594ab36fa69e7dbcbd79261d8b46f4262 (diff) | |
moved shipping address and billing address to the customers table itselfv0.20.0
Diffstat (limited to 'customer/hooks.go')
| -rw-r--r-- | customer/hooks.go | 16 | 
1 files changed, 1 insertions, 15 deletions
diff --git a/customer/hooks.go b/customer/hooks.go index 148004f..7f715c3 100644 --- a/customer/hooks.go +++ b/customer/hooks.go @@ -1,5 +1,5 @@  /* openbills - Server for web based Libre Billing Software - * Copyright (C) 2023  Vidhu Kant Sharma <vidhukant@vidhukant.com> + * Copyright (C) 2023-2025  Vidhu Kant Sharma <vidhukant@vidhukant.com>   *   * This program is free software: you can redistribute it and/or modify   * it under the terms of the GNU General Public License as published by @@ -39,19 +39,5 @@ func (c *Customer) BeforeDelete(tx *gorm.DB) error {  		return errors.ErrNoWhereCondition  	} -	var err error - -	// delete billing address -	err = db.Where("customer_id = ?", c.ID).Delete(&CustomerBillingAddress{}).Error -	if err != nil { -		return err -	} - -	// delete shipping address -	err = db.Where("customer_id = ?", c.ID).Delete(&CustomerShippingAddress{}).Error -	if err != nil { -		return err -	} -  	return nil  }  |