--Cancelacion parcial de remison cuando se tiene varios boletos

This commit is contained in:
2024-02-19 19:10:52 -07:00
parent ea7df27b86
commit 636e336b7c
3 changed files with 91 additions and 21 deletions

View File

@@ -235,9 +235,6 @@ Partial Class Boletos
Obs = dr("Observaciones").ToString
Dim CveViajePasajero = ObjTransporte.AddViajesPasajeros(CveViaje, CveDestinoOrigen, CveDestinoFinal, Importe, Asiento.ToEntero, Nombre, Visa, Celular, Sexo, Obs, UsuarioActual.CveUsuario, UsuarioActual.CveVendedor)
If Not CveViajePasajero > 1 Then
TieneError = True
End If
If CveViajePasajero < 1 Then
TieneError = True
@@ -433,14 +430,18 @@ Partial Class Boletos
ObjFactura.SetSubProyectoMatriz()
For Each Dr As DataRow In DtPasajeros.Rows
Dim Obs = Dr("Nombre").ToString
Dim Obs = Dr("Observaciones").ToString
Dim Importe = Dr("Importe").ToString.ToDecimal()
If Importe <= 0 Then
Retorno.Mensajes.Add("El importe debe ser mayor a 0")
Return Retorno
End If
ObjFactura.AgregarPS(CvePSBoleto, 1, Importe, 0, Obs, CveSubProyecto:=CveSubProyecto, PorcentajeIVA:=0, CveViajePasajero:=Dr("CveViajePasajero").ToString().ToEntero())
If Not ObjFactura.AgregarPS(CvePSBoleto, 1, Importe, 0, Obs, CveSubProyecto:=CveSubProyecto, PorcentajeIVA:=0, CveViajePasajero:=Dr("CveViajePasajero").ToString().ToEntero()) Then
Retorno.Mensajes.Add("No se pudo agregar el producto")
Return Retorno
End If
Next
ObjFactura.CalculaTotales()
@@ -459,7 +460,6 @@ Partial Class Boletos
Retorno.Mensajes.Add("No se pudo generar la factura")
End If
Return Retorno
End Function