|
|
|
|
@@ -513,12 +513,26 @@ Partial Class Clientes
|
|
|
|
|
Set(value As Integer)
|
|
|
|
|
ViewState("CveLineaAdicional") = value
|
|
|
|
|
End Set
|
|
|
|
|
End Property
|
|
|
|
|
|
|
|
|
|
End Property
|
|
|
|
|
Private Property FechaIngLineaAdicional As DateTime
|
|
|
|
|
Get
|
|
|
|
|
If ViewState("FechaIngLineaAdicional") Is Nothing Then
|
|
|
|
|
ViewState("FechaIngLineaAdicional") = MinFecha
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Return ViewState("FechaIngLineaAdicional").ToString().ToDateTime()
|
|
|
|
|
|
|
|
|
|
End Get
|
|
|
|
|
Set(value As DateTime)
|
|
|
|
|
ViewState("FechaIngLineaAdicional") = value
|
|
|
|
|
End Set
|
|
|
|
|
End Property
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "Documentacion"
|
|
|
|
|
Private Property DTDocumentacion As DataTable
|
|
|
|
|
Get
|
|
|
|
|
@@ -941,10 +955,10 @@ Partial Class Clientes
|
|
|
|
|
LnkAgregarLineaAdicional.Visible = True
|
|
|
|
|
GetLineasAdicionales()
|
|
|
|
|
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017
|
|
|
|
|
@@ -2085,15 +2099,15 @@ Partial Class Clientes
|
|
|
|
|
UpAgregarSucursal.Update()
|
|
|
|
|
UpDatos.Update()
|
|
|
|
|
End Sub
|
|
|
|
|
Public Sub CargaAFAsignados()
|
|
|
|
|
'Dim ObjAF As New ClsAF()
|
|
|
|
|
'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "-1", CveCliente) Then
|
|
|
|
|
' GvAFAsignado.DataSource = ObjAF.DtResultados
|
|
|
|
|
'Else
|
|
|
|
|
' GvAFAsignado.DataSource = Nothing
|
|
|
|
|
'End If
|
|
|
|
|
'ObjAF.Dispose()
|
|
|
|
|
'GvAFAsignado.DataBind()
|
|
|
|
|
Public Sub CargaAFAsignados()
|
|
|
|
|
'Dim ObjAF As New ClsAF()
|
|
|
|
|
'If ObjAF.GetActivosFijos(-1, UsuarioActual.CveEmpresa, "-1", "-1", -1, -1, "-1", -1, -1, -1, -1, -1, "-1", CveCliente) Then
|
|
|
|
|
' GvAFAsignado.DataSource = ObjAF.DtResultados
|
|
|
|
|
'Else
|
|
|
|
|
' GvAFAsignado.DataSource = Nothing
|
|
|
|
|
'End If
|
|
|
|
|
'ObjAF.Dispose()
|
|
|
|
|
'GvAFAsignado.DataBind()
|
|
|
|
|
End Sub
|
|
|
|
|
Private Sub CargaMetodosPago33()
|
|
|
|
|
DdlMetodoPago33.Items.Clear()
|
|
|
|
|
@@ -4068,10 +4082,10 @@ Partial Class Clientes
|
|
|
|
|
|
|
|
|
|
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 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)
|
|
|
|
|
|
|
|
|
|
'OBTENEMOS LOS DATOS
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
'OBTENEMOS LOS DATOS
|
|
|
|
|
Dim DtCxCFact As DataTable = Nothing
|
|
|
|
|
|
|
|
|
|
Dim FI = If(TxtFechaInicioCxP.Text = "" Or TxtFechaInicioCxP.Text = "__/__/____", "-1", TxtFechaInicioCxP.Text)
|
|
|
|
|
@@ -4277,16 +4291,16 @@ Partial Class Clientes
|
|
|
|
|
Else
|
|
|
|
|
If Archivo.Exists Then
|
|
|
|
|
Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta))
|
|
|
|
|
If ArchivoSti.Exists Then
|
|
|
|
|
Dim listass As New List(Of ReportParameter)
|
|
|
|
|
For Each item As CrystalParametro In lista
|
|
|
|
|
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
|
|
|
|
Next
|
|
|
|
|
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
|
|
|
|
Else
|
|
|
|
|
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If ArchivoSti.Exists Then
|
|
|
|
|
Dim listass As New List(Of ReportParameter)
|
|
|
|
|
For Each item As CrystalParametro In lista
|
|
|
|
|
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
|
|
|
|
Next
|
|
|
|
|
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
|
|
|
|
Else
|
|
|
|
|
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Else
|
|
|
|
|
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
|
|
|
|
End If
|
|
|
|
|
@@ -4329,16 +4343,16 @@ Partial Class Clientes
|
|
|
|
|
DtCxCFact2.Rows.Add(drr)
|
|
|
|
|
|
|
|
|
|
If Archivo.Exists Then
|
|
|
|
|
Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta))
|
|
|
|
|
If ArchivoSti.Exists Then
|
|
|
|
|
Dim listass As New List(Of ReportParameter)
|
|
|
|
|
For Each item As CrystalParametro In lista
|
|
|
|
|
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
|
|
|
|
Next
|
|
|
|
|
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
|
|
|
|
Else
|
|
|
|
|
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
|
|
|
|
End If
|
|
|
|
|
Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta))
|
|
|
|
|
If ArchivoSti.Exists Then
|
|
|
|
|
Dim listass As New List(Of ReportParameter)
|
|
|
|
|
For Each item As CrystalParametro In lista
|
|
|
|
|
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
|
|
|
|
Next
|
|
|
|
|
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
|
|
|
|
Else
|
|
|
|
|
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
|
|
|
|
End If
|
|
|
|
|
Else
|
|
|
|
|
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
|
|
|
|
End If
|
|
|
|
|
@@ -4361,9 +4375,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)
|
|
|
|
|
|
|
|
|
|
@@ -4431,11 +4445,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)
|
|
|
|
|
@@ -4505,11 +4519,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()
|
|
|
|
|
@@ -4732,12 +4746,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"))
|
|
|
|
|
@@ -4841,9 +4855,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"
|
|
|
|
|
@@ -5431,9 +5445,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
|
|
|
|
|
@@ -5574,10 +5588,10 @@ Partial Class Clientes
|
|
|
|
|
UpMoverDispositivo.Update()
|
|
|
|
|
RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});")
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "Sucursales"
|
|
|
|
|
Public Sub CreaDTSucursales()
|
|
|
|
|
|
|
|
|
|
@@ -5811,14 +5825,14 @@ Partial Class Clientes
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "G P S"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
|
|
|
|
|
|
|
|
|
|
Try
|
|
|
|
|
@@ -5889,16 +5903,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
|
|
|
|
|
@@ -5943,10 +5957,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
|
|
|
|
|
@@ -6356,13 +6370,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")
|
|
|
|
|
@@ -6437,18 +6451,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()
|
|
|
|
|
@@ -6483,12 +6497,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
|
|
|
|
|
@@ -6661,8 +6675,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
|
|
|
|
|
@@ -6718,10 +6732,10 @@ Partial Class Clientes
|
|
|
|
|
GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing
|
|
|
|
|
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Private Sub CargaPSGridCuentasBancos()
|
|
|
|
|
If CveCliente > 0 Then
|
|
|
|
|
GvBancosCuentas.DataSource = DTCuentasBancos
|
|
|
|
|
@@ -6779,9 +6793,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")
|
|
|
|
|
@@ -6803,11 +6817,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
|
|
|
|
|
@@ -7038,10 +7052,10 @@ Partial Class Clientes
|
|
|
|
|
ObjVentas.Dispose()
|
|
|
|
|
|
|
|
|
|
Return PdfFactura(Vta)
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
#End Region
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Region "COMERCIO EXTERIOR"
|
|
|
|
|
Public Sub CargaCombosComercioExterior()
|
|
|
|
|
|
|
|
|
|
@@ -7165,12 +7179,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()
|
|
|
|
|
|
|
|
|
|
@@ -7808,12 +7822,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
|
|
|
|
|
|
|
|
|
|
@@ -7984,11 +7998,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();")
|
|
|
|
|
@@ -8013,9 +8027,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
|
|
|
|
|
@@ -8024,19 +8038,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')")
|
|
|
|
|
@@ -8373,13 +8387,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"))
|
|
|
|
|
@@ -8563,12 +8577,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()
|
|
|
|
|
@@ -8606,10 +8620,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()
|
|
|
|
|
@@ -8709,9 +8723,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"))
|
|
|
|
|
@@ -8936,9 +8950,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"))
|
|
|
|
|
@@ -9174,12 +9188,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
|
|
|
|
|
|
|
|
|
|
@@ -9822,11 +9836,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")
|
|
|
|
|
@@ -9889,15 +9903,13 @@ Partial Class Clientes
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Private Sub LnkUsadosReset_Click(sender As Object, e As EventArgs) Handles LnkUsadosReset.Click
|
|
|
|
|
|
|
|
|
|
Dim Acum As New ClsAcumuladores
|
|
|
|
|
Dim Puntos As Decimal = -GvUsadosResumen.Rows.Cast(Of GridViewRow).Where(Function(x) x.RowType = DataControlRowType.DataRow).FirstOrDefault(Function(gvr) gvr.RowIndex = 3).DataKey("Puntos").ToEntero()
|
|
|
|
|
If Acum.DistribuidorMovtosAdd(CveCliente, 1, 1, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Puntos, "Saldo Inicializado", Now) Then
|
|
|
|
|
If Acum.DistribuidorMovtosAdd(CveCliente, 1, 1, Puntos, 0, 0, 3, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Puntos, "Saldo Inicializado", Now) Then
|
|
|
|
|
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
|
|
|
|
|
@@ -10406,6 +10418,8 @@ Partial Class Clientes
|
|
|
|
|
|
|
|
|
|
Protected Sub LnkAgregarLineaAdicional_Click(sender As Object, e As EventArgs)
|
|
|
|
|
CveLineaAdicional = -1
|
|
|
|
|
FechaIngLineaAdicional = Nothing
|
|
|
|
|
|
|
|
|
|
RegistraScript("$('#DVLineasAdicionales').modal('show')")
|
|
|
|
|
LtlLineasAdicionalesTotuloModal.Text = "Agregar Linea Adicional"
|
|
|
|
|
AgregarLineaAdicionalLimpiarControles()
|
|
|
|
|
@@ -10437,11 +10451,13 @@ Partial Class Clientes
|
|
|
|
|
' Exit Sub
|
|
|
|
|
'End If
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dim ObjVentas As New ClsVentas
|
|
|
|
|
If CveLineaAdicional > 0 Then
|
|
|
|
|
|
|
|
|
|
If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then
|
|
|
|
|
TxtFechaVencimientoLineaAdicionalModal.Text = FechaIngLineaAdicional.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy")
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If CveLineaAdicional > 0 Then
|
|
|
|
|
If Not ObjVentas.UpdateLineasAdicionales(CveLineaAdicional, TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
|
|
|
|
|
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlCategoriaLineaAdicionalModal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
|
|
|
|
|
DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then
|
|
|
|
|
@@ -10449,7 +10465,11 @@ Partial Class Clientes
|
|
|
|
|
Else
|
|
|
|
|
Alert("Linea Adicional Actualizada Correctamente")
|
|
|
|
|
End If
|
|
|
|
|
Else
|
|
|
|
|
Else
|
|
|
|
|
If DdlTipoLineaAdicionalModal.SelectedValue = "2" Then
|
|
|
|
|
TxtFechaVencimientoLineaAdicionalModal.Text = Now.AddDays(TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero()).ToString("dd/MM/yyyy")
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
|
|
|
|
|
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlCategoriaLineaAdicionalModal.SelectedValue.ToEntero,
|
|
|
|
|
DiasVencimiento:=TxtDiasVencimientoLineaAdicionalModal.Text.ToEntero) Then
|
|
|
|
|
@@ -10476,6 +10496,7 @@ Partial Class Clientes
|
|
|
|
|
|
|
|
|
|
CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToEntero
|
|
|
|
|
|
|
|
|
|
FechaIngLineaAdicional = GvRow.DataKey("FechaIng").ToDateTime()
|
|
|
|
|
TxtLineaAdicionalModal.Text = GvRow.DataKey("LineaAdicional")
|
|
|
|
|
DdlProveedorLineaAdicionalModal.txtText.Value = GvRow.DataKey("Proveedor")
|
|
|
|
|
DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor")
|
|
|
|
|
@@ -10520,6 +10541,7 @@ Partial Class Clientes
|
|
|
|
|
Protected Sub DdlTipoLineaAdicionalModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
|
|
|
|
|
|
|
|
|
DvLineaAdicionalDiasVenciemientoModal.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, True, False)
|
|
|
|
|
DvFechaVencimiento.Visible = If(DdlTipoLineaAdicionalModal.SelectedValue.ToEntero = 2, False, True)
|
|
|
|
|
UpLineaAdicionalmodal.Update()
|
|
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
|
|