--fix tipos venta

This commit is contained in:
2025-03-20 17:08:52 -07:00
parent 356e97ad36
commit b3944d2f11
2 changed files with 17 additions and 14 deletions

View File

@@ -1470,7 +1470,7 @@ Partial Class ProductosyServicios
Exit Sub
End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ChkAplicaParaVenta.Checked Then
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso ChkAplicaParaVenta.Checked AndAlso DivListaPrecios.Visible Then
Dim tcontador As Integer = 0
For Each GvRow As GridViewRow In GvPLMultiple.Rows
Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero()
@@ -3012,13 +3012,12 @@ Partial Class ProductosyServicios
If UsuarioActual.TienePermisoProceso(389) Then 'si puede actualizar precios se muestra
Dim objPS As New ClsProductosServicios
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CvePS:=CvePS) Then
GvPLMultiple.DataSource = objPS.DtResultados
GvPLMultiple.DataSource = objPS.DtResultados.Copy()
End If
objPS.Dispose()
DivListaPrecios.Visible = True
GvPLMultiple.DataBind()
DivListaPrecios.Visible = True
End If
End Sub
Protected Sub GvMultiple_RowDataBound(sender As Object, e As GridViewRowEventArgs)
@@ -3035,6 +3034,7 @@ Partial Class ProductosyServicios
Dim TieneError As Boolean = False
Try
If DivListaPrecios.Visible Then
For Each GvRow As GridViewRow In GvPLMultiple.Rows
Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero()
Dim Precio As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal()
@@ -3045,6 +3045,8 @@ Partial Class ProductosyServicios
Exit For
End If
Next
End If
Catch ex As Exception
OnError("Ocurrió un error al actualizar precios", ex)
TieneError = True

View File

@@ -14649,7 +14649,7 @@ Partial Class Ventas
'VERIFICA SI BONIFICACION
If ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 2)) Then
CveTipoVentaGuardar = 7 ' BONIFICACION
ElseIf ListaNCDescuento.Any(Function(RNC) (Not RNC.Num1 = 2)) Then
ElseIf ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 1)) Then
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
End If
End If
@@ -14658,7 +14658,7 @@ Partial Class Ventas
'VERIFICA SI BONIFICACION
If ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 2)) Then
CveTipoVentaGuardar = 7 ' BONIFICACION
ElseIf ListaRemisionesNC.Any(Function(RNC) (Not RNC.Num1 = 2)) Then
ElseIf ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 1)) Then
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
End If
End If
@@ -37929,6 +37929,7 @@ Partial Class Ventas
ObjFacturaProntoPago.DtVentasNC = DtVentasNC
ObjFacturaProntoPago.Timbre = PreParaTimbre(ObjFacturaProntoPago)
ObjFacturaProntoPago.CveTipoVenta = 8
Resp = ObjFacturaProntoPago.EmitirFactura(False, Transac:=SqlTransaccion)