This commit is contained in:
Oscar Irigoyen
2023-02-22 10:50:41 -07:00
24 changed files with 528 additions and 273 deletions

View File

@@ -2492,7 +2492,8 @@ Partial Class AF_AF
TxtObservaciones.Text.Trim, Ddlclientes.SelectedValue.ToEntero, CveMovimientoSalidaInv, UsuarioActual.CveUsuario, CveEmpresaActual, CveMarca:=DdlMarcas.SelectedValue.ToEntero, TxtObservaciones.Text.Trim, Ddlclientes.SelectedValue.ToEntero, CveMovimientoSalidaInv, UsuarioActual.CveUsuario, CveEmpresaActual, CveMarca:=DdlMarcas.SelectedValue.ToEntero,
CveModelo:=DdlModelos.SelectedValue.ToEntero, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, CveAFPadre:=DdlAFPadres.SelectedValue.ToEntero, CveDispositivo:=DdlDispositivo.SelectedValue.ToEntero, CveModelo:=DdlModelos.SelectedValue.ToEntero, CveGrupo:=DdlGrupo.SelectedValue.ToEntero, CveAFPadre:=DdlAFPadres.SelectedValue.ToEntero, CveDispositivo:=DdlDispositivo.SelectedValue.ToEntero,
FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text, AgroCuenta:=TxtAgroCuenta.Text) > 0 Then FechaBaja:=FechaBaja, Lat:=TxtLatitud.Text, Longi:=TxtLongitud.Text, AgroCuenta:=TxtAgroCuenta.Text) > 0 Then
ViewState("CveActivoFijo") = ObjAF.CveActivoFijo ViewState("CveActivoFijo") = ObjAF.CveActivoFijo
GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing
Else Else
ErrorGuardar = True ErrorGuardar = True
End If End If
@@ -2506,7 +2507,6 @@ Partial Class AF_AF
End If End If
Next Next
If Not ErrorGuardar Then If Not ErrorGuardar Then
For Each GvRowPlagaEnfermedad As GridViewRow In GvPlagaEnfermedad.Rows For Each GvRowPlagaEnfermedad As GridViewRow In GvPlagaEnfermedad.Rows
If Not ObjAF.AddPlagaEnfermedad(ObjAF.CveActivoFijo, GvRowPlagaEnfermedad.DataKey("Observaciones"), GvRowPlagaEnfermedad.DataKey("Fecha").ToDate, UsuarioActual.CveUsuario) Then If Not ObjAF.AddPlagaEnfermedad(ObjAF.CveActivoFijo, GvRowPlagaEnfermedad.DataKey("Observaciones"), GvRowPlagaEnfermedad.DataKey("Fecha").ToDate, UsuarioActual.CveUsuario) Then
@@ -2516,11 +2516,8 @@ Partial Class AF_AF
Next Next
End If End If
If Not ErrorGuardar Then If Not ErrorGuardar Then
For Each GvRowMantenimiento As GridViewRow In GvMantenimientos.Rows For Each GvRowMantenimiento As GridViewRow In GvMantenimientos.Rows
Dim CveMantenimientoTemp As Integer = ObjAF.AddMantenimientos(ObjAF.CveActivoFijo, GvRowMantenimiento.DataKey("Mantenimiento"), GvRowMantenimiento.DataKey("Observaciones"), GvRowMantenimiento.DataKey("Fecha").ToDate, UsuarioActual.CveUsuario, "") Dim CveMantenimientoTemp As Integer = ObjAF.AddMantenimientos(ObjAF.CveActivoFijo, GvRowMantenimiento.DataKey("Mantenimiento"), GvRowMantenimiento.DataKey("Observaciones"), GvRowMantenimiento.DataKey("Fecha").ToDate, UsuarioActual.CveUsuario, "")
@@ -2556,7 +2553,6 @@ Partial Class AF_AF
End If End If
Else Else
ErrorGuardar = True ErrorGuardar = True
Exit For Exit For
@@ -2564,8 +2560,6 @@ Partial Class AF_AF
Next Next
End If End If
End If End If
@@ -2603,7 +2597,9 @@ Partial Class AF_AF
'UPHistModificaciones.Update() 'UPHistModificaciones.Update()
'UpDatos.Update() 'UpDatos.Update()
' GuardaValores() ' GuardaValores()
ErrorGuardar = True ErrorGuardar = True
Else
GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing
End If End If
End If End If

View File

@@ -24,7 +24,6 @@ Partial Class AF_RepDepreciacion
Protected Sub BtnGenerarDepreciacion_Click(sender As Object, e As System.EventArgs) Handles BtnGenerarDepreciacion.Click Protected Sub BtnGenerarDepreciacion_Click(sender As Object, e As System.EventArgs) Handles BtnGenerarDepreciacion.Click
If GvDatos.Rows.Count > 0 Then If GvDatos.Rows.Count > 0 Then
Dim CveActivoFijo As Integer Dim CveActivoFijo As Integer
Dim ObjInventario As New ClsInventarios Dim ObjInventario As New ClsInventarios
@@ -41,11 +40,12 @@ Partial Class AF_RepDepreciacion
Dim ConceptoPolizaDetalle As String = String.Format("Depreciación - {0} - {1}", txtFechaI.Text, RowsDt.FCLiteral("LtlDescripcion").Text) Dim ConceptoPolizaDetalle As String = String.Format("Depreciación - {0} - {1}", txtFechaI.Text, RowsDt.FCLiteral("LtlDescripcion").Text)
If CvePrePoliza > 0 Then If CvePrePoliza > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, -MontoDepreciacion, -MontoDepreciacion, 270, ConceptoPolizaDetalle, ConceptoPolizaDetalle, 0, CveActivoFijo:=CveActivoFijo, CveSubProyecto:=CveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, MontoDepreciacion, MontoDepreciacion, 101, ConceptoPolizaDetalle, ConceptoPolizaDetalle, 0, CveActivoFijo:=CveActivoFijo, CveSubProyecto:=CveSubProyecto) Then
ErrorMovInv = True ErrorMovInv = True
Exit For Exit For
End If End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, MontoDepreciacion, MontoDepreciacion, 101, ConceptoPolizaDetalle, ConceptoPolizaDetalle, 0, CveActivoFijo:=CveActivoFijo, CveSubProyecto:=CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, MontoDepreciacion, MontoDepreciacion, 270, ConceptoPolizaDetalle, ConceptoPolizaDetalle, 0, CveActivoFijo:=CveActivoFijo, CveSubProyecto:=CveSubProyecto) Then
ErrorMovInv = True ErrorMovInv = True
Exit For Exit For
End If End If
@@ -54,7 +54,6 @@ Partial Class AF_RepDepreciacion
Exit For Exit For
End If End If
End If End If
Next Next
If ErrorMovInv = False Then If ErrorMovInv = False Then

View File

@@ -597,26 +597,48 @@ Public Class ClsPaginas
Application(AppNombre) = value Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTCuentasDepositosClientes(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional Estatus As Boolean = True) As DataTable Property GlobalDTCuentasDepositosClientes(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}" Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim P As New ClsGenerales Dim P As New ClsGenerales
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then Application(AppNombre) = P.DtResultados If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
P.Dispose() P.Dispose()
End If End If
Dim Str As New StringBuilder Dim filtros As New List(Of String)
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) If CveCliente <> -1 Then filtros.Add($"CveCliente = {CveCliente}")
If CveCliente <> -1 Then Str.AppendFormat(" AND CveCliente = {0}", CveCliente) If CveCuentaDeposito <> -1 Then filtros.Add($"CveCuentaDeposito = {CveCuentaDeposito}")
If Estatus = True Then Str.AppendFormat(" AND Estatus = 1 ")
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTCuentasDepositosClientes = Dv.ToTable GlobalDTCuentasDepositosClientes = Dv.ToTable
Dv.Dispose() Dv.Dispose()
End Get End Get
Set(value As DataTable) Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}" Dim AppNombre As String = $"GlobalDTCuentasDepositosClientes-{CveEmpresa}"
Application(AppNombre) = value HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Property GlobalDTCuentasDepositosPersonales(CveEmpresa As Integer, Optional CvePersonal As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTCuentasDepositosPersonales-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim P As New ClsGenerales
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CvePersonal:=-2) Then HttpContext.Current.Application(AppNombre) = P.DtResultados
P.Dispose()
End If
Dim filtros As New List(Of String)
If CvePersonal <> -1 Then filtros.Add($"CvePersonal = {CvePersonal}")
If CveCuentaDeposito <> -1 Then filtros.Add($"CveCuentaDeposito = {CveCuentaDeposito}")
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTCuentasDepositosPersonales = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTCuentasDepositosPersonales-{CveEmpresa}"
HttpContext.Current.Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
@@ -5730,7 +5752,7 @@ Public Class ClsPaginas
Dim VendedorMail As String = "" Dim VendedorMail As String = ""
Dim VendedorTelefono As String = "" Dim VendedorTelefono As String = ""
Dim VendedorCelular As String = "" Dim VendedorCelular As String = ""
Dim RowVendedor As DataRow = GlobalDTVendedores(-1).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString)) Dim RowVendedor As DataRow = GlobalDTVendedores(Vta.CveEmpresa, VendedorTipo:=-1).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
If Not IsNothing(RowVendedor) Then If Not IsNothing(RowVendedor) Then
VendedorNombre = RowVendedor("Vendedor").ToString VendedorNombre = RowVendedor("Vendedor").ToString
VendedorMail = RowVendedor("Correo").ToString VendedorMail = RowVendedor("Correo").ToString
@@ -7571,7 +7593,7 @@ Public Class ClsPaginas
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
Dim ContabilizableISR As Boolean = False Dim ContabilizableISR As Boolean = False
If UsuarioActual.CveEmpresa.Contiene(140, 7, 11, 12, 122, 145, 172, 173) Then If UsuarioActual.CveEmpresa.Contiene(140, 7, 11, 12, 122, 145, 172, 173, 174) Then
ContabilizableISR = True ContabilizableISR = True
End If End If
Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR Dim Ret As ConceptosRetenciones = CompraActual.ConceptoPrePolizaRetISR

View File

@@ -330,7 +330,8 @@ Public Class ClsRH
End Function End Function
Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer, Public Function AddAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean,
chkAplicaUtilidades As Boolean, aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_RH_AsistenciasInasistenciasAdd") DataAdapter("PA_RH_AsistenciasInasistenciasAdd")
@@ -347,6 +348,9 @@ Public Class ClsRH
.Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo .Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo
.Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo .Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo
.Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades .Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades
.Add("@AplicaPago", SqlDbType.Int).Value = aplicaPago
.Add("@AplicaPagoDoble", SqlDbType.Int).Value = aplicaPagoDoble
.Add("@AplicaPrimaVac", SqlDbType.Int).Value = aplicaPrimaVac
End With End With
@@ -367,7 +371,8 @@ Public Class ClsRH
End Function End Function
Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer, Public Function UpdateAsistenciasInasistencias(Tipo As String, AplicaFalta As Boolean, AplicaAsistencia As Boolean, Estatus As Boolean, CveAI As Integer,
chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean) As Boolean chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo As Boolean, chkAplicaAguinaldo As Boolean, chkAplicaUtilidades As Boolean,
aplicaPago As Integer, aplicaPagoDoble As Integer, aplicaPrimaVac As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_RH_AsistenciasInasistenciasUpdate") DataAdapter("PA_RH_AsistenciasInasistenciasUpdate")
@@ -384,6 +389,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo .Add("@AplicaRetardo", SqlDbType.Bit).Value = chkAplicaRetardo
.Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo .Add("@AplicaAguinaldo", SqlDbType.Bit).Value = chkAplicaAguinaldo
.Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades .Add("@AplicaUtilidades", SqlDbType.Bit).Value = chkAplicaUtilidades
.Add("@AplicaPago", SqlDbType.Int).Value = aplicaPago
.Add("@AplicaPagoDoble", SqlDbType.Int).Value = aplicaPagoDoble
.Add("@AplicaPrimaVac", SqlDbType.Int).Value = aplicaPrimaVac
End With End With
Try Try

View File

@@ -144,7 +144,8 @@ Public Class LogicNominas
Dim SalarioDiarioSS As Double = 0 Dim SalarioDiarioSS As Double = 0
Dim ClaveEstado As String = "" Dim ClaveEstado As String = ""
Dim MetodoPagoFijo As Boolean Dim MetodoPagoFijo As Boolean
Dim totalDb As Decimal
Dim subTotalDb As Decimal
Dim CodigoPostal As String = "" Dim CodigoPostal As String = ""
Dim ObjIncapacidades As New List(Of CFDINominaIncapacidades) Dim ObjIncapacidades As New List(Of CFDINominaIncapacidades)
@@ -157,6 +158,8 @@ Public Class LogicNominas
Dim drow As DataRow = objNomina.DtResultados.Rows(0) Dim drow As DataRow = objNomina.DtResultados.Rows(0)
CvePersonal = drow("CvePersonal").ToString().ToEntero() CvePersonal = drow("CvePersonal").ToString().ToEntero()
CvePeriodo = drow("CvePeriodo").ToString().ToEntero() CvePeriodo = drow("CvePeriodo").ToString().ToEntero()
totalDb = drow("Total").ToString().ToDecimal()
subTotalDb = drow("SubTotal").ToString().ToDecimal()
cfdi.Nomina.Antiguedad = drow("Antiguedad").ToString().ToEntero() cfdi.Nomina.Antiguedad = drow("Antiguedad").ToString().ToEntero()
cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal() cfdi.Nomina.UltimoSueldoOrdinario = drow("UltimoSueldoOrdinario").ToString().ToDecimal()
Serie = objNomina.Serie Serie = objNomina.Serie
@@ -438,9 +441,9 @@ Public Class LogicNominas
cfdi.Comprobante.Serie = Serie cfdi.Comprobante.Serie = Serie
cfdi.Comprobante.Folio = Folio cfdi.Comprobante.Folio = Folio
cfdi.Comprobante.Fecha = Now cfdi.Comprobante.Fecha = Now
cfdi.Comprobante.SubTotal = cfdi.Nomina.TotalPercepciones.ToString().ToDecimal() + cfdi.Nomina.TotalOtrosPagos.ToString().ToDecimal() cfdi.Comprobante.SubTotal = subTotalDb 'cfdi.Nomina.TotalPercepciones.ToString().ToDecimal() + cfdi.Nomina.TotalOtrosPagos.ToString().ToDecimal()
cfdi.Comprobante.Descuentos = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal() cfdi.Comprobante.Descuentos = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal()
cfdi.Comprobante.Total = cfdi.Comprobante.SubTotal - cfdi.Comprobante.Descuentos 'cfdi.Nomina.TotalPercepciones + cfdi.Nomina.TotalOtrosPagos - cfdi.Nomina.TotalDeducciones cfdi.Comprobante.Total = totalDb 'cfdi.Comprobante.SubTotal - cfdi.Comprobante.Descuentos 'cfdi.Nomina.TotalPercepciones + cfdi.Nomina.TotalOtrosPagos - cfdi.Nomina.TotalDeducciones
cfdi.Comprobante.MotivoDescuento = "" '"Deducciones nómina" cfdi.Comprobante.MotivoDescuento = "" '"Deducciones nómina"
cfdi.Comprobante.Moneda = "MXN" cfdi.Comprobante.Moneda = "MXN"
cfdi.Comprobante.TipoComprobante = "N" cfdi.Comprobante.TipoComprobante = "N"

View File

@@ -5201,6 +5201,8 @@ Partial Class Bancos_IE
dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor) dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
ElseIf CveCliente > 0 Then ElseIf CveCliente > 0 Then
dtc = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente) dtc = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
ElseIf cvepersonal > 0 Then
dtc = GlobalDTCuentasDepositosPersonales(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal)
End If End If
@@ -5221,20 +5223,16 @@ Partial Class Bancos_IE
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
If dtc.Rows.Count > 0 Then If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ") DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
trCuentaDeposito.Visible = True trCuentaDeposito.Visible = True
BtnGuardar.ToolTip = "" BtnGuardar.ToolTip = ""
Else Else
BtnGuardar.Enabled = False BtnGuardar.Enabled = False
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia) Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito" BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
End If End If
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
UpGuardar.Update() UpGuardar.Update()
Else Else

View File

@@ -1400,7 +1400,7 @@ Partial Class Bancos_ProveedoresAbonar
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor) Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero)
If dtc IsNot Nothing AndAlso dtc.Rows.Count = 1 Then If dtc IsNot Nothing AndAlso dtc.Rows.Count = 1 Then
If dtc.Rows.Count > 0 Then If dtc.Rows.Count > 0 Then

View File

@@ -8648,7 +8648,6 @@ Partial Class Compras_Compras
End If End If
Dim CveCompraNC, IdCtaContable, IdCtaContableComp As Integer Dim CveCompraNC, IdCtaContable, IdCtaContableComp As Integer
Dim PorcentajePago As Decimal
Dim ConceptoPoliza As String = $"Amortización {NombreProveedor} - {TxtSerie.Text}-{TxtFolio.Text}" Dim ConceptoPoliza As String = $"Amortización {NombreProveedor} - {TxtSerie.Text}-{TxtFolio.Text}"
Try Try

View File

@@ -24,14 +24,13 @@
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView runat="server" ID="GvDatos" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Motivo de Baja" CssClass="table table-striped table-advance table-hover ScrollAD" <asp:GridView runat="server" ID="GvDatos" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Motivo de Baja" CssClass="table table-striped table-advance table-hover ScrollAD"
DataKeyNames="CveEjercicio,Ejercicio,PeriodoActualNumero,CuentaNombre,CveCuentaCierre,PolizoFolio,PrePolizaCierreFolio,Estatus" AutoGenerateColumns="False" DataKeyNames="CveEjercicio,Ejercicio,PeriodoActualNumero,CuentaNombre,CveCuentaCierre,PolizaFolio,PrePolizaCierreFolio,Estatus" AutoGenerateColumns="False"
Style="text-align: center; width: 100%" GridLines="None"> Style="text-align: center; width: 100%" GridLines="None">
<Columns> <Columns>
<asp:BoundField DataField="Ejercicio" HeaderText="Ejercicio" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Ejercicio" HeaderText="Ejercicio" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="PeriodoActual" HeaderText="Periodo Actual" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="PeriodoActual" HeaderText="Periodo Actual" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="CuentaNombre" HeaderText="Cuenta Nombre" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="CuentaNombre" HeaderText="Cuenta Nombre" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="PolizoFolio" HeaderText="Póliza Folio" ItemStyle-HorizontalAlign="Left" /> <asp:HyperLinkField DataTextField ="PrePolizaCierreFolio" target="_blank" DataNavigateUrlFields ="CvePrePolizaCierre" DataNavigateUrlFormatString="/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}" HeaderText="Póliza Cierre" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="PrePolizaCierreFolio" HeaderText="PrePóliza Cierre Folio" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField ItemStyle-Width="80px"> <asp:TemplateField ItemStyle-Width="80px">
<ItemTemplate> <ItemTemplate>

View File

@@ -1814,6 +1814,9 @@ Partial Class General_SaldosIniciales
If Not dt.Columns.Contains("CveCuentaContableDepreciacion") Then If Not dt.Columns.Contains("CveCuentaContableDepreciacion") Then
dt.Columns.Add("CveCuentaContableDepreciacion", GetType(Integer)) dt.Columns.Add("CveCuentaContableDepreciacion", GetType(Integer))
End If End If
If Not dt.Columns.Contains("CveCuentaContableDepreciacionAcum") Then
dt.Columns.Add("CveCuentaContableDepreciacionAcum", GetType(Integer))
End If
Dim sbErrores As New StringBuilder Dim sbErrores As New StringBuilder
For Each Row As DataRow In dt.Rows For Each Row As DataRow In dt.Rows
@@ -1821,11 +1824,9 @@ Partial Class General_SaldosIniciales
Dim Codigo As String = Row("Código").ToString() Dim Codigo As String = Row("Código").ToString()
Dim Descripcion As String = Row("Descripción").ToString() Dim Descripcion As String = Row("Descripción").ToString()
Dim CuentaContable As String = Row("Cuenta Contable").ToString().Trim.Replace("-", "").Replace(" ", "") Dim CuentaContable As String = Row("CuentaContable").ToString().Trim.Replace("-", "").Replace(" ", "")
If CuentaContable.Length > 0 Then If CuentaContable.Length > 0 Then
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero() Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
If CveCuentaContable > 0 Then If CveCuentaContable > 0 Then
Row("CveCuentaContable") = CveCuentaContable Row("CveCuentaContable") = CveCuentaContable
Else Else
@@ -1833,11 +1834,9 @@ Partial Class General_SaldosIniciales
ErrorAF = True ErrorAF = True
End If End If
End If End If
CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "") CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "")
If CuentaContable.Length > 0 Then If CuentaContable.Length > 0 Then
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero() Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
If CveCuentaContable > 0 Then If CveCuentaContable > 0 Then
Row("CveCuentaContableDepreciacion") = CveCuentaContable Row("CveCuentaContableDepreciacion") = CveCuentaContable
Else Else
@@ -1845,7 +1844,16 @@ Partial Class General_SaldosIniciales
ErrorAF = True ErrorAF = True
End If End If
End If End If
CuentaContable = Row("Cuenta Depreciación Acumulada").ToString().Trim.Replace("-", "").Replace(" ", "")
If CuentaContable.Length > 0 Then
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
If CveCuentaContable > 0 Then
Row("CveCuentaContableDepreciacionAcum") = CveCuentaContable
Else
sbErrores.AppendLine($"Activo Fijo {Codigo} {Descripcion} cuenta {CuentaContable} no encontrada.<br>")
ErrorAF = True
End If
End If
Next Next
If Not ErrorAF Then If Not ErrorAF Then
@@ -1860,8 +1868,6 @@ Partial Class General_SaldosIniciales
Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL) Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
Try Try
Dim Contador As Integer = 0 Dim Contador As Integer = 0
Dim NumRow As Integer = 0 Dim NumRow As Integer = 0
@@ -1870,8 +1876,8 @@ Partial Class General_SaldosIniciales
Dim Descripcion As String = Row("Descripción").ToString() Dim Descripcion As String = Row("Descripción").ToString()
Dim TipoAF As String = Row("Tipo").ToString().Trim Dim TipoAF As String = Row("Tipo").ToString().Trim
Dim SubTipo As String = Row("SubTipo").ToString().Trim Dim SubTipo As String = Row("SubTipo").ToString().Trim
Dim Valor As Decimal = Row("Valor").ToString().ToDecimal Dim Valor As Decimal = Row("Valor de compra").ToString().ToDecimal
Dim FechaAF As Date = Row("Fecha").ToString().ToDate Dim FechaAF As Date = Row("Fecha de compra").ToString().ToDate
Dim NumeroSerie As String = Row("No. Serie").ToString() Dim NumeroSerie As String = Row("No. Serie").ToString()
Dim Año As Integer = Row("Año").ToString().ToEntero() Dim Año As Integer = Row("Año").ToString().ToEntero()
Dim CuentaContable As String = Row("Cuenta Contable").ToString() Dim CuentaContable As String = Row("Cuenta Contable").ToString()
@@ -1891,6 +1897,7 @@ Partial Class General_SaldosIniciales
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"Nombre = '{Cliente}'").ToString().ToEntero() Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"Nombre = '{Cliente}'").ToString().ToEntero()
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString().ToEntero() Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString().ToEntero()
Dim CveCuentaContableDepreciacion As Integer = Row("CveCuentaContableDepreciacion").ToString().ToEntero() Dim CveCuentaContableDepreciacion As Integer = Row("CveCuentaContableDepreciacion").ToString().ToEntero()
Dim CveCuentaContableDepreciacionAcum As Integer = Row("CveCuentaContableDepreciacionAcum").ToString().ToEntero()
'VALIDACIONES 'VALIDACIONES
If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
@@ -1921,6 +1928,13 @@ Partial Class General_SaldosIniciales
ErrorAF = True ErrorAF = True
End If End If
End If End If
If CveCuentaContableDepreciacion > 0 Then
If Not ObjConta.AddCuentasAsignaciones(270, UsuarioActual.CveEmpresa, CveCuentaContableDepreciacionAcum, -1,
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
ErrorAF = True
End If
End If
Else Else
ErrorAF = True ErrorAF = True
Exit For Exit For
@@ -1935,6 +1949,7 @@ Partial Class General_SaldosIniciales
ObjAF.Commit() ObjAF.Commit()
TxtExcel.Text = "" TxtExcel.Text = ""
UpDatos.Update() UpDatos.Update()
GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing
Else Else
Alert(String.Format("Se agregaron: <b>{0}</b> Activos Fijos correctamente.", NumRows), TipoMensaje.MsgInformacion) Alert(String.Format("Se agregaron: <b>{0}</b> Activos Fijos correctamente.", NumRows), TipoMensaje.MsgInformacion)
ObjAF.Commit() ObjAF.Commit()

View File

@@ -75,12 +75,12 @@ public partial class Nomina_Finiquito : ClsPaginas
} }
set { ViewState["dtempleados"] = value; } set { ViewState["dtempleados"] = value; }
} }
#endregion #endregion
protected void Page_Load(object sender, EventArgs e) protected void Page_Load(object sender, EventArgs e)
{ {
if (!Page.IsPostBack) if (!Page.IsPostBack)
{ {
GvFinOrdinario.DataSource = new DataTable(); GvFinOrdinario.DataSource = new DataTable();
GVFinIndemnizacion.DataSource = new DataTable(); GVFinIndemnizacion.DataSource = new DataTable();
GvFinOrdinario.DataBind(); GvFinOrdinario.DataBind();
@@ -154,22 +154,20 @@ public partial class Nomina_Finiquito : ClsPaginas
FechaInicio = LblFechaAlta.Text.ToDateTime(); FechaInicio = LblFechaAlta.Text.ToDateTime();
TxtObservaciones.Text = da["Observaciones"].ToString(); TxtObservaciones.Text = da["Observaciones"].ToString();
TxtFechaBaja.Text = string.Format("{0:dd/MM/yyyy}", da["FechaFin"]); TxtFechaBaja.Text = string.Format("{0:dd/MM/yyyy}", da["FechaFin"]);
if (da["CveMotivoBaja"].ToString() == "")
{ {
if (da["CveMotivoBaja"].ToString() == "") chkIndemnizacion.Checked = true;
{ chkSeparacionUnica.Checked = true;
chkIndemnizacion.Checked = true; chkPrimaantiguedad.Checked = true;
chkSeparacionUnica.Checked = true;
chkPrimaantiguedad.Checked = true;
}
else
{
chkIndemnizacion.Checked = da["ValIndemnizacion"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
chkSeparacionUnica.Checked = da["ValSeparacionunica"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
chkPrimaantiguedad.Checked = da["ValPrimadeantiguedad"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
}
} }
else
DdlTipoPeriodo.SelectedValueExist(((da["CveTipoPeriodo"]).ToString()=="6"?"-2":"-1")); {
chkIndemnizacion.Checked = da["ValIndemnizacion"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
chkSeparacionUnica.Checked = da["ValSeparacionunica"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
chkPrimaantiguedad.Checked = da["ValPrimadeantiguedad"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
}
DdlTipoPeriodo.SelectedValueExist(((da["CveTipoPeriodo"]).ToString() == "6" ? "-2" : "-1"));
DdlMotivoBaja.SelectedValueExist(da["CveMotivoBaja"]); DdlMotivoBaja.SelectedValueExist(da["CveMotivoBaja"]);
TxtSalarioMinimo.Text = $"{da["SalarioMinimo"]:N2}"; TxtSalarioMinimo.Text = $"{da["SalarioMinimo"]:N2}";
ChkesLiquidacion.Checked = (da["esLiquidacion"].ToString() == "1" || da["esLiquidacion"].ToString().ToUpper() == "TRUE"); ChkesLiquidacion.Checked = (da["esLiquidacion"].ToString() == "1" || da["esLiquidacion"].ToString().ToUpper() == "TRUE");
@@ -183,6 +181,30 @@ public partial class Nomina_Finiquito : ClsPaginas
{ {
loadsobrerecibo(onom); loadsobrerecibo(onom);
} }
if (da["Autorizado"].ToString().ToEntero() == 1)
{
LnkAutorizar.Visible = false;
LnkTimbrar.Visible = true;
LnkGuardarDatos.Enabled = false;
LnkGuardarDatos.CssClass = "btn btn-default";
LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado.";
}
if (da["SeTimbro"].ToString().ToEntero() == 1)
{
LnkAutorizar.Visible = false;
LnkTimbrar.Visible = false;
LnkGuardarDatos.Enabled = false;
LnkGuardarDatos.CssClass = "btn btn-default";
LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado.";
}
UpAcciones.Update();
} }
} }
CamposCalculados(); CamposCalculados();
@@ -537,13 +559,13 @@ public partial class Nomina_Finiquito : ClsPaginas
string[] getcolumnas = new string[] { "CvePersonal", "CveMetodoPago", "CveNomina", "Total", "SalarioDiario", "SalarioDiarioIMSS", "SalarioDiarioIntegrado", "DiasLaborados", "DiasFaltados", "DiasVacaciones", "DiasIncapacidad" }; string[] getcolumnas = new string[] { "CvePersonal", "CveMetodoPago", "CveNomina", "Total", "SalarioDiario", "SalarioDiarioIMSS", "SalarioDiarioIntegrado", "DiasLaborados", "DiasFaltados", "DiasVacaciones", "DiasIncapacidad" };
DataTable dtr = dtempleados.FiltraParametros(string.Format("(CvePersonal={0} OR {0}=-1) AND CvePersonal > 0 AND NomAutorizado =0", CvePersonal), "", getcolumnas); DataTable dtr = dtempleados.FiltraParametros(string.Format(" CvePersonal={0} ", CvePersonal), "", getcolumnas);
int CveNomina = dtr.Rows[0]["CveNomina"].ToString().ToEntero(); int CveNomina = dtr.Rows[0]["CveNomina"].ToString().ToEntero();
LogicNominas lognom = new LogicNominas(); LogicNominas lognom = new LogicNominas();
string Msg = ""; string Msg = "";
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual,versionTimbre:(UsuarioActual.CveEmpresa == 119? VersionTimbradoEnum.PorDefectoEmpresa: VersionTimbradoEnum.Version3_3)); Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
if (Msg != null && Msg.Length > 0) if (Msg != null && Msg.Length > 0)
{ Alert(Msg, TipoMensaje.MsgAdvertencia); } { Alert(Msg, TipoMensaje.MsgAdvertencia); }
@@ -738,7 +760,7 @@ public partial class Nomina_Finiquito : ClsPaginas
DiasFaltados = string.Format("{0}", drow["DiasFaltados"].ToString().ToEntero()); DiasFaltados = string.Format("{0}", drow["DiasFaltados"].ToString().ToEntero());
DiasVacaciones = string.Format("{0}", drow["DiasVacaciones"].ToString().ToEntero()); DiasVacaciones = string.Format("{0}", drow["DiasVacaciones"].ToString().ToEntero());
FechaInicio = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]); FechaInicio = string.Format("{0:dd/MM/yyyy}", drow["FechaInicio"]);
FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]); //FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero()); DiasRetardos = string.Format("{0}", drow["DiasRetardos"].ToString().ToEntero());
DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero()); DiasIncapacidad = string.Format("{0}", drow["DiasIncapacidad"].ToString().ToEntero());
} }
@@ -753,6 +775,7 @@ public partial class Nomina_Finiquito : ClsPaginas
NombreCompleto = drow["NombreCompleto"].ToString(); NombreCompleto = drow["NombreCompleto"].ToString();
RFC = drow["RFC"].ToString(); RFC = drow["RFC"].ToString();
CURP = drow["CURP"].ToString(); CURP = drow["CURP"].ToString();
FechaFin = string.Format("{0:dd/MM/yyyy}", drow["FechaFin"]);
TipoPeriodo = drow["TipoPeriodo"].ToString(); TipoPeriodo = drow["TipoPeriodo"].ToString();
NSS = drow["NSS"].ToString(); NSS = drow["NSS"].ToString();
} }
@@ -1087,7 +1110,7 @@ public partial class Nomina_Finiquito : ClsPaginas
using (ClsRH ObjPersonal = new ClsRH()) using (ClsRH ObjPersonal = new ClsRH())
using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL())) using (ClsNominas onom = new ClsNominas(ObjPersonal.IniciaTransacSQL()))
{ {
if (continuar = ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked,TxtObservaciones.Text ) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0) if (continuar = ObjPersonal.UpPersonalAltas(CvePersonal, UsuarioActual.CveUsuario, "", TxtFechaBaja.Text.ToDateTime().ToString("yyyy/MM/dd"), DdlTipoPeriodo.SelectedValue.ToEntero(), DdlMotivoBaja.SelectedValue.ToEntero(), ChkesLiquidacion.Checked, chkIndemnizacion.Checked, chkSeparacionUnica.Checked, chkPrimaantiguedad.Checked, TxtObservaciones.Text) && ObjPersonal.GetPersonalAltas(CvePersonal) && ObjPersonal.DtResultados.Rows.Count > 0)
{ {
DataRow da = ObjPersonal.DtResultados.Rows[0]; DataRow da = ObjPersonal.DtResultados.Rows[0];
CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero(); CvePeriodoIndemnizacion = da["CvePeriodoIndemnizacion"].ToString().ToEntero();
@@ -1136,7 +1159,8 @@ public partial class Nomina_Finiquito : ClsPaginas
}*/ }*/
dtempleadosConceptos = null; dtempleadosConceptos = null;
dtempleados = null; dtempleados = null;
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal) && objnom.DTSetResultados.Tables.Count > 1) LnkAutorizar.Visible = true;
if (objnom.GetNominaEmpleado(-1, -1, -1, CvePeriodoFiniquito, UsuarioActual.CveEmpresa, 1, 3, CvePersonal,Neto:1) && objnom.DTSetResultados.Tables.Count > 1)
{ {
dtempleados = objnom.DTSetResultados.Tables[3]; dtempleados = objnom.DTSetResultados.Tables[3];
LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "NomAutorizado =0") > 0); LnkAutorizar.Visible = (dtempleados.COUNT("CvePersonal", "NomAutorizado =0") > 0);
@@ -1164,7 +1188,6 @@ public partial class Nomina_Finiquito : ClsPaginas
LnkGuardarDatos.CssClass = "btn btn-default"; LnkGuardarDatos.CssClass = "btn btn-default";
LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado."; LnkGuardarDatos.ToolTip = "el finiquito ha sido capturado.";
} }
LnkAutorizar.Visible = true;
} }
protected void LnkAutorizar_Click(object sender, EventArgs e) protected void LnkAutorizar_Click(object sender, EventArgs e)
@@ -1350,7 +1373,7 @@ public partial class Nomina_Finiquito : ClsPaginas
if (continuar) if (continuar)
{ {
continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa, diasindemnizacion: Txtdiasindemnizacion.Text.ToEntero()); continuar = onom.GetFiniquitosPersonal(CvePersonal, UsuarioActual.CveEmpresa, diasindemnizacion: Txtdiasindemnizacion.Text.ToEntero());
if(onom.DtResultados.Rows.Count > 0) if (onom.DtResultados.Rows.Count > 0)
{ {
DataRow drow = onom.DtResultados.Rows[0]; DataRow drow = onom.DtResultados.Rows[0];
@@ -1358,7 +1381,7 @@ public partial class Nomina_Finiquito : ClsPaginas
LtlSFSDI.Text = string.Format("<pre>{0:##,###,###.00##}</pre>", drow["SDI"]); LtlSFSDI.Text = string.Format("<pre>{0:##,###,###.00##}</pre>", drow["SDI"]);
LtlSFDias.Text = string.Format("<pre>{0:##,###,###}</pre>", drow["diasMesAnterior"]); LtlSFDias.Text = string.Format("<pre>{0:##,###,###}</pre>", drow["diasMesAnterior"]);
LtlSFPercepciones.Text = string.Format("<pre>{0:##,###,###.00##}</pre>", drow["TotalPercepciones"]); LtlSFPercepciones.Text = string.Format("<pre>{0:##,###,###.00##}</pre>", drow["TotalPercepciones"]);
LtlSFVar.Text = string.Format("<pre>(Percepciones /días)\r\n{0:##,###,###.00##}</pre>", drow["TotalPercepciones"].ToString().ToDecimal() / drow["diasMesAnterior"].ToString().ToDecimal() ); LtlSFVar.Text = string.Format("<pre>(Percepciones /días)\r\n{0:##,###,###.00##}</pre>", drow["TotalPercepciones"].ToString().ToDecimal() / drow["diasMesAnterior"].ToString().ToDecimal());
LtlSF.Text = string.Format("<pre>Si((Tipo de salario ='Fijo'),SDI,(Salario Variable + SDI))\r\n{0:##,###,###.00##}</pre>", drow["SalarioBC"]); LtlSF.Text = string.Format("<pre>Si((Tipo de salario ='Fijo'),SDI,(Salario Variable + SDI))\r\n{0:##,###,###.00##}</pre>", drow["SalarioBC"]);
} }
GVSDF.DataSource = onom.DTSetResultados.Tables[1]; GVSDF.DataSource = onom.DTSetResultados.Tables[1];

View File

@@ -106,6 +106,16 @@ public partial class Nomina_Nomina2 : ClsPaginas
set { ViewState["DtSuaProcesado"] = value; } set { ViewState["DtSuaProcesado"] = value; }
} }
protected bool enviarCorreoEnTimbrado
{
get
{
if (ViewState["enviarCorreoEnTimbrado"] == null) { return false; }
else { return (bool)ViewState["enviarCorreoEnTimbrado"]; }
}
set { ViewState["enviarCorreoEnTimbrado"] = value; }
}
protected bool PermisoCancelarEmitido protected bool PermisoCancelarEmitido
{ {
get get
@@ -249,6 +259,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
if (!IsPostBack) if (!IsPostBack)
{ {
enviarCorreoEnTimbrado = (UsuarioActual.CveEmpresa == 141 ? false : true);
LnkCargaNetos.Visible = (UsuarioActual.Empresa.Funcionalidad(267) == "1") || (UsuarioActual.CveRol == 1); LnkCargaNetos.Visible = (UsuarioActual.Empresa.Funcionalidad(267) == "1") || (UsuarioActual.CveRol == 1);
if (UsuarioActual.CveEmpresa == 141) { ddlfiniquito.SelectedValueExist("2"); } if (UsuarioActual.CveEmpresa == 141) { ddlfiniquito.SelectedValueExist("2"); }
using (ClsRH objrh = new ClsRH()) using (ClsRH objrh = new ClsRH())
@@ -556,7 +567,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LnkFormatoTabular.Visible = true; LnkFormatoTabular.Visible = true;
HypPDFSTimbrados.Visible = true; HypPDFSTimbrados.Visible = true;
if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, DdlRegimenContratacion.SelectedValue.ToEntero(), CveTipoTrabajador: CveTipoTrabajador,Neto: ddlfiniquito.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 4) if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, DdlRegimenContratacion.SelectedValue.ToEntero(), CveTipoTrabajador: CveTipoTrabajador, Neto: ddlfiniquito.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 4)
{ {
dtempleados = objnom.DTSetResultados.Tables[3]; dtempleados = objnom.DTSetResultados.Tables[3];
dtempleadosConceptos = objnom.DTSetResultados.Tables[4]; dtempleadosConceptos = objnom.DTSetResultados.Tables[4];
@@ -1237,22 +1248,22 @@ public partial class Nomina_Nomina2 : ClsPaginas
if (pdf != null) if (pdf != null)
{ {
List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>(); List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>();
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" });
if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa)) if (ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, UsuarioActual.CveEmpresa))
{ {
string Ruta = ""; string Ruta = "";
string PathXML = ""; string PathXML = "";
string PathXMLF = ""; string PathXMLF = "";
string Xmlname = ""; string Xmlname = "";
string XmlnameF = ""; string XmlnameF = "";
string empleado = ""; //string empleado = "";
Ruta = UsuarioActual.Empresa.Ruta; Ruta = UsuarioActual.Empresa.Ruta;
PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml"; PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml";
PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
Xmlname = $"{ObjNomina.SerieFolio}.xml"; Xmlname = $"{ObjNomina.SerieFolio}.xml";
XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = $"{ObjNomina.SerieFolio}.pdf" });
//this.GuardaLog(PathXML);
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML)) if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML))
{ {
objarch.Add(new ClsSisMail.ArchivoMail() { Ruta = PathXML, NombreArchivo = Xmlname }); objarch.Add(new ClsSisMail.ArchivoMail() { Ruta = PathXML, NombreArchivo = Xmlname });
@@ -1326,96 +1337,97 @@ public partial class Nomina_Nomina2 : ClsPaginas
objrh.GetPersonal(-1, UsuarioActual.CveEmpresa); objrh.GetPersonal(-1, UsuarioActual.CveEmpresa);
dtpersonal = objrh.DtResultados.FiltraParametros("", "", new string[] { "CvePersonal", "Correo", "NombreCompleto", "RFC", "CURP" }); dtpersonal = objrh.DtResultados.FiltraParametros("", "", new string[] { "CvePersonal", "Correo", "NombreCompleto", "RFC", "CURP" });
} }
using (ClsNominas ObjNomina = new ClsNominas()) { using (ClsNominas ObjNomina = new ClsNominas())
foreach (GridViewRow gvRow in GvNominas.Rows)
{ {
CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero(); foreach (GridViewRow gvRow in GvNominas.Rows)
int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
LinkButton LnkTimbrar = gvRow.FCLinkButton("LnkTimbrar");
string Correo = string.Empty;
string NombreCompleto = string.Empty;
string RFC = string.Empty;
string CURP = string.Empty;
if (dtpersonal.Rows.Count > 0 && (drow = dtpersonal.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal))) != null)
{ {
Correo = drow["Correo"].ToString(); CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero();
NombreCompleto = drow["NombreCompleto"].ToString(); int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
RFC = drow["RFC"].ToString(); int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
CURP = drow["CURP"].ToString(); LinkButton LnkTimbrar = gvRow.FCLinkButton("LnkTimbrar");
} string Correo = string.Empty;
if (CvePersonal > 0 && LnkTimbrar.Visible) string NombreCompleto = string.Empty;
{ string RFC = string.Empty;
LogicNominas lognom = new LogicNominas(); string CURP = string.Empty;
if (dtpersonal.Rows.Count > 0 && (drow = dtpersonal.FiltroPrimero(string.Format("CvePersonal = {0}", CvePersonal))) != null)
string Msg = "";
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
if (Msg != null && Msg.Length > 0)
{ {
Msg = msgCorregidoSat(Msg, CvePersonal, RFC, CURP); Correo = drow["Correo"].ToString();
msggral = string.Format("{0}<tr><td>{3}</td><td>{2}</td><td><pre>{1}</pre></td></tr>", msggral, Msg, gvRow.DataKey("Nombre"), gvRow.DataKey("Codigo")); NombreCompleto = drow["NombreCompleto"].ToString();
RFC = drow["RFC"].ToString();
CURP = drow["CURP"].ToString();
} }
else if (CvePersonal > 0 && LnkTimbrar.Visible)
{ {
LnkTimbrar.Visible = false; LogicNominas lognom = new LogicNominas();
gvRow.CssClass = "success";
gvRow.FindControl("ImgDelete").Visible = false;
gvRow.FindControl("Imgdesautorizar").Visible = false;
gvRow.FindControl("LnkCancelar").Visible = true; string Msg = "";
gvRow.FindControl("HypXml").Visible = true; Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
gvRow.FindControl("HypPDF").Visible = true;
gvRow.ForeColor = Color.Green; if (Msg != null && Msg.Length > 0)
if (Correo.Trim().Length > 0)
{ {
byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta); Msg = msgCorregidoSat(Msg, CvePersonal, RFC, CURP);
if (pdf != null) msggral = string.Format("{0}<tr><td>{3}</td><td>{2}</td><td><pre>{1}</pre></td></tr>", msggral, Msg, gvRow.DataKey("Nombre"), gvRow.DataKey("Codigo"));
}
else
{
LnkTimbrar.Visible = false;
gvRow.CssClass = "success";
gvRow.FindControl("ImgDelete").Visible = false;
gvRow.FindControl("Imgdesautorizar").Visible = false;
gvRow.FindControl("LnkCancelar").Visible = true;
gvRow.FindControl("HypXml").Visible = true;
gvRow.FindControl("HypPDF").Visible = true;
gvRow.ForeColor = Color.Green;
if (enviarCorreoEnTimbrado && Correo.Trim().Length > 0)
{ {
List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>(); byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" }); if (pdf != null)
if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa))
{ {
string Ruta = ""; List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>();
string PathXML = "";
string PathXMLF = "";
string Xmlname = "";
string XmlnameF = "";
string empleado = "";
Ruta = UsuarioActual.Empresa.Ruta;
PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml";
PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
Xmlname = $"{ObjNomina.SerieFolio}.xml";
XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML)) if (ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, UsuarioActual.CveEmpresa))
{ {
objarch.Add(new ClsSisMail.ArchivoMail() { Ruta = PathXML, NombreArchivo = Xmlname }); string Ruta = "";
string PathXML = "";
string PathXMLF = "";
string Xmlname = "";
string XmlnameF = "";
//string empleado = "";
Ruta = UsuarioActual.Empresa.Ruta;
PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml";
PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
Xmlname = $"{ObjNomina.SerieFolio}.xml";
XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = $"{ObjNomina.SerieFolio}.pdf" });
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML))
{
objarch.Add(new ClsSisMail.ArchivoMail() { Ruta = PathXML, NombreArchivo = Xmlname });
}
if (!string.IsNullOrEmpty(PathXMLF) && System.IO.File.Exists(PathXMLF))
{
objarch.Add(new ClsSisMail.ArchivoMail() { Ruta = PathXMLF, NombreArchivo = XmlnameF });
}
} }
if (!string.IsNullOrEmpty(PathXMLF) && System.IO.File.Exists(PathXMLF)) Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Correo.Trim(), string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy}", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), "", "", objarch);
//Mail.SendMail(ClsPaginas.EmpresaNotificaciones, "caudillo.90d@gmail.com", string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy} ", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), Correo.Trim(), "", objarch);
using (ClsRH objrh = new ClsRH())
{ {
objarch.Add(new ClsSisMail.ArchivoMail() { Ruta = PathXMLF, NombreArchivo = XmlnameF }); objrh.NomBitacoraCorreoAdd(CvePeriodoSeleccionado, CvePersonal, Correo.Trim(), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario);
} }
} }
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Correo.Trim(), string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy}", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), "", "", objarch);
//Mail.SendMail(ClsPaginas.EmpresaNotificaciones, "caudillo.90d@gmail.com", string.Format("Empleado {0} Nomina del {1:dd/MM/yyyy} al {2:dd/MM/yyyy} ", NombreCompleto, FechaInicioPeriodo, FechaFinPeriodo), Correo.Trim(), "", objarch);
using (ClsRH objrh = new ClsRH())
{
objrh.NomBitacoraCorreoAdd(CvePeriodoSeleccionado, CvePersonal, Correo.Trim(), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario);
}
} }
} }
} }
} }
} }
}
if (msggral.Length > 0) if (msggral.Length > 0)
{ {
@@ -1492,28 +1504,28 @@ public partial class Nomina_Nomina2 : ClsPaginas
if (Correo.Trim().Length > 0) if (Correo.Trim().Length > 0)
{ {
byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta); byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
if (pdf != null) if (pdf != null)
{ {
List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>(); List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>();
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" });
using (ClsNominas ObjNomina = new ClsNominas()) using (ClsNominas ObjNomina = new ClsNominas())
{ {
if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa)) if (ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, UsuarioActual.CveEmpresa))
{ {
string Ruta = ""; string Ruta = "";
string PathXML = ""; string PathXML = "";
string PathXMLF = ""; string PathXMLF = "";
string Xmlname = ""; string Xmlname = "";
string XmlnameF = ""; string XmlnameF = "";
string empleado = ""; //string empleado = "";
Ruta = UsuarioActual.Empresa.Ruta; Ruta = UsuarioActual.Empresa.Ruta;
PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml"; PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml";
PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
Xmlname = $"{ObjNomina.SerieFolio}.xml"; Xmlname = $"{ObjNomina.SerieFolio}.xml";
XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = $"{ObjNomina.SerieFolio}.pdf" });
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML)) if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML))
{ {
@@ -1597,30 +1609,30 @@ public partial class Nomina_Nomina2 : ClsPaginas
ClsNominas ObjPeriodo = new ClsNominas(); ClsNominas ObjPeriodo = new ClsNominas();
ObjPeriodo.CambiaEstatusPeriodo(CvePeriodo, (int)enumNominasEstatus.Timbrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa); ObjPeriodo.CambiaEstatusPeriodo(CvePeriodo, (int)enumNominasEstatus.Timbrada, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
ObjPeriodo.Dispose(); ObjPeriodo.Dispose();
if (Correo.Trim().Length > 0) if (enviarCorreoEnTimbrado && Correo.Trim().Length > 0)
{ {
byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta); byte[] pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
if (pdf != null) if (pdf != null)
{ {
List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>(); List<ClsSisMail.ArchivoMail> objarch = new List<ClsSisMail.ArchivoMail>();
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = "Nomina.pdf" });
using (ClsNominas ObjNomina = new ClsNominas()) using (ClsNominas ObjNomina = new ClsNominas())
{ {
if (ObjNomina.GetNom_Nominas(-1, TxtCvePersonal.Text.ToEntero(), TxtCvePeriodo.Text.ToEntero(), -1, UsuarioActual.CveEmpresa)) if (ObjNomina.GetNom_Nominas(-1, CvePersonal, CvePeriodo, -1, UsuarioActual.CveEmpresa))
{ {
string Ruta = ""; string Ruta = "";
string PathXML = ""; string PathXML = "";
string PathXMLF = ""; string PathXMLF = "";
string Xmlname = ""; string Xmlname = "";
string XmlnameF = ""; string XmlnameF = "";
string empleado = ""; //string empleado = "";
Ruta = UsuarioActual.Empresa.Ruta; Ruta = UsuarioActual.Empresa.Ruta;
PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml"; PathXML = $"{Ruta}XML\\Nomina\\{ObjNomina.SerieFolio}.xml";
PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; PathXMLF = $"{Ruta}XML\\Nomina\\{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
Xmlname = $"{ObjNomina.SerieFolio}.xml"; Xmlname = $"{ObjNomina.SerieFolio}.xml";
XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml"; XmlnameF = $"{ObjNomina.Serie}F-{ObjNomina.Folio}.xml";
objarch.Add(new ClsSisMail.ArchivoMail() { ArchivoBinario = pdf, NombreArchivo = $"{ObjNomina.SerieFolio}.pdf" });
if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML)) if (!string.IsNullOrEmpty(PathXML) && System.IO.File.Exists(PathXML))
{ {
@@ -7057,7 +7069,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
while (Neto != NetoSimulado && continuarV) while (Neto != NetoSimulado && continuarV)
{ {
if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador, -1, 1, Neto,ddlfiniquito.SelectedValue.ToEntero()) if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador, -1, 1, Neto, ddlfiniquito.SelectedValue.ToEntero())
&& objnom.DTSetResultados.Tables.Count > 1) && objnom.DTSetResultados.Tables.Count > 1)
{ {
dtempleadosSimula = objnom.DTSetResultados.Tables[3]; dtempleadosSimula = objnom.DTSetResultados.Tables[3];

View File

@@ -30,7 +30,7 @@
<label class="col-md-1 truncate">Estatus:</label> <label class="col-md-1 truncate">Estatus:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlMotivoBaja" runat="server" Width="100%" CssClass="select2me" AppendDataBoundItems="true" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlEstatusFiniquito" runat="server" Width="100%" CssClass="select2me" AppendDataBoundItems="true" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Pendientes" Value="0" Selected="True"></asp:ListItem> <asp:ListItem Text="Pendientes" Value="0" Selected="True"></asp:ListItem>
<asp:ListItem Text="Guardados" Value="1"></asp:ListItem> <asp:ListItem Text="Guardados" Value="1"></asp:ListItem>

View File

@@ -29,10 +29,10 @@ public partial class Nomina_RepFiniquito : ClsPaginas
int diafin = DateTime.DaysInMonth(dnow.Year, dnow.Month); int diafin = DateTime.DaysInMonth(dnow.Year, dnow.Month);
TxtFechaInicio.Text = string.Format("01/{0:MM/yyyy}", dnow); TxtFechaInicio.Text = string.Format("01/{0:MM/yyyy}", dnow);
TxtFechaFin.Text = string.Format("{1}/{0:MM/yyyy}", dnow,diafin); TxtFechaFin.Text = string.Format("{1}/{0:MM/yyyy}", dnow,diafin);
RcveEstatusFiniquito = Request["cveEstatusFiniquito"] == null ? 0 : Request["cveEstatusFiniquito"].ToString().ToEntero(); RcveEstatusFiniquito = Request["cveEstatusFiniquito"] == null ? -1 : Request["cveEstatusFiniquito"].ToString().ToEntero();
RcveSubProyecto = Request["cveSubProyecto"] == null ? 0 : Request["cveSubProyecto"].ToString().ToEntero(); RcveSubProyecto = Request["cveSubProyecto"] == null ? 0 : Request["cveSubProyecto"].ToString().ToEntero();
DdlEstatusFiniquito.SelectedValueExist(RcveEstatusFiniquito);
RcveEstatusFiniquito = DdlEstatusFiniquito.SelectedValue.ToEntero();
CargaRepFiniquitos(); CargaRepFiniquitos();
} }
} }
@@ -48,6 +48,7 @@ public partial class Nomina_RepFiniquito : ClsPaginas
} }
protected void BtnConsultar_Click(object sender, EventArgs e) protected void BtnConsultar_Click(object sender, EventArgs e)
{ {
RcveEstatusFiniquito = DdlEstatusFiniquito.SelectedValue.ToEntero();
CargaRepFiniquitos(); CargaRepFiniquitos();
} }
} }

View File

@@ -861,26 +861,41 @@
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
</div>
<asp:LinkButton ID="LnkFormatocMasivaRegistroPatronal" CssClass="btn btn-default" OnClick="LnkFormatocMasivaRegistroPatronal_Click" runat="server"><i class="fa fa-ad-excel"></i> Formato Registro Patronal</asp:LinkButton> <div class="btn-group ">
<asp:LinkButton ID="LnkFormatocMasiva" CssClass="btn btn-default" OnClick="LnkFormatocMasiva_Click" runat="server"><i class="fa fa-ad-excel"></i> Formato Salario</asp:LinkButton> <a class="btn yellow-gold btn-sm" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" aria-expanded="true"><i class="fa fa-ad-excel"></i> Formatos
<i class="fa fa-angle-down"></i>
</a>
<ul class="dropdown-menu pull-right">
<li>
<asp:LinkButton ID="LnkFormatocMasivaRegistroPatronal" OnClick="LnkFormatocMasivaRegistroPatronal_Click" runat="server"> Registro Patronal</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkFormatocMasiva" OnClick="LnkFormatocMasiva_Click" runat="server"> Salario</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkFormatocMasivaTS" OnClick="LnkFormatocMasivaTS_Click" runat="server"> Tipo salario</asp:LinkButton>
</li>
</ul>
</div> </div>
</div> </div>
</div> </div>
<div class="portlet-body rowpadding "> <div class="portlet-body rowpadding ">
<div class="row"> <div class="row">
<label class="col-md-1 compoonenlabel" style="line-height: 1; max-width: 65px;">Tipo:</label> <label class="col-md-1 compoonenlabel" style="line-height: 1; max-width: 65px;">Tipo:</label>
<div class="col-md-4"> <div class="col-md-4">
<asp:DropDownList ID="ddltipoCarga" runat="server" Style="width: 100% !important;" CssClass="select2me"> <asp:DropDownList ID="ddltipoCarga" runat="server" Style="width: 100% !important;" CssClass="select2me">
<asp:ListItem Text="Salario" Value="1"></asp:ListItem> <asp:ListItem Text="Salario" Value="1"></asp:ListItem>
<asp:ListItem Text="Registro Patronal" Value="2"></asp:ListItem> <asp:ListItem Text="Tipo salario" Value="3"></asp:ListItem>
</asp:DropDownList> <asp:ListItem Text="Registro Patronal" Value="2"></asp:ListItem>
</div> </asp:DropDownList>
<asp:Label ID="Label2" runat="server" CssClass="col-md-1 ">Fecha :</asp:Label> </div>
<div class="col-md-2" id="Div2" runat="server"> <asp:Label ID="Label2" runat="server" CssClass="col-md-2 ">Fecha :</asp:Label>
<div class="col-md-4" id="Div2" runat="server">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="txtfechacargamasiva" runat="server" Text="01/03/2021" CssClass="form-control" CausesValidation="true" Width="90%" MaxLength="10"></asp:TextBox> <asp:TextBox ID="txtfechacargamasiva" runat="server" Text="01/03/2021" CssClass="form-control" CausesValidation="true" Width="100%" MaxLength="10"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="lnkcargamasiva" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="lnkcargamasiva" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span> </span>
@@ -911,6 +926,7 @@
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:PostBackTrigger ControlID="LnkFormatocMasiva" /> <asp:PostBackTrigger ControlID="LnkFormatocMasiva" />
<asp:PostBackTrigger ControlID="LnkFormatocMasivaTS" />
<asp:PostBackTrigger ControlID="LnkFormatocMasivaRegistroPatronal" /> <asp:PostBackTrigger ControlID="LnkFormatocMasivaRegistroPatronal" />
</Triggers> </Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -391,6 +391,75 @@ public partial class RH_CalculoSBC : ClsPaginas
Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString(), TipoMensaje.MsgAdvertencia); Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString(), TipoMensaje.MsgAdvertencia);
} }
} }
protected void LnkFormatocMasivaTS_Click(object sender, EventArgs e)
{
try
{
bool continuar = true;
string msgerror = "";
if (dtsalario == null || dtsalario.Rows.Count == 0)
{
msgerror = "favor de calcular primero";
continuar = false;
}
if (continuar)
{
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
var libro = wb.AddWorksheet("Salario");
int column = 1;
libro.Cell(1, column).Value = "Codigo";
column++;
libro.Cell(1, column).Value = "Empleado";
column++;
libro.Cell(1, column).Value = "TipodeSalario";
libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
int Fila = 1;
foreach (DataRow erow in dtsalario.Rows)
{
Fila++;
column = 1;
libro.Cell(Fila, column).Value = string.Format("'{0}", erow["Codigo"]);
column++;
libro.Cell(Fila, column).Value = erow["Nombre"];
column++;
libro.Cell(Fila, column).Value = erow["TipodeSalario"];
}
libro.Columns().AdjustToContents();
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
{
input.CopyTo(memoryStream);
}
memoryStream.Position = 0;
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", string.Format("attachment;filename={0}.xlsx", "Plantilla Salario "));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}
else
{
Alert(msgerror, TipoMensaje.MsgAdvertencia);
}
}
catch (Exception ex)
{
Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString(), TipoMensaje.MsgAdvertencia);
}
}
protected void LnkProcesarArchvo_Click(object sender, EventArgs e) protected void LnkProcesarArchvo_Click(object sender, EventArgs e)
{ {
@@ -474,8 +543,8 @@ public partial class RH_CalculoSBC : ClsPaginas
DataTable DTEXcel = Extensiones.ModExtensiones.ReadExcelFile(fileItem.FileUrl, true); DataTable DTEXcel = Extensiones.ModExtensiones.ReadExcelFile(fileItem.FileUrl, true);
StringBuilder str = new StringBuilder(); StringBuilder str = new StringBuilder();
bool rollback = false; //bool rollback = false;
using (ClsClaseBase objNomina = new ClsClaseBase( )) using (ClsClaseBase objNomina = new ClsClaseBase())
using (ClsRH objpersonal = new ClsRH()) using (ClsRH objpersonal = new ClsRH())
{ {
@@ -483,7 +552,7 @@ public partial class RH_CalculoSBC : ClsPaginas
{ {
string Codigo = row["Codigo"].ToString(); string Codigo = row["Codigo"].ToString();
int CvePersonal = -1; // row["CvePersonal"].ToString().ToEntero(); int CvePersonal = -1; // row["CvePersonal"].ToString().ToEntero();
string RegistroPatronal = row["RegistroPatronal"].ToString() ; string RegistroPatronal = row["RegistroPatronal"].ToString();
int CveMetodoPago = 0; int CveMetodoPago = 0;
if (Codigo != "-1" && objpersonal.GetPersonal(CvePersonal, Codigo, "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) && if (Codigo != "-1" && objpersonal.GetPersonal(CvePersonal, Codigo, "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) &&
objpersonal.DtResultados.Rows.Count == 1) objpersonal.DtResultados.Rows.Count == 1)
@@ -501,7 +570,47 @@ public partial class RH_CalculoSBC : ClsPaginas
objNomina.runQuerystr(string.Format("EXEC PA_RH_PersonalRPUpdate {0},'{1}'", CvePersonal, RegistroPatronal)); objNomina.runQuerystr(string.Format("EXEC PA_RH_PersonalRPUpdate {0},'{1}'", CvePersonal, RegistroPatronal));
} }
} }
}
}
if (ddltipoCarga.SelectedValue.ToEntero() == 3)
{
List<Archivo> Filesgral = TxtArchivoNomina.getfiles().Archivos;
Archivo fileItem = Filesgral.Count > 0 ? Filesgral[0] : null;
DataTable DTEXcel = Extensiones.ModExtensiones.ReadExcelFile(fileItem.FileUrl, true);
StringBuilder str = new StringBuilder();
//bool rollback = false;
using (ClsClaseBase objNomina = new ClsClaseBase())
using (ClsRH objpersonal = new ClsRH())
{
foreach (DataRow row in DTEXcel.FiltraParametros("LEN(Codigo)>0 ").Rows)
{
string Codigo = row["Codigo"].ToString();
int CvePersonal = -1; // row["CvePersonal"].ToString().ToEntero();
string TipodeSalario = row["TipodeSalario"].ToString();
int CveMetodoPago = 0;
if (Codigo != "-1" && objpersonal.GetPersonal(CvePersonal, Codigo, "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) &&
objpersonal.DtResultados.Rows.Count == 1)
{
CvePersonal = objpersonal.CvePersonal;
CveMetodoPago = objpersonal.CveMetodoPago;
}
else
{
CvePersonal = 0;
str.AppendLine(string.Format("No se encontro el codigo {0}<br>", Codigo));
}
if (CvePersonal > 0)
{
objNomina.runQuerystr(string.Format("EXEC PA_RH_PersonalTSUpdate {0},'{1}'", CvePersonal, TipodeSalario));
}
}
} }

View File

@@ -31,7 +31,7 @@
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAsistenciasInasistencias,Tipo,AplicaAsistencia,AplicaFalta,AplicaVacacion,AplicaIncapacidad,AplicaRetardo,AplicaAguinaldo,AplicaUtilidades,Estatus" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall" GridLines="None"> <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAsistenciasInasistencias,Tipo,AplicaAsistencia,AplicaFalta,AplicaVacacion,AplicaIncapacidad,AplicaRetardo,AplicaAguinaldo,AplicaUtilidades,AplicaPago,AplicaPagoDoble,AplicaPrimaVac,Estatus" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall" GridLines="None">
<Columns> <Columns>
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText="Tipo" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate> <ItemTemplate>
@@ -86,6 +86,16 @@
<asp:Literal ID="LtlAplicaUtilidades" runat="server" Text='<%# Eval("AplicaUtilidades") %>'></asp:Literal> <asp:Literal ID="LtlAplicaUtilidades" runat="server" Text='<%# Eval("AplicaUtilidades") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Aplica Pago" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlAplicapago" runat="server" Text='<%# Eval("AplicaPago") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Aplica Pago Doble" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Literal ID="LtlAplicapagoDoble" runat="server" Text='<%# Eval("AplicaPagoDoble") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
@@ -174,6 +184,10 @@
<label for="AplicaRetardo">Aplica Retardo:</label><br /> <label for="AplicaRetardo">Aplica Retardo:</label><br />
<asp:CheckBox ID="AplicaRetardo" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" /> <asp:CheckBox ID="AplicaRetardo" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div> </div>
<div class="col-md-4">
<label for="ChkAplicaPrimaVac">Aplica Prima Vacacional:</label><br />
<asp:CheckBox ID="ChkAplicaPrimaVac" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
@@ -184,12 +198,22 @@
<label for="AplicaUtilidades">Aplica Utilidades:</label><br /> <label for="AplicaUtilidades">Aplica Utilidades:</label><br />
<asp:CheckBox ID="AplicaUtilidades" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" /> <asp:CheckBox ID="AplicaUtilidades" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div> </div>
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright">
<label for="ChkEstatus">Activo:</label><br />
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-4">
<label for="ChkAplicaPago">Aplica Pago:</label><br />
<asp:CheckBox ID="ChkAplicaPago" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
<div class="col-md-4">
<label for="ChkAplicaPagoDoble">Aplica Pago doble:</label><br />
<asp:CheckBox ID="ChkAplicaPagoDoble" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div>
</div> </div>
<div id="CheckActiveSection" runat="server" class="form-group form-md-line-input input-iconright"> <div class="row">
<label for="ChkEstatus">Activo:</label><br />
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="chksino" data-size="small" Text=" " Checked="true" />
</div> </div>
</div> </div>

View File

@@ -85,10 +85,13 @@ Partial Class RH_CatAsistenciasInasistencias
Dim chkAplicaRetardo As Boolean = AplicaRetardo.Checked Dim chkAplicaRetardo As Boolean = AplicaRetardo.Checked
Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked
Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked
Dim aplicaPago As Integer = If(ChkAplicaPago.Checked, 1, 0)
Dim aplicaPagoDoble As Integer = If(ChkAplicaPagoDoble.Checked, 1, 0)
Dim aplicaPrimaVac As Integer = If(ChkAplicaPrimaVac.Checked, 1, 0)
If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, chkAplicaFalta, chkAplicaNoAplica, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, If ObjAsistenciasInasistencias.AddAsistenciasInasistencias(TipoTxt.Text.Trim, chkAplicaFalta, chkAplicaNoAplica, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades) Then chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble, aplicaPrimaVac) Then
TipoTxt.Text = "" TipoTxt.Text = ""
Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion) Alert("El nuevo Tipo Asistencias/Inasistencias se guardó correctamente.", TipoMensaje.MsgInformacion)
UpTitulos.Update() UpTitulos.Update()
@@ -129,6 +132,11 @@ chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, c
AplicaAguinaldo.Checked = If(GvRow.DataKey("AplicaAguinaldo") = "Aplica", True, False) AplicaAguinaldo.Checked = If(GvRow.DataKey("AplicaAguinaldo") = "Aplica", True, False)
AplicaUtilidades.Checked = If(GvRow.DataKey("AplicaUtilidades") = "Aplica", True, False) AplicaUtilidades.Checked = If(GvRow.DataKey("AplicaUtilidades") = "Aplica", True, False)
ChkAplicaPago.Checked = If(GvRow.DataKey("AplicaPago") = "Aplica", True, False)
ChkAplicaPagoDoble.Checked = If(GvRow.DataKey("AplicaPagoDoble") = "Aplica", True, False)
ChkAplicaPrimaVac.Checked = If(GvRow.DataKey("AplicaPrimaVac") = "Aplica", True, False)
ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False) ChkEstatus.Checked = If(GvRow.DataKey("Estatus") = "Activo", True, False)
CveTipoAsisAEditar = Convert.ToInt32(GvRow.DataKey("CveAsistenciasInasistencias")) 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating" CveTipoAsisAEditar = Convert.ToInt32(GvRow.DataKey("CveAsistenciasInasistencias")) 'Guardamos en una propiedad el id del registro del cual haremos cambios, se guarda y se utiliza en el metodo "GvDatos_RowUpdating"
@@ -156,9 +164,16 @@ chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, c
Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked Dim chkAplicaAguinaldo As Boolean = AplicaAguinaldo.Checked
Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked Dim chkAplicaUtilidades As Boolean = AplicaUtilidades.Checked
Dim aplicaPago As Integer = If(ChkAplicaPago.Checked, 1, 0)
Dim aplicaPagoDoble As Integer = If(ChkAplicaPagoDoble.Checked, 1, 0)
Dim aplicaPrimaVac As Integer = If(ChkAplicaPrimaVac.Checked, 1, 0)
If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, ckAplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias, If ObjAsistenciasInasistencias.UpdateAsistenciasInasistencias(Tipo, ckAplicaFalta, AplicaAsistencia, Estatus, CveAsistenciasInasistencias,
chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades) Then chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, chkAplicaUtilidades, aplicaPago, aplicaPagoDoble,
aplicaPrimaVac) Then
GvDatos.EditIndex = -1 GvDatos.EditIndex = -1
ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ViewState("DTAsistenciasInasistencias") = ObjAsistenciasInasistencias.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados GlobalDTAsistenciasInasistencias = ObjAsistenciasInasistencias.DtResultados

View File

@@ -62,8 +62,9 @@
<asp:ListItem Text="GlobalDTTipoTransacciones" Value="GlobalDTTipoTransacciones"></asp:ListItem> <asp:ListItem Text="GlobalDTTipoTransacciones" Value="GlobalDTTipoTransacciones"></asp:ListItem>
<asp:ListItem Text="GlobalSATGenerales" Value="GlobalSATGenerales"></asp:ListItem> <asp:ListItem Text="GlobalSATGenerales" Value="GlobalSATGenerales"></asp:ListItem>
<asp:ListItem Text="GlobalDTActivoFijos" Value="GlobalDTActivoFijos"></asp:ListItem> <asp:ListItem Text="GlobalDTActivoFijos" Value="GlobalDTActivoFijos"></asp:ListItem>
<asp:ListItem Text="GlobalDTVendedoresOld" Value="GlobalDTVendedoresOld"></asp:ListItem>
</asp:DropDownList>&nbsp;&nbsp; </asp:DropDownList>&nbsp;&nbsp;
<asp:Button ID="BtnCargar" runat="server" Text="Cargar" class="btn btn-primary" />&nbsp;&nbsp;<asp:Button ID="BtnRefresh" runat="server" Text="Consultar" class="btn btn-primary" /> <asp:Button ID="BtnCargar" runat="server" Text="Cargar" class="btn btn-primary" />&nbsp;&nbsp;<asp:Button ID="BtnRefresh" runat="server" Text="Consultar" class="btn btn-primary" />
<br /> <br />

View File

@@ -102,12 +102,28 @@ Partial Class Sistemas_CatSesiones
ElseIf DdlVariable.SelectedItem.Value = "GlobalSATGenerales" Then ElseIf DdlVariable.SelectedItem.Value = "GlobalSATGenerales" Then
CargaSATGenerales() CargaSATGenerales()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTActivoFijos" Then ElseIf DdlVariable.SelectedItem.Value = "GlobalDTActivoFijos" Then
CargaActivoFijos()
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTVendedoresOld" Then
CargaActivoFijos() CargaActivoFijos()
End If End If
End Sub End Sub
Private Sub CargaGlobalDTVendedoresOld()
Dim AppNombre As String = $"GlobalDTVendedores-{-1}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjVendedores As New ClsVtaVendedores
If ObjVendedores.GetVendedores(-1) Then
For Each Row As DataRow In ObjVendedores.DtResultados.Rows
Row("VendedorTipo") = 1
Next
HttpContext.Current.Application(AppNombre) = ObjVendedores.DtResultados.Copy()
End If
ObjVendedores.Dispose()
End If
End Sub
Private Sub CargaActivoFijos() Private Sub CargaActivoFijos()
GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing GlobalDTActivoFijos(UsuarioActual.CveEmpresa) = Nothing
GlobalDTModeloActivoFijo(UsuarioActual.CveEmpresa, -1) = Nothing GlobalDTModeloActivoFijo(UsuarioActual.CveEmpresa, -1) = Nothing

View File

@@ -646,57 +646,46 @@
<div class="row"> <div class="row">
<div class=" col-md-6"> <div class=" col-md-6">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlSubProyecto_SelectedIndexChanged" DataTextField="SubProyecto" DataValueField="CveSubProyecto" ValidationGroup="GrpGuardar"></asp:DropDownList> <asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control select2me" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlSubProyecto_SelectedIndexChanged" DataTextField="SubProyecto" DataValueField="CveSubProyecto" ValidationGroup="GrpGuardar"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<label for="<%= DdlSubProyecto.ClientID.ToString()%>">Sucursal del Cliente: </label> <label for="<%= DdlSubProyecto.ClientID.ToString()%>">Sucursal del Cliente: </label>
<i></i> <i></i>
</div> </div>
</div> </div>
<div class=" col-md-6"> <div class=" col-md-6" id="DivPrecioLista" runat="server">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPrecioLista" runat="server" CssClass="form-control select2me" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList> <asp:DropDownList ID="DdlPrecioLista" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList>
<label for="<%= DdlPrecioLista.ClientID.ToString()%>">Precio Lista: </label> <label for="<%= DdlPrecioLista.ClientID.ToString()%>">Precio Lista: </label>
<i></i> <i></i>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group form-md-line-input input-iconright col-md-6" id="DivPortletAsignaciones" runat="server">
<asp:DropDownList ID="DdlClasificacion" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" Width="150px" runat="server" CssClass="form-control select2me">
</asp:DropDownList>
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Giro:</label>
</div>
<div class="col-md-6"> <div class="col-md-6">
<table> <div class="form-group form-md-line-input input-iconright" id="DivPortletAsignaciones" runat="server">
<tr> <asp:DropDownList ID="DdlClasificacion" DataValueField="CveClienteClasificacion" DataTextField="ClienteClasificacion" Width="100%" runat="server" CssClass="form-control select2me">
<td style="width:90%"> </asp:DropDownList>
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server"> <label for="<%= DdlClasificacion.ClientID.ToString()%>">Giro:</label>
</div>
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="Vendedor" DataValueField="CveVendedor"></asp:DropDownList> </div>
<asp:LinkButton ID="LnkAgregarVendedorSucursal" Visible="false" runat="server" data-toggle="tooltip" data-placement="right" title="Agregar vendedor por sucursal." CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar por Sucursal"></asp:LinkButton> <div class="col-md-6">
<label for="<%= DdlVendedor.ClientID.ToString()%>">Vendedor:</label> <div class="row">
<div class="col-md-10">
</div> <div class="form-group form-md-line-input input-iconright">
</td> <asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="Vendedor" DataValueField="CveVendedor"></asp:DropDownList>
<td style="width:10%"> <asp:LinkButton ID="LnkAgregarVendedorSucursal" Visible="false" runat="server" data-toggle="tooltip" data-placement="right" title="Agregar vendedor por sucursal." CssClass="btn btn-circle btn-default" Text="<i class='fa fa-plus'></i> Agregar por Sucursal"></asp:LinkButton>
<div class="form-group form-md-line-input input-iconright" id="DVLnkCambiarVendedor" runat="server" visible="false"> <label for="<%= DdlVendedor.ClientID.ToString()%>">Vendedor:</label>
<asp:LinkButton runat="server" ID="LnkCambiarVendedor" CssClass="btn btn-default btn-circle btn-xs" Text="<i class='fa fa-check' style='color:green'></i>" </div>
data-toggle="confirmation" data-popout="true" data-original-title="¿Actualizar Vendedor?" data-btn-ok-label="si" </div>
OnClick="LnkCambiarVendedor_Click"></asp:LinkButton> <div class="col-md-2">
</div> <div class="form-group form-md-line-input input-iconright" id="DVLnkCambiarVendedor" runat="server" visible="false">
</td> <asp:LinkButton runat="server" ID="LnkCambiarVendedor" CssClass="btn btn-default btn-circle btn-xs" Text="<i class='fa fa-check' style='color:green'></i>"
</tr> data-toggle="confirmation" data-popout="true" data-original-title="¿Actualizar Vendedor?" data-btn-ok-label="si"
</table> OnClick="LnkCambiarVendedor_Click"></asp:LinkButton>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div class="form-group form-md-line-input input-iconright" id="Div2" runat="server"> <div class="form-group form-md-line-input input-iconright" id="Div2" runat="server">
<asp:DropDownList ID="DdlCorporativo" runat="server" CssClass="form-control select2me" Width="200px" DataTextField="Descripcion" DataValueField="CveClienteCorporativo"></asp:DropDownList> <asp:DropDownList ID="DdlCorporativo" runat="server" CssClass="form-control select2me" Width="200px" DataTextField="Descripcion" DataValueField="CveClienteCorporativo"></asp:DropDownList>
@@ -712,23 +701,23 @@
<asp:TextBox runat="server" ID="TxtCorreoEntregaAlmacen" CssClass="form-control" /> <asp:TextBox runat="server" ID="TxtCorreoEntregaAlmacen" CssClass="form-control" />
<label for="<%= TxtCorreoEntregaAlmacen.ClientID.ToString()%>">Correo de Entrega de Almacén:</label> <label for="<%= TxtCorreoEntregaAlmacen.ClientID.ToString()%>">Correo de Entrega de Almacén:</label>
</div> </div>
<div class="row">
<div class="form-group form-md-line-input input-iconright"> <div class="col-md-6">
<asp:DropDownList ID="DdlTipoCliente" runat="server" CssClass=" form-control input-sm select2me" Width="200px" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoCliente_SelectedIndexChanged"> <div class="form-group form-md-line-input input-iconright">
<asp:ListItem Selected="True" Value="1">Frecuente</asp:ListItem> <asp:DropDownList ID="DdlTipoCliente" runat="server" CssClass=" form-control input-sm select2me" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoCliente_SelectedIndexChanged">
<asp:ListItem Value="2">Venta Mostrador</asp:ListItem> <asp:ListItem Selected="True" Value="1">Frecuente</asp:ListItem>
</asp:DropDownList> <asp:ListItem Value="2">Venta Mostrador</asp:ListItem>
<label for="<%= DdlTipoCliente.ClientID.ToString()%>">Tipo de Cliente:</label> </asp:DropDownList>
<label for="<%= DdlTipoCliente.ClientID.ToString()%>">Tipo de Cliente:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" id="DivRepresentanteLegal" runat="server" visible="false">
<asp:TextBox runat="server" ID="TxtRepresentanteLegal" CssClass="form-control" MaxLength="100" />
<label for="<%= TxtRepresentanteLegal.ClientID.ToString()%>">Representante Legal:</label>
</div>
</div>
</div> </div>
<div class="form-group form-md-line-input input-iconright" id="DivRepresentanteLegal" runat="server" visible="false">
<asp:TextBox runat="server" ID="TxtRepresentanteLegal" CssClass="form-control" MaxLength="100" />
<label for="<%= TxtRepresentanteLegal.ClientID.ToString()%>">Representante Legal:</label>
</div>
<div class="row"> <div class="row">
<div runat="server" id="DivEsDistribuidor" visible="false" class="col-md-4 form-group form-md-line-input input-iconright"> <div runat="server" id="DivEsDistribuidor" visible="false" class="col-md-4 form-group form-md-line-input input-iconright">
<label>Es distribuidor: </label> <label>Es distribuidor: </label>
@@ -1132,7 +1121,7 @@
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlMetodoPago33" CssClass="form-control select2me" runat="server" Width="250" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar" AutoPostBack="true" <asp:DropDownList ID="DdlMetodoPago33" CssClass="form-control select2me" runat="server" Width="250" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" ValidationGroup="GrpGuardar" AutoPostBack="true"
OnSelectedIndexChanged="DdlMetodoPago33_SelectedIndexChanged" > OnSelectedIndexChanged="DdlMetodoPago33_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlMetodoPago33.ClientID.ToString()%>">Método de Pago:</label> <label for="<%= DdlMetodoPago33.ClientID.ToString()%>">Método de Pago:</label>
@@ -2017,13 +2006,13 @@
<asp:HyperLink ID="HplAbonarMasivo" Visible="True" runat="server" NavigateUrl="#" ToolTip="Pago de múltiples facturas">Pago múltiples facturas&nbsp;<img src="/Imagenes/Money_Add.png" alt="Pagar múltiples facturas" /></asp:HyperLink> <asp:HyperLink ID="HplAbonarMasivo" Visible="True" runat="server" NavigateUrl="#" ToolTip="Pago de múltiples facturas">Pago múltiples facturas&nbsp;<img src="/Imagenes/Money_Add.png" alt="Pagar múltiples facturas" /></asp:HyperLink>
&nbsp; &nbsp;
<asp:LinkButton ID="LnkCxCActivasPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton> <asp:LinkButton ID="LnkCxCActivasPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<asp:LinkButton ID="LnkCxCActivasExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton> <asp:LinkButton ID="LnkCxCActivasExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<input type="text" id="TxtCxCActivas" class="form-control input-sm" <input type="text" id="TxtCxCActivas" class="form-control input-sm"
onkeyup="<%= String.Format("FiltrarTabla('TxtCxCActivas','{0}')", GvCxC.ClientID) %>" onkeyup="<%= String.Format("FiltrarTabla('TxtCxCActivas','{0}')", GvCxC.ClientID) %>"
style="display: inline-block; margin-right: -20px; width: 150px;" /> style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCActivas','{0}')", GVHistorial.ClientID) %>" <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCActivas','{0}')", GVHistorial.ClientID) %>"
style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a> style="margin-top: -3px; float: inherit;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:PostBackTrigger ControlID="LnkCxCActivasPDF" /> <asp:PostBackTrigger ControlID="LnkCxCActivasPDF" />
@@ -2126,7 +2115,7 @@
<ContentTemplate> <ContentTemplate>
<asp:LinkButton ID="LnkHistorialCxCPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton> <asp:LinkButton ID="LnkHistorialCxCPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<asp:LinkButton ID="LnkHistorialCxCExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton> <asp:LinkButton ID="LnkHistorialCxCExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
<input type="text" id="TxtCxCHistorial" class="form-control input-sm" <input type="text" id="TxtCxCHistorial" class="form-control input-sm"
onkeyup="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GvCxCHistorial.ClientID) %>" onkeyup="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GvCxCHistorial.ClientID) %>"
style="display: inline-block; margin-right: -20px; width: 150px;" /> style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GVHistorial.ClientID) %>" <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtCxCHistorial','{0}')", GVHistorial.ClientID) %>"
@@ -4276,13 +4265,13 @@
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<asp:Label ID="LblProyectoFiltro" runat="server" class="col-md-1 truncate" style="width: 120px">Proyecto:</asp:Label> <asp:Label ID="LblProyectoFiltro" runat="server" class="col-md-1 truncate" Style="width: 120px">Proyecto:</asp:Label>
<div runat="server" id="DivProyectoFiltro" class="col-md-2" style="width: 120px"> <div runat="server" id="DivProyectoFiltro" class="col-md-2" style="width: 120px">
<asp:DropDownList ID="DdlProyectoFiltro" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlProyectoFiltro" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<asp:Label ID="LblSubProyectoFiltro" runat="server" class="col-md-1 truncate" style="width: 120px; text-align: right">SubProyecto:</asp:Label> <asp:Label ID="LblSubProyectoFiltro" runat="server" class="col-md-1 truncate" Style="width: 120px; text-align: right">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyectoFiltro" class="col-md-2" style="width: 120px"> <div runat="server" id="DivSubProyectoFiltro" class="col-md-2" style="width: 120px">
<asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList> </asp:DropDownList>
@@ -4546,15 +4535,15 @@
<div class="row"> <div class="row">
<label class="col-md-1 " style="width: 120px; text-align: right">Comercializador:</label> <label class="col-md-1 " style="width: 120px; text-align: right">Comercializador:</label>
<div class="col-md-2" style="width: 250px"> <div class="col-md-2" style="width: 250px">
<ADS:Dropdownlost ID="DdlProveedorLineaAdicional" SelectedText="-" IncluyeTodos="true" runat="server" CssClassDdl="select2me" Width="100%" CssStyle="width: 100%;" <ADS:Dropdownlost ID="DdlProveedorLineaAdicional" SelectedText="-" IncluyeTodos="true" runat="server" CssClassDdl="select2me" Width="100%" CssStyle="width: 100%;"
DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost> DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
</div> </div>
<label class="col-md-1 truncate" style="width: 120px; text-align: right">Estatus:</label> <label class="col-md-1 truncate" style="width: 120px; text-align: right">Estatus:</label>
<div class="col-md-2" style="width: 120px"> <div class="col-md-2" style="width: 120px">
<asp:DropDownList ID="DdlEstatusLineaAdicional" runat="server" Cssclass="table-group-action-input form-control select2me"> <asp:DropDownList ID="DdlEstatusLineaAdicional" runat="server" CssClass="table-group-action-input form-control select2me">
<asp:ListItem value="-1" Text="Todos"/> <asp:ListItem Value="-1" Text="Todos" />
<asp:ListItem value="1" Text="Vinculado"/> <asp:ListItem Value="1" Text="Vinculado" />
<asp:ListItem Selected="True" value="0" Text="Sin Registrar"/> <asp:ListItem Selected="True" Value="0" Text="Sin Registrar" />
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
@@ -6732,7 +6721,7 @@
<asp:DropDownList ID="DdlTipoLineaAdicionalModal" CssClass="form-control select2me" runat="server" Width="250px" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoLineaAdicionalModal_SelectedIndexChanged"> <asp:DropDownList ID="DdlTipoLineaAdicionalModal" CssClass="form-control select2me" runat="server" Width="250px" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoLineaAdicionalModal_SelectedIndexChanged">
<asp:ListItem Text="PO" Value="2"></asp:ListItem> <asp:ListItem Text="PO" Value="2"></asp:ListItem>
<asp:ListItem Text="Seleccione" Value="-1" Selected="True"></asp:ListItem> <asp:ListItem Text="Seleccione" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Pagaré Especial" Value="1"></asp:ListItem> <asp:ListItem Text="Pagaré Especial" Value="1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RfvDdlTipoLinea" InitialValue="-1" runat="server" ControlToValidate="TxtLineaAdicionalModal" CssClass="help-block errorimput" <asp:RequiredFieldValidator ID="RfvDdlTipoLinea" InitialValue="-1" runat="server" ControlToValidate="TxtLineaAdicionalModal" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Linea''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator> ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Linea''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>

View File

@@ -910,7 +910,8 @@ Partial Class Clientes
CargaDocumentacionCliente() CargaDocumentacionCliente()
'TxtPais.Text = "México" 'TxtPais.Text = "México"
End If End If
If UsuarioActual.Empresa.CvePlataforma = 3 Then If UsuarioActual.Empresa.CvePlataforma = 3 Then
LbAddDispositivo.Visible = True LbAddDispositivo.Visible = True
@@ -1334,7 +1335,13 @@ Partial Class Clientes
DdlMetodoPagoSucursal.DataBind() DdlMetodoPagoSucursal.DataBind()
'DdlMetodoPago.DataBind() 'DdlMetodoPago.DataBind()
End Sub End Sub
Private Sub CargaPrecioLista() Private Sub CargaPrecioLista()
'SI NO TIENE LA FUNCIONALIDAD DE LISTA DE PRECIOS
If Not GlobalDTPrecioListas(UsuarioActual.CveEmpresa).Rows.Count > 0 Then
DdlSubProyecto.AutoPostBack = False
DivPrecioLista.Visible = False
End If
DdlPrecioLista.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa) DdlPrecioLista.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa)
DdlPrecioLista.DataBind() DdlPrecioLista.DataBind()
DdlPrecioLista.Items.Insert(0, New ListItem(" - ", "-1")) DdlPrecioLista.Items.Insert(0, New ListItem(" - ", "-1"))
@@ -5838,13 +5845,15 @@ Partial Class Clientes
Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
If DdlSubProyecto.SelectedValue.ToEntero() > 0 Then If DdlSubProyecto.SelectedValue.ToEntero() > 0 Then
Dim Dr As DataRow = GlobalDTSubProyectos(-1, DdlSubProyecto.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa).Rows(0) Dim Dr As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)
If Dr IsNot Nothing Then If Dr IsNot Nothing Then
If Dr("CvePrecioLista").ToString().ToEntero() > 0 Then If Dr("CvePrecioLista").ToString().ToEntero() > 0 Then
DdlPrecioLista.SelectedValueExist(Dr("CvePrecioLista").ToString()) DdlPrecioLista.SelectedValueExist(Dr("CvePrecioLista").ToString())
End If End If
End If End If
End If End If
UpDatos.Update()
End Sub End Sub
#End Region #End Region
@@ -6744,7 +6753,7 @@ Partial Class Clientes
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1) Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveCliente > 0 Then If CveCliente > 0 Then
GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1) = Nothing
End If End If
End Sub End Sub
@@ -8468,8 +8477,8 @@ Partial Class Clientes
End Sub End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyectoFiltro.SelectedIndexChanged Protected Sub DdlProyectoFiltro_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyectoFiltro.SelectedIndexChanged
CargarSubProyecto(DdlSubProyecto, DdlProyectoFiltro.SelectedValue) CargarSubProyecto(DdlSubProyectoFiltro, DdlProyectoFiltro.SelectedValue)
End Sub End Sub
Protected Sub DdlClasificacionFilto_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlClasificacionFilto_SelectedIndexChanged(sender As Object, e As EventArgs)

View File

@@ -2235,30 +2235,29 @@ Partial Class Ventas_ClientesAbonar
If DdlTipoTransaccion.SelectedValue > 0 Then ' transferencias y layout If DdlTipoTransaccion.SelectedValue > 0 Then ' transferencias y layout
trCuentaDeposito.Visible = False trCuentaDeposito.Visible = False
Dim Dep As New ClsGenerales Dim dtc As DataTable = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
If Dep.GetCuentasDepositos(CveCliente:=CveCliente) Then
If dtc IsNot Nothing Then
If DdlTipoTransaccion.SelectedValue = "9" Then If DdlTipoTransaccion.SelectedValue = "9" Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'") DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
If Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else Else
BtnIEGuardar.Enabled = False BtnIEGuardar.Enabled = False
Alert("El Cliente no tiene ninguna cuenta deposito registrada ante el sistema BBVA BANCOMER", TipoMensaje.MsgAdvertencia) Alert("El Cliente no tiene ninguna cuenta deposito registrada ante el sistema BBVA BANCOMER", TipoMensaje.MsgAdvertencia)
End If End If
Else Else
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'") DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
If Dep.DtResultados.Rows.Count >= 1 Then If dtc.Rows.Count >= 1 Then
trCuentaDeposito.Visible = True trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If End If
End If End If
End If End If
Dep.Dispose()
DdlCuentaDeposito.DataBind() DdlCuentaDeposito.DataBind()
Else Else
trCuentaDeposito.Visible = False trCuentaDeposito.Visible = False
@@ -2280,16 +2279,17 @@ Partial Class Ventas_ClientesAbonar
CargaCuentasDepositos() CargaCuentasDepositos()
End Sub End Sub
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Dep As New ClsGenerales Dim dtc As DataTable = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero)
If Dep.GetCuentasDepositos(CveCliente:=CveCliente, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then
If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then If dtc IsNot Nothing AndAlso dtc.Rows.Count = 1 Then
If dtc.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
TrReferenciaCIE.Visible = True TrReferenciaCIE.Visible = True
TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString TxtReferenciaCIE.Text = dtc.Rows(0)("Referencia").ToString
Else Else
TrReferenciaCIE.Visible = False TrReferenciaCIE.Visible = False
End If End If
End If End If
Dep.Dispose()
UpCuentaDeposito.Update() UpCuentaDeposito.Update()
End Sub End Sub
#End Region #End Region

View File

@@ -2755,6 +2755,7 @@ Partial Class Ventas
End If End If
End Using End Using
End If End If
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
DdlMoneda.SelectedValueExist(2) DdlMoneda.SelectedValueExist(2)
CambiaMoneda() CambiaMoneda()
@@ -21090,7 +21091,7 @@ Partial Class Ventas
Dim DtCostos = ObjInventario.DtResultados.Copy Dim DtCostos = ObjInventario.DtResultados.Copy
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}) Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
Dim IdCtaContable As Integer = 0 Dim IdCtaContable As Integer = 0
Dim CveCuenta As Integer = 0 ' Dim CveCuenta As Integer = 0
Dim ValorInventario As Decimal Dim ValorInventario As Decimal
Dim TotalCostoAcumulado As Decimal = 0D Dim TotalCostoAcumulado As Decimal = 0D
Dim Cont As Integer = 1 Dim Cont As Integer = 1
@@ -21099,7 +21100,7 @@ Partial Class Ventas
For Each RowInv As DataRow In DtCostosDistinct.Rows For Each RowInv As DataRow In DtCostosDistinct.Rows
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero() 'CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
TotalCostoAcumulado += ValorInventario TotalCostoAcumulado += ValorInventario
'cuando es el último movimiento y hay diferencias en los importes 'cuando es el último movimiento y hay diferencias en los importes
@@ -21109,7 +21110,7 @@ Partial Class Ventas
Try Try
'If ValorInventario <> 0 Then 'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=ValorInventario, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
OcurrioError = True OcurrioError = True
Exit For Exit For
End If End If
@@ -21123,7 +21124,7 @@ Partial Class Ventas
If Not OcurrioError Then If Not OcurrioError Then
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacenVirtual)).ToEntero() IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacenVirtual)).ToEntero()
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=TotalCosto, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
OcurrioError = True OcurrioError = True
End If End If
End If End If
@@ -36398,7 +36399,7 @@ Partial Class Ventas
Me.CveCategoriaLineaAdicional = 0 Me.CveCategoriaLineaAdicional = 0
If CveVenta <= 0 Then If CveVenta <= 0 Then
TxtFechaPago.Text = Now.ToString("dd/MM/yyyy") TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToString("dd/MM/yyyy")
TxtOrdenCompra.Text = "" TxtOrdenCompra.Text = ""
'SI SE HABILITO LA FACTURACION DESDE LA LINEA ADICIONAL DEBE QUITARLO 'SI SE HABILITO LA FACTURACION DESDE LA LINEA ADICIONAL DEBE QUITARLO