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,24 @@
|
||||
package dto
|
||||
|
||||
type CrearFacturaDto struct {
|
||||
ClienteID uint `json:"clienteId" binding:"required"`
|
||||
AlmacenID uint `json:"almacenId" binding:"required"`
|
||||
Items []ItemFacturaDto `json:"items" binding:"required,min=1"`
|
||||
DescuentoID uint `json:"descuentoId"`
|
||||
Pagos []PagoFacturaDto `json:"pagos"`
|
||||
EnviarEmail bool `json:"enviarEmail"`
|
||||
Observacion string `json:"observacion"`
|
||||
}
|
||||
|
||||
type ItemFacturaDto struct {
|
||||
RepuestoID uint64 `json:"repuestoId" binding:"required"`
|
||||
Cantidad float64 `json:"cantidad" binding:"required,gt=0"`
|
||||
PrecioUnitario float64 `json:"precioUnitario" binding:"gte=0"`
|
||||
}
|
||||
|
||||
type PagoFacturaDto struct {
|
||||
FormaDePagoID uint `json:"formaDePagoId" binding:"required"`
|
||||
Importe float64 `json:"importe" binding:"required,gt=0"`
|
||||
Fecha string `json:"fecha"`
|
||||
Observacion string `json:"observacion"`
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package dto
|
||||
|
||||
import "repuestera_back/models"
|
||||
|
||||
// CrearFacturaResponse es la respuesta de la emisión de una factura.
|
||||
type CrearFacturaResponse struct {
|
||||
Factura *FacturaResponse `json:"factura"`
|
||||
Stocks []*models.Stock `json:"stocks"`
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"repuestera_back/models"
|
||||
)
|
||||
|
||||
// FacturaCalculada reúne los datos ya validados y calculados que necesita el
|
||||
// builder para construir el modelo de factura.
|
||||
type FacturaCalculada struct {
|
||||
EmpresaID uint
|
||||
Numero string
|
||||
ClienteID uint
|
||||
AlmacenID uint
|
||||
FechaEmision time.Time
|
||||
Subtotal float64
|
||||
DescuentoID uint
|
||||
DescuentoTotal float64
|
||||
Impuestos float64
|
||||
AlicuotaIVA float64
|
||||
Total float64
|
||||
Saldo float64
|
||||
Detalles []models.FacturaDetalle
|
||||
Observacion string
|
||||
ResponsableID uint
|
||||
}
|
||||
Reference in new issue
Block a user