Private
Public Access
hecha la parte del cu-02 falta test
Signed-off-by: fede <federico.nicolas.polidoro@gmail.com>
This commit is contained in:
1 parent
42bf987ffc
commit
cc80dd1467
20 files changed
+940
-7
No files matched your search
@@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
// ComprobanteSecuencia lleva el último número emitido por empresa y tipo.
|
||||
type ComprobanteSecuencia struct {
|
||||
gorm.Model
|
||||
EmpresaID uint `gorm:"not null;index;uniqueIndex:uq_seq_empresa_tipo,priority:1" json:"empresaId"`
|
||||
Tipo string `gorm:"type:varchar(20);not null;uniqueIndex:uq_seq_empresa_tipo,priority:2" json:"tipo"`
|
||||
UltimoNumero uint `gorm:"not null;default:0" json:"ultimoNumero"`
|
||||
}
|
||||
|
||||
func (ComprobanteSecuencia) TableName() string {
|
||||
return "comprobante_secuencia"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// FacturaCambio registra una modificación sobre una factura (auditoría).
|
||||
type FacturaCambio struct {
|
||||
Fecha time.Time `json:"fecha"`
|
||||
UsuarioID uint `json:"usuarioId"`
|
||||
Motivo string `json:"motivo"`
|
||||
ItemsAnteriores []FacturaDetalle `json:"itemsAnteriores"`
|
||||
TotalAnterior float64 `json:"totalAnterior"`
|
||||
ItemsNuevos []FacturaDetalle `json:"itemsNuevos"`
|
||||
TotalNuevo float64 `json:"totalNuevo"`
|
||||
NotaTipo string `json:"notaTipo,omitempty"`
|
||||
NotaID uint `json:"notaId,omitempty"`
|
||||
}
|
||||
Reference in new issue
Block a user