Private
Public Access
hecho lo ded Registro de pagos
Signed-off-by: fede <federico.nicolas.polidoro@gmail.com>
This commit is contained in:
1 parent
b68db07c92
commit
09830e15ec
19 files changed
+722
-46
No files matched your search
@@ -5,6 +5,7 @@ import (
|
||||
decorator "repuestera_back/repositorios/Decorator/facturas"
|
||||
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/clause"
|
||||
)
|
||||
|
||||
type RepositorioFactura interface {
|
||||
@@ -75,7 +76,7 @@ func (r *repositorioFactura) BloquearPorID(tx *gorm.DB, id uint) (*models.Factur
|
||||
if r.empresaID > 0 {
|
||||
db = db.Where("empresa_id = ?", r.empresaID)
|
||||
}
|
||||
if err := db.Set("gorm:query_option", "FOR UPDATE").Preload("Cliente").First(&factura, id).Error; err != nil {
|
||||
if err := db.Clauses(clause.Locking{Strength: "UPDATE"}).Preload("Cliente").First(&factura, id).Error; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &factura, nil
|
||||
|
||||
Reference in new issue
Block a user