--FIX Varios
This commit is contained in:
@@ -505,6 +505,7 @@ Partial Class Ventas_PVCobranza
|
||||
VentaActual.UsuarioActual = UsuarioActual
|
||||
VentaActual.CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero
|
||||
Dim CveVendedor As Integer = DbRowVenta("CveVendedor").ToString.ToEntero
|
||||
Dim ObservacionesAlmacen = DbRowVenta("ObservacionesAlmacen").ToString()
|
||||
|
||||
If tCveCorte <= 0 AndAlso DbRowVenta("CveCorte").ToString.ToEntero > 0 Then tCveCorte = DbRowVenta("CveCorte").ToString.ToEntero
|
||||
|
||||
@@ -530,7 +531,7 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
CveVentaRemision = HdnCveVenta.Value.ToEntero
|
||||
|
||||
respFactura = GenerarFactura(CveVendedor, VentaActual, ObjVentas2, ObjClientes)
|
||||
respFactura = GenerarFactura(CveVendedor, VentaActual, ObjVentas2, ObjClientes, ObservacionesAlmacen)
|
||||
|
||||
If respFactura Is Nothing Then
|
||||
MsgError = "Ocurrió un error al generar la factura"
|
||||
@@ -761,7 +762,7 @@ Partial Class Ventas_PVCobranza
|
||||
UpL.Update()
|
||||
End Sub
|
||||
|
||||
Private Function GenerarFactura(CveVendedor As Integer, ByRef VentaRemision As Venta, ByRef ObjVentas As ClsVentas, ByRef ObjClientes As ClsClientes) As Modelos.Factura.MMensajeFactura
|
||||
Private Function GenerarFactura(CveVendedor As Integer, ByRef VentaRemision As Venta, ByRef ObjVentas As ClsVentas, ByRef ObjClientes As ClsClientes, ObservacionesAlmacen As String) As Modelos.Factura.MMensajeFactura
|
||||
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||
Dim SbAlert As New StringBuilder()
|
||||
|
||||
@@ -828,7 +829,7 @@ Partial Class Ventas_PVCobranza
|
||||
PorcentajeIVA:=Dr("PorcentajeIVA").ToString().ToDecimal())
|
||||
Next
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" Then
|
||||
If Not ValidateString(ObservacionesAlmacen.ToLower(), "parcial") Then
|
||||
ObjFactura.GenerarSalidaAlmacen = True
|
||||
ObjFactura.DtInventario = ObjFactura.DtDetalle.FiltraParametros("CveTipoPS = 2").Copy()
|
||||
ObjFactura.CveAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 1 AND CveSubProyecto = {VentaRemision.CveSubProyecto}", "Orden").ToString().ToEntero()
|
||||
@@ -948,6 +949,12 @@ Partial Class Ventas_PVCobranza
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Private Function ValidateString(texto As String, contenidoValidar As String) As Boolean
|
||||
Dim regex As Text.RegularExpressions.Regex = New Text.RegularExpressions.Regex("\b" + contenidoValidar + "\b")
|
||||
|
||||
Return (regex.IsMatch(texto))
|
||||
End Function
|
||||
|
||||
Private Function GenerarNC(CveVendedor As Integer, ByRef Venta As Venta, ByRef ObjVentas As ClsVentas) As Modelos.Factura.MMensajeFactura
|
||||
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||
Dim SbAlert As New StringBuilder()
|
||||
|
||||
Reference in New Issue
Block a user