+
+
+
+
+
+
+
@@ -245,6 +282,17 @@
$("#divComandos").modal()
$("#C_BtnCargaComandos").click()
+ }
+ function EditarComentario(Vehiculo, Comentario, CveDispositivo) {
+ $("#HdnCveDipositivo").val(CveDispositivo)
+ // if (open) { FNShowDiv(); }
+ $("#myModalLabelComenta").text("Comentarios para vehículo: " + Vehiculo)
+ closeLastOpenedInfoWindow();
+ $("#divComentarios").modal();
+
+ $("#C_TxtComentarios").val(Comentario)
+ $("#C_BtnCargaComentarios").click()
+
}
function ControlLabels(controlDiv, map) {
@@ -337,7 +385,7 @@
});
}
- }
+ }
diff --git a/PortalGPS/InicioGPS.aspx.vb b/PortalGPS/InicioGPS.aspx.vb
index 17d5eccd0..fcd6c617a 100644
--- a/PortalGPS/InicioGPS.aspx.vb
+++ b/PortalGPS/InicioGPS.aspx.vb
@@ -229,23 +229,37 @@ Partial Class GPS_PruebaMaster
Public Function InfoWindowCombustible(Header As String, ExtraBody As String, CveDispositivo As Integer, row As DataRow, Optional PermisoComandos As Boolean = True) As String
Dim SBuilder As New StringBuilder
SBuilder.Clear()
- SBuilder.Append($"
")
+ SBuilder.Append($"
")
SBuilder.Append($"
")
SBuilder.Append($"
")
SBuilder.Append($"| Fecha : {row("FechaTrama")} |
")
- SBuilder.Append($"| Conductor : {row("Conductor").ToString} |
")
+ SBuilder.Append($"| Conductor : {row("Conductor")} |
")
SBuilder.Append($"| Combustible : {IfNull(row("Combustible"), "NO DISPONIBLE", $"{row("Combustible").ToString.FormatoNumero} lts").ToString} |
")
If row("SPD").ToString <> "-1" Then
- SBuilder.Append($"| Velocidad : {row("SPD").ToString} KM/H |
")
+ SBuilder.Append($"| Velocidad : {row("SPD")} KM/H |
")
End If
If ExtraBody <> "" AndAlso ExtraBody <> "-1" Then
SBuilder.Append(ExtraBody)
End If
If PermisoComandos Then
- SBuilder.Append($"| Comandos |
")
+ SBuilder.Append($"| Comandos |
")
End If
SBuilder.AppendFormat("| Ver en google maps |
", row("Lat").ToString, row("Lng").ToString)
- SBuilder.Append($"
")
+ SBuilder.Append("
")
+ SBuilder.Append("Comentario:
")
+ SBuilder.Append($"{row("Comentarios")}
Editar")
+
+ SBuilder.Append("
")
Return SBuilder.ToString
End Function
+
+ Protected Sub BtnGuardarComentario_Click(sender As Object, e As EventArgs)
+ Dim CveDispositivo As Integer = HdnCveDipositivo.Value.ToEntero()
+ Dim comentario As String = TxtComentarios.Text
+ Using objgps As New ClsGPS
+ objgps.DispositivoComentarioupdate(CveDispositivo, comentario, UsuarioActual.CveUsuario)
+ RegistraScript("$(""#divComentarios"").modal('hide');")
+ End Using
+ BtnCargar_Click(Nothing, Nothing)
+ End Sub
End Class
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb
index 6b33e261a..49764cc6b 100644
--- a/Ventas/Clientes.aspx.vb
+++ b/Ventas/Clientes.aspx.vb
@@ -12,9 +12,9 @@ Imports Newtonsoft.Json
Imports Newtonsoft.Json.Linq
Partial Class Clientes
- Inherits ClsPaginas
-
- 'Configuración
+ Inherits ClsPaginas
+
+ 'Configuración
#Region "P R O P I E D A D E S"
Private Const NumeroDecimales As Integer = 2
Private CveVentaDeduccion As Integer
@@ -452,7 +452,7 @@ Partial Class Clientes
Set(value As DataTable)
ViewState("DtAnticipoHistorial") = value
End Set
- End Property
+ End Property
Private Property DtLineaAdicional As DataTable
Get
Return CType(ViewState("DtLineaAdicional"), DataTable)
@@ -535,13 +535,13 @@ Partial Class Clientes
Set(value As DateTime)
ViewState("FechaIngLineaAdicional") = value
End Set
- End Property
-
-
-
-
+ End Property
+
+
+
+
#End Region
-
+
#Region "Documentacion"
Private Property DTDocumentacion As DataTable
Get
@@ -652,38 +652,38 @@ Partial Class Clientes
Set(value As String)
ViewState("AdjuntoDocumentacion") = value
End Set
- End Property
-
+ End Property
+
Property CveVendedorOriginal As Integer
Get
- If ViewState("CveVendedorOriginal") Is Nothing Then
- ViewState("CveVendedorOriginal") = -1
- End If
-
+ If ViewState("CveVendedorOriginal") Is Nothing Then
+ ViewState("CveVendedorOriginal") = -1
+ End If
+
Return DirectCast(ViewState("CveVendedorOriginal"), Integer)
End Get
Set(value As Integer)
ViewState("CveVendedorOriginal") = value
End Set
- End Property
-
-
-
- 'Private ReadOnly Property CvePersonal As Integer
- ' Get
- ' If ViewState("CvePersonal") Is Nothing Then
- ' Return -1
- ' Else
- ' Return ViewState("CvePersonal").ToString().Toentero()
- ' End If
- ' End Get
- 'End Property
-
+ End Property
+
+
+
+ 'Private ReadOnly Property CvePersonal As Integer
+ ' Get
+ ' If ViewState("CvePersonal") Is Nothing Then
+ ' Return -1
+ ' Else
+ ' Return ViewState("CvePersonal").ToString().Toentero()
+ ' End If
+ ' End Get
+ 'End Property
+
#End Region
-
-
-
+
+
+
#Region " A C U M U L A D O R E S"
Property CveVentaNota As Integer
Get
@@ -723,10 +723,10 @@ Partial Class Clientes
Set(value As String)
ViewState("SerieNotaAcumulador") = value
End Set
- End Property
-
+ End Property
+
#End Region
-
+
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -884,13 +884,13 @@ Partial Class Clientes
End If
'CargaCuentasyConceptos()
- If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.TienePermisoProceso(353) Then
- DVLnkCambiarVendedor.Visible = True
- End If
-
-
- Else
- 'Configuración de Modalidad Insert
+ If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso UsuarioActual.TienePermisoProceso(353) Then
+ DVLnkCambiarVendedor.Visible = True
+ End If
+
+
+ Else
+ 'Configuración de Modalidad Insert
CargaEstados()
BtnGuardar.Visible = PermiteGuardar()
@@ -910,7 +910,7 @@ Partial Class Clientes
CargaDocumentacionCliente()
'TxtPais.Text = "México"
- End If
+ End If
If UsuarioActual.Empresa.CvePlataforma = 3 Then
@@ -985,7 +985,7 @@ Partial Class Clientes
TabLineasAdicionales.Visible = True
LnkAgregarLineaAdicional.Visible = True
GetLineasAdicionales()
- End If
+ End If
End If
'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017
@@ -993,12 +993,12 @@ Partial Class Clientes
ChkPermiso5.Enabled = False
ChkPermiso6.Enabled = False
- End Sub
-
-
-
+ End Sub
+
+
+
#Region " PERMISOS PAGINAS "
-
+
Private Sub MostrarTxtDireccionesClienteEnvio()
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
@@ -1035,18 +1035,18 @@ Partial Class Clientes
If Not ChkEsDistribuidor.Checked Then
BtnGuardar.Visible = PermiteEditar()
End If
- End Sub
-
-
+ End Sub
+
+
#End Region
-
-
+
+
#Region "C A R G A S"
-
-
-
-
-
+
+
+
+
+
Private Sub CreaDtPago()
DtPagos = New DataTable
DtPagos.Columns.Add("CveTipoMovimiento", GetType(String))
@@ -1146,8 +1146,8 @@ Partial Class Clientes
DdlClienteSucursalEnvio.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlClienteSucursalEnvio.SelectedValue = "-1"
End Sub
- Private Sub CargaSubProyectosSuscursales()
- CargarCentrosDeCosto(Nothing, DdlSubProyectoClienteSucursal, Nothing, LblSubProyectoClienteSucursal)
+ Private Sub CargaSubProyectosSuscursales()
+ CargarCentrosDeCosto(Nothing, DdlSubProyectoClienteSucursal, Nothing, LblSubProyectoClienteSucursal)
End Sub
Private Sub CargaGridRetenciones()
Dim ObjClientes As New ClsClientes
@@ -1224,9 +1224,9 @@ Partial Class Clientes
Select Case HdnCuenta.Value
Case "1"
- CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero()
+ CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero()
Case "2"
- CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero()
+ CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero()
Case "3"
CargaDdlCuentasContables(DdlCtaContableRetIVA, -1)
Case "4"
@@ -1234,11 +1234,11 @@ Partial Class Clientes
Case "5"
CargaDdlCuentasContables(DdlCtaContableFondoGarantia, -1)
Case "6"
- CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero()
+ CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero()
Case "7"
CargaDdlCuentasContables(DdlCtaContableCompAnticipos, -1)
Case "8"
- CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero()
+ CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero()
Case "9"
CargaDdlCuentasContables(DdlMonedaExtranjeraAnticipos, 1) 'UsuarioActual.Empresa.Funcionalidad(542).Toentero()
End Select
@@ -1323,7 +1323,7 @@ Partial Class Clientes
CargaCombosComercioExterior()
- End Sub
+ End Sub
Private Sub CargaSubProyectos()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, Nothing, AplicaTodos:="Seleccione")
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
@@ -1335,11 +1335,11 @@ Partial Class Clientes
DdlMetodoPagoSucursal.DataBind()
'DdlMetodoPago.DataBind()
End Sub
- Private Sub CargaPrecioLista()
- 'SI NO TIENE LA FUNCIONALIDAD DE LISTA DE PRECIOS
- If Not GlobalDTPrecioListas(UsuarioActual.CveEmpresa).Rows.Count > 0 Then
- DdlSubProyecto.AutoPostBack = False
- DivPrecioLista.Visible = False
+ Private Sub CargaPrecioLista()
+ 'SI NO TIENE LA FUNCIONALIDAD DE LISTA DE PRECIOS
+ If Not GlobalDTPrecioListas(UsuarioActual.CveEmpresa).Rows.Count > 0 Then
+ DdlSubProyecto.AutoPostBack = False
+ DivPrecioLista.Visible = False
End If
DdlPrecioLista.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa)
@@ -1517,7 +1517,7 @@ Partial Class Clientes
' CargaDocs()
CargaCombos()
CargaDocumentacionCliente()
- 'CargaSubProyectosSuscursales()
+ CargaSubProyectosSuscursales()
'CargaMetodosPago33()
'CargaFormaPago33()
'CargaComboCFDI()
@@ -1589,11 +1589,11 @@ Partial Class Clientes
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
TxtRetIVA.Text = ObjClientes.RetIVA.ToString()
TxtRetISR.Text = ObjClientes.RetISR.ToString()
- ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes
- If ObjClientes.CveSubProyecto > 0 Then
- DdlSubProyecto.SelectedValueExistInsert(ObjClientes.CveSubProyecto.ToString(), GlobalDTSubProyectos(-1, CveSubProyecto:=ObjClientes.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto"))
- End If
-
+ ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes
+ If ObjClientes.CveSubProyecto > 0 Then
+ DdlSubProyecto.SelectedValueExistInsert(ObjClientes.CveSubProyecto.ToString(), GlobalDTSubProyectos(-1, CveSubProyecto:=ObjClientes.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto"))
+ End If
+
DdlZonaHoraria.SelectedValueExist(ObjClientes.DtResultados(0)("CveZonaHoraria").ToString())
ChkEstado.Checked = ObjClientes.Estatus
EstatusAnteriorCliente = ObjClientes.Estatus
@@ -2171,11 +2171,11 @@ Partial Class Clientes
DdlSucursalUsoCFDI.Items.Clear()
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
DdlSucursalUsoCFDI.DataBind()
- End Sub
+ End Sub
#End Region
-
+
#Region "V E R M Á S"
-
+
Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs)
If BtnVerMasVentas.Text = "Ver Más" Then
CargaHistorial(-1)
@@ -2205,12 +2205,12 @@ Partial Class Clientes
CargaBancos(51)
BtnVerMasBancos.Text = "Ver Más"
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "B A N C O S"
- 'CuentasxCobrar Activas (Pagos Recibidos)
+ 'CuentasxCobrar Activas (Pagos Recibidos)
Private Sub CargaBancos(Optional SelectTop As Integer = 51, Optional CveClienteSucursal As Integer = -1)
Dim ObjMovtos As New ClsMovimientos()
'CxC Activas
@@ -2280,9 +2280,9 @@ Partial Class Clientes
TxtParaMail.Text = TxtCobranzaCorreo.Text
UpSendMail.Update()
RegistraScript("$('#ModalDivMail').modal('show');")
- End Sub
+ End Sub
#End Region
-
+
#Region "B T N ´ S"
Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
Dim ObjClientes As New ClsClientes()
@@ -2623,85 +2623,85 @@ Partial Class Clientes
Dim errorContPaq As Boolean = False
Dim IdContPaqi As Integer = 0
- Dim CodigoPersona As Integer = 0
-
-
+ Dim CodigoPersona As Integer = 0
+
+
#Region "comentado"
- 'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then
-
- ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
-
- ' If ObjContPaqi.GetPersona(TxtRFC.Text) Then
-
- ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
-
- ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString().Toentero()
- ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
-
- ' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString()), 1, 0)
- ' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString()
- ' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString()
-
- ' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then
- ' errorContPaq = False
- ' Else
- ' errorContPaq = True
- ' End If
-
- ' Else
- ' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then
-
- ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero()
- ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
- ' errorContPaq = False
- ' Else
- ' errorContPaq = True
- ' End If
- ' End If
- ' End If
-
-
- ' If Not errorContPaq Then
- ' Dim IdContPaqiCliente As Integer
-
- ' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then
-
- ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
-
- ' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero()
-
- ' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then
- ' errorContPaq = False
- ' Else
- ' errorContPaq = True
- ' End If
- ' Else
- ' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then
- ' errorContPaq = False
- ' Else
- ' errorContPaq = True
- ' End If
- ' End If
- ' Else
- ' errorContPaq = True
- ' End If
- ' End If
-
-
- ' If Not errorContPaq Then
- ' ObjContPaqi.Commit()
- ' ObjContPaqi.Dispose()
- ' Else
- ' ObjContPaqi.RollBack()
- ' ObjContPaqi.Dispose()
- ' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError)
- ' Exit Sub
- ' End If
-
-
- 'End If
+ 'If UsuarioActual.Empresa.Funcionalidad(522).ToString() = "1" Then
+
+ ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
+
+ ' If ObjContPaqi.GetPersona(TxtRFC.Text) Then
+
+ ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
+
+ ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString().Toentero()
+ ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
+
+ ' Dim Cont_EsProveedor As Integer = If(Boolean.Parse(ObjContPaqi.DtResultados.Rows(0)("EsProveedor").ToString()), 1, 0)
+ ' Dim Cont_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString()
+ ' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString()
+
+ ' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then
+ ' errorContPaq = False
+ ' Else
+ ' errorContPaq = True
+ ' End If
+
+ ' Else
+ ' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then
+
+ ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString().Toentero()
+ ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString().Toentero()
+ ' errorContPaq = False
+ ' Else
+ ' errorContPaq = True
+ ' End If
+ ' End If
+ ' End If
+
+
+ ' If Not errorContPaq Then
+ ' Dim IdContPaqiCliente As Integer
+
+ ' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then
+
+ ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
+
+ ' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString().Toentero()
+
+ ' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then
+ ' errorContPaq = False
+ ' Else
+ ' errorContPaq = True
+ ' End If
+ ' Else
+ ' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then
+ ' errorContPaq = False
+ ' Else
+ ' errorContPaq = True
+ ' End If
+ ' End If
+ ' Else
+ ' errorContPaq = True
+ ' End If
+ ' End If
+
+
+ ' If Not errorContPaq Then
+ ' ObjContPaqi.Commit()
+ ' ObjContPaqi.Dispose()
+ ' Else
+ ' ObjContPaqi.RollBack()
+ ' ObjContPaqi.Dispose()
+ ' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError)
+ ' Exit Sub
+ ' End If
+
+
+ 'End If
#End Region
-
+
Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0")
Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0")
@@ -2956,11 +2956,11 @@ Partial Class Clientes
ObjClientes.Dispose()
objDoc.Dispose()
RecargaGlobal()
- End Sub
-
+ End Sub
+
#End Region
-
-
+
+
#Region "G L O B L A L"
Private Sub RecargaGlobal()
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
@@ -2974,10 +2974,10 @@ Partial Class Clientes
' Application("GlobalDTCliente") = Objclientes.DtResultados
'End If
'Objclientes.Dispose()
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region "G R I D V I E W S"
Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -3118,11 +3118,11 @@ Partial Class Clientes
End If
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "R H"
-
+
Private Sub CargaPersonalAsignado()
Dim ObjPersonal As New ClsRH
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, CveCliente, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
@@ -3195,9 +3195,9 @@ Partial Class Clientes
End If
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "S U C U R S A L E S"
Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click
ChkEstatusSucursal.Checked = True
@@ -3329,7 +3329,7 @@ Partial Class Clientes
UpModalDivMapa.Update()
- End Sub
+ End Sub
#Region "G V S U C U R S A L E S"
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVSucursales.RowDataBound
@@ -3451,9 +3451,9 @@ Partial Class Clientes
Else
CargaGrid("", 0)
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "G V U S U A R I O S P O R T A L"
Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand
If e.CommandName = "RestablecerContraseña" Then
@@ -3605,9 +3605,9 @@ Partial Class Clientes
CargaGrid("", 1)
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "O R D E N A M I E N T O"
Private Sub CargaGrid(Orden As String, gvi As Integer)
If gvi = 0 Then
@@ -3639,12 +3639,12 @@ Partial Class Clientes
UPPUsuarios.Update()
End If
- End Sub
+ End Sub
#End Region
-
-
+
+
#End Region
-
+
#Region "U S U A R I O S"
Protected Sub LbSolicitudPortal_Click(sender As Object, e As EventArgs) Handles LbEnviarActivacionPortal.Click
Dim ObjUsuario As New ClsSisUsuarios
@@ -3826,9 +3826,9 @@ Partial Class Clientes
ChkPermiso5.Checked = False
ChkPermiso6.Checked = False
ChkPermiso7.Checked = False
- End Sub
+ End Sub
#End Region
-
+
#Region "E V E N T O - B I T A C O R A"
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -4037,11 +4037,11 @@ Partial Class Clientes
BtnActivaRegistroISR.Visible = True
End If
- End Sub
+ End Sub
#End Region
-
+
#Region " I M P R I M I R P D F"
-
+
Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs)
DdlTipoDocto.ClearSelection()
If ChkAntIXCNC.Checked Then
@@ -4087,13 +4087,13 @@ Partial Class Clientes
End Sub
- Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
-
+ Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
+
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.rpt", UsuarioActual.Empresa.Ruta))
- Dim RutaReporteGrales As New System.IO.FileInfo($"{DirectorioEmpresas}Grales\Formatos\RepClientesCxC.rpt")
-
-
-
+ Dim RutaReporteGrales As New System.IO.FileInfo($"{DirectorioEmpresas}Grales\Formatos\RepClientesCxC.rpt")
+
+
+
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
@@ -4402,9 +4402,9 @@ Partial Class Clientes
End Using
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "E N V I O C O R R E O"
Private Sub EnviaCorreo(Liga As String, LigaActivar As String)
@@ -4472,11 +4472,11 @@ Partial Class Clientes
a.GuardaLog()
Dim Mail As New ClsSisMail()
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
- End Sub
+ End Sub
#End Region
-
+
#Region " COTIZACIONES "
-
+
Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs)
If BtnVerMasCot.Text = "Ver Más" Then
CargaCotizaciones(-1)
@@ -4546,11 +4546,11 @@ Partial Class Clientes
HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}"
End If
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "D I R E C C I O N E N V I O "
-
+
Private Sub CargaCombosDirecionesClientesSAT()
CargaDirClientePais()
CargaDirClienteEstado()
@@ -4773,12 +4773,12 @@ Partial Class Clientes
End If
CargaDireccionesEnvio()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region " IMPORTAR SALDOS "
-
+
Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click
CargaClientesImportarSaldos()
RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos"))
@@ -4882,9 +4882,9 @@ Partial Class Clientes
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("ChkSaldo(this,{0},{1});", e.Row.FCTextBox("TxtImporte").ClientID, e.Row.DBCampo("Saldo")))
e.Row.FCTextBox("TxtImporte").Attributes.Add("onKeyUp", String.Format("CambiaSaldo({0},this,{1});", e.Row.FCCheckBox("Chk").ClientID, e.Row.DBCampo("Saldo")))
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "Cuentas/Equipos"
Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs)
HdnModalidad.Value = "I"
@@ -5472,9 +5472,9 @@ Partial Class Clientes
End If
Return Retorno
- End Function
+ End Function
#End Region
-
+
#Region "GPS"
Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click
If hdnArrayDispositivo.Value.Length > 0 Then
@@ -5615,10 +5615,10 @@ Partial Class Clientes
UpMoverDispositivo.Update()
RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});")
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "Sucursales"
Public Sub CreaDTSucursales()
@@ -5854,14 +5854,14 @@ Partial Class Clientes
End If
UpDatos.Update()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "G P S"
-
-
-
+
+
+
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
Try
@@ -5932,16 +5932,16 @@ Partial Class Clientes
End If
ObjClientes.Dispose()
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "C O N T R A T O S"
-
-
-
-
+
+
+
+
Private Sub CargaDatosContrato()
If CveCliente <= 0 Then
Exit Sub
@@ -5986,10 +5986,10 @@ Partial Class Clientes
e.Row.CssClass = "Totales white"
End If
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "M E T O D O S "
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then
@@ -6399,13 +6399,13 @@ Partial Class Clientes
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "IMPRIMIR GVHistorial"
-
-
+
+
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
Dim retorno As Byte() = Nothing
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
@@ -6480,18 +6480,18 @@ Partial Class Clientes
ObjClientes.Dispose()
Return retorno
- End Function
-
-
+ End Function
+
+
#End Region
-
+
#Region "C O B R A N Z A"
Public Sub Visitas_Click(sender As Object, e As EventArgs)
RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas"))
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "Usuarios"
Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting
Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero()
@@ -6527,12 +6527,12 @@ Partial Class Clientes
e.Row.Cells(5).Visible = False
End If
End If
- End Sub
+ End Sub
#End Region
-
-
+
+
#Region "C U E N T A S - B A N C A R I A S"
-
+
Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False)
If CveCliente <= 0 Then Exit Sub
@@ -6654,14 +6654,14 @@ Partial Class Clientes
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
- End If
-
+ End If
+
Else
If CveCliente > 0 Then
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, Estatus, CveMoneda, UsuarioActual.CveEmpresa) Then
- DTCuentasBancos.Clear()
+ DTCuentasBancos.Clear()
CargaCuentasBancarias()
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
@@ -6704,8 +6704,8 @@ Partial Class Clientes
TxtNumeroCuenta2.Text = ""
TxtConvenioCIE2.Text = ""
TxtReferencia2.Text = ""
- End Sub
-
+ End Sub
+
#Region "GRIDVIEW - CUENTAS BANCARIAS"
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -6715,8 +6715,8 @@ Partial Class Clientes
TempDTCuentasBancos.Rows(index - 1)("CveCuentaDeposito") = index
Next
TempDTCuentasBancos.AcceptChanges()
- End If
-
+ End If
+
If e.Row.DBCampo("Estatus") = "True" Then
e.Row.FCLabel("LlbEstatusTexto").Text = "Activo"
Else
@@ -6744,8 +6744,8 @@ Partial Class Clientes
Dim index = GvRow.RowIndex
TempDTCuentasBancos.Rows.RemoveAt(index)
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
- End If
-
+ End If
+
CargaPSGridCuentasBancos()
ObjCuentasBancos.Dispose()
RecargaGlobalCuentasBancarias()
@@ -6756,10 +6756,10 @@ Partial Class Clientes
GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1) = Nothing
End If
- End Sub
-
+ End Sub
+
#End Region
-
+
Private Sub CargaPSGridCuentasBancos()
If CveCliente > 0 Then
GvBancosCuentas.DataSource = DTCuentasBancos
@@ -6817,9 +6817,9 @@ Partial Class Clientes
divestatus.Visible = True
UpAddBancos.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias"))
- End Sub
+ End Sub
#End Region
-
+
#Region "C L I E N T E S P A G O S R E A L I Z A D O S I M P R I M I R P D F/Excel"
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
GenerarPDF("Excel")
@@ -6841,11 +6841,11 @@ Partial Class Clientes
ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & Now.ToString("yyyyMMddhhmmss"), Formato:=Formato)
- End Sub
+ End Sub
#End Region
-
+
#Region "VENTAS"
-
+
Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte()
Dim ObjVentas As New ClsVentas
Dim Vta As Modelos.Factura = Nothing
@@ -7076,10 +7076,10 @@ Partial Class Clientes
ObjVentas.Dispose()
Return PdfFactura(Vta)
- End Function
-
+ End Function
+
#End Region
-
+
#Region "COMERCIO EXTERIOR"
Public Sub CargaCombosComercioExterior()
@@ -7093,8 +7093,8 @@ Partial Class Clientes
DdlIncoterm.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlIncoterm.DataBind()
- DdlClavePedimento.Items.Clear()
- DdlClavePedimento.DataSource = GlobalDTClavePedimento()
+ DdlClavePedimento.Items.Clear()
+ DdlClavePedimento.DataSource = GlobalDTClavePedimento()
DdlClavePedimento.Items.Insert(0, New ListItem("Seleccione", "-1"))
DdlMotivoTraslado.Items.Clear()
@@ -7202,12 +7202,12 @@ Partial Class Clientes
End Sub
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaColonia()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "D O C U M E N T A C I O N "
-
+
Private Sub CargaDocumentacionCliente()
Dim objRH As New ClsEdocumentacion()
@@ -7845,12 +7845,12 @@ Partial Class Clientes
RegistraScript("Download('" & baseUrl & "')")
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "D O C U M E N T O S V E N T A S"
-
+
Private Sub CargaDocumentosVenta(tCveCliente As Integer)
Dim objInv As New ClsEdocumentacion
@@ -8021,11 +8021,11 @@ Partial Class Clientes
objRH.Dispose()
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "PERSONA FISICA"
Protected Sub LnkPersonaFisica_Click(sender As Object, e As EventArgs)
RegistraScript("$('#DivModalPersonaFisica').modal();")
@@ -8050,9 +8050,9 @@ Partial Class Clientes
ObjCliente.Dispose()
UpDatos.Update()
- End Sub
+ End Sub
#End Region
-
+
#Region "USUARIOS PLATAFORMA CLIENTE - 6 "
Protected Sub CargaUsuariosPortalCliente()
Dim objUsuario As ClsSisUsuarios = New ClsSisUsuarios
@@ -8061,19 +8061,19 @@ Partial Class Clientes
GvUsuarios.DataBind()
End If
objUsuario.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region " DEVOLVER DINERO ANT/NC "
Private Sub InicializaDevolverDinero()
If UsuarioActual.TienePermisoProceso(247) Then
GVAnticipos.Columns(6).Visible = True
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "MODAL GRAFICA/PEDIDOS"
-
+
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
If CargaDatatables() Then
RegistraScript("$('#DivModalGrafica').modal('show')")
@@ -8410,13 +8410,13 @@ Partial Class Clientes
RegistraScript($"CargaGraficaCompratamientoSaldoMensual({Dt5.ToJson},{Dt6.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "55")
UPModalProd.Update()
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "TAB - COMPORTAMIENTO DE VENTAS"
-
+
Private Sub CargaGrupo()
DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3"))
DdlGrupo.Items.Insert(1, New ListItem("Clasificacion", "4"))
@@ -8438,8 +8438,8 @@ Partial Class Clientes
DdlGrupo.SelectedValueExist("8")
End Sub
- Private Sub CargaFiltros()
-
+ Private Sub CargaFiltros()
+
CargarCentrosDeCosto(DdlProyectoFiltro, DdlSubProyectoFiltro, LblProyectoFiltro, LblSubProyectoFiltro)
'Cargo Clasificaciones
@@ -8478,7 +8478,7 @@ Partial Class Clientes
End Sub
Protected Sub DdlProyectoFiltro_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyectoFiltro.SelectedIndexChanged
- CargarSubProyecto(DdlSubProyectoFiltro, DdlProyectoFiltro.SelectedValue)
+ CargarSubProyecto(DdlSubProyectoFiltro, DdlProyectoFiltro.SelectedValue)
End Sub
Protected Sub DdlClasificacionFilto_SelectedIndexChanged(sender As Object, e As EventArgs)
@@ -8533,12 +8533,12 @@ Partial Class Clientes
ObjVentas.Dispose()
GvComportamientoVenta.DataBind()
UpDatosComportamientoVenta.Update()
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "DISPOSITIVOS"
-
+
Protected Sub LnkMoverDispositivo_Click(sender As Object, e As EventArgs)
Dim CveDispositivo As Integer = HdnCveDispositivoMover.Value.ToEntero()
Dim CveCliente As Integer = DdlClienteDispositivo.SelectedValue.ToEntero()
@@ -8576,10 +8576,10 @@ Partial Class Clientes
CargaEventoBitacora()
NombreDispositivo = ""
RegistraScript("$('#DivMoverDispositivo').modal('hide');")
- End Sub
-
+ End Sub
+
#End Region
-
+
#Region "CRM"
Protected Sub CargaDatosCRM()
Dim ObjCRM = New ClsCRM()
@@ -8679,9 +8679,9 @@ Partial Class Clientes
Alert("Se Unificó correctamente al Cliente con la Empresa CRM.")
End If
End If
- End Sub
+ End Sub
#End Region
-
+
#Region "PORCENTAJE PRECIO DE MARCAS"
Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas"))
@@ -8906,9 +8906,9 @@ Partial Class Clientes
ObjPS.Dispose()
- End Sub
+ End Sub
#End Region
-
+
#Region "PORCENTAJE PRECIO DE PRODUCTOS"
Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
@@ -9144,12 +9144,12 @@ Partial Class Clientes
Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs)
DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero(), DdlProducto2)
- End Sub
+ End Sub
#End Region
-
+
#Region " A C U M U L A D O R E S"
-
-
+
+
Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs)
'CveVentaNota = 0
@@ -9792,11 +9792,11 @@ Partial Class Clientes
' ObjFactura.Timbre = PreParaTimbre(ObjFactura)
- End Sub
-
-
+ End Sub
+
+
#End Region
-
+
#Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel"
Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click
ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones")
@@ -9865,7 +9865,7 @@ Partial Class Clientes
Alert("Puntuación Inicializada")
End If
Acum.Dispose()
- End Sub
+ End Sub
#End Region
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
@@ -10303,7 +10303,7 @@ Partial Class Clientes
If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
DivRazonSocial2.Attributes.Add("class", "col-md-8")
- DVRegimenSociedad.Visible = True
+ DVRegimenSociedad.Visible = True
Else
TxtNombreComercial.Enabled = True
End If
@@ -10329,21 +10329,21 @@ Partial Class Clientes
- Private Sub CargaCombosLineasAdicionales()
-
- DdlProveedorLineaAdicional.setEsWebService(True)
- DdlProveedorLineaAdicional.Attributes.Add("data-metodo", "getproveedores")
- DdlProveedorLineaAdicional.SelectedText = "-"
- DdlProveedorLineaAdicional.SelectedValue = "-1"
-
- DdlProveedorLineaAdicionalModal.setEsWebService(True)
- DdlProveedorLineaAdicionalModal.Attributes.Add("data-metodo", "getproveedores")
- DdlProveedorLineaAdicionalModal.SelectedText = "-"
- DdlProveedorLineaAdicionalModal.SelectedValue = "-1"
-
+ Private Sub CargaCombosLineasAdicionales()
+
+ DdlProveedorLineaAdicional.setEsWebService(True)
+ DdlProveedorLineaAdicional.Attributes.Add("data-metodo", "getproveedores")
+ DdlProveedorLineaAdicional.SelectedText = "-"
+ DdlProveedorLineaAdicional.SelectedValue = "-1"
+
+ DdlProveedorLineaAdicionalModal.setEsWebService(True)
+ DdlProveedorLineaAdicionalModal.Attributes.Add("data-metodo", "getproveedores")
+ DdlProveedorLineaAdicionalModal.SelectedText = "-"
+ DdlProveedorLineaAdicionalModal.SelectedValue = "-1"
+
DdlCategoriaLineaAdicionalModal.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
DdlCategoriaLineaAdicionalModal.DataBind()
- DdlCategoriaLineaAdicionalModal.Items.Insert(0, New ListItem("-", "-1"))
+ DdlCategoriaLineaAdicionalModal.Items.Insert(0, New ListItem("-", "-1"))
End Sub
@@ -10351,21 +10351,21 @@ Partial Class Clientes
FiltrarLineasAdicionales()
End Sub
- Protected Sub FiltrarLineasAdicionales()
- Dim ObjVentas As New ClsVentas
- If ObjVentas.GetLineasAdicionales(CveCliente, DdlProveedorLineaAdicional.SelectedValue.ToEntero, -1, -1, DdlEstatusLineaAdicional.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
- GvLineasAdicionales.DataSource = ObjVentas.DtResultados
- End If
- ObjVentas.Dispose()
- GvLineasAdicionales.DataBind()
- UpLineasAdicionales.Update()
+ Protected Sub FiltrarLineasAdicionales()
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetLineasAdicionales(CveCliente, DdlProveedorLineaAdicional.SelectedValue.ToEntero, -1, -1, DdlEstatusLineaAdicional.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
+ GvLineasAdicionales.DataSource = ObjVentas.DtResultados
+ End If
+ ObjVentas.Dispose()
+ GvLineasAdicionales.DataBind()
+ UpLineasAdicionales.Update()
End Sub
- 'Protected Sub DdlProveedorLineaAdicional_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedorLineaAdicional.selectedindexchange
- ' FiltrarLineasAdicionales()
+ 'Protected Sub DdlProveedorLineaAdicional_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProveedorLineaAdicional.selectedindexchange
+ ' FiltrarLineasAdicionales()
'End Sub
- 'Protected Sub DdlEstatusLineasAdicionales_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEstatusLineaAdicional.SelectedIndexChanged
- ' FiltrarLineasAdicionales()
+ 'Protected Sub DdlEstatusLineasAdicionales_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlEstatusLineaAdicional.SelectedIndexChanged
+ ' FiltrarLineasAdicionales()
'End Sub
Private Sub GetLineasAdicionales()
@@ -10378,7 +10378,7 @@ Partial Class Clientes
ObjVentas.Dispose()
GvLineasAdicionales.DataBind()
- FiltrarLineasAdicionales()
+ FiltrarLineasAdicionales()
UpLineasAdicionales.Update()
End Sub
@@ -10417,9 +10417,9 @@ Partial Class Clientes
' Exit Sub
'End If
- If DdlTipoLineaAdicionalModal.SelectedValue.ToEntero() <= 0 Then
- Alert("Debe seleccionar el tipo de linea adicional", TipoMensaje.MsgAdvertencia)
- Exit Sub
+ If DdlTipoLineaAdicionalModal.SelectedValue.ToEntero() <= 0 Then
+ Alert("Debe seleccionar el tipo de linea adicional", TipoMensaje.MsgAdvertencia)
+ Exit Sub
End If
Dim ObjVentas As New ClsVentas
@@ -10516,70 +10516,70 @@ Partial Class Clientes
UpLineaAdicionalmodal.Update()
End Sub
-
- Protected Sub DdlMetodoPago33_SelectedIndexChanged(sender As Object, e As EventArgs)
-
- CargaFormaDePago(-1)
-
- End Sub
-
- Private Sub CargaFormaDePago(Optional CveFormaPago As Integer = -1)
-
- DdlFormaPago33.Items.Clear()
-
- If DdlMetodoPago33.SelectedValue.ToEntero = 3 Then
- DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago = 20")
- Else
- DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago <> 20")
- End If
-
- DdlFormaPago33.DataBind()
-
- If Not DdlMetodoPago33.SelectedValue.ToEntero = 3 Then
- DdlFormaPago33.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
- End If
-
- If CveFormaPago > 0 Then
- DdlFormaPago33.SelectedValueExist(CveFormaPago)
- End If
-
- UpFiscalContable.Update()
-
- End Sub
-
-
- Protected Sub LnkCambiarVendedor_Click(sender As Object, e As EventArgs)
-
- If Not DdlVendedor.SelectedValue.ToEntero > 0 Then
- Alert("Debe de seleccionar un Vendedor.", TipoMensaje.MsgAdvertencia)
- Exit Sub
- End If
-
-
- If CveVendedorOriginal = DdlVendedor.SelectedValue.ToEntero Then
- Alert("Debe de seleccionar un vendedor distinto para actualizar.", TipoMensaje.MsgAdvertencia)
- Exit Sub
- End If
-
- Dim ObjVentas As New ClsVentas
- Dim ErrorCambio As Boolean = False
-
- If ObjVentas.CambioClientesVendedor(CveCliente, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
- CveVendedorOriginal = DdlVendedor.SelectedValue.ToEntero
- Else
- ErrorCambio = True
- End If
-
- ObjVentas.Dispose()
-
- If Not ErrorCambio Then
- Alert("Vendedor Cambiado Correctamente.", TipoMensaje.MsgInformacion, $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}""")
- End If
-
-
-
-
- End Sub
-
+
+ Protected Sub DdlMetodoPago33_SelectedIndexChanged(sender As Object, e As EventArgs)
+
+ CargaFormaDePago(-1)
+
+ End Sub
+
+ Private Sub CargaFormaDePago(Optional CveFormaPago As Integer = -1)
+
+ DdlFormaPago33.Items.Clear()
+
+ If DdlMetodoPago33.SelectedValue.ToEntero = 3 Then
+ DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago = 20")
+ Else
+ DdlFormaPago33.DataSource = GlobalDTVtaFormaPago.FiltraParametros("CveFormaPago <> 20")
+ End If
+
+ DdlFormaPago33.DataBind()
+
+ If Not DdlMetodoPago33.SelectedValue.ToEntero = 3 Then
+ DdlFormaPago33.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
+ End If
+
+ If CveFormaPago > 0 Then
+ DdlFormaPago33.SelectedValueExist(CveFormaPago)
+ End If
+
+ UpFiscalContable.Update()
+
+ End Sub
+
+
+ Protected Sub LnkCambiarVendedor_Click(sender As Object, e As EventArgs)
+
+ If Not DdlVendedor.SelectedValue.ToEntero > 0 Then
+ Alert("Debe de seleccionar un Vendedor.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+
+ If CveVendedorOriginal = DdlVendedor.SelectedValue.ToEntero Then
+ Alert("Debe de seleccionar un vendedor distinto para actualizar.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ Dim ObjVentas As New ClsVentas
+ Dim ErrorCambio As Boolean = False
+
+ If ObjVentas.CambioClientesVendedor(CveCliente, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
+ CveVendedorOriginal = DdlVendedor.SelectedValue.ToEntero
+ Else
+ ErrorCambio = True
+ End If
+
+ ObjVentas.Dispose()
+
+ If Not ErrorCambio Then
+ Alert("Vendedor Cambiado Correctamente.", TipoMensaje.MsgInformacion, $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}""")
+ End If
+
+
+
+
+ End Sub
+
End Class
diff --git a/Ventas/RepLineasAdicionales.aspx b/Ventas/RepLineasAdicionales.aspx
index fe2b823be..8a2cad2c4 100644
--- a/Ventas/RepLineasAdicionales.aspx
+++ b/Ventas/RepLineasAdicionales.aspx
@@ -131,8 +131,7 @@
-
-
+
diff --git a/Ventas/RepLineasAdicionales.aspx.cs b/Ventas/RepLineasAdicionales.aspx.cs
index 4e183d8c1..b8328d80a 100644
--- a/Ventas/RepLineasAdicionales.aspx.cs
+++ b/Ventas/RepLineasAdicionales.aspx.cs
@@ -3,6 +3,16 @@ using System.Collections.Generic;
using System.IO;
using ListItem = System.Web.UI.WebControls.ListItem;
using System.Web.UI;
+using Microsoft.AspNet.SignalR;
+using System.Activities.Expressions;
+using System.EnterpriseServices.Internal;
+using iTextSharp.text.pdf;
+using GemBox.Spreadsheet;
+using System.Linq;
+using System.Text.RegularExpressions;
+using System.Web;
+using AjaxControlToolkit;
+//using DocumentFormat.OpenXml.Wordprocessing;
public partial class Ventas_RepLineasAdicionales : ClsPaginas
{
@@ -309,15 +319,18 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
if(TipoLinea == 1)
{
- GridView gvTemp = GvLineasAdicionales;
- gvTemp.ExportToExcelX("RepLineasAdicionales" + DateTime.Now.ToShortDateString());
+ GridView gvTemp = GvLineasAdicionales;
+ //gvTemp.ExportToExcelX("RepLineasAdicionales" + DateTime.Now.ToShortDateString());
+ gvTemp.ExportToExcelGembox("RepLineasAdicionales", UsuarioActual, "Rep Lineas Adicionales", AnchoImagen: 150);
}
else if(TipoLinea == 2)
{
GridView gvTemp = GvLAPO;
- gvTemp.Columns[8].Visible = false;
- gvTemp.ExportToExcelX("ReportePO" + DateTime.Now.ToShortDateString());
- }
+ gvTemp.Columns[12].Visible = false;
+ //gvTemp.ExportToExcelX("ReportePO" + DateTime.Now.ToShortDateString());
+ gvTemp.ExportToExcelGembox( "ReportePO", UsuarioActual, "Reporte PO ", AnchoImagen:150);
+ }
+
}
protected void GvLAPO_RowDataBound(object sender, GridViewRowEventArgs e)
@@ -409,4 +422,10 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
}
}
}
+
+ public override void VerifyRenderingInServerForm(Control control ) { }
+
+
+
+
}
\ No newline at end of file
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index e654fa7f1..9df8b7f41 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -2596,7 +2596,7 @@
-
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 51dd9afac..456043f51 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -8921,7 +8921,7 @@ Partial Class Ventas
Exit Sub
End If
- If DdlLineaAdicional.SelectedValue.ToEntero() > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") Then
+ If DdlLineaAdicional.SelectedValue.ToEntero() > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Egs", "Dev") Then
Alert("No se puede seleccionar una linea adicional de crédito si no se genera una remisón.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If