integración de cambios en producción que no estaban en git

This commit is contained in:
Antonio Gonzalez
2020-05-10 08:57:57 -07:00
parent 293b637246
commit 39735c5478

View File

@@ -18,7 +18,7 @@ Partial Class Clientes
Private Opcion As Integer Private Opcion As Integer
<PersistenceModeAttribute(PersistenceMode.InnerProperty)> <PersistenceModeAttribute(PersistenceMode.InnerProperty)>
Public ReadOnly Property RowStyle As TableItemStyle Public ReadOnly Property RowStyle As TableItemStyle
Protected ReadOnly Property CveCliente As Integer Private ReadOnly Property CveCliente As Integer
Get Get
Return ViewState("CveCliente").ToString.ToEntero Return ViewState("CveCliente").ToString.ToEntero
End Get End Get
@@ -601,21 +601,21 @@ Partial Class Clientes
Set(value As String) Set(value As String)
ViewState("AdjuntoDocumentacion") = value ViewState("AdjuntoDocumentacion") = value
End Set End Set
End Property End Property
'Private ReadOnly Property CvePersonal As Integer 'Private ReadOnly Property CvePersonal As Integer
' Get ' Get
' If ViewState("CvePersonal") Is Nothing Then ' If ViewState("CvePersonal") Is Nothing Then
' Return -1 ' Return -1
' Else ' Else
' Return ViewState("CvePersonal").ToString.ToEntero ' Return ViewState("CvePersonal").ToString.ToEntero
' End If ' End If
' End Get ' End Get
'End Property 'End Property
#End Region #End Region
#Region " A C U M U L A D O R E S" #Region " A C U M U L A D O R E S"
Property CveVentaNota As Integer Property CveVentaNota As Integer
Get Get
@@ -655,8 +655,8 @@ Partial Class Clientes
Set(value As String) Set(value As String)
ViewState("SerieNotaAcumulador") = value ViewState("SerieNotaAcumulador") = value
End Set End Set
End Property End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
@@ -849,6 +849,7 @@ Partial Class Clientes
'PERMISOS PAGINA 'PERMISOS PAGINA
If CveCliente > 0 Then If CveCliente > 0 Then
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveCliente:{0}}});""> <i class=""fa fa-plus""'></i> Tarea</a>", CveCliente)
BtnEliminar.Visible = PermiteEliminar() BtnEliminar.Visible = PermiteEliminar()
BtnGuardar.Visible = PermiteEditar() BtnGuardar.Visible = PermiteEditar()
Else Else
@@ -887,8 +888,8 @@ Partial Class Clientes
ChkPermiso5.Enabled = False ChkPermiso5.Enabled = False
ChkPermiso6.Enabled = False ChkPermiso6.Enabled = False
End Sub End Sub
#Region " PERMISOS PAGINAS " #Region " PERMISOS PAGINAS "
Private Function PermiteGuardar() As Boolean Private Function PermiteGuardar() As Boolean
Return UsuarioActual.TienePermisoProceso(192) Return UsuarioActual.TienePermisoProceso(192)
@@ -898,11 +899,11 @@ Partial Class Clientes
End Function End Function
Private Function PermiteEliminar() As Boolean Private Function PermiteEliminar() As Boolean
Return UsuarioActual.TienePermisoProceso(194) Return UsuarioActual.TienePermisoProceso(194)
End Function End Function
#End Region #End Region
#Region "C A R G A S" #Region "C A R G A S"
Private Sub CreaDtPago() Private Sub CreaDtPago()
DtPagos = New DataTable DtPagos = New DataTable
@@ -1700,9 +1701,9 @@ Partial Class Clientes
Return Retorno Return Retorno
End Function End Function
Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1, Optional TipoDocto As String = "-1") Private Sub CargaHistorial(Optional SelectTop As Integer = 21, Optional CveClienteSucursal As Integer = -1)
Dim ObjClientes As New ClsClientes() Dim ObjClientes As New ClsClientes()
If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, TipoDocto:=TipoDocto) Then If ObjClientes.GetHistorialVentas(CveCliente, SelectTop, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then If ObjClientes.DtResultados.Rows.Count > 0 Then
'Carga Generales 'Carga Generales
LtlCantidad.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString.FormatoNumero(0) LtlCantidad.Text = ObjClientes.DtResultados.Rows(0)("CountTotal").ToString.FormatoNumero(0)
@@ -1889,19 +1890,20 @@ Partial Class Clientes
DdlSucursalUsoCFDI.Items.Clear() DdlSucursalUsoCFDI.Items.Clear()
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica) DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
DdlSucursalUsoCFDI.DataBind() DdlSucursalUsoCFDI.DataBind()
End Sub End Sub
#End Region #End Region
#Region "V E R M Á S" #Region "V E R M Á S"
Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs) Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs)
If BtnVerMasVentas.Text = "Ver Más" Then If BtnVerMasVentas.Text = "Ver Más" Then
CargaHistorial(-1, TipoDocto:=RblTipo.SelectedValue) CargaHistorial(-1)
BtnVerMasVentas.Text = "Ver Menos" BtnVerMasVentas.Text = "Ver Menos"
Else Else
CargaHistorial(21, TipoDocto:=RblTipo.SelectedValue) CargaHistorial(21)
BtnVerMasVentas.Text = "Ver Más" BtnVerMasVentas.Text = "Ver Más"
End If End If
RblTipo_SelectedIndexChanged(RblTipo, EventArgs.Empty)
End Sub End Sub
Protected Sub BtnVerMasAnticipos_Click(sender As Object, e As EventArgs) Protected Sub BtnVerMasAnticipos_Click(sender As Object, e As EventArgs)
@@ -1985,9 +1987,9 @@ Partial Class Clientes
TxtParaMail.Text = TxtCobranzaCorreo.Text TxtParaMail.Text = TxtCobranzaCorreo.Text
UpSendMail.Update() UpSendMail.Update()
RegistraScript("$('#ModalDivMail').modal('show');") RegistraScript("$('#ModalDivMail').modal('show');")
End Sub End Sub
#End Region #End Region
#Region "B T N ´ S" #Region "B T N ´ S"
Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
Dim ObjClientes As New ClsClientes() Dim ObjClientes As New ClsClientes()
@@ -2295,85 +2297,85 @@ Partial Class Clientes
Dim errorContPaq As Boolean = False Dim errorContPaq As Boolean = False
Dim IdContPaqi As Integer = 0 Dim IdContPaqi As Integer = 0
Dim CodigoPersona As Integer = 0 Dim CodigoPersona As Integer = 0
#Region "comentado" #Region "comentado"
'If UsuarioActual.Empresa.Funcionalidad(522).ToString = "1" Then 'If UsuarioActual.Empresa.Funcionalidad(522).ToString = "1" Then
' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa) ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa)
' If ObjContPaqi.GetPersona(TxtRFC.Text) Then ' If ObjContPaqi.GetPersona(TxtRFC.Text) Then
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString.ToEntero ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("Id").ToString.ToEntero
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").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_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_Nombre As String = ObjContPaqi.DtResultados(0)("Nombre").ToString
' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString ' Dim Cont_RFC As String = ObjContPaqi.DtResultados(0)("RFC").ToString
' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then ' If ObjContPaqi.UpdatePersona(IdContPaqi, Cont_Nombre, Cont_RFC, 1, Cont_EsProveedor) Then
' errorContPaq = False ' errorContPaq = False
' Else ' Else
' errorContPaq = True ' errorContPaq = True
' End If ' End If
' Else ' Else
' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then ' If ObjContPaqi.AddPersona(TxtNombre.Text.Trim, TxtRFC.Text.Trim, 1, 0) Then
' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString.ToEntero ' IdContPaqi = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiPersona").ToString.ToEntero
' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString.ToEntero ' CodigoPersona = ObjContPaqi.DtResultados.Rows(0)("Codigo").ToString.ToEntero
' errorContPaq = False ' errorContPaq = False
' Else ' Else
' errorContPaq = True ' errorContPaq = True
' End If ' End If
' End If ' End If
' End If ' End If
' If Not errorContPaq Then ' If Not errorContPaq Then
' Dim IdContPaqiCliente As Integer ' Dim IdContPaqiCliente As Integer
' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then ' If ObjContPaqi.GetCliente(-1, CodigoPersona) Then
' If ObjContPaqi.DtResultados.Rows.Count > 0 Then ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then
' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString.ToEntero ' IdContPaqiCliente = ObjContPaqi.DtResultados.Rows(0)("IdContPaqiClient").ToString.ToEntero
' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then ' If ObjContPaqi.UpdateCliente(IdContPaqiCliente, CodigoPersona, CodigoPersona, "", "") Then
' errorContPaq = False ' errorContPaq = False
' Else ' Else
' errorContPaq = True ' errorContPaq = True
' End If ' End If
' Else ' Else
' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then ' If ObjContPaqi.AddCliente(CodigoPersona, CodigoPersona, "", "") Then
' errorContPaq = False ' errorContPaq = False
' Else ' Else
' errorContPaq = True ' errorContPaq = True
' End If ' End If
' End If ' End If
' Else ' Else
' errorContPaq = True ' errorContPaq = True
' End If ' End If
' End If ' End If
' If Not errorContPaq Then ' If Not errorContPaq Then
' ObjContPaqi.Commit() ' ObjContPaqi.Commit()
' ObjContPaqi.Dispose() ' ObjContPaqi.Dispose()
' Else ' Else
' ObjContPaqi.RollBack() ' ObjContPaqi.RollBack()
' ObjContPaqi.Dispose() ' ObjContPaqi.Dispose()
' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError) ' Alert("Se presento un error al guardar en ContPAQi", TipoMensaje.MsgError)
' Exit Sub ' Exit Sub
' End If ' End If
'End If 'End If
#End Region #End Region
Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0") Dim LT As String = If(HDLT.Value.ToDouble <> 0, HDLT.Value, "0")
Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0") Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0")
@@ -2619,11 +2621,11 @@ Partial Class Clientes
ObjClientes.Dispose() ObjClientes.Dispose()
objDoc.Dispose() objDoc.Dispose()
RecargaGlobal() RecargaGlobal()
End Sub End Sub
#End Region #End Region
#Region "G L O B L A L" #Region "G L O B L A L"
Private Sub RecargaGlobal() Private Sub RecargaGlobal()
'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT) 'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalDT)
@@ -2801,11 +2803,11 @@ Partial Class Clientes
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region "R H" #Region "R H"
Private Sub CargaPersonalAsignado() Private Sub CargaPersonalAsignado()
Dim ObjPersonal As New ClsRH 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 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
@@ -2878,9 +2880,9 @@ Partial Class Clientes
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region "S U C U R S A L E S" #Region "S U C U R S A L E S"
Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click
ChkEstatusSucursal.Checked = True ChkEstatusSucursal.Checked = True
@@ -3014,7 +3016,7 @@ Partial Class Clientes
UpModalDivMapa.Update() UpModalDivMapa.Update()
End Sub End Sub
#Region "G V S U C U R S A L E S" #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 Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVSucursales.RowDataBound
@@ -3133,9 +3135,9 @@ Partial Class Clientes
Else Else
CargaGrid("", 0) CargaGrid("", 0)
End If End If
End Sub End Sub
#End Region #End Region
#Region "G V U S U A R I O S P O R T A L" #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 Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand
If e.CommandName = "RestablecerContraseña" Then If e.CommandName = "RestablecerContraseña" Then
@@ -3287,9 +3289,9 @@ Partial Class Clientes
CargaGrid("", 1) CargaGrid("", 1)
End If End If
End Sub End Sub
#End Region #End Region
#Region "O R D E N A M I E N T O" #Region "O R D E N A M I E N T O"
Private Sub CargaGrid(Orden As String, gvi As Integer) Private Sub CargaGrid(Orden As String, gvi As Integer)
If gvi = 0 Then If gvi = 0 Then
@@ -3321,12 +3323,12 @@ Partial Class Clientes
UPPUsuarios.Update() UPPUsuarios.Update()
End If End If
End Sub End Sub
#End Region #End Region
#End Region #End Region
#Region "U S U A R I O S" #Region "U S U A R I O S"
Protected Sub LbSolicitudPortal_Click(sender As Object, e As EventArgs) Handles LbEnviarActivacionPortal.Click Protected Sub LbSolicitudPortal_Click(sender As Object, e As EventArgs) Handles LbEnviarActivacionPortal.Click
Dim ObjUsuario As New ClsSisUsuarios Dim ObjUsuario As New ClsSisUsuarios
@@ -3508,9 +3510,9 @@ Partial Class Clientes
ChkPermiso5.Checked = False ChkPermiso5.Checked = False
ChkPermiso6.Checked = False ChkPermiso6.Checked = False
ChkPermiso7.Checked = False ChkPermiso7.Checked = False
End Sub End Sub
#End Region #End Region
#Region "E V E N T O - B I T A C O R A" #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 Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -3716,11 +3718,11 @@ Partial Class Clientes
BtnActivaRegistroISR.Visible = True BtnActivaRegistroISR.Visible = True
End If End If
End Sub End Sub
#End Region #End Region
#Region " I M P R I M I R P D F" #Region " I M P R I M I R P D F"
Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkAntIXCNC_CheckedChanged(sender As Object, e As EventArgs)
DdlTipoDocto.ClearSelection() DdlTipoDocto.ClearSelection()
If ChkAntIXCNC.Checked Then If ChkAntIXCNC.Checked Then
@@ -4106,11 +4108,11 @@ Partial Class Clientes
a.GuardaLog() a.GuardaLog()
Dim Mail As New ClsSisMail() Dim Mail As New ClsSisMail()
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body) Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
End Sub End Sub
#End Region #End Region
#Region " COTIZACIONES " #Region " COTIZACIONES "
Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs) Protected Sub BtnVerMasCot_Click(sender As Object, e As EventArgs)
If BtnVerMasCot.Text = "Ver Más" Then If BtnVerMasCot.Text = "Ver Más" Then
CargaCotizaciones(-1) CargaCotizaciones(-1)
@@ -4180,9 +4182,9 @@ Partial Class Clientes
HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}" HLFacturar.HRef = $"/Ventas/Ventas.aspx?CveCotizacion={e.Row.DBCampo("CveVenta")}"
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region "D I R E C C I O N E N V I O " #Region "D I R E C C I O N E N V I O "
Public Sub Edit_Click(sender As Object, e As EventArgs) Public Sub Edit_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
@@ -4262,12 +4264,12 @@ Partial Class Clientes
End If End If
CargaDireccionesEnvio() CargaDireccionesEnvio()
End Sub End Sub
#End Region #End Region
#Region " IMPORTAR SALDOS " #Region " IMPORTAR SALDOS "
Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click Private Sub HLImportarSaldos_Click(sender As Object, e As EventArgs) Handles HLImportarSaldos.Click
CargaClientesImportarSaldos() CargaClientesImportarSaldos()
RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos")) RegistraScript(String.Format("$('#{0}').modal();", "DivImportarSaldos"))
@@ -4373,9 +4375,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.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"))) 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 If
End Sub End Sub
#End Region #End Region
#Region "Cuentas/Equipos" #Region "Cuentas/Equipos"
Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs) Public Sub BtnAgregarCtaEquipo_Click(sender As Object, e As EventArgs)
HdnModalidad.Value = "I" HdnModalidad.Value = "I"
@@ -4963,9 +4965,9 @@ Partial Class Clientes
End If End If
Return Retorno Return Retorno
End Function End Function
#End Region #End Region
#Region "GPS" #Region "GPS"
Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click
If hdnArrayDispositivo.Value.Length > 0 Then If hdnArrayDispositivo.Value.Length > 0 Then
@@ -5068,10 +5070,10 @@ Partial Class Clientes
UpMoverDispositivo.Update() UpMoverDispositivo.Update()
RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});") RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});")
End Sub End Sub
#End Region #End Region
#Region "Sucursales" #Region "Sucursales"
Public Sub CreaDTSucursales() Public Sub CreaDTSucursales()
@@ -5305,14 +5307,14 @@ Partial Class Clientes
End If End If
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region "G P S" #Region "G P S"
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String) Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
Try Try
@@ -5383,11 +5385,11 @@ Partial Class Clientes
End If End If
ObjClientes.Dispose() ObjClientes.Dispose()
End Sub End Sub
#End Region #End Region
#Region "C O N T R A T O S" #Region "C O N T R A T O S"
Private Sub CargaDatosContrato() Private Sub CargaDatosContrato()
If CveCliente <= 0 Then If CveCliente <= 0 Then
@@ -5433,13 +5435,32 @@ Partial Class Clientes
e.Row.CssClass = "Totales white" e.Row.CssClass = "Totales white"
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region "M E T O D O S " #Region "M E T O D O S "
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
CargaHistorial(TipoDocto:=RblTipo.SelectedValue) If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then
Dim tmp As DataTable = DTHistorialVentas.FiltraParametros($"TipoDocto = '{RblTipo.SelectedValue}'")
If tmp.Rows.Count > 0 Then
Dim Totales As DataRow = tmp.NewRow
Totales("SubTotal") = tmp.SUM("SubTotal")
Totales("Total") = tmp.SUM("Total")
Totales("Descuento") = tmp.SUM("Descuento")
Totales("Amortizacion") = tmp.SUM("Amortizacion")
Totales("MAX_Total") = tmp.MAX("MAX_Total")
Totales("AVG_Total") = tmp.AVG("AVG_Total")
Totales("MIN_Total") = tmp.MIN("MIN_Total")
Totales("CountTotal") = tmp.COUNT("CountTotal")
tmp.Rows.InsertAt(Totales, 0)
End If
GVHistorial.DataSource = tmp
ElseIf DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue = "-1" Then
GVHistorial.DataSource = DTHistorialVentas
End If
GVHistorial.DataBind()
End Sub End Sub
Private Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged Private Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged
CargaCotizaciones(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) 'listo CargaCotizaciones(CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero) 'listo
@@ -5815,13 +5836,13 @@ Partial Class Clientes
End If End If
End Sub End Sub
#End Region #End Region
#Region "IMPRIMIR GVHistorial" #Region "IMPRIMIR GVHistorial"
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs) Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
Dim retorno As Byte() = Nothing Dim retorno As Byte() = Nothing
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
@@ -5900,18 +5921,18 @@ Partial Class Clientes
ObjClientes.Dispose() ObjClientes.Dispose()
Return retorno Return retorno
End Function End Function
#End Region #End Region
#Region "C O B R A N Z A" #Region "C O B R A N Z A"
Public Sub Visitas_Click(sender As Object, e As EventArgs) Public Sub Visitas_Click(sender As Object, e As EventArgs)
RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas")) RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas"))
End Sub End Sub
#End Region #End Region
#Region "Usuarios" #Region "Usuarios"
Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting 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 Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero
@@ -5946,12 +5967,12 @@ Partial Class Clientes
e.Row.Cells(5).Visible = False e.Row.Cells(5).Visible = False
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region "C U E N T A S - B A N C A R I A S" #Region "C U E N T A S - B A N C A R I A S"
Private Sub CargaCuentasBancarias() Private Sub CargaCuentasBancarias()
Dim ObjCuentasBancos As New ClsGenerales Dim ObjCuentasBancos As New ClsGenerales
ViewState("OrdenCuentasBancos") = "" ViewState("OrdenCuentasBancos") = ""
@@ -6122,8 +6143,8 @@ Partial Class Clientes
TxtNumeroCuenta2.Text = "" TxtNumeroCuenta2.Text = ""
TxtConvenioCIE2.Text = "" TxtConvenioCIE2.Text = ""
TxtReferencia2.Text = "" TxtReferencia2.Text = ""
End Sub End Sub
#Region "GRIDVIEW - CUENTAS BANCARIAS" #Region "GRIDVIEW - CUENTAS BANCARIAS"
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
@@ -6182,10 +6203,10 @@ Partial Class Clientes
End If End If
ObjCuentasBancos.Dispose() ObjCuentasBancos.Dispose()
End If End If
End Sub End Sub
#End Region #End Region
Private Sub CargaPSGridCuentasBancos() Private Sub CargaPSGridCuentasBancos()
If CveCliente > 0 Then If CveCliente > 0 Then
GvBancosCuentas.DataSource = DTCuentasBancos GvBancosCuentas.DataSource = DTCuentasBancos
@@ -6243,9 +6264,9 @@ Partial Class Clientes
divestatus.Visible = True divestatus.Visible = True
UpAddBancos.Update() UpAddBancos.Update()
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias")) RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias"))
End Sub End Sub
#End Region #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" #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 Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
GenerarPDF("Excel") GenerarPDF("Excel")
@@ -6505,10 +6526,10 @@ Partial Class Clientes
ObjVentas.Dispose() ObjVentas.Dispose()
Return PdfFactura(Vta) Return PdfFactura(Vta)
End Function End Function
#End Region #End Region
#Region "COMERCIO EXTERIOR" #Region "COMERCIO EXTERIOR"
Public Sub CargaCombosComercioExterior() Public Sub CargaCombosComercioExterior()
@@ -6622,12 +6643,12 @@ Partial Class Clientes
End Sub End Sub
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaColonia() CargaColonia()
End Sub End Sub
#End Region #End Region
#Region "D O C U M E N T A C I O N " #Region "D O C U M E N T A C I O N "
Private Sub CargaDocumentacionCliente() Private Sub CargaDocumentacionCliente()
Dim objRH As New ClsEdocumentacion() Dim objRH As New ClsEdocumentacion()
@@ -7450,12 +7471,12 @@ Partial Class Clientes
RegistraScript("Download('" & baseUrl & "')") RegistraScript("Download('" & baseUrl & "')")
End Sub End Sub
#End Region #End Region
#Region "D O C U M E N T O S V E N T A S" #Region "D O C U M E N T O S V E N T A S"
Private Sub CargaDocumentosVenta(tCveCliente As Integer) Private Sub CargaDocumentosVenta(tCveCliente As Integer)
Dim objInv As New ClsEdocumentacion Dim objInv As New ClsEdocumentacion
@@ -7626,11 +7647,11 @@ Partial Class Clientes
objRH.Dispose() objRH.Dispose()
End Sub End Sub
#End Region #End Region
#Region "PERSONA FISICA" #Region "PERSONA FISICA"
Protected Sub LnkPersonaFisica_Click(sender As Object, e As EventArgs) Protected Sub LnkPersonaFisica_Click(sender As Object, e As EventArgs)
RegistraScript("$('#DivModalPersonaFisica').modal();") RegistraScript("$('#DivModalPersonaFisica').modal();")
@@ -7655,9 +7676,9 @@ Partial Class Clientes
ObjCliente.Dispose() ObjCliente.Dispose()
UpDatos.Update() UpDatos.Update()
End Sub End Sub
#End Region #End Region
#Region "USUARIOS PLATAFORMA CLIENTE - 6 " #Region "USUARIOS PLATAFORMA CLIENTE - 6 "
Protected Sub CargaUsuariosPortalCliente() Protected Sub CargaUsuariosPortalCliente()
Dim objUsuario As ClsSisUsuarios = New ClsSisUsuarios Dim objUsuario As ClsSisUsuarios = New ClsSisUsuarios
@@ -7666,19 +7687,19 @@ Partial Class Clientes
GvUsuarios.DataBind() GvUsuarios.DataBind()
End If End If
objUsuario.Dispose() objUsuario.Dispose()
End Sub End Sub
#End Region #End Region
#Region " DEVOLVER DINERO ANT/NC " #Region " DEVOLVER DINERO ANT/NC "
Private Sub InicializaDevolverDinero() Private Sub InicializaDevolverDinero()
If UsuarioActual.TienePermisoProceso(247) Then If UsuarioActual.TienePermisoProceso(247) Then
GVAnticipos.Columns(6).Visible = True GVAnticipos.Columns(6).Visible = True
End If End If
End Sub End Sub
#End Region #End Region
#Region "MODAL GRAFICA/PEDIDOS" #Region "MODAL GRAFICA/PEDIDOS"
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs) Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
If CargaDatatables() Then If CargaDatatables() Then
RegistraScript("$('#DivModalGrafica').modal('show')") RegistraScript("$('#DivModalGrafica').modal('show')")
@@ -8011,13 +8032,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") RegistraScript($"CargaGraficaCompratamientoSaldoMensual({Dt5.ToJson},{Dt6.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "55")
UPModalProd.Update() UPModalProd.Update()
End Sub End Sub
#End Region #End Region
#Region "TAB - COMPORTAMIENTO DE VENTAS" #Region "TAB - COMPORTAMIENTO DE VENTAS"
Private Sub CargaGrupo() Private Sub CargaGrupo()
DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3")) DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3"))
DdlGrupo.Items.Insert(1, New ListItem("Clasificacion", "4")) DdlGrupo.Items.Insert(1, New ListItem("Clasificacion", "4"))
@@ -8197,12 +8218,12 @@ Partial Class Clientes
ObjVentas.Dispose() ObjVentas.Dispose()
GvComportamientoVenta.DataBind() GvComportamientoVenta.DataBind()
UpDatosComportamientoVenta.Update() UpDatosComportamientoVenta.Update()
End Sub End Sub
#End Region #End Region
#Region "DISPOSITIVOS" #Region "DISPOSITIVOS"
Protected Sub LnkMoverDispositivo_Click(sender As Object, e As EventArgs) Protected Sub LnkMoverDispositivo_Click(sender As Object, e As EventArgs)
Dim CveDispositivo As Integer = HdnCveDispositivoMover.Value.ToEntero() Dim CveDispositivo As Integer = HdnCveDispositivoMover.Value.ToEntero()
Dim CveCliente As Integer = DdlClienteDispositivo.SelectedValue.ToEntero() Dim CveCliente As Integer = DdlClienteDispositivo.SelectedValue.ToEntero()
@@ -8240,10 +8261,10 @@ Partial Class Clientes
CargaEventoBitacora() CargaEventoBitacora()
NombreDispositivo = "" NombreDispositivo = ""
RegistraScript("$('#DivMoverDispositivo').modal('hide');") RegistraScript("$('#DivMoverDispositivo').modal('hide');")
End Sub End Sub
#End Region #End Region
#Region "CRM" #Region "CRM"
Protected Sub CargaDatosCRM() Protected Sub CargaDatosCRM()
Dim ObjCRM = New ClsCRM() Dim ObjCRM = New ClsCRM()
@@ -8343,9 +8364,9 @@ Partial Class Clientes
Alert("Se Unificó correctamente al Cliente con la Empresa CRM.") Alert("Se Unificó correctamente al Cliente con la Empresa CRM.")
End If End If
End If End If
End Sub End Sub
#End Region #End Region
#Region "PORCENTAJE PRECIO DE MARCAS" #Region "PORCENTAJE PRECIO DE MARCAS"
Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas")) RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas"))
@@ -8549,9 +8570,9 @@ Partial Class Clientes
ObjPS.Dispose() ObjPS.Dispose()
End Sub End Sub
#End Region #End Region
#Region "PORCENTAJE PRECIO DE PRODUCTOS" #Region "PORCENTAJE PRECIO DE PRODUCTOS"
Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios")) RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
@@ -8787,12 +8808,12 @@ Partial Class Clientes
Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs) Protected Sub BtnCambiaPorcentaje_Click(sender As Object, e As EventArgs)
DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2) DdlProducto2IndexChange(DdlProducto2.SelectedValue.ToEntero, DdlProducto2)
End Sub End Sub
#End Region #End Region
#Region " A C U M U L A D O R E S" #Region " A C U M U L A D O R E S"
Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs) Protected Sub LnkFacturaUsadosCargos_Click(sender As Object, e As EventArgs)
'CveVentaNota = 0 'CveVentaNota = 0