--Facturacion de activos fijos
This commit is contained in:
@@ -122,7 +122,14 @@ Partial Class ProductosyServicios
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property GeneraServicioAF As Integer
|
||||
Get
|
||||
Return ViewState("GeneraServicioAF").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("GeneraServicioAF") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Private ReadOnly Property PermiteClasificacion2 As Boolean
|
||||
@@ -308,6 +315,22 @@ Partial Class ProductosyServicios
|
||||
LtlScripts.Text = $"<script>function setPoscicion(){{{posiciontipo}}}</script>"
|
||||
If Not CvePS > 0 Then MuestraPanel(True)
|
||||
|
||||
|
||||
If Request("GeneraServicioAF") IsNot Nothing AndAlso IsNumeric(Request("GeneraServicioAF")) AndAlso Request("GeneraServicioAF").ToEntero() = 1 Then
|
||||
GeneraServicioAF = 1
|
||||
TxtPS.Text = "Servicio de facturación de activos fijos"
|
||||
|
||||
DdlTipoPS.SelectedValueExist("1")
|
||||
DdlTipoPS.Enabled = False
|
||||
|
||||
ChkAplicaParaVenta.Checked = True
|
||||
|
||||
Dim DrSAT = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:="84111506", AplicaParaVenta:=1).FiltroPrimero("") ', SATClavePS:=CveSATNC
|
||||
|
||||
DdlSATPS.SelectedValue = DrSAT("CveSATPS").ToString()
|
||||
DdlSATPS.SelectedText = DrSAT("SATClaveProductoServicio").ToString()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1403,6 +1426,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||
Dim ObjInv As New ClsInventarios(ObjProductosServicios.IniciaTransacSQL())
|
||||
Dim ObjEmpresas As New ClsSisEmpresas(ObjProductosServicios.IniciaTransacSQL())
|
||||
|
||||
Dim TieneError = False
|
||||
Dim AccionJS = ""
|
||||
@@ -1435,6 +1459,7 @@ Partial Class ProductosyServicios
|
||||
TxtFechaVigenciaRSCO.Text = "01/01/1900"
|
||||
End If
|
||||
|
||||
|
||||
If CvePS = -1 Then
|
||||
Dim PSS As String = TxtPS.Text.Trim.Replace("|", "")
|
||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper
|
||||
@@ -1478,6 +1503,24 @@ Partial Class ProductosyServicios
|
||||
TieneError = GuardarProductoEnFranquicia(ObjProductosServicios, PSS, CveMetodoInv, EsPaquete, True)
|
||||
End If
|
||||
|
||||
If GeneraServicioAF = 1 Then
|
||||
|
||||
Dim RowFuncionalidad380 As DataRow = Nothing
|
||||
|
||||
If ObjEmpresas.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then
|
||||
RowFuncionalidad380 = ObjEmpresas.DtResultados.FiltroPrimero("CveFuncionalidad = 380")
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
'SI NO TIENE LA FUNCIONALIDAD 380 GUARDAR LA FUNCIONALIDAD
|
||||
If Not TieneError AndAlso RowFuncionalidad380 Is Nothing Then
|
||||
If Not ObjEmpresas.AddUpdateEmpresaFuncionalidades(UsuarioActual.CveEmpresa, 380, $"{Me.CvePS}") Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
TieneError = True
|
||||
Alert("Ocurrió un Error al agregar el Producto o Servicio. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
@@ -1595,7 +1638,7 @@ Partial Class ProductosyServicios
|
||||
|
||||
If Not TieneError Then
|
||||
ObjProductosServicios.Commit()
|
||||
Alert("El Producto/Servicio se guardo correctamente.", TipoMensaje.MsgInformacion, AccionJS)
|
||||
Alert("El Producto/Servicio se guardo correctamente." + If(GeneraServicioAF = 1, " Recargue la pagina de ventas para poder utilizar el servicio", ""), TipoMensaje.MsgInformacion, AccionJS)
|
||||
Else
|
||||
ObjProductosServicios.RollBack()
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user