--fix tipos venta
This commit is contained in:
@@ -1470,7 +1470,7 @@ Partial Class ProductosyServicios
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
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
|
Dim tcontador As Integer = 0
|
||||||
For Each GvRow As GridViewRow In GvPLMultiple.Rows
|
For Each GvRow As GridViewRow In GvPLMultiple.Rows
|
||||||
Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero()
|
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
|
If UsuarioActual.TienePermisoProceso(389) Then 'si puede actualizar precios se muestra
|
||||||
Dim objPS As New ClsProductosServicios
|
Dim objPS As New ClsProductosServicios
|
||||||
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CvePS:=CvePS) Then
|
If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, -1, CvePS:=CvePS) Then
|
||||||
GvPLMultiple.DataSource = objPS.DtResultados
|
GvPLMultiple.DataSource = objPS.DtResultados.Copy()
|
||||||
End If
|
End If
|
||||||
objPS.Dispose()
|
objPS.Dispose()
|
||||||
DivListaPrecios.Visible = True
|
|
||||||
GvPLMultiple.DataBind()
|
GvPLMultiple.DataBind()
|
||||||
|
DivListaPrecios.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvMultiple_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GvMultiple_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
@@ -3035,16 +3034,19 @@ Partial Class ProductosyServicios
|
|||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
Try
|
Try
|
||||||
For Each GvRow As GridViewRow In GvPLMultiple.Rows
|
If DivListaPrecios.Visible Then
|
||||||
Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero()
|
For Each GvRow As GridViewRow In GvPLMultiple.Rows
|
||||||
Dim Precio As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal()
|
Dim CvePrecioLista As Integer = GvRow.DataKey("CvePrecioLista").ToEntero()
|
||||||
|
Dim Precio As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal()
|
||||||
|
|
||||||
TieneError = Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLista, 0, CvePS, UsuarioActual.CveUsuario, NowADS(), True)
|
TieneError = Not ObjPS.UpdatePSPreciosLista(Precio, CvePrecioLista, 0, CvePS, UsuarioActual.CveUsuario, NowADS(), True)
|
||||||
|
|
||||||
|
If TieneError Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
If TieneError Then
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al actualizar precios", ex)
|
OnError("Ocurrió un error al actualizar precios", ex)
|
||||||
TieneError = True
|
TieneError = True
|
||||||
|
|||||||
@@ -14649,7 +14649,7 @@ Partial Class Ventas
|
|||||||
'VERIFICA SI BONIFICACION
|
'VERIFICA SI BONIFICACION
|
||||||
If ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
If ListaNCDescuento.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
||||||
CveTipoVentaGuardar = 7 ' BONIFICACION
|
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
|
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -14658,7 +14658,7 @@ Partial Class Ventas
|
|||||||
'VERIFICA SI BONIFICACION
|
'VERIFICA SI BONIFICACION
|
||||||
If ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
If ListaRemisionesNC.Any(Function(RNC) (RNC.Num1 = 2)) Then
|
||||||
CveTipoVentaGuardar = 7 ' BONIFICACION
|
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
|
CveTipoVentaGuardar = 9 ' CANCELACION DE USADOS
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -37929,6 +37929,7 @@ Partial Class Ventas
|
|||||||
ObjFacturaProntoPago.DtVentasNC = DtVentasNC
|
ObjFacturaProntoPago.DtVentasNC = DtVentasNC
|
||||||
|
|
||||||
ObjFacturaProntoPago.Timbre = PreParaTimbre(ObjFacturaProntoPago)
|
ObjFacturaProntoPago.Timbre = PreParaTimbre(ObjFacturaProntoPago)
|
||||||
|
ObjFacturaProntoPago.CveTipoVenta = 8
|
||||||
|
|
||||||
Resp = ObjFacturaProntoPago.EmitirFactura(False, Transac:=SqlTransaccion)
|
Resp = ObjFacturaProntoPago.EmitirFactura(False, Transac:=SqlTransaccion)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user