This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2023-12-28 07:01:35 -07:00
64 changed files with 11942 additions and 9990 deletions

View File

@@ -735,6 +735,9 @@
<div class="col-md-10">
<div runat="server" class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPrecioLista" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlPrecioLista" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlPrecioLista"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Lista de Precio''</b> es necesario, por favor ingréselo."
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= DdlPrecioLista.ClientID.ToString()%>">Precio Lista:</label>
<i></i>
</div>
@@ -1211,7 +1214,7 @@
<div class="col-md-6">
<div class="form-group form-md-line-input" id="DivAplicaProductoAlterno" runat="server">
Aplica Producto Alterno:
<asp:CheckBox ID="ChkProductoAlterno" Checked="true" CssClass="make-switchsd" data-size="small" runat="server" />
<asp:CheckBox ID="ChkProductoAlterno" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" />
</div>
</div>
</div>

View File

@@ -2,6 +2,7 @@
Option Strict On
Imports System.Data
Imports System.Data.SqlClient
Imports System.Globalization
Imports System.IO
Imports System.Net
@@ -12,9 +13,9 @@ Imports Newtonsoft.Json
Imports Newtonsoft.Json.Linq
Partial Class Clientes
Inherits ClsPaginas
'Configuración
Inherits ClsPaginas
'Configuración
#Region "P R O P I E D A D E S"
Private Const NumeroDecimales As Integer = 2
Private CveVentaDeduccion As Integer
@@ -455,13 +456,13 @@ Partial Class Clientes
Set(value As DateTime)
ViewState("FechaIngLineaAdicional") = value
End Set
End Property
End Property
#End Region
#Region "Documentacion"
Private Property DTDocumentacion As DataTable
Get
@@ -586,24 +587,24 @@ Partial Class Clientes
Set(value As Integer)
ViewState("CveVendedorOriginal") = value
End Set
End Property
'Private ReadOnly Property CvePersonal As Integer
' Get
' If ViewState("CvePersonal") Is Nothing Then
' Return -1
' Else
' Return ViewState("CvePersonal").ToString().Toentero()
' End If
' End Get
'End Property
End Property
'Private ReadOnly Property CvePersonal As Integer
' Get
' If ViewState("CvePersonal") Is Nothing Then
' Return -1
' Else
' Return ViewState("CvePersonal").ToString().Toentero()
' End If
' End Get
'End Property
#End Region
#Region " A C U M U L A D O R E S"
Property CveVentaNota As Integer
Get
@@ -643,10 +644,23 @@ Partial Class Clientes
Set(value As String)
ViewState("SerieNotaAcumulador") = value
End Set
End Property
End Property
#End Region
Property CvePrecioListaOriginal As Integer
Get
If ViewState("CvePrecioListaOriginal") Is Nothing Then
Return 0
Else
Return ViewState("CvePrecioListaOriginal").ToString().ToEntero()
End If
End Get
Set(value As Integer)
ViewState("CvePrecioListaOriginal") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -911,12 +925,12 @@ Partial Class Clientes
ChkPermiso5.Enabled = False
ChkPermiso6.Enabled = False
End Sub
End Sub
#Region " PERMISOS PAGINAS "
Private Sub MostrarTxtDireccionesClienteEnvio()
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
@@ -953,15 +967,15 @@ 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))
@@ -1132,9 +1146,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"
@@ -1142,11 +1156,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
@@ -1231,7 +1245,7 @@ Partial Class Clientes
End If
UpDatos.Update()
End Sub
@@ -1452,7 +1466,8 @@ Partial Class Clientes
TxtNotificar.Text = ObjClientes.NotificarA
TxtPagina.Text = ObjClientes.Pagina
'TxtGiro.Text = ObjClientes.Giro
DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString()
DdlPrecioLista.SelectedValueExist(ObjClientes.CvePrecioLista.ToString())
CvePrecioListaOriginal = ObjClientes.CvePrecioLista
TxtCC.Text = ObjClientes.NotificarA
ChkMail.Checked = ObjClientes.EnviarFactura
@@ -1552,7 +1567,8 @@ Partial Class Clientes
DdlCorporativo.SelectedValueExist(ObjClientes.CveClienteCorporativo.ToString())
ChkCargoUsado.Checked = ObjClientes.CargoUsados
ChkBonificacionUsado.Checked = ObjClientes.BonificacionUsado
ChkProductoAlterno.Checked = ObjClientes.UsaProductoAlterno
ChkProductoAlterno.Checked = ObjClientes.UsaProductoAlterno
DdlAlmacenAsignado.SelectedValueExist(ObjClientes.CveAlmacenAsignado)
'COMERCIO EXTERIOR
ChkAplicaComercioExterior.Checked = ObjClientes.AplicaComercioExterior
@@ -1996,11 +2012,11 @@ Partial Class Clientes
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
DdlSucursalUsoCFDI.DataBind()
UpFiscalContable.Update()
End Sub
End Sub
#End Region
#Region "V E R M Á S"
Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs)
If BtnVerMasVentas.Text = "Ver Más" Then
CargaHistorial(-1)
@@ -2030,12 +2046,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
@@ -2105,9 +2121,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()
@@ -2482,7 +2498,7 @@ Partial Class Clientes
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
Dim CvePrecioLista As Integer = DdlPrecioLista.SelectedValue.ToEntero()
'If DivCrearPrecioLista.Visible AndAlso ChkCrearPrecioLista.Checked Then
' CvePrecioListaNuevo = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, 0)
@@ -2493,6 +2509,17 @@ Partial Class Clientes
' End If
'End If
If Not ErrorProceso AndAlso UsuarioActual.Empresa.Funcionalidad(404).Contiene("10", "30") Then
If DdlPrecioLista.SelectedValue.ToEntero.Contiene(-2, -3) Then
If Not AsignaLista(ObjClientes.IniciaTransacSQL) Then
ErrorProceso = True
Alert("Error al generar lista de precios.", TipoMensaje.MsgAdvertencia)
End If
End If
End If
Dim CvePrecioLista As Integer = DdlPrecioLista.SelectedValue.ToEntero()
If Not ErrorProceso Then
'VERIFICA SI ES CLIENTE NUEVO O ACTUALIZACION
If Me.CveCliente = -1 Then
@@ -2613,6 +2640,7 @@ Partial Class Clientes
If ErrorProceso Then
ObjClientes.RollBack()
CargaPrecioLista()
Alert("Ocurrió un error al guardar.", TipoMensaje.MsgError)
Else
ObjClientes.Commit()
@@ -2693,11 +2721,11 @@ Partial Class Clientes
End If
End If
End Sub
End Sub
#End Region
#Region "G L O B L A L"
Private Sub RecargaGlobal()
@@ -2706,10 +2734,10 @@ Partial Class Clientes
Private Sub GeneraGlobalDT()
GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
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
@@ -2850,11 +2878,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
@@ -2927,9 +2955,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
@@ -3061,7 +3089,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
@@ -3183,9 +3211,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
@@ -3337,9 +3365,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
@@ -3371,12 +3399,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
@@ -3558,9 +3586,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
@@ -5215,9 +5243,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
@@ -5358,10 +5386,10 @@ Partial Class Clientes
UpMoverDispositivo.Update()
RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});")
End Sub
End Sub
#End Region
#Region "Sucursales"
Public Sub CreaDTSucursales()
@@ -5652,14 +5680,14 @@ Partial Class Clientes
End If
UpDatos.Update()
End Sub
End Sub
#End Region
#Region "G P S"
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
Try
@@ -5730,16 +5758,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
@@ -5784,10 +5812,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
@@ -5951,6 +5979,7 @@ Partial Class Clientes
divAlmacenAsignado.Visible = True
DdlAlmacenAsignado.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
DdlAlmacenAsignado.DataBind()
DdlAlmacenAsignado.Items.Insert(0, New ListItem("-", "-1"))
End If
End Sub
@@ -6170,12 +6199,12 @@ Partial Class Clientes
Else
Alert("No hay saldo pendiente del cliente. Por lo cual no se envió el mensaje.", TipoMensaje.MsgInformacion)
End If
End Sub
End Sub
#End Region
#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 Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
@@ -6249,18 +6278,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()
@@ -6296,12 +6325,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
@@ -6473,8 +6502,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
@@ -6525,10 +6554,10 @@ Partial Class Clientes
GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1) = Nothing
End If
End Sub
End Sub
#End Region
Private Sub CargaPSGridCuentasBancos()
If CveCliente > 0 Then
GvBancosCuentas.DataSource = DTCuentasBancos
@@ -6582,9 +6611,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")
@@ -6606,11 +6635,11 @@ Partial Class Clientes
ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & NowADS().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
@@ -6841,10 +6870,10 @@ Partial Class Clientes
ObjVentas.Dispose()
Return PdfFactura(Vta)
End Function
End Function
#End Region
#Region "COMERCIO EXTERIOR"
Public Sub CargaCombosComercioExterior()
@@ -6968,12 +6997,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()
@@ -7575,12 +7604,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
@@ -7748,11 +7777,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();")
@@ -7777,9 +7806,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
@@ -7788,19 +7817,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')")
@@ -8137,13 +8166,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"))
@@ -8260,12 +8289,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()
@@ -8303,10 +8332,10 @@ Partial Class Clientes
CargaEventoBitacora()
NombreDispositivo = ""
RegistraScript("$('#DivMoverDispositivo').modal('hide');")
End Sub
End Sub
#End Region
#Region "CRM"
Protected Sub CargaDatosCRM()
Dim ObjCRM As New ClsCRM()
@@ -8406,9 +8435,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"))
@@ -8633,9 +8662,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"))
@@ -9507,11 +9536,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")
@@ -9580,7 +9609,7 @@ Partial Class Clientes
Alert("Puntuación Inicializada")
End If
Acum.Dispose()
End Sub
End Sub
#End Region
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
@@ -10298,25 +10327,75 @@ Partial Class Clientes
RegistraScript("$('#DivAgregarPrecioLista').modal('show');")
End Sub
Protected Sub BtnGuardarPL_Click(sender As Object, e As EventArgs)
Dim ObjVentas As New ClsVentas()
Dim CvePrecioListaNuevo As Integer = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, False, 0)
If CvePrecioListaNuevo > 0 Then
Alert("La lista de precio se guardo correctamente")
RegistraScript("$('#DivAgregarPrecioLista').modal('hide');")
LimpiaItemsListaPrecion()
If DdlPrecioListaClonar.SelectedValue.ToEntero > 0 Then
DdlPrecioLista.Items.Add(New ListItem(TxtPrecioLista.Text, "-3"))
DdlPrecioLista.SelectedValueExist("-3")
Else
Alert("Ocurrió un error al guardar la lista de precio", TipoMensaje.MsgError)
DdlPrecioLista.Items.Add(New ListItem(TxtPrecioLista.Text, "-2"))
DdlPrecioLista.SelectedValueExist("-2")
End If
'Alert("La lista de precio se guardo correctamente")
UpDatos.Update()
RegistraScript("$('#DivAgregarPrecioLista').modal('hide');")
End Sub
Private Sub LimpiaItemsListaPrecion()
DdlPrecioLista.SelectedValue = Nothing
DdlPrecioLista.ClearSelection()
For i As Integer = DdlPrecioLista.Items.Count - 1 To 0 Step -1
If DdlPrecioLista.Items(i).Value.Contiene("-2", "-3") Then
DdlPrecioLista.Items.RemoveAt(i)
End If
Next
End Sub
Private Function AsignaLista(ByRef transaccionSQL As SqlTransaction) As Boolean
Dim respuesta As Boolean = True
Dim CvePrecioListaClonar As Integer = -1
If DdlPrecioLista.SelectedValue.ToEntero = -3 Then 'Clñonar
CvePrecioListaClonar = DdlPrecioListaClonar.SelectedValue.ToEntero
End If
Dim ObjVentas As New ClsVentas(transaccionSQL)
Dim CvePrecioListaNuevo As Integer = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, False, 0, CvePrecioListaClonar:=CvePrecioListaClonar)
If Not CvePrecioListaNuevo > 0 Then
respuesta = False
End If
'RECARGA GLOBAL DE LISTA DE PRECIOS SI SE GENERO UNO NUEVO
If CvePrecioListaNuevo > 0 Then
GlobalDTPrecioListas(UsuarioActual.CveEmpresa) = Nothing
If ObjVentas.GetPrecioListas(UsuarioActual.CveEmpresa) Then
DdlPrecioLista.DataSource = ObjVentas.DtResultados
Else
DdlPrecioLista.DataSource = Nothing
End If
CargaPrecioLista()
DdlPrecioLista.DataBind()
DdlPrecioLista.Items.Insert(0, New ListItem(" - ", "-1"))
'CargaPrecioLista()
DdlPrecioLista.SelectedValueExist(CvePrecioListaNuevo)
End If
UpDatos.Update()
End Sub
Return respuesta
End Function
End Class

View File

@@ -1151,15 +1151,143 @@
<div class="row form-md-line-input">
<label class="col-md-4 truncate">Peso en Kg:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtPesoKg" runat="server" Width="60px" Class="form-control input-sm"></asp:TextBox>
<asp:TextBox ID="TxtPesoKg" runat="server" Width="200px" Class="form-control input-sm"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Dimensiones:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDimensiones" runat="server" Width="120px" Class="form-control input-sm"></asp:TextBox>
<asp:TextBox ID="TxtDimensiones" runat="server" Width="200px" Class="form-control input-sm" ></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">ClaveSector COFEPRIS:</label>
<div class="col-md-8">
<asp:DropDownList ID="DdlClaveSectorCOFEPRIS" runat="server" CssStyle="width: 100%;" Width="200px" DataTextField="SectorCOFEPRISClave" DataValueField="CveSectorCOFEPRIS" CssClass="form-control input-sm select2me"></asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Clave Forma Farmaceutica:</label>
<div class="col-md-8">
<asp:DropDownList ID="DdlClaveFormaFarmaceutica" runat="server" CssStyle="width: 100%;" Width="200px" DataTextField="FormaFarmaceuticaClave" DataValueField="CveFormaFarmaceutica" CssClass="form-control input-sm select2me"></asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Nombre Ingrediente Activo:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtNombreIngredienteActivo" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Nom Quimico:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtNomQuimico" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Denominacion Generica:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDenominacionGenerica" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Denominacion Distintiva:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDenominacionDistintiva" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Fabricante:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtFabricante" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Condiciones Transporte:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtCondicionesTransporte" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Registro Sanitario Autorizacion:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtRegistroSanitarioAutorizacion" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Permiso Importacion:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtPermisoImportacion" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Folio Importacion VUCEM:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtFolioImportacionVUCEM" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Num CAS:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtNumCAS" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Razon Social Emp Importacion:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtRazonSocialEmpImportacion" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Num Registro Plag COFEPRIS:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtNumRegistroPlagCOFEPRIS" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Datos Fabricante:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDatosFabricante" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Datos Formulador:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDatosFormulador" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Datos Maquilador:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtDatosMaquilador" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
<div class="row">
<label class="col-md-4 truncate">Uso Autorizado:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtUsoAutorizado" runat="server" Width="200px" Class="form-control input-sm" MaxLength="50"></asp:TextBox>
</div>
</div>
</div>
</div>
</ContentTemplate>

View File

@@ -2,6 +2,7 @@
Option Strict On
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports Extensiones
Imports ZXing
@@ -12,7 +13,7 @@ Partial Class ProductosyServicios
#Region " Propiedades "
Private ReadOnly Property CvePS As Integer
Get
Return ViewState("CvePS").ToString.ToEntero
Return IfNull(ViewState("CvePS"), "-1").ToString.ToEntero
End Get
End Property
Public Property PSAdicionalAnterior As String
@@ -186,18 +187,18 @@ Partial Class ProductosyServicios
ViewState("CvePS") = Request("CvePS")
If CargaDatos() Then
CargarMarcas()
'Configuración de Modalidad Update
BtnGuardar.Text = "Guardar Cambios"
CargarAlias()
CargaExistencias()
End If
CargaDatosCartaPorte()
Else
'Configuración de Modalidad Insert
RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')")
ViewState("CvePS") = -1
CargarMarcas()
ChkEstado.Enabled = False
ChkEstado.Checked = True
@@ -367,6 +368,8 @@ Partial Class ProductosyServicios
CargaTipoProductos()
CargaUnidadesMedida()
CargarMetodosInv()
CargarMarcas()
CargaCombosPSComplementos()
'CargaPSAdicional(DdlPSAdicional)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
@@ -452,6 +455,18 @@ Partial Class ProductosyServicios
End Sub
Private Sub CargaCombosPSComplementos()
DdlClaveSectorCOFEPRIS.DataSource = GlobalDTSATSectorCOFEPRIS
DdlClaveSectorCOFEPRIS.DataBind()
DdlClaveSectorCOFEPRIS.Items.Insert(0, New ListItem("-", "-1"))
DdlClaveFormaFarmaceutica.DataSource = GlobalDTSATFormaFarmaceutica
DdlClaveFormaFarmaceutica.DataBind()
DdlClaveFormaFarmaceutica.Items.Insert(0, New ListItem("-", "-1"))
End Sub
Private Sub CargaPanelLlantas()
Dim ObjGral As New ClsGenerales()
@@ -1648,6 +1663,10 @@ Partial Class ProductosyServicios
OnError("Ocurrió un error al guardar al guardar el producto/servicio.", ex)
End Try
If Not TieneError Then
GuardaDatosCartPorte()
End If
If Not TieneError Then
ObjProductosServicios.Commit()
Alert("El Producto/Servicio se guardo correctamente." + If(GeneraServicioAF = 1, " Recargue la pagina de ventas para poder utilizar el servicio", ""), TipoMensaje.MsgInformacion, AccionJS)
@@ -3293,8 +3312,6 @@ Partial Class ProductosyServicios
End If
End If
ObjGrales.Dispose()
If ValidaMaterialPeligrosoMensaje Then
@@ -3321,11 +3338,29 @@ Partial Class ProductosyServicios
DdlMaterialPeligroso.txtText.Value = ""
DdlMaterialPeligroso.txtValue.Value = ""
DdlEmbalaje.txtText.Value = ""
DdlEmbalaje.txtValue.Value = ""
DdlClaveSectorCOFEPRIS.SelectedValueExist(-1)
DdlClaveFormaFarmaceutica.SelectedValueExist(-1)
TxtNombreIngredienteActivo.Text = ""
TxtNomQuimico.Text = ""
TxtDenominacionGenerica.Text = ""
TxtDenominacionDistintiva.Text = ""
TxtFabricante.Text = ""
TxtCondicionesTransporte.Text = ""
TxtRegistroSanitarioAutorizacion.Text = ""
TxtPermisoImportacion.Text = ""
TxtFolioImportacionVUCEM.Text = ""
TxtNumCAS.Text = ""
TxtRazonSocialEmpImportacion.Text = ""
TxtNumRegistroPlagCOFEPRIS.Text = ""
TxtDatosFabricante.Text = ""
TxtDatosFormulador.Text = ""
TxtDatosMaquilador.Text = ""
TxtUsoAutorizado.Text = ""
UpCartaPorte.Update()
End Sub
@@ -3334,8 +3369,6 @@ Partial Class ProductosyServicios
Protected Sub ChkFechaIndeterminadaRSCO_CheckedChanged(sender As Object, e As EventArgs)
DivRegistroRSCO3.Visible = If(ChkFechaIndeterminadaRSCO.Checked, False, True)
If TxtFechaVigenciaRSCO.Text = "01/01/1900" Then
TxtFechaVigenciaRSCO.Text = ""
End If
@@ -3343,4 +3376,65 @@ Partial Class ProductosyServicios
UpDatos.Update()
End Sub
Private Sub CargaDatosCartaPorte()
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetProductosServiciosComplementos(CvePS) AndAlso ObjPS.DtResultados.Rows.Count > 0 Then
DdlMaterialPeligroso.txtText.Value = ObjPS.DtResultados.Rows(0)("MaterialPeligroso").ToString
DdlMaterialPeligroso.txtValue.Value = ObjPS.DtResultados.Rows(0)("CveMaterialPeligroso").ToString
DdlEmbalaje.txtText.Value = ObjPS.DtResultados.Rows(0)("Embalaje").ToString
DdlEmbalaje.txtValue.Value = ObjPS.DtResultados.Rows(0)("CveEmbalaje").ToString
DdlClaveSectorCOFEPRIS.SelectedValueExist(ObjPS.DtResultados.Rows(0)("CveSectorCOFEPRIS").ToString)
DdlClaveFormaFarmaceutica.SelectedValueExist(ObjPS.DtResultados.Rows(0)("CveFormaFarmaceutica").ToString)
TxtPesoKg.Text = ObjPS.DtResultados.Rows(0)("PesoKg").ToString
TxtDimensiones.Text = ObjPS.DtResultados.Rows(0)("Dimensiones").ToString
TxtNombreIngredienteActivo.Text = ObjPS.DtResultados.Rows(0)("NombreIngredienteActivo").ToString
TxtNomQuimico.Text = ObjPS.DtResultados.Rows(0)("NomQuimico").ToString
TxtDenominacionGenerica.Text = ObjPS.DtResultados.Rows(0)("DenominacionGenerica").ToString
TxtDenominacionDistintiva.Text = ObjPS.DtResultados.Rows(0)("DenominacionDistintiva").ToString
TxtFabricante.Text = ObjPS.DtResultados.Rows(0)("Fabricante").ToString
TxtCondicionesTransporte.Text = ObjPS.DtResultados.Rows(0)("CondicionesTransporte").ToString
TxtRegistroSanitarioAutorizacion.Text = ObjPS.DtResultados.Rows(0)("RegistroSanitarioAutorizacion").ToString
TxtPermisoImportacion.Text = ObjPS.DtResultados.Rows(0)("PermisoImportacion").ToString
TxtFolioImportacionVUCEM.Text = ObjPS.DtResultados.Rows(0)("FolioImportacionVUCEM").ToString
TxtNumCAS.Text = ObjPS.DtResultados.Rows(0)("NumCAS").ToString
TxtRazonSocialEmpImportacion.Text = ObjPS.DtResultados.Rows(0)("RazonSocialEmpImportacion").ToString
TxtNumRegistroPlagCOFEPRIS.Text = ObjPS.DtResultados.Rows(0)("NumRegistroPlagCOFEPRIS").ToString
TxtDatosFabricante.Text = ObjPS.DtResultados.Rows(0)("DatosFabricante").ToString
TxtDatosFormulador.Text = ObjPS.DtResultados.Rows(0)("DatosFormulador").ToString
TxtDatosMaquilador.Text = ObjPS.DtResultados.Rows(0)("DatosMaquilador").ToString
TxtUsoAutorizado.Text = ObjPS.DtResultados.Rows(0)("UsoAutorizado").ToString
End If
UpCartaPorte.Update()
End Sub
Private Function GuardaDatosCartPorte(ByRef transaccionSQL As SqlTransaction) As Boolean
Dim Respuesta As Boolean = True
If DdlMaterialPeligroso.SelectedValue.ToEntero > 0 Or DdlEmbalaje.SelectedValue.ToEntero > 0 Or DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero > 0 Or DdlClaveFormaFarmaceutica.SelectedValue.ToEntero > 0 Then
Dim ObjPS As New ClsProductosServicios(transaccionSQL)
If Not ObjPS.AddUpdateProductosServiciosComplementos(CvePS, TxtPesoKg.Text.ToDecimal, DdlMaterialPeligroso.SelectedValue.ToEntero, DdlEmbalaje.SelectedValue.ToEntero, TxtDimensiones.Text, DdlClaveSectorCOFEPRIS.SelectedValue.ToEntero,
TxtNombreIngredienteActivo.Text.Trim, TxtNomQuimico.Text.Trim, TxtDenominacionGenerica.Text.Trim, TxtDenominacionDistintiva.Text.Trim, TxtFabricante.Text.Trim, DdlClaveFormaFarmaceutica.SelectedValue.ToEntero, TxtCondicionesTransporte.Text.Trim,
TxtRegistroSanitarioAutorizacion.Text.Trim, TxtPermisoImportacion.Text.Trim, TxtFolioImportacionVUCEM.Text.Trim, TxtNumCAS.Text.Trim, TxtRazonSocialEmpImportacion.Text, TxtNumRegistroPlagCOFEPRIS.Text.Trim, TxtDatosFabricante.Text.Trim,
TxtDatosFormulador.Text.Trim, TxtDatosMaquilador.Text.Trim, TxtUsoAutorizado.Text) Then
Respuesta = False
End If
End If
Return Respuesta
End Function
End Class

View File

@@ -593,9 +593,6 @@
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px" step="1"></asp:TextBox>
</td>
</tr>
</table>
</div>
</div>
@@ -3489,12 +3486,10 @@
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabAuxiliarConta" runat="server" HeaderText="Contabilidad" Visible="false">
<HeaderTemplate>
<asp:LinkButton ID="LnkTabContabilidad" CssClass="Texto" runat="server" OnClick="LnkTabContabilidad_Click">Contabilidad</asp:LinkButton>
</HeaderTemplate>
<ajax:TabPanel ID="TabAuxiliarConta" ClientIDMode="Static" Enabled="true" runat="server" HeaderText="Contabilidad" Visible="false">
<ContentTemplate>
<asp:Literal ID="LtlTipo1" runat="server"></asp:Literal>
<asp:Button ID="BtnCargaAuxiliarConta" runat="server" ClientIDMode="Static" Text="" Style="display: none;" OnClick="BtnCargaAuxiliarConta_Click" />
<table border="0" class="contenido Widthall">
<tr>
<td align="left">
@@ -8471,38 +8466,25 @@
<div class="row" runat="server" id="DVGvProductosProcedimiento" visible="false">
<div class="col-md-12">
Productos utilizados en el procedimiento
<asp:GridView ID="GvProductosProcedimiento" runat="server" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" AutoGenerateColumns="False" Width="100%"
DataKeyNames="CveProcedimientoProducto,CveProcedimiento,Cantidad,CvePS,CodigoPS,Autogenerado,Estatus,CveVenta,CveUnidadMedida,Abreviatura,CveClasificacion,Clasificacion" GridLines="None">
<asp:GridView ID="GvProductosProcedimiento" runat="server" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" AutoGenerateColumns="False" Width="100%" OnRowDataBound="GvProductosProcedimiento_RowDataBound"
DataKeyNames="CveProcedimientoProducto,CveProcedimiento,Cantidad,CvePS,CodigoPS,Autogenerado,Estatus,CveVenta,CveUnidadMedida,Abreviatura,CveClasificacion,Clasificacion,Precio" GridLines="None">
<Columns>
<asp:BoundField DataField="Cantidad" HeaderText="Cant." DataFormatString="{0:N3}" ItemStyle-Width="30px" >
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Cant." ItemStyle-Width="40px">
<ItemTemplate>
<asp:TextBox ID="TxtCantidad" runat="server" Text="0" Width="40px" style="text-align:right!important"></asp:TextBox>
<asp:TextBox ID="TxtCantidad" runat="server" Text="" Width="40px" style="text-align:right!important"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilTxtCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
</ItemTemplate>
</asp:TemplateField>
</asp:TemplateField>
<asp:BoundField DataField="Cantidad" HeaderText="Cant." DataFormatString="{0:#,###.##}" ItemStyle-Width="30px" >
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="CodigoPS" HeaderText="Producto">
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="Abreviatura" HeaderText="UM">
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<%--<asp:BoundField DataField="Precio" HeaderText="Precio">
<ItemStyle HorizontalAlign="Right" />
</asp:BoundField> --%>
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="P.U." ItemStyle-Width="50px">
<ItemTemplate>
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio") %>' Width="50px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FilTxtPrecio" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
</ItemTemplate>
</asp:TemplateField>
</asp:BoundField>
<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:#,##0.###}" HtmlEncode="False" />
</Columns>
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
</asp:GridView>
@@ -9710,6 +9692,13 @@
}else {
$("#TabAlmacen_tab .ajax__tab_inner").unbind();
}
if (HdnCargarInventario.value == 'True') {
$("#TabAuxiliarConta_tab .ajax__tab_inner").click(function () {
CargaMovimientosAuxiliarConta();
});
} else {
$("#TabAuxiliarConta_tab .ajax__tab_inner").unbind();
}
}
@@ -10039,6 +10028,9 @@
function CargaMovimientosInventario() {
$('#BtnCargarInventario').click();
}
function CargaMovimientosAuxiliarConta() {
$('#BtnCargaAuxiliarConta').click();
}
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });

View File

@@ -3145,8 +3145,6 @@ Partial Class Ventas
End If
CargaFletes()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto, AplicaTodos:="")
DdlSubProyecto.SelectedValueExist(DdlSubProyectoDatos.SelectedValue)
BrSubProyecto.Visible = DdlProyecto.Visible
@@ -3343,7 +3341,7 @@ Partial Class Ventas
End If
TxtFecha.Enabled = True
BloqueaCondiconesPago()
BloqueaCondicionesPago()
BloqueaClasificaciones()
@@ -3450,7 +3448,7 @@ Partial Class Ventas
End If
End Sub
Private Sub BloqueaCondiconesPago()
Private Sub BloqueaCondicionesPago()
If UsuarioActual.TienePermisoProceso(289) Then
DdlFormaEntrega.Enabled = False
DdlUsoCFDI.Enabled = False
@@ -4806,7 +4804,7 @@ Partial Class Ventas
HLPagar.NavigateUrl = $"/Bancos/PopIEVentas.aspx?CveVenta={CveVenta}&TB_iframe=true&height=500&width=675"
HlCuentaTerminal.Visible = True
End If
'CargarSaldoAuxiliar(CveCliente)
TabAuxiliarConta.Visible = UsuarioActual.TienePermisoProceso(306)
Dim TienePermiso As String = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, -1).FiltroPrimeroValor("CveSubProyecto", String.Format("CveSubProyecto = {0}", DbRowVenta("CveSubProyecto")))
If TienePermiso <> "" Then ' si tiene acceso en el subproyecto
@@ -6856,7 +6854,7 @@ Partial Class Ventas
UPObservaciones.Update()
End If
BloqueaCondiconesPago()
BloqueaCondicionesPago()
DeshabilitarAplicarNotaDeCredito(LblRFC.Text)
Dim CveVentaRef As Integer = -1
@@ -8075,6 +8073,7 @@ Partial Class Ventas
e.Row.FCTextBox("TxtPrecio").Enabled = False
End If
'PERMISO EDITAR REM
If e.Row.DBCampo("TipoDocto") = "Rem" And ModalidadEdicion Then
'LO PERMITIDO MODIFICAR
@@ -25151,31 +25150,31 @@ Partial Class Ventas
End Sub
#End Region
#Region " FLETES "
'#Region " FLETES "
Private Sub CargaFletes()
'Private Sub CargaFletes()
If UsuarioActual.CveEmpresa <> 125 Or CveVenta > 0 Then
Exit Sub
End If
' If UsuarioActual.CveEmpresa <> 125 Or CveVenta > 0 Then
' Exit Sub
' End If
HLModalFletes.Visible = True
' HLModalFletes.Visible = True
Dim ObjVentas As New ClsVentas
' Dim ObjVentas As New ClsVentas
If ObjVentas.GetFletes(UsuarioActual.CveEmpresa) Then
GVFletes.DataSource = ObjVentas.DtResultados
GVFletes.DataBind()
End If
' If ObjVentas.GetFletes(UsuarioActual.CveEmpresa) Then
' GVFletes.DataSource = ObjVentas.DtResultados
' GVFletes.DataBind()
' End If
UpFletes.Update()
' UpFletes.Update()
ObjVentas.Dispose()
End Sub
' ObjVentas.Dispose()
'End Sub
#End Region
'#End Region
#Region "A G R E G A R P S M O D A L"
Private Sub CargaMetodosPSModal()
@@ -29271,7 +29270,7 @@ Partial Class Ventas
UPCondicionesPago.Update()
UpDetalle.Update()
BloqueaCondiconesPago()
BloqueaCondicionesPago()
End Sub
Private Sub InicializaDTAnticiposAmortizacion()
Me.DtAnticipoAmortizacion = New DataTable
@@ -29629,7 +29628,7 @@ Partial Class Ventas
End If
Next
BloqueaCondiconesPago()
BloqueaCondicionesPago()
UpAnticipos.Update()
UpParametros.Update()
@@ -30203,7 +30202,7 @@ Partial Class Ventas
DdlIVA.Visible = True
End If
BloqueaCondiconesPago()
BloqueaCondicionesPago()
CargaVendedores()
@@ -31964,8 +31963,7 @@ Partial Class Ventas
CargaGVInv(TmpDT.FiltraParametros("CveTipoPS = 2"))
End If
BloqueaCondiconesPago()
BloqueaCondicionesPago()
DivDdlFacturaRela.Visible = True
BtnAgregarFacturasRelaciondas.Visible = True
@@ -31987,7 +31985,6 @@ Partial Class Ventas
HabilitarControlesCartaPorte(True)
End If
Dim FolioNuevo As String = TxtFolio.Text
If FolioNuevo <> FolioOriginal Then
If Adjunto <> "" Then
@@ -36068,21 +36065,23 @@ Partial Class Ventas
DdlMedico.SelectedValueExist(DdlMedicoModal.SelectedValue)
DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue)
'si es A - Vista o ,Fuera De Linea requiere tecnico
If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 2) Then
'si es pago directo es factura
If RBLTipoVenta.SelectedValue.Contiene("2") Then
DdlTipoComprobante.SelectedValueExist("Ing")
TdRequiereTecnico1.Visible = True
TdRequiereTecnico2.Visible = True
Else
TdFechaOS1.Visible = True
TdFechaOS2.Visible = True
ChkRequiereTecnico.Checked = True
ChkRequiereTecnico.Enabled = False
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
DdlTipoComprobante.SelectedValueExist("Ped")
Else
DdlTipoComprobante.SelectedValueExist("Ing")
End If
DdlTipoComprobante.Enabled = False
TdRequiereTecnico1.Visible = True
TdRequiereTecnico2.Visible = True
CargaCliente(CveCliente)
@@ -36101,7 +36100,7 @@ Partial Class Ventas
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
Dim PU As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal
Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
@@ -36128,6 +36127,14 @@ Partial Class Ventas
End Sub
Protected Sub GvProductosProcedimiento_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DataKey("Precio").ToDecimal = 0 Then
e.Row.FCTextBox("TxtCantidad").Enabled = False
End If
End If
End Sub
Protected Sub ChkRequiereTecnicoModal_CheckedChanged(sender As Object, e As EventArgs)
DvModalRequiereOSFecha.Visible = ChkRequiereTecnicoModal.Checked
@@ -36254,10 +36261,8 @@ Partial Class Ventas
RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC")
End Sub
Protected Sub LnkTabContabilidad_Click(sender As Object, e As EventArgs)
Tab.ActiveTabIndex = 6
Protected Sub BtnCargaAuxiliarConta_Click(sender As Object, e As EventArgs)
CargarSaldoAuxiliar(CveCliente)
End Sub
End Class