This commit is contained in:
2024-12-16 06:40:42 -07:00
15 changed files with 2780 additions and 235 deletions

View File

@@ -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()

View File

@@ -1253,7 +1253,7 @@
</table>
<asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False"
DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,Clasificacion,CveUM,UM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,ImporteIVA,CantidadInventario,CantidadFacturadaRem,CveVentaDetalle,CvePromocionDetalle"
DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,Clasificacion,CveUM,UM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,ImporteIVA,CantidadInventario,CantidadFacturadaRem,CveVentaDetalle,CvePromocionDetalle,CvePrecioLista"
CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" Style="min-width: 980px;">
<Columns>
<%--0--%>

View File

@@ -20033,6 +20033,7 @@ Partial Class Ventas
Else
If Me.CvePrecioLista > 0 Then
CvePrecioListaPS = Me.CvePrecioLista
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
PrecioListaPS = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("PrecioLista", $"CvePrecioLista={CvePrecioListaPS}")
End If
@@ -20305,6 +20306,7 @@ Partial Class Ventas
'CODIGO BARRAS
TxtCodigoBarras.Text = ""
TxtCodigoSerie.Text = ""
TxtTiempoEntrega.Text = ""
'FOCUS DEPENDIENDO MODALIDAD DE CODIGO BARRAS
If DIVCod.Visible Then