Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
|
||||
Partial Class Ventas_ActualizarPrecios
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1,24 +1,20 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.IO
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
Imports System.Globalization
|
||||
Imports System.Net.Http
|
||||
Imports Newtonsoft.Json
|
||||
Imports System.Threading.Tasks
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Collections.Generic
|
||||
Imports Newtonsoft.Json.Serialization
|
||||
Imports System.Net.Http
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
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
|
||||
@@ -503,10 +499,10 @@ Partial Class Clientes
|
||||
Set(value As String)
|
||||
ViewState("linkDescargaPagare") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Documentacion"
|
||||
Private Property DTDocumentacion As DataTable
|
||||
Get
|
||||
@@ -617,21 +613,21 @@ Partial Class Clientes
|
||||
Set(value As String)
|
||||
ViewState("AdjuntoDocumentacion") = 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
|
||||
@@ -671,10 +667,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
|
||||
|
||||
@@ -924,10 +920,10 @@ 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
|
||||
@@ -964,18 +960,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))
|
||||
@@ -1169,9 +1165,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"
|
||||
@@ -1179,11 +1175,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
|
||||
@@ -2126,12 +2122,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
|
||||
@@ -2194,9 +2190,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()
|
||||
@@ -2497,18 +2493,18 @@ Partial Class Clientes
|
||||
|
||||
End If
|
||||
|
||||
'CargaSucursal()
|
||||
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
|
||||
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
'CargaSucursal()
|
||||
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
|
||||
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
'Dim rowcodigo As DataTable = GlobalDTCliente.FiltraParametros(String.Format("Codigo='{0}' AND CveEmpresa={1} ", TxtCodigo.Text.Trim, UsuarioActual.CveEmpresa))
|
||||
'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString().Toentero() <> CveCliente) Then
|
||||
' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
'Dim rowcodigo As DataTable = GlobalDTCliente.FiltraParametros(String.Format("Codigo='{0}' AND CveEmpresa={1} ", TxtCodigo.Text.Trim, UsuarioActual.CveEmpresa))
|
||||
'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString().Toentero() <> CveCliente) Then
|
||||
' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
Dim objDoc As New ClsEdocumentacion(ObjClientes.IniciaTransacSQL())
|
||||
Dim MsgCuentaContable As String = ""
|
||||
Dim ErrorProceso As Boolean = False
|
||||
@@ -2538,85 +2534,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")
|
||||
|
||||
@@ -2867,11 +2863,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)
|
||||
@@ -2885,10 +2881,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
|
||||
@@ -3049,11 +3045,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
|
||||
@@ -3126,9 +3122,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
|
||||
@@ -3260,7 +3256,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
|
||||
|
||||
@@ -3382,9 +3378,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
|
||||
@@ -3536,9 +3532,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
|
||||
@@ -3570,12 +3566,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
|
||||
@@ -3757,9 +3753,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
|
||||
@@ -3968,11 +3964,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
|
||||
@@ -4294,9 +4290,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)
|
||||
|
||||
@@ -4364,11 +4360,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)
|
||||
@@ -4438,11 +4434,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()
|
||||
@@ -4657,12 +4653,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"))
|
||||
@@ -4768,9 +4764,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"
|
||||
@@ -5358,9 +5354,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
|
||||
@@ -5501,10 +5497,10 @@ Partial Class Clientes
|
||||
UpMoverDispositivo.Update()
|
||||
RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});")
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Sucursales"
|
||||
Public Sub CreaDTSucursales()
|
||||
|
||||
@@ -5738,14 +5734,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
|
||||
@@ -5816,16 +5812,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
|
||||
@@ -5870,10 +5866,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
|
||||
@@ -6283,13 +6279,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(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -6372,18 +6368,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()
|
||||
@@ -6418,12 +6414,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
|
||||
@@ -6596,8 +6592,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
|
||||
@@ -6653,10 +6649,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
|
||||
@@ -6714,9 +6710,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")
|
||||
@@ -6742,11 +6738,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
|
||||
@@ -6977,10 +6973,10 @@ Partial Class Clientes
|
||||
ObjVentas.Dispose()
|
||||
|
||||
Return PdfFactura(Vta)
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "COMERCIO EXTERIOR"
|
||||
Public Sub CargaCombosComercioExterior()
|
||||
|
||||
@@ -7104,12 +7100,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()
|
||||
|
||||
@@ -8607,9 +8603,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"))
|
||||
@@ -8833,9 +8829,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"))
|
||||
@@ -9071,12 +9067,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
|
||||
|
||||
@@ -9715,11 +9711,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")
|
||||
@@ -9794,7 +9790,7 @@ Partial Class Clientes
|
||||
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
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System.Linq
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Ventas_ClientesAbonar
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class MetasVendedoresDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Linq
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports System.Globalization
|
||||
Imports System.Net.Http
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Security.Cryptography.X509Certificates
|
||||
Imports ADSSession
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class PV
|
||||
Inherits ClsPaginas
|
||||
@@ -709,6 +706,20 @@ Partial Class PV
|
||||
ViewState("CveAutorizacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ClienteCodigoRegimenFiscal As String
|
||||
Get
|
||||
|
||||
If ViewState("ClienteCodigoRegimenFiscal") Is Nothing Then
|
||||
ViewState("ClienteCodigoRegimenFiscal") = ""
|
||||
End If
|
||||
Return ViewState("ClienteCodigoRegimenFiscal").ToString
|
||||
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("ClienteCodigoRegimenFiscal") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "PROPIEDADES DE PUNTO DE VENTA"
|
||||
@@ -2431,8 +2442,10 @@ Partial Class PV
|
||||
'End If
|
||||
End Sub
|
||||
Private Sub CargaUsoCFDI()
|
||||
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica)
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) <> "1" Then
|
||||
ClienteCodigoRegimenFiscal = "-1"
|
||||
End If
|
||||
DdlUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=ClienteCodigoRegimenFiscal)
|
||||
DdlUsoCFDI.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaNuevaFactura(OVenta As ClsVentas)
|
||||
@@ -2635,6 +2648,7 @@ Partial Class PV
|
||||
ViewState("IdCtaContRetISR") = ObjCliente.IdCtaContRetISR
|
||||
ViewState("CodCliente") = ObjCliente.Codigo
|
||||
ViewState("ClienteDesglosaIEPS") = ObjCliente.DesglosaIEPS
|
||||
ClienteCodigoRegimenFiscal = ObjCliente.DtResultados.Rows(0)("CodigoRegimenFiscal").ToString()
|
||||
|
||||
If (Boolean.Parse(ObjCliente.DtResultados(0)("EsDistribuidor").ToString)) Then
|
||||
TrEsDistribuidor.Visible = True
|
||||
@@ -2687,6 +2701,13 @@ Partial Class PV
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33.ToString)
|
||||
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
'S01 Sin efectos fiscales.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
ClienteCodigoRegimenFiscal = "616"
|
||||
End If
|
||||
End If
|
||||
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
|
||||
|
||||
@@ -2865,6 +2886,13 @@ Partial Class PV
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
|
||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
'S01 Sin efectos fiscales.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
ClienteCodigoRegimenFiscal = "616"
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveVenta < 0 Then TxtAtencionA.Text = ObjCliente.DtResultados.Rows(0)("Contacto").ToString
|
||||
@@ -2894,6 +2922,13 @@ Partial Class PV
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
'S01 Sin efectos fiscales.
|
||||
DdlUsoCFDI.SelectedValueExist("23")
|
||||
DdlUsoCFDI.Enabled = False
|
||||
ClienteCodigoRegimenFiscal = "616"
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -4204,12 +4239,18 @@ Partial Class PV
|
||||
HdnDescuentoOriginal.Value = TxtDescuento.Text.ToDecimal().ToString()
|
||||
LblDescuentoIncluido.Text = TxtDescuento.Text.ToDecimal().FormatoNumero(2)
|
||||
|
||||
If PrecioSugerido > 0 AndAlso TxtDescuento.Text.ToDecimal() > 0 Then
|
||||
If PrecioSugerido > 0 Then
|
||||
TxtPrecio.Text = PrecioSugerido.FormatoNumero()
|
||||
LblPrecio1.Text = PrecioSugerido.FormatoNumero()
|
||||
'RegistraScript("$get('LblPrecio1').innerText = formato_numero(" + PrecioSugerido.ToString() + ", 2, '.', ',');", "A1")
|
||||
End If
|
||||
|
||||
If IsNumeric(TxtCantidad.Text.Trim) Then
|
||||
LblTotalPS.Text = (TxtCantidad.Text.Trim.ToDouble * TxtPrecio.Text.ToDouble).ToString.FormatoNumero(2)
|
||||
Else
|
||||
LblTotalPS.Text = "0.00"
|
||||
End If
|
||||
|
||||
If ChkAjuste.Checked Then
|
||||
CalculaMesesUso()
|
||||
UpAjuste.Update()
|
||||
@@ -4405,6 +4446,27 @@ Partial Class PV
|
||||
Descuento = 0
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
'LTH AA Paq. 2 baterias, LTH AAA Paq. 02 baterias, LTH AA Paq. 4 baterias, LTH AAA Paq. 4 Baterias
|
||||
If CvePS.Contiene(521445, 521448, 402917, 402918) Then
|
||||
'SI TIENE BATERIAS AGREGADAS CON LA MARCA LTH, APLICAR PROMOCION, LA CLASIFICACION DEBE SER ACUMULADORES
|
||||
If TmpDT.SUMD("Cantidad", "CveMarca IN (819,826,1085,1052) AND CveClasificacion IN (20520,20522,20513,20521,20512,20514,20229)") >= 1D Then
|
||||
Descuento = 0
|
||||
SeAjustoPU = True
|
||||
'Paq. 2 baterias
|
||||
If CvePS.Contiene(521445, 521448) Then
|
||||
PUPromocion = 25D
|
||||
End If
|
||||
'Paq. 4 baterias
|
||||
If CvePS.Contiene(402917, 402918) Then
|
||||
PUPromocion = 40D
|
||||
End If
|
||||
PUModificado = Math.Round(PUPromocion / (1 + PorcentajeIVA), 6)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjDescuento.ImporteDescuento = Descuento
|
||||
ObjDescuento.CvePromocionDetalle = CvePromocionDetalle
|
||||
If SeAjustoPU Then
|
||||
@@ -4642,6 +4704,7 @@ Partial Class PV
|
||||
TmpDT.Columns("EliminarDB").DefaultValue = False
|
||||
|
||||
TmpDT.Columns.Add("AplicaSerie", GetType(Boolean))
|
||||
TmpDT.Columns.Add("CveMarca", GetType(Integer))
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -5014,6 +5077,11 @@ Partial Class PV
|
||||
|
||||
Row("EliminarDB") = EliminarDB
|
||||
|
||||
If TmpDT.Columns.Contains("CveMarca") Then
|
||||
Row("CveMarca") = DrPS("CveMarca")
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA
|
||||
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
using System;
|
||||
using Extensiones;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.ServiceModel;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Web.UI.WebControls;
|
||||
using static Extensiones.ModExtensiones;
|
||||
|
||||
public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
@@ -77,7 +71,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
GvRefacturaciones.DataSource = DtRefacturar;
|
||||
GvRefacturaciones.DataBind();
|
||||
}
|
||||
|
||||
|
||||
|
||||
GvDatos.DataBind();
|
||||
UPDatos.Update();
|
||||
@@ -107,9 +101,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
Msg = resp.Mensaje;
|
||||
if (CveEstatusRefact == "4")
|
||||
{
|
||||
Msg = Msg+ "<br/><a class='Texto' href='/Ventas/Ventas.aspx?CveDevolucion=" + CveVenta + "&NuevaFactura=1'> Refacturar</a>";
|
||||
}
|
||||
{
|
||||
Msg = Msg + "<br/><a class='Texto' href='/Ventas/Ventas.aspx?CveDevolucion=" + CveVenta + "&NuevaFactura=1'> Refacturar</a>";
|
||||
}
|
||||
|
||||
Alert(Msg, TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar");
|
||||
}
|
||||
@@ -228,7 +222,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
if (respCancelacion.CveEstatus == 20)
|
||||
{
|
||||
sb.Append("El estatus de la factura fue cambiado a <b>'Cancelación en proceso'</b>.");
|
||||
sb.Append("El estatus de la factura fue cambiado a <b>'Cancelación en proceso'</b>.");
|
||||
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||
}
|
||||
else if (respCancelacion.CveEstatus == 23)
|
||||
@@ -589,9 +583,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
e.Row.FCHyperLink("HplRefact").Visible = true;
|
||||
}
|
||||
|
||||
if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID=="GvDatos")
|
||||
if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID == "GvDatos")
|
||||
{
|
||||
e.Row.FCLinkButton("BtnValidar").Text= "<i class='fa fa-check'>02</i>";
|
||||
e.Row.FCLinkButton("BtnValidar").Text = "<i class='fa fa-check'>02</i>";
|
||||
e.Row.FCLinkButton("BtnValidar").CssClass = "btn btn-circle btn-sm blue";
|
||||
}
|
||||
//if (e.Row.DBCampo("CveEstatusRefacturacion") == "4" && gv.ID == "GvDatos")
|
||||
@@ -615,7 +609,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = true;
|
||||
//SOLO MOSTRAR SI LA FACTURA NUEVA ESTA EMITIDA
|
||||
if (e.Row.DBCampo("CveEstatusRefacturacion") != "4" && e.Row.DBCampo("CveEstatusFacturaSustitucion") == "3")
|
||||
if (e.Row.DBCampo("CveEstatusRefacturacion") != "4" && e.Row.DBCampo("CveEstatusFacturaSustitucion") == "3")
|
||||
{
|
||||
e.Row.FCLinkButton("LnkCancelarFolioSustitucion").Visible = true;
|
||||
}
|
||||
@@ -810,7 +804,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
if (respCancelacion.CveEstatus == 20)
|
||||
{
|
||||
sb.Append($"El estatus de la factura <b>{SerieFolioSustitucion}</b> fue cambiado a <b>'Cancelación en proceso'</b>.");
|
||||
|
||||
|
||||
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||
}
|
||||
else if (respCancelacion.CveEstatus == 23)
|
||||
@@ -824,9 +818,9 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||
}
|
||||
|
||||
if (respCancelacion.CveEstatus.Contiene(5,20))
|
||||
if (respCancelacion.CveEstatus.Contiene(5, 20))
|
||||
{
|
||||
if (ObjVentas.UpdateEstatusVenta(CveVentaOriginal, 23, UsuarioActual.CveEmpresa, CveEstatusRefacturacion:4, CveMotivoCancelacion: CveMotivoCancelacion))
|
||||
if (ObjVentas.UpdateEstatusVenta(CveVentaOriginal, 23, UsuarioActual.CveEmpresa, CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion))
|
||||
{
|
||||
sb.Append($"</br>La Factura <b>{SerieFolioOriginal}</b> fue desligada.");
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports System.Globalization
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Ventas_RepPS
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
|
||||
Partial Class Ventas_RepProductosServicios
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -3,9 +3,9 @@ Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.IO.Compression
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.IO.Compression
|
||||
|
||||
Partial Class Ventas_RepProductosServiciosDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -3,9 +3,9 @@ Option Strict On
|
||||
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.IO
|
||||
Partial Class Ventas_RepRecuperacionDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class RepRemisiones
|
||||
Inherits ClsPaginas
|
||||
|
||||
@@ -63,8 +63,8 @@ Partial Class RepRemisiones
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVentas") = 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 Page.IsPostBack Then
|
||||
@@ -75,8 +75,8 @@ Partial Class RepRemisiones
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " C A R G A - D A T O S "
|
||||
Public Sub CargaDatos()
|
||||
|
||||
@@ -132,9 +132,9 @@ Partial Class RepRemisiones
|
||||
e.Row.FCLiteral("LtlTotal").Text = "<a class=""Texto"" target=""_blank"" href=""/Ventas/RepRemisionesDetalle.aspx?CveVenta=" & e.Row.DBCampo("CveVenta") & "&FechaI=" & FechaI & "&FechaF=" & FechaF & "&FechaV=" & FechaV & "&CveCliente=" & If(e.Row.DBCampo("CveCliente").ToString().ToEntero() > 0, e.Row.DBCampo("CveCliente").ToString(), DdlClientes.SelectedValue) & "&CveContrato=" & CveContrato & "&CveSubProyecto=" & Sucursales & "&CveMoneda=" & e.Row.DBCampo("CveMoneda") & """>" & e.Row.FCLiteral("LtlTotal").Text & "</a>"
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "CARGA COMBOS FILTRO"
|
||||
Private Sub CargaCliente()
|
||||
'CargaClientes
|
||||
@@ -186,15 +186,15 @@ Partial Class RepRemisiones
|
||||
DdlVendedor.Attributes.Add("disabled", "disabled")
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "DDLS SELECTED INDEX CHANGED"
|
||||
Private Sub DdlClientes_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaContrato()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PDF"
|
||||
Private Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
If DtVentas IsNot Nothing Then
|
||||
@@ -232,7 +232,7 @@ Partial Class RepRemisiones
|
||||
Else
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
End Sub
|
||||
|
||||
@@ -478,17 +478,23 @@ Partial Class Ventas_RepVentas
|
||||
If Anio > 0 AndAlso Mes > 0 Then
|
||||
Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes)
|
||||
|
||||
Dim Dia As Integer = FechaFRef.Day
|
||||
Dim DiaFinal As Integer = FechaFRef.Day
|
||||
|
||||
If e.Row.DBCampo("Mes").ToEntero() <> FechaFRef.Month Then
|
||||
Dia = lastDayOfMonth
|
||||
If Mes <> FechaFRef.Month Then
|
||||
DiaFinal = lastDayOfMonth
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Mes").ToEntero() <> FechaIRef.Month Then
|
||||
'VERIFICAR LA FECHA DE INICIO DEL MES DE CONSULTA
|
||||
If Mes <> FechaIRef.Month Then
|
||||
FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy")
|
||||
Else
|
||||
'SI ES EL MISMO MES DE FECHA DE INICIO TOMAR LA FECHA DE INICIO COMO REFERENCIA
|
||||
If Mes = FechaIRef.Month AndAlso Anio = FechaIRef.Year Then
|
||||
FechaInicial = FechaIRef.ToString("dd/MM/yyyy")
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim FechaFinalRef = New DateTime(Anio, Mes, Dia)
|
||||
Dim FechaFinalRef = New DateTime(Anio, Mes, DiaFinal)
|
||||
|
||||
'ASIGNAR LA FECHA FINAL DEL GRUPO, SI ES MENOR A LA FECHA DEL FILTRO
|
||||
If FechaF <> "-1" Then
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user