-
This commit is contained in:
@@ -1475,7 +1475,8 @@ Public Class ClsBancos
|
||||
NotificarA As String, EsAbonoEnCuenta As Boolean, AplicaImpuestos As Boolean, IDPoliza As Integer, CvePrePoliza As Integer, Comprobante As String, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Optional CveCuentaDeposito As Integer = -1, Optional PagoElectronico As String = "-1", Optional CveEstatusIE As Integer = 1, Optional CveCuentaTarjeta As Integer = -1,
|
||||
Optional Referencia As String = "-1", Optional CveCorte As Integer = -1, Optional CveProveedorIntermediario As Integer = -1, Optional FueConciliado As Boolean = False,
|
||||
Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1, Optional ImporteDeduccionesPago As Decimal = -1) As Integer
|
||||
Optional MesesSinIntereses As Integer = -1, Optional Modulo As String = "", Optional ConceptoCIE As String = "", Optional CveOCAnticipo As Integer = -1, Optional ImporteDeduccionesPago As Decimal = -1,
|
||||
Optional AnticipoPuntual As Boolean = False) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Banc_IEAdd")
|
||||
@@ -1516,7 +1517,7 @@ Public Class ClsBancos
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = Modulo
|
||||
.Add("@CveOCAnticipo", SqlDbType.Int).Value = CveOCAnticipo
|
||||
.Add("@ImporteDeduccionesPago", SqlDbType.Money).Value = ImporteDeduccionesPago
|
||||
|
||||
.Add("@AnticipoPuntual", SqlDbType.Bit).Value = AnticipoPuntual
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -1514,8 +1514,7 @@ Public Class ClsInventarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetKardexAlmacen(CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Optional CodigoInicio As String = "-1", Optional CodigoFin As String = "-1") As Boolean
|
||||
Public Function GetKardexAlmacen(CvePS As Integer, FechaI As String, FechaF As String, CveAlmacen As Integer, CveUnidadMedida As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_KardexAlmacenGet")
|
||||
@@ -1528,8 +1527,6 @@ Public Class ClsInventarios
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CodigoInicio", SqlDbType.VarChar).Value = CodigoInicio
|
||||
.Add("@CodigoFin", SqlDbType.VarChar).Value = CodigoFin
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1549,7 +1546,7 @@ Public Class ClsInventarios
|
||||
Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer,
|
||||
IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0,
|
||||
Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1",
|
||||
Optional GPO As Integer = 1, Optional CodigoPS As String = "-1", Optional CodigoInicio As String = "-1", Optional CodigoFin As String = "-1") As Boolean
|
||||
Optional GPO As Integer = 1, Optional CodigoPS As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_KardexAlmacenHorizontalGet")
|
||||
@@ -1573,10 +1570,6 @@ Public Class ClsInventarios
|
||||
.Add("@CveAlmacenes", SqlDbType.NVarChar).Value = CveAlmacenes
|
||||
.Add("@GPO", SqlDbType.Int).Value = GPO
|
||||
.Add("@CodigoPS", SqlDbType.VarChar).Value = CodigoPS
|
||||
.Add("@CodigoInicio", SqlDbType.VarChar).Value = CodigoInicio
|
||||
.Add("@CodigoFin", SqlDbType.VarChar).Value = CodigoFin
|
||||
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1839,7 +1832,7 @@ Public Class ClsInventarios
|
||||
|
||||
Public Function RepMovimientos(CveEmpresa As Integer, CveMoneda As Integer, FechaI As String, FechaF As String, CveConcepto As Integer, CveProveedor As Integer, Almacenes As String,
|
||||
CveCategoria As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer, Optional CveMarca As String = "-1", Optional CvePersonal As Integer = -1,
|
||||
Optional CveClasificacion2 As Integer = -1, Optional CveTipoAlmacen As String = "-1", Optional Modalidad As Integer = -1, Optional CodigoInicio As String = "-1", Optional CodigoFin As String = "-1") As Boolean
|
||||
Optional CveClasificacion2 As Integer = -1, Optional CveTipoAlmacen As String = "-1", Optional Modalidad As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_ReporteMovimientos")
|
||||
@@ -1862,8 +1855,6 @@ Public Class ClsInventarios
|
||||
.Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
|
||||
.Add("@CveTipoAlmacen", SqlDbType.VarChar).Value = CveTipoAlmacen
|
||||
.Add("@Modalidad", SqlDbType.Int).Value = Modalidad
|
||||
.Add("@CodigoInicio", SqlDbType.VarChar).Value = CodigoInicio
|
||||
.Add("@CodigoFin", SqlDbType.VarChar).Value = CodigoFin
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -10711,6 +10711,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/RepCotizacionesDetalle.aspx".ToUpper(), 430)
|
||||
PaginaDict.Add("/Ventas/RepVentasPV.aspx".ToUpper(), 9)
|
||||
PaginaDict.Add("/Ventas/RepVentaDetalle.aspx".ToUpper(), 9)
|
||||
PaginaDict.Add("/Ventas/RepVentaDetalle.aspx?Menu=1".ToUpper(), 785)
|
||||
PaginaDict.Add("/Ventas/CatClasificaciones.aspx".ToUpper(), 12)
|
||||
PaginaDict.Add("/Ventas/CatClasificaciones2.aspx".ToUpper(), 396)
|
||||
PaginaDict.Add("/Ventas/CatClasificacionesDetalle.aspx".ToUpper(), 12)
|
||||
|
||||
@@ -2722,6 +2722,27 @@ Public Class ClsRH
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetPersonalPreAsistenciaRegistros(InicioPeriodo As Date, FinPeriodo As Date, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
SqlDataAdapter("PA_RH_PersonalPreAsistenciaRegistrosGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@InicioPeriodo", SqlDbType.Date).Value = InicioPeriodo
|
||||
.Add("@FinPeriodo", SqlDbType.Date).Value = FinPeriodo
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrió un error al consultar las Asistencias del Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddAsistencia(CvePersonal As Integer, CveCliente As Integer, CveSubProyecto As Integer, Fecha As Date, CveAsistenciasInasistencias As Integer, PorcentajePago As Double,
|
||||
HorasDobles As Double, HorasTriples As Double, CveMotivoHoraExtra As Integer, Observacion As String, CveUsuario As Integer, CveEmpresa As Integer, Modulo As String) As Boolean
|
||||
|
||||
@@ -2768,6 +2789,44 @@ Public Class ClsRH
|
||||
End Function
|
||||
|
||||
|
||||
Public Function AddPreAsistencia(CvePersonal As Integer, Fecha As Date, CveAsistenciasInasistencias As Integer, PorcentajePago As Double, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Data = New DataTable
|
||||
'SqlAdapter = New SqlDataAdapter("PA_RH_PersonalAsistenciasAddUpd", SqlConexion)
|
||||
'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
|
||||
SqlDataAdapter("PA_RH_PersonalPreAsistenciasAddUpd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||
.Add("@CveAsistenciasInasistencias", SqlDbType.Int).Value = CveAsistenciasInasistencias
|
||||
.Add("@PorcentajePago", SqlDbType.Float).Value = PorcentajePago
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
CveAsistencia = SqlAdapter.SelectCommand.Parameters("@RETURN_VALUE").Value.ToString.ToEntero
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("Ya se registró la Asistencia del día " & Fecha & " para el empleado.", TipoMensaje.MsgAdvertencia)
|
||||
ElseIf Ex1.Message.Contains("x50102;") Then
|
||||
Alert("No se puede editar o agregar la asistencia ya que se encuentra vinculada a un periodo autorizado.", TipoMensaje.MsgAdvertencia)
|
||||
GuardaLog(String.Format("{0} DESCRIPCIÓN DETALLADA: {1} {2} {3}", "Ocurrió un error al editar o agregar la asistencia ", Ex1.ToString, vbCrLf, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()))
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar la Asistencia.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar la Pre Asistencia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpAsistenciaDetalle(CveEmpresa As Integer, CveUsuario As Integer, registros As List(Of RequestUpAsistenciaDetalle)) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Dim xmlProductos As System.Xml.Linq.XDocument = Nothing
|
||||
|
||||
@@ -245,6 +245,7 @@
|
||||
<asp:CheckBox ID="ChkAbonoCuenta" CssClass="md-checksd" ClientIDMode="Static" runat="server" Text="Abono en Cuenta"></asp:CheckBox>
|
||||
<br />
|
||||
<asp:CheckBox ID="ChkAplicaViatico" CssClass="md-checksd" Text="Aplica Viaticos" runat="server" Visible="false" align="Right" />
|
||||
<asp:CheckBox ID="ChkAnticipoPuntual" CssClass="md-checksd" ClientIDMode="Static" runat="server" Text="Anticipo Puntual" Visible="false"></asp:CheckBox>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -452,7 +453,6 @@
|
||||
<asp:BoundField DataField="ImporteAnticipo" HeaderText="Importe Anticipo" DataFormatString="{0:C}" > <ItemStyle HorizontalAlign="Right" /></asp:BoundField>
|
||||
</Columns>
|
||||
</asp:GridView>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -620,7 +620,7 @@
|
||||
<ajax:TabPanel ID="TabM" runat="server" HeaderText="Movimientos">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6" >
|
||||
<div class="col-md-6">
|
||||
<asp:GridView ID="GvM" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover Widthall ADSCroll mysmallbtn ScrollAD" Style="text-align: center;" GridLines="None"
|
||||
DataKeyNames="CveVenta" OnRowDataBound="GvM_RowDataBound">
|
||||
<Columns>
|
||||
@@ -790,8 +790,8 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="TRImporteDeduccionesPago" visible="false">
|
||||
<td >Deducciones Pago:</td>
|
||||
<td style="text-align:left">
|
||||
<td>Deducciones Pago:</td>
|
||||
<td style="text-align: left">
|
||||
<asp:Label runat="server" ID="LblImporteDeduccionesPago"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1030,7 +1030,8 @@
|
||||
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold font-green'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' ></i><span class='caption-subject bold font-green'>Agendar</span>" Visible="false" Style="font-weight: 700 !important; cursor: pointer;" ToolTip="Agendar"></asp:HyperLink>
|
||||
<br /><asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
|
||||
<br />
|
||||
<asp:Literal ID="LtlTareaNueva" runat="server"></asp:Literal>
|
||||
<UserControl:TareaNueva runat="server" ID="TareaNueva" />
|
||||
<script>
|
||||
function OnAddedTareaNueva() {
|
||||
@@ -1220,7 +1221,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12" id="DVTipoTransacciónCancelar2" runat="server" visible="false">
|
||||
Cuenta Devolución:
|
||||
<asp:DropDownList ID="DdlDevolucionCuenta" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" >
|
||||
<asp:DropDownList ID="DdlDevolucionCuenta" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta">
|
||||
<asp:ListItem Value="-1">-</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
@@ -1231,7 +1232,7 @@
|
||||
|
||||
</div>
|
||||
<br />
|
||||
<div class="row" id="DivCancelarComplemento" runat="server" Visible="false">
|
||||
<div class="row" id="DivCancelarComplemento" runat="server" visible="false">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet light xspadding bordered whitoutcol" style="width: 100%">
|
||||
<div class="portlet-title">
|
||||
@@ -1251,7 +1252,7 @@
|
||||
<div class="row" style="align-items: center; vertical-align: middle;">
|
||||
<label class="col-md-3" style="max-width: 155px;">Motivo de cancelación:</label>
|
||||
<div class="col-md-9">
|
||||
<asp:DropDownList runat="server" id="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="select2me" Width="100%" >
|
||||
<asp:DropDownList runat="server" ID="DdlMotivoCancelacion" DataTextField="CodigoSATDescripcion" DataValueField="CveMotivoCancelacion" CssClass="select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RfvDdlMotivoCancelacion" runat="server" ControlToValidate="DdlMotivoCancelacion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Motivo de Cancelación''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpCancelarIE"></asp:RequiredFieldValidator>
|
||||
@@ -1273,7 +1274,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- <div id="DivChqDevueltoIE" class="modal fade">
|
||||
<%-- <div id="DivChqDevueltoIE" class="modal fade">
|
||||
<div class="modal-dialog" style="max-height: 500px; max-width: 500px;">
|
||||
<asp:UpdatePanel ID="UpdatePanel1" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -646,6 +646,10 @@ Partial Class Bancos_IE
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||
DivOtrosIngresosEgresos.Visible = True
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso UsuarioActual.CveRol = 1 Then
|
||||
ChkAnticipoPuntual.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSCREDITO") Then
|
||||
@@ -711,6 +715,7 @@ Partial Class Bancos_IE
|
||||
TxtObservaciones.Enabled = False
|
||||
ChkAplicaImpuestos.Enabled = False
|
||||
ChkAbonoCuenta.Enabled = False
|
||||
ChkAnticipoPuntual.Enabled = False
|
||||
Anexo.Visible = False
|
||||
DdlCliente.Enabled = False
|
||||
DdlProveedores.Enabled = False
|
||||
@@ -806,6 +811,8 @@ Partial Class Bancos_IE
|
||||
|
||||
End Try
|
||||
|
||||
ChkAnticipoPuntual.Checked = CBool(ObjIE.DtResultados(0)("AnticipoPuntual").ToString)
|
||||
|
||||
CveIEDeposito = ObjIE.DtResultados(0)("CveIEDepositoPadre").ToString.ToEntero
|
||||
CuentaDepositoPadre = ObjIE.DtResultados(0)("CuentaDepositoPadre").ToString
|
||||
Cuenta = ObjIE.DtResultados(0)("NumCuenta").ToString
|
||||
@@ -1755,6 +1762,13 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
Dep.Dispose()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
If String.IsNullOrEmpty(TxtObservaciones.Text.Trim) Then
|
||||
Alert("Las observaciones son obligatorias.", TipoMensaje.MsgAdvertencia)
|
||||
EsValido = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveOCSolicitudAnticipo > 0 Then
|
||||
Dim ObjOC As New ClsOC
|
||||
If ObjOC.GetOCAnticipoSaldo(CveOCSolicitudAnticipo, UsuarioActual.CveEmpresa) Then
|
||||
@@ -2001,7 +2015,7 @@ Partial Class Bancos_IE
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, TxtFolio.Text.Trim, PagueseA, TxtImporte.Text.Trim.ToDouble, tCveMoneda,
|
||||
TxtTipoCambio.Text.Trim.ToDouble, TxtObservaciones.Text.Trim, TxtNotificarA.Text.Trim, ChkAbonoCuenta.Checked, ChkAplicaImpuestos.Checked, -1, CvePrePoliza, Comprobante, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
CveCuentaDeposito:=CveCuentaDeposito, CveEstatusIE:=DdlEstatusIE.SelectedValue.ToString.ToEntero, Referencia:=If(TxtReferenciaCIE.Visible, TxtReferenciaCIE.Text, "-1"),
|
||||
ConceptoCIE:=If(TxtConceptoCIE.Text.Trim.Length > 0, TxtConceptoCIE.Text, "-1"), CveCorte:=Me.CveCorte, CveOCAnticipo:=CveOCSolicitudAnticipo)
|
||||
ConceptoCIE:=If(TxtConceptoCIE.Text.Trim.Length > 0, TxtConceptoCIE.Text, "-1"), CveCorte:=Me.CveCorte, CveOCAnticipo:=CveOCSolicitudAnticipo, AnticipoPuntual:=ChkAnticipoPuntual.Checked)
|
||||
|
||||
If CveIE > 0 Then
|
||||
|
||||
|
||||
@@ -9866,7 +9866,7 @@ Partial Class Compras_Compras
|
||||
e.Row.FCLabel("LtlUnidadMedida").Attributes.Add("title", "Unidad de medida SIN registrar")
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then e.Row.FCHyperLink("HplPS").Text = e.Row.DBCampo("PSCodigo")
|
||||
'If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then e.Row.FCHyperLink("HplPS").Text = e.Row.DBCampo("PSCodigo")
|
||||
|
||||
'EQUIVALENCIA
|
||||
If e.Row.DBCampo("CveUM").ToString.ToEntero > 0 And e.Row.DBCampo("CveTipoPS").ToString.ToEntero = 2 Then
|
||||
@@ -20713,7 +20713,7 @@ Partial Class Compras_Compras
|
||||
Dim Diferencia As Decimal = saldoTotal - TotalAcumuladoTabla - ValImporte
|
||||
|
||||
If (Diferencia) < 0 Then
|
||||
Alert($"No hay presupuesto disponible en el subproyecto <b>{ValSubProyecto}</b> con la clasificación <b>{ValClasificacion}</b>, Tipo de gasto <b>{ValTipoGasto}</b>. Se excede por <b>{Math.Abs(Diferencia).FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"No hay presupuesto disponible. <br>SubProyecto: <b>{ValSubProyecto}</b> <br>Clasificación: <b>{ValClasificacion}</b> <br>Tipo de gasto: <b>{ValTipoGasto}</b>. Se excede por <b>{Math.Abs(Diferencia).FormatoNumero}.</b>", TipoMensaje.MsgAdvertencia)
|
||||
respuesta = False
|
||||
|
||||
Else
|
||||
@@ -20721,7 +20721,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert($"No hay presupuesto disponible en el subproyecto <b>{ValSubProyecto}</b> con la clasificación <b>{ValClasificacion}</b>, Tipo de gasto <b>{ValTipoGasto}</b> ", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"No hay presupuesto disponible. <br>SubProyecto: <b>{ValSubProyecto}</b> <br>Clasificación: <b>{ValClasificacion}</b> <br>Tipo de gasto: <b>{ValTipoGasto}</b>.", TipoMensaje.MsgAdvertencia)
|
||||
respuesta = False
|
||||
End If
|
||||
Else
|
||||
@@ -20778,16 +20778,24 @@ Partial Class Compras_Compras
|
||||
Dim tieneRegistrosConCveSubProyecto As Boolean = resultadosFiltrados.Any(Function(row) CType(row("CveSubProyecto"), Integer) = item.CveSubProyecto)
|
||||
|
||||
If tieneRegistrosConCveSubProyecto Then
|
||||
Dim saldoTotal As Decimal = (From row In resultadosFiltrados
|
||||
'Dim saldoTotal As Decimal = (From row In resultadosFiltrados
|
||||
' Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso
|
||||
' row.Field(Of Integer)("CveClasificacion") = item.CveClasificacion
|
||||
' Select row.Field(Of Decimal)("Saldo")).Sum()
|
||||
|
||||
Dim saldoTotal As Decimal = (From row In resultadosFiltrados.AsEnumerable()
|
||||
Where row.Field(Of Integer)("CveSubProyecto") = item.CveSubProyecto AndAlso
|
||||
row.Field(Of Integer)("CveClasificacion") = item.CveClasificacion
|
||||
If(row.IsNull("CveClasificacion"),
|
||||
0,
|
||||
row.Field(Of Integer?)("CveClasificacion").GetValueOrDefault()) = item.CveClasificacion
|
||||
Select row.Field(Of Decimal)("Saldo")).Sum()
|
||||
|
||||
If saldoTotal > 0 Then
|
||||
|
||||
Dim Diferencia As Decimal = saldoTotal - item.TotalSum
|
||||
|
||||
If (Diferencia) < 0 Then
|
||||
Alert($"No hay presupuesto disponible en el subproyecto <b>{item.SubProyecto}</b> con la clasificación <b>{item.Clasificacion}</b>, Tipo de gasto <b>{item.TipoGasto}</b>. Se excede por <b>{Math.Abs(Diferencia).FormatoNumero}</b>", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"No hay presupuesto disponible. <br>SubProyecto: <b>{item.SubProyecto}</b> <br>Clasificación: <b>{item.Clasificacion}</b> <br>Tipo de gasto: <b>{item.TipoGasto}</b>. Se excede por <b>{Math.Abs(Diferencia).FormatoNumero}.</b>", TipoMensaje.MsgAdvertencia)
|
||||
respuesta = False
|
||||
Exit For
|
||||
Else
|
||||
@@ -20795,7 +20803,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert($"No hay presupuesto disponible en el subproyecto <b>{item.SubProyecto}</b> con la clasificación <b>{item.Clasificacion}</b>, Tipo de gasto <b>{item.TipoGasto}</b>", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"No hay presupuesto disponible. <br>SubProyecto: <b>{item.SubProyecto}</b> <br>Clasificación: <b>{item.Clasificacion}</b> <br>Tipo de gasto: <b>{item.TipoGasto}</b>.", TipoMensaje.MsgAdvertencia)
|
||||
respuesta = False
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -5746,11 +5746,12 @@ Partial Class PopUpVerFactura
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Dim reportDataSetsList As New List(Of ReportDataSource)
|
||||
|
||||
Dim CvePrePoliza As Integer = 0
|
||||
Dim dtMovs As New DataTable
|
||||
If ObjIE.GetBancosIEFacturasPagadas(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
dtMovs = ObjIE.DtResultados.FiltraParametros("CveConceptoContable IN (17,2,308,309,312,292 )")
|
||||
CvePrePoliza = dtMovs.Rows(0)("CVePrePoliza").ToString.ToEntero
|
||||
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
'CONVIERTO A PESOS CUANDO SE PAGA CON PESOS FACTURAS DE DOLARES
|
||||
@@ -5792,8 +5793,26 @@ Partial Class PopUpVerFactura
|
||||
.Add(New ReportParameter("LogoPath", RutaImagenLogo))
|
||||
End With
|
||||
dtMovs.Dispose()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
|
||||
Dim ObjContabilidad As New ClsContabilidad
|
||||
|
||||
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza, UsuarioActual.CveEmpresa)
|
||||
Dim dtPrePoliza As DataTable = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
ObjContabilidad.Dispose()
|
||||
|
||||
Dim rdsPrePoliza As New ReportDataSource("DSPrePoliza", dtPrePoliza)
|
||||
reportDataSetsList.Add(rdsPrePoliza)
|
||||
|
||||
ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientosPrePoliza.rdlc", reportDataSetsList, paramList, ObjIE.Folio, "PDF")
|
||||
Else
|
||||
ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientos.rdlc", reportDataSetsList, paramList, ObjIE.Folio, "PDF")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
1980
Empresas/Grales/Formatos/rptChequeMovimientos.rdlc
Normal file
1980
Empresas/Grales/Formatos/rptChequeMovimientos.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3252,7 +3252,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Consola</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}&Consola={1}", CveMovimiento, Consola)))
|
||||
End If
|
||||
|
||||
If CveMovimientoEntrada > 0 Then
|
||||
If CveMovimientoEntrada > 0 AndAlso Not UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
Msg.AppendFormat("<br/><br/> Movimiento Entrada (Traspaso): <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a></b>", CveMovimientoEntrada, FolioEntrada)
|
||||
Msg.AppendFormat("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada)))
|
||||
End If
|
||||
|
||||
@@ -66,11 +66,11 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"><i class="fa fa-file-pdf-o"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Data
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CGame
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
@@ -113,10 +112,7 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero
|
||||
|
||||
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
||||
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
||||
|
||||
If ObjMovimientos.GetKardexAlmacen(CvePS, FechaI, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
||||
If ObjMovimientos.GetKardexAlmacen(CvePS, FechaI, FechaF, CveAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
dt = ObjMovimientos.DtResultados
|
||||
GvDatos.DataSource = ObjMovimientos.DtResultados
|
||||
End If
|
||||
|
||||
@@ -96,18 +96,17 @@
|
||||
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkProyectado" OnClick="LnkProyectado_Click" Text="Cargar Proyecciones" />
|
||||
<asp:LinkButton ID="LnkProyectado" runat="server" OnClick="LnkProyectado_Click"><i class="fa fa-upload"></i> Cargar Proyecciones</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkPOG" OnClick="LnkProyectado_Click" Visible="false"><i class="fa fa-ad-excel"></i> POG</asp:LinkButton>
|
||||
<asp:LinkButton runat="server" ID="LnkPOG" OnClick="LnkProyectado_Click" Visible="false"><i class="fa fa-file-excel-o"></i> POG</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
|
||||
@@ -238,28 +237,7 @@
|
||||
</div>
|
||||
</asp:Panel>
|
||||
|
||||
<div class="row" runat="server" visible="false" id="DVFiltroCodigo">
|
||||
<div class="col-md-1">Código Inicio:</div>
|
||||
<div class="col-md-2"><asp:TextBox runat="server" ID="TxtCodigoInicio" Height="26px"></asp:TextBox></div>
|
||||
<div class="col-md-1">Código Fin:</div>
|
||||
<div class="col-md-2"><asp:TextBox runat="server" ID="TxtCodigoFinal" Height="26px"></asp:TextBox></div>
|
||||
|
||||
<div class="col-md-1" runat="server" id="DVNavegar" >
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<asp:LinkButton runat="server" ID="LnkPSAntyerior" OnClick="LnkPSAntyerior_Click" CssClass="btn btn-primary">Anterior</asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<asp:LinkButton runat="server" ID="LnkPSSiguiente" OnClick="LnkPSSiguiente_Click" CssClass="btn btn-primary">Siguiente</asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -329,7 +307,7 @@
|
||||
<asp:ListItem Text="Entrada" Value="1" Selected="True" />
|
||||
<asp:ListItem Text="Salida" Value="2" />
|
||||
</asp:RadioButtonList>
|
||||
<asp:Button runat="server" ID="BtnDescargarFormato" OnClick="BtnDescargarFormato_Click" Text="Descargar formato" CssClass="btn btn-warning" />
|
||||
<asp:LinkButton runat="server" ID="BtnDescargarFormato" OnClick="BtnDescargarFormato_Click" CssClass="btn btn-warning" ><i class='fa fa-download' aria-hidden='true'></i> Descargar formato</asp:LinkButton>
|
||||
</div>
|
||||
<asp:Label runat="server" ID="Label1" Text="Subir Proyección:" Style="font-size: 15px" />
|
||||
<br />
|
||||
|
||||
@@ -38,10 +38,6 @@ Partial Class Inventarios_KardexAlmacenHorizontal
|
||||
If IfNull(Request("CvePS"), "-1").ToString.ToEntero > 0 Then CargarKardex(Request("CvePS").ToString.ToEntero)
|
||||
ddlProducto2.SelectedValue = If(Request("CvePS") IsNot Nothing, Request("CvePS").ToString, "-1")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||
DVFiltroCodigo.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
@@ -159,14 +155,10 @@ Partial Class Inventarios_KardexAlmacenHorizontal
|
||||
Dim GPO As Integer = Ddlgrupo.SelectedValue.ToEntero
|
||||
Dim IncluyeTransitorios As Integer = DdlIncluyeTransitorios.SelectedValue.ToEntero
|
||||
|
||||
|
||||
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
||||
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
||||
|
||||
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios,
|
||||
DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue.ToEntero,
|
||||
Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO, CodigoPS:=TxtPS.Text,
|
||||
CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
||||
Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO, CodigoPS:=TxtPS.Text) Then
|
||||
|
||||
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
|
||||
dt = ObjMovimientos.DtResultados
|
||||
Dim ListaBorrar As New List(Of DataColumn)
|
||||
@@ -538,65 +530,4 @@ Partial Class Inventarios_KardexAlmacenHorizontal
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkPSAntyerior_Click(sender As Object, e As EventArgs)
|
||||
NavegacionPS(Siguiente:=False)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPSSiguiente_Click(sender As Object, e As EventArgs)
|
||||
NavegacionPS(Siguiente:=True)
|
||||
End Sub
|
||||
Private Sub NavegacionPS(Siguiente As Boolean)
|
||||
Dim CvePS As Integer = ddlProducto2.SelectedValue.ToEntero
|
||||
|
||||
If Not CvePS > 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
Dim dt As DataTable = New DataTable
|
||||
|
||||
Dim Entrada As Boolean = True
|
||||
Dim Salida As Boolean = True
|
||||
|
||||
Dim FechaI As String = "-1"
|
||||
Dim FechaF As String = If(TxtFechaF.Text <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||
Dim CveAlmacen As Integer = If(ddlAlmacen.SelectedValue.ToEntero = 0, -1, ddlAlmacen.SelectedValue.ToEntero)
|
||||
Dim CveAlmacenes As String = ddlAlmacen.GetSelectedValues()
|
||||
If CveAlmacenes.Contains(",") Then
|
||||
CveAlmacen = -1
|
||||
End If
|
||||
If CvePS > 0 Then
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
ddlProducto2.SelectedText = dr("PSCodigo").ToString
|
||||
ddlProducto2.SelectedValue = CvePS.ToString
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim CveTiposAlmacen As String = "-1"
|
||||
|
||||
|
||||
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
||||
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetKardexPSNavegacion(Entrada, Salida, CvePS, FechaI, FechaF, CveAlmacen, CveTiposAlmacen, DdlUnidadMedida.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
CveAlmacenes, Siguiente:=Siguiente, CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
||||
dt = ObjInventarios.DtResultados.Copy
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
ddlProducto2.SelectedValue = dt.Rows(0)("CvePS").ToString
|
||||
ddlProducto2.SelectedText = dt.Rows(0)("CodigoPS").ToString
|
||||
ddlProducto2.txtValue.Value = dt.Rows(0)("CvePS").ToString
|
||||
ddlProducto2.txtText.Value = dt.Rows(0)("CodigoPS").ToString
|
||||
CargarKardex(dt.Rows(0)("CvePS").ToString.ToEntero)
|
||||
UPFiltros.Update()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcelPersonalizado" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Excel Personalizado</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkExcelPersonalizado" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel Personalizado</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkFormatoInventario" runat="server" Visible="false"><i class="fa fa-ad-excel"></i> Generar Formato Inventario</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkFormatoInventario" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Generar Formato Inventario</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
|
||||
@@ -256,13 +256,10 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
CveMarca = DdlMarca.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
Dim CodigoInicio As String = If(TxtCodigoInicio.Text.Trim.Length = 0, "-1", TxtCodigoInicio.Text.Trim)
|
||||
Dim CodigoFin As String = If(TxtCodigoFinal.Text.Trim.Length = 0, "-1", TxtCodigoFinal.Text.Trim)
|
||||
|
||||
If Reporte.RepMovimientos(UsuarioActual.CveEmpresa, DdlMoneda.SelectedValue.ToEntero, FechaInicial, FechaFinal, DdlTipoMovimiento.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero,
|
||||
Almacenes, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero,
|
||||
DdlMovs.SelectedValue.ToEntero, CveMarca:=Marcas, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveTipoAlmacen:=TipoAlmacen,
|
||||
Modalidad:=DdlModalidadFiltro.SelectedValue.ToEntero, CodigoInicio:=CodigoInicio, CodigoFin:=CodigoFin) Then
|
||||
Modalidad:=DdlModalidadFiltro.SelectedValue.ToEntero) Then
|
||||
dt = Reporte.DtResultados
|
||||
|
||||
|
||||
|
||||
@@ -16,11 +16,15 @@
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" ID="UpAgregar" UpdateMode="Conditional" >
|
||||
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnAgregar" Visible="false" data-toggle="tooltip" data-placement="left" title="Procesar" Text="<i class='fa fa-plus'></i> Procesar"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkEnviarAsistencia" Visible="false" data-toggle="tooltip" data-placement="left" title="Enviar Asistencia" Text="<i class='fa fa-arrow-right'></i> Enviar Asistencia"
|
||||
OnClick="LnkEnviarAsistencia_Click"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
@@ -33,45 +37,27 @@
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
|
||||
|
||||
<ul class="list-inline text-size-12">
|
||||
<li>Ejercicio:
|
||||
|
||||
<asp:DropDownList ID="DdlEjercicios" runat="server" OnSelectedIndexChanged="DdlEjercicios_SelectedIndexChanged" AutoPostBack="true"
|
||||
style="width: 120px !important;" CssClass="select2me" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
|
||||
|
||||
</li>
|
||||
<li>Tipo Periodo:
|
||||
<asp:DropDownList ID="DdlTipoPeriodo" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 120px !important;" ValidationGroup="GrpGuardar" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo">
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li><asp:label ID="LblPeriodo" runat="server" Visible="true" >Periodo:</asp:label>
|
||||
<asp:DropDownList ID="DdlRango" Visible="true" AutoPostBack="true" runat="server" CssClass="form-control input-sm select2me" Style="width: 275px !important;" DataTextField="NominaEstatus" DataValueField="CvePeriodo" ValidationGroup="GrpGuardar">
|
||||
<li>
|
||||
Período:
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" CssClass="select2me"
|
||||
DataTextField="NominaEstatus" DataValueField="CvePeriodo" style="width: 120px !important;" >
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<%--<li>Fecha Inicio:
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||
<asp:TextBox ID="TxtInicio" runat="server" CssClass="form-control input-sm" CausesValidation="true" MaxLength="10" Width="82px "></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtInicio" PopupButtonID="ImgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li>Fecha Fin:
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy" style="display: inline-block;">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control input-sm" CausesValidation="true" MaxLength="10" Width="82px "></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEETxtFechaFin" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CETxtFechaFin" TargetControlID="TxtFechaFin" PopupButtonID="ImgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CvTxtFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="RfvcTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="CvcTxtFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="CvTxtFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>--%>
|
||||
<li>SubProyecto:
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" CssClass="form-control input-sm select2me" Style="width: 135px; !important;" DataTextField="SubProyecto" DataValueField="CveSubproyecto">
|
||||
</asp:DropDownList>
|
||||
@@ -340,7 +326,7 @@
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<asp:Button ID="BtnGuardar" Visible="true" runat="server" Text="Guardar" class="btn btn-primary" OnClick="BtnGuardar_Click" />
|
||||
<asp:Button ID="BtnEstusAsistenciaModal" Visible="false" runat="server" class="btn btn-success" Text="Aceptar" />
|
||||
<%--<asp:Button ID="BtnEstusAsistenciaModal" Visible="false" runat="server" class="btn btn-success" Text="Aceptar" />--%>
|
||||
<button id="Button4" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
Option Strict On
|
||||
|
||||
|
||||
Imports Extensiones
|
||||
Imports System
|
||||
Imports System.Data
|
||||
|
||||
|
||||
|
||||
Partial Class RH_RepChecadorPreAsistencia
|
||||
Inherits ClsPaginas
|
||||
#Region "Propiedades"
|
||||
@@ -60,16 +65,16 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DTPeridos As DataTable
|
||||
Private Property DTPeriodos As DataTable
|
||||
Get
|
||||
If ViewState("DTPeridoso") Is Nothing Then
|
||||
If ViewState("DTPeriodos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTPeridoso"), DataTable)
|
||||
Return DirectCast(ViewState("DTPeriodos"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTPeridoso") = value
|
||||
ViewState("DTPeriodos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -153,11 +158,26 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Property
|
||||
|
||||
|
||||
'Private Property dtPeriodos As DataTable
|
||||
' Get
|
||||
' If ViewState("dtPeriodos") Is Nothing Then
|
||||
' Return Nothing
|
||||
' Else
|
||||
' Return DirectCast(ViewState("dtPeriodos"), DataTable)
|
||||
' End If
|
||||
' End Get
|
||||
' Set(value As DataTable)
|
||||
' ViewState("dtPeriodos") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub RH_RepChecadorIncidencias_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
cargaEjercicios()
|
||||
CargaCombos()
|
||||
End If
|
||||
|
||||
@@ -165,6 +185,81 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub cargaEjercicios()
|
||||
Dim EjercicioActual As Integer = UsuarioActual.Empresa.EjercicioActual
|
||||
If EjercicioActual = 0 Then
|
||||
EjercicioActual = Now.Year
|
||||
End If
|
||||
|
||||
Dim dtejercicio As DataTable = Nothing
|
||||
Using objnom As New ClsNominas()
|
||||
If objnom.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
dtejercicio = objnom.DtResultados
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlEjercicios.DataSource = dtejercicio
|
||||
DdlEjercicios.DataBind()
|
||||
|
||||
Dim litem As ListItem = Nothing
|
||||
If dtejercicio IsNot Nothing AndAlso dtejercicio.Rows.Count > 0 Then
|
||||
If dtejercicio.Compute("COUNT(Ejercicio)", String.Format("Ejercicio={0}", EjercicioActual)).ToString.ToEntero = 0 Then
|
||||
litem = New ListItem(EjercicioActual.ToString(), EjercicioActual.ToString())
|
||||
DdlEjercicios.Items.Insert(0, litem)
|
||||
End If
|
||||
If dtejercicio.Compute("COUNT(Ejercicio)", String.Format("Ejercicio={0}", EjercicioActual - 1)).ToString.ToEntero = 0 Then
|
||||
litem = New ListItem((EjercicioActual - 1).ToString(), (EjercicioActual - 1).ToString())
|
||||
DdlEjercicios.Items.Insert(1, litem)
|
||||
' DdlEjerciciosCM.Items.Insert(1, litem)
|
||||
End If
|
||||
Else
|
||||
litem = New ListItem(EjercicioActual.ToString(), EjercicioActual.ToString())
|
||||
DdlEjercicios.Items.Insert(0, litem)
|
||||
'DdlEjerciciosCM.Items.Insert(0, litem)
|
||||
litem = New ListItem((EjercicioActual - 1).ToString(), (EjercicioActual - 1).ToString())
|
||||
DdlEjercicios.Items.Insert(1, litem)
|
||||
'DdlEjerciciosCM.Items.Insert(1, litem)
|
||||
End If
|
||||
|
||||
If DdlEjercicios.Items.Count > 0 Then
|
||||
DdlEjercicios.SelectedIndex = 0
|
||||
End If
|
||||
|
||||
' Additional method to check if selected value exists, and set it if it does
|
||||
DdlEjercicios.SelectedValueExist(Now.Year.ToString())
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlEjercicios_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
cargaPeriodos()
|
||||
End Sub
|
||||
|
||||
Private Sub cargaPeriodos()
|
||||
BtnConsultar.Enabled = False
|
||||
Dim tipoPeriodo As Integer = DdlTipoPeriodo.SelectedValue.ToEntero()
|
||||
Dim ejercicio As Integer = DdlEjercicios.SelectedValue.ToEntero()
|
||||
DTPeriodos = Nothing
|
||||
|
||||
If DdlTipoPeriodo.SelectedValue.ToEntero() > 0 Then
|
||||
Using objPeriodos As New ClsNominas()
|
||||
If objPeriodos.GetPeriodos(tipoPeriodo, UsuarioActual.CveEmpresa, ejercicio, -1, -1) Then
|
||||
If objPeriodos.DtResultados.Rows.Count = 0 Then
|
||||
Alert("No existen periodos registrados en este año y tipo de periodo, ¿desea registrarlos masivamente?", TipoMensaje.MsgConfirmacion, "$(""#divCargaMasiva"").modal(""show"");", TextoConfirmacion:="Aceptar", TextoSegundoBoton:="No")
|
||||
End If
|
||||
DTPeriodos = objPeriodos.DtResultados.FiltraParametros("Estatus IN (1,2,3,4,5)")
|
||||
End If
|
||||
End Using
|
||||
|
||||
BtnConsultar.Enabled = True
|
||||
End If
|
||||
|
||||
DdlPeriodo.DataSource = DTPeriodos
|
||||
DdlPeriodo.DataBind()
|
||||
DdlPeriodo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
UPFiltros.Update()
|
||||
'muestraPeriodo()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
|
||||
@@ -198,10 +293,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
lblTituloPagina.Text = ""
|
||||
|
||||
If DdlRango.SelectedIndex > 0 Then
|
||||
lblTituloPagina.Text = DdlRango.SelectedItem.Text
|
||||
If DdlPeriodo.SelectedIndex > 0 Then
|
||||
lblTituloPagina.Text = DdlPeriodo.SelectedItem.Text
|
||||
|
||||
Dim DtTemp As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero)
|
||||
Dim DtTemp As DataTable = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue.ToEntero)
|
||||
FechaInicioPeriodo = DtTemp(0)("FechaInicio").ToString().ToDate
|
||||
FechaFinPeriodo = DtTemp(0)("FechaFin").ToString().ToDate
|
||||
End If
|
||||
@@ -212,8 +307,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Protected Sub DdlTipoPeriodo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoPeriodo.SelectedIndexChanged
|
||||
|
||||
DdlRango.Items.Clear()
|
||||
DTPeridos = Nothing
|
||||
DdlPeriodo.Items.Clear()
|
||||
DTPeriodos = Nothing
|
||||
|
||||
Dim objRh As New ClsRH
|
||||
|
||||
@@ -222,53 +317,57 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
CveTipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero
|
||||
DiasPeriodo = DTTipoPeriodoDatos.FiltraParametros(" CveTipoPeriodo = " & DdlTipoPeriodo.SelectedValue)(0)("DiasPeriodo").ToString().ToEntero
|
||||
|
||||
Dim objNomina As New ClsNominas
|
||||
|
||||
If objNomina.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, -1, -1, -1) Then
|
||||
cargaPeriodos()
|
||||
|
||||
TxtFechaModal.Text = ""
|
||||
lblTituloPagina.Text = ""
|
||||
UpTituloPagina.Update()
|
||||
UpModalFechaBody.Update()
|
||||
'Dim objNomina As New ClsNominas
|
||||
|
||||
If objNomina.DtResultados.Rows.Count > 0 Then
|
||||
BtnConsultar.Enabled = True
|
||||
DTPeridos = objNomina.DtResultados
|
||||
Dim DTPeridosView As DataView = DTPeridos.DefaultView
|
||||
DTPeridosView.Sort = " FechaInicio desc "
|
||||
DTPeridos = DTPeridosView.ToTable
|
||||
DdlRango.DataSource = objNomina.DtResultados
|
||||
'If objNomina.GetPeriodos(DdlTipoPeriodo.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, -1, -1, -1) Then
|
||||
|
||||
' LblPeriodo.Visible = True
|
||||
'DdlRango.Visible = True
|
||||
Else
|
||||
' RegistraScript("$('#ModalModalFecha').modal({ backdrop: 'static', keyboard: false});")
|
||||
Alert("No se encontraron periodos disponibles.", TipoMensaje.MsgAdvertencia)
|
||||
DTPeridos = Nothing
|
||||
DdlRango.DataSource = Nothing
|
||||
End If
|
||||
Else
|
||||
DTPeridos = Nothing
|
||||
DdlRango.DataSource = Nothing
|
||||
End If
|
||||
' TxtFechaModal.Text = ""
|
||||
' lblTituloPagina.Text = ""
|
||||
' UpTituloPagina.Update()
|
||||
' UpModalFechaBody.Update()
|
||||
|
||||
Dim DtTempFechaInicial As DataTable = DTPeridos.FiltraParametros("Estatus = 1")
|
||||
' If objNomina.DtResultados.Rows.Count > 0 Then
|
||||
' BtnConsultar.Enabled = True
|
||||
' DTPeriodos = objNomina.DtResultados
|
||||
' Dim DTPeridosView As DataView = DTPeriodos.DefaultView
|
||||
' DTPeridosView.Sort = " FechaInicio desc "
|
||||
' DTPeriodos = DTPeridosView.ToTable
|
||||
' DdlPeriodo.DataSource = objNomina.DtResultados
|
||||
|
||||
objNomina.Dispose()
|
||||
DdlRango.DataBind()
|
||||
' ' LblPeriodo.Visible = True
|
||||
' 'DdlRango.Visible = True
|
||||
' Else
|
||||
' ' RegistraScript("$('#ModalModalFecha').modal({ backdrop: 'static', keyboard: false});")
|
||||
' Alert("No se encontraron periodos disponibles.", TipoMensaje.MsgAdvertencia)
|
||||
' DTPeriodos = Nothing
|
||||
' DdlPeriodo.DataSource = Nothing
|
||||
' End If
|
||||
'Else
|
||||
' DTPeriodos = Nothing
|
||||
' DdlPeriodo.DataSource = Nothing
|
||||
'End If
|
||||
'objNomina.Dispose()
|
||||
|
||||
Dim DtTempFechaInicial As DataTable = DTPeriodos.FiltraParametros("Estatus = 1")
|
||||
|
||||
|
||||
DdlPeriodo.DataBind()
|
||||
|
||||
If DtTempFechaInicial.Rows.Count > 0 Then
|
||||
Dim temCvePeriodoNomi As Integer = DtTempFechaInicial(0)("CvePeriodo").ToString().ToEntero
|
||||
DdlRango.SelectedValueExist(temCvePeriodoNomi)
|
||||
DdlPeriodo.SelectedValueExist(temCvePeriodoNomi)
|
||||
End If
|
||||
|
||||
DdlRango.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
DdlPeriodo.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
UPFiltros.Update()
|
||||
' BtnConsultar.Enabled = True
|
||||
Else
|
||||
|
||||
DTPeridos = Nothing
|
||||
DdlRango.DataSource = Nothing
|
||||
DTPeriodos = Nothing
|
||||
DdlPeriodo.DataSource = Nothing
|
||||
|
||||
'DdlRango.Visible = False
|
||||
' LblPeriodo.Visible = Fale
|
||||
@@ -281,7 +380,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
GeneraFechasInicioFinPerdiodo()
|
||||
End Sub
|
||||
|
||||
Private Sub DdlRango_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlRango.SelectedIndexChanged
|
||||
Private Sub DdlRango_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPeriodo.SelectedIndexChanged
|
||||
|
||||
GeneraFechasInicioFinPerdiodo()
|
||||
UpTituloPagina.Update()
|
||||
@@ -302,7 +401,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim dt As New DataTable
|
||||
|
||||
Dim Retardos As Integer = 0
|
||||
Dim DTAsistenciasInasistencias As New DataTable
|
||||
'Dim DTAsistenciasInasistencias As New DataTable
|
||||
Dim DTPreAsistenciasInasistencias As New DataTable
|
||||
Dim DTChecadorRegistros As New DataTable
|
||||
Dim DTHorarios As New DataTable
|
||||
Dim DTDiasInhabiles As New DataTable
|
||||
@@ -376,7 +476,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Resultados.Columns.Add("TipoCorto")
|
||||
Resultados.Columns.Add("Sancion")
|
||||
|
||||
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlRango.SelectedValue.ToEntero > 0 Then
|
||||
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlPeriodo.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim FiltroSubProyecto As String = ""
|
||||
Dim filtroturno = If(DdlTurno.SelectedValue = "-1", "", $"AND CveTurno = { DdlTurno.SelectedValue}")
|
||||
@@ -388,7 +488,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
'DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto)
|
||||
|
||||
Dim DtTempPeriodo As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero)
|
||||
Dim DtTempPeriodo As DataTable = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue.ToEntero)
|
||||
Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
||||
|
||||
Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto).AsEnumerable()
|
||||
@@ -439,24 +539,28 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DtVacaciones = objRH.DtResultados
|
||||
End If
|
||||
|
||||
If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DTAsistenciasInasistencias = objRH.DtResultados
|
||||
'If objRH.GetPersonalAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
' DTAsistenciasInasistencias = objRH.DtResultados
|
||||
'End If
|
||||
|
||||
If objRH.GetPersonalPreAsistenciaRegistros(FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa) Then
|
||||
DTPreAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
|
||||
'If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
' DTAsistenciasInasistenciasReg = objRH.DtResultados
|
||||
If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
DTAsistenciasInasistenciasReg = objRH.DtResultados
|
||||
|
||||
' If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then
|
||||
' BtnAgregar.Visible = False
|
||||
' BtnEstusAsistenciaModal.Visible = False
|
||||
'If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then
|
||||
' 'BtnAgregar.Visible = False
|
||||
' 'BtnEstusAsistenciaModal.Visible = False
|
||||
' 'DdlAsistenciaInacistencia.Enabled = False
|
||||
' Else
|
||||
' BtnAgregar.Visible = True
|
||||
' BtnEstusAsistenciaModal.Visible = True
|
||||
'Else
|
||||
' 'BtnAgregar.Visible = True
|
||||
' 'BtnEstusAsistenciaModal.Visible = True
|
||||
' 'DdlAsistenciaInacistencia.Enabled = True
|
||||
' End If
|
||||
' UpAgregar.Update()
|
||||
'End If
|
||||
'UpAcciones.Update()
|
||||
End If
|
||||
|
||||
objRH.Dispose()
|
||||
|
||||
@@ -536,12 +640,46 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim tabladelDia As DataTable = registrosPersonal.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND FechaRegistro >= '" & tempDatetime1.ToShortDateString & "' AND FechaRegistro <= '" & tempDatetime2.ToString() & "'")
|
||||
|
||||
If DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND Fecha >= '" & Fecha & "'").Rows.Count > 0 Then
|
||||
ReRow("CveAsistenciasInasistencias") = DTAsistenciasInasistencias(0)("CveAsistenciasInasistencias").ToString()
|
||||
|
||||
|
||||
|
||||
If DTPreAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND Fecha = '" & Fecha & "'").Rows.Count > 0 Then
|
||||
ReRow("CveAsistenciasInasistencias") = DTPreAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND Fecha = '" & Fecha & "'")(0)("CveAsistenciasInasistencias").ToString()
|
||||
|
||||
If ReRow("CveAsistenciasInasistencias").ToString.ToEntero > 0 Then
|
||||
|
||||
Dim drowAsistenciaInasistencia As DataRow = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltroPrimero($"CveAsistenciasInasistencias={ReRow("CveAsistenciasInasistencias").ToString.ToEntero}")
|
||||
|
||||
ReRow("Asistio") = drowAsistenciaInasistencia("AplicaAsistencia").ToString = "Aplica"
|
||||
ReRow("PorcentajePago") = DTPreAsistenciasInasistencias(0)("PorcentajePago").ToString.ToDecimal
|
||||
ReRow("Descanso") = drowAsistenciaInasistencia("AplicaVacacion").ToString = "Aplica"
|
||||
ReRow("DiaInhabil") = "False"
|
||||
ReRow("DiaVacacion") = drowAsistenciaInasistencia("AplicaVacacion").ToString = "Aplica"
|
||||
ReRow("FaltaRetardosAcumulados") = drowAsistenciaInasistencia("AplicaFalta").ToString = "Aplica"
|
||||
ReRow("Retraso") = drowAsistenciaInasistencia("AplicaRetardo").ToString = "Aplica"
|
||||
ReRow("FaltaRetraso") = False 'Not drowAsistenciaInasistencia("AplicaAsistencia").ToString = "Aplica"
|
||||
ReRow("TipoCorto") = drowAsistenciaInasistencia("TipoCorto").ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim CountRegistros As Integer = tabladelDia.Rows.Count
|
||||
If Not ReRow("CveAsistenciasInasistencias").ToString.ToEntero > 0 Then
|
||||
|
||||
'If tabladelDia.Rows.Count > 0 AndAlso tabladelDia.Rows.Count <> 4 And DiaLaboral = False Then
|
||||
If tabladelDia.Rows.Count > 0 AndAlso tabladelDia.Rows.Count <> 4 Then
|
||||
'Dim drowAsistenciaInasistencia As DataRow = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltroPrimero($"CveAsistenciasInasistencias={ReRow("CveAsistenciasInasistencias").ToString.ToEntero}")
|
||||
|
||||
ReRow("Asistio") = False
|
||||
ReRow("PorcentajePago") = 0
|
||||
ReRow("Descanso") = False
|
||||
ReRow("DiaInhabil") = False
|
||||
ReRow("DiaVacacion") = False
|
||||
ReRow("FaltaRetardosAcumulados") = False
|
||||
ReRow("Retraso") = False
|
||||
ReRow("FaltaRetraso") = False
|
||||
ReRow("TipoCorto") = "_ND"
|
||||
|
||||
Else
|
||||
Dim CountRegistros As Integer = tabladelDia.Rows.Count
|
||||
Dim Inconsistencia As Boolean = False
|
||||
|
||||
If Not DiaLaboral Then
|
||||
@@ -652,6 +790,16 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End If
|
||||
|
||||
If ReRow("Asistio").ToString() = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'adasdasd
|
||||
|
||||
|
||||
Resultados.Rows.Add(ReRow)
|
||||
@@ -899,7 +1047,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim ColumN As Integer = (dt.Columns.Count) - 2
|
||||
|
||||
For x As Integer = 3 To dt.Columns.Count-1
|
||||
For x As Integer = 3 To dt.Columns.Count - 1
|
||||
GVRegDatos.Columns(x).HeaderText = ""
|
||||
GVRegDatos.Columns(x).Visible = False
|
||||
Next
|
||||
@@ -940,10 +1088,17 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
RRow(ColumN) = "-"
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString().Length > 0 Then
|
||||
|
||||
RRow(ColumN) = $"{ResumenDia(0)("TipoCorto").ToString()}|" & filtro
|
||||
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("Asistio").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||
RRow(ColumN) = "A|" & filtro
|
||||
End If
|
||||
|
||||
|
||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||
RRow(ColumN) = "V|" & filtro
|
||||
End If
|
||||
@@ -970,6 +1125,11 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
RRow(ColumN) = "IND|" & filtro
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
|
||||
DTTempAsistencias = DTAsistenciasInasistenciasReg.FiltraParametros(filtro)
|
||||
@@ -1009,10 +1169,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Sub
|
||||
|
||||
Private Sub GvBind()
|
||||
|
||||
LnkEnviarAsistencia.Visible = False
|
||||
If DtDatosTabla.Rows.Count > 0 Then
|
||||
'BtnAgregar.Visible = True
|
||||
GVRegDatos.DataSource = DtDatosTabla
|
||||
LnkEnviarAsistencia.Visible = True
|
||||
|
||||
Else
|
||||
'BtnAgregar.Visible = False
|
||||
GVRegDatos.DataSource = Nothing
|
||||
@@ -1020,6 +1182,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
GVRegDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
UpAcciones.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -1027,7 +1190,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
|
||||
|
||||
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlRango.SelectedValue.ToEntero > 0 Then
|
||||
If DdlTipoPeriodo.SelectedValue.ToEntero > 0 And DdlPeriodo.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
Dim dt As New DataTable
|
||||
Dim DtPersonal As New DataTable
|
||||
@@ -1039,7 +1202,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DTAsistenciasInasistencias = objRH.DtResultados
|
||||
End If
|
||||
|
||||
Dim DtTempPeriodo As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero)
|
||||
Dim DtTempPeriodo As DataTable = DTPeriodos.FiltraParametros("CvePeriodo = " & DdlPeriodo.SelectedValue.ToEntero)
|
||||
Dim FechaInicioPeriodoFiltro = DtTempPeriodo(0)("FechaInicio").ToString().ToDate
|
||||
|
||||
Dim FilasFiltradas = From fila In GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros($" CveTipoPeriodo = { DdlTipoPeriodo.SelectedValue} AND CveEstado = 1 " & If(DdlTurno.SelectedValue = "-1", "", $" AND CveTurno = {DdlTurno.SelectedValue}")).AsEnumerable()
|
||||
@@ -1496,9 +1659,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
DTRespuesta = DtRespuestaView.ToTable
|
||||
|
||||
DdlRango.DataSource = DTRespuesta
|
||||
DdlRango.DataBind()
|
||||
DdlRango.Items.Insert(0, New ListItem("Seleccionar uno", "-1"))
|
||||
DdlPeriodo.DataSource = DTRespuesta
|
||||
DdlPeriodo.DataBind()
|
||||
DdlPeriodo.Items.Insert(0, New ListItem("Seleccionar uno", "-1"))
|
||||
'DdlRango.Visible = True
|
||||
'LblPeriodo.Visible = True
|
||||
UPFiltros.Update()
|
||||
@@ -1523,6 +1686,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim separador As Char()
|
||||
Dim arrayComands As String()
|
||||
|
||||
Dim Fecha As Date = FechaInicioPeriodo
|
||||
|
||||
For x As Integer = 3 To 33
|
||||
|
||||
NombreLink = "LnkFecha" & CountFecha
|
||||
@@ -1532,10 +1697,22 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
arrayComands = lnkLink.Text.Split(separador)
|
||||
Instruccion = arrayComands(0)
|
||||
|
||||
If Fecha >= NowADS() Then
|
||||
lnkLink.Visible = False
|
||||
End If
|
||||
|
||||
If arrayComands.Length > 1 Then Filtro = arrayComands(1) Else Filtro = ""
|
||||
|
||||
lnkLink.CommandArgument = $"{lnkLink.Text}|{e.Row.DataKey("CvePersonal")}|{e.Row.DataKey("NombreCompleto")}"
|
||||
|
||||
If Instruccion = "_ND" Then
|
||||
lnkLink.Text = "<i class='fa fa-question' aria-hidden='True'></i>"
|
||||
lnkLink.ForeColor = Drawing.Color.DarkOrange
|
||||
lnkLink.ToolTip = "Inconsistencia"
|
||||
lnkLink.Font.Bold = True
|
||||
End If
|
||||
|
||||
|
||||
If Instruccion = "-" Then
|
||||
lnkLink.Text = "<i class='fa fa-check-square' aria-hidden='true'></i>"
|
||||
lnkLink.ForeColor = Drawing.Color.Green
|
||||
@@ -1565,6 +1742,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ContadorFaltas = ContadorFaltas + 1
|
||||
End If
|
||||
|
||||
If Instruccion = "DDV" Then
|
||||
lnkLink.Text = "<i Class='fa fa-sun-o' aria-hidden='true'></i>"
|
||||
lnkLink.ToolTip = "Dia de descanso."
|
||||
lnkLink.ForeColor = Drawing.Color.Green
|
||||
End If
|
||||
|
||||
If Instruccion = "D" Or Instruccion = "V" Then
|
||||
lnkLink.Text = "<i Class='fa fa-sun-o' aria-hidden='true'></i>"
|
||||
lnkLink.ToolTip = "Dia de descanso/no laboral/Vacación"
|
||||
@@ -1639,10 +1822,18 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
lnkLink.Font.Bold = True
|
||||
End If
|
||||
|
||||
If Instruccion = "P" Then
|
||||
lnkLink.Text = "<i class='fa fa-exclamation-triangle' aria-hidden='true'></i>"
|
||||
lnkLink.ToolTip = "Permiso."
|
||||
lnkLink.ForeColor = Drawing.Color.DarkOrange
|
||||
lnkLink.Font.Bold = True
|
||||
End If
|
||||
|
||||
If Filtro.Length > 0 Then
|
||||
AddHandler lnkLink.Click, AddressOf Me.DetalleDia_Click
|
||||
End If
|
||||
CountFecha = CountFecha + 1
|
||||
Fecha = Fecha.AddDays(1)
|
||||
Next
|
||||
|
||||
If ContadorFaltas > 0 Then
|
||||
@@ -1707,6 +1898,14 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
lnkModalImg.Text = ""
|
||||
|
||||
If Instruccion = "_ND" Then
|
||||
lnkModalImg.Text = "<i class='fa fa-question' aria-hidden='True'></i>"
|
||||
lnkModalImg.ForeColor = Drawing.Color.DarkOrange
|
||||
lnkModalImg.ToolTip = "Inconsistencia"
|
||||
lnkModalImg.Font.Bold = True
|
||||
lblModalMensaje.Text = "Inconsistencia"
|
||||
End If
|
||||
|
||||
If Instruccion = "-" Or Instruccion = "A" Then
|
||||
lnkModalImg.Text = "<i class='fa fa-check-square fa-3x' aria-hidden='true'></i>"
|
||||
lnkModalImg.ForeColor = Drawing.Color.Green
|
||||
@@ -1741,6 +1940,15 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
'CveEstado = CveDescanso
|
||||
End If
|
||||
|
||||
|
||||
If Instruccion = "DDV" Then
|
||||
lnkModalImg.Text = "<i Class='fa fa-sun-o fa-3x' aria-hidden='true'></i>"
|
||||
lnkModalImg.ToolTip = "Dia de descanso."
|
||||
lnkModalImg.ForeColor = Drawing.Color.Green
|
||||
lblModalMensaje.Text = "Dia de descanso."
|
||||
'CveEstado = CveDescanso
|
||||
End If
|
||||
|
||||
If Instruccion = "DI" Or Instruccion = "V" Then
|
||||
lnkModalImg.Text = "<i Class='fa fa-sun-o' aria-hidden='true'></i>"
|
||||
lnkModalImg.ToolTip = "Dia de descanso/no laboral/Vacación"
|
||||
@@ -1828,39 +2036,39 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub BtnEstusAsistenciaModal_Click(sender As Object, e As EventArgs) Handles BtnEstusAsistenciaModal.Click
|
||||
'Private Sub BtnEstusAsistenciaModal_Click(sender As Object, e As EventArgs) Handles BtnEstusAsistenciaModal.Click
|
||||
|
||||
Dim myRow As DataRow() ' = DtResultados.NewRow
|
||||
Dim temtDt As New DataTable
|
||||
temtDt = DtResultados.FiltraParametros(FiltroAplicado)
|
||||
' Dim myRow As DataRow() ' = DtResultados.NewRow
|
||||
' Dim temtDt As New DataTable
|
||||
' temtDt = DtResultados.FiltraParametros(FiltroAplicado)
|
||||
|
||||
Dim fecha As String = temtDt(0)("Fecha").ToString()
|
||||
Dim CvePersonal As Integer = temtDt(0)("CvePersonal").ToString().ToEntero
|
||||
Dim filtro As String = String.Format(" CvePersonal = '{0}' AND Fecha = '{1}'", CvePersonal, fecha)
|
||||
' Dim fecha As String = temtDt(0)("Fecha").ToString()
|
||||
' Dim CvePersonal As Integer = temtDt(0)("CvePersonal").ToString().ToEntero
|
||||
' Dim filtro As String = String.Format(" CvePersonal = '{0}' AND Fecha = '{1}'", CvePersonal, fecha)
|
||||
|
||||
Dim AplicaFalta As String = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("AplicaFalta").ToString()
|
||||
' Dim AplicaFalta As String = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("AplicaFalta").ToString()
|
||||
|
||||
|
||||
myRow = DtResultados.Select(filtro)
|
||||
' myRow = DtResultados.Select(filtro)
|
||||
|
||||
If AplicaFalta = "Aplica" Then
|
||||
myRow(0)("Asistio") = "False"
|
||||
myRow(0)("SalarioDiario") = "0"
|
||||
Else
|
||||
myRow(0)("Asistio") = "True"
|
||||
myRow(0)("SalarioDiario") = "100"
|
||||
End If
|
||||
' If AplicaFalta = "Aplica" Then
|
||||
' myRow(0)("Asistio") = "False"
|
||||
' myRow(0)("SalarioDiario") = "0"
|
||||
' Else
|
||||
' myRow(0)("Asistio") = "True"
|
||||
' myRow(0)("SalarioDiario") = "100"
|
||||
' End If
|
||||
|
||||
myRow(0)("CveAsistenciasInasistencias") = DdlAsistenciaInacistencia.SelectedValue
|
||||
' myRow(0)("CveAsistenciasInasistencias") = DdlAsistenciaInacistencia.SelectedValue
|
||||
|
||||
myRow(0)("TipoCorto") = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("TipoCorto").ToString()
|
||||
' myRow(0)("TipoCorto") = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("TipoCorto").ToString()
|
||||
|
||||
RegistraScript("$('#divDetallesDia').modal('hide');")
|
||||
Alert("Actualizado correctamente.")
|
||||
ReprocesarTabla()
|
||||
GvBind()
|
||||
' RegistraScript("$('#divDetallesDia').modal('hide');")
|
||||
' Alert("Actualizado correctamente.")
|
||||
' ReprocesarTabla()
|
||||
' GvBind()
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs) Handles BtnAgregar.Click
|
||||
|
||||
@@ -1906,7 +2114,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Else
|
||||
objRh.Commit()
|
||||
BtnAgregar.Visible = False
|
||||
UpAgregar.Update()
|
||||
UpAcciones.Update()
|
||||
Alert("Proceso realizado correctamente.")
|
||||
End If
|
||||
objRh.Dispose()
|
||||
@@ -1997,12 +2205,165 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
If DdlAsistenciaInacistencia.SelectedValue.ToEntero > 0 Then
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.AddAsistencia(CvePersonalSeleccionado, -1, DdlSubProyecto.SelectedValue.ToEntero, FechaSeleccionada,
|
||||
DdlAsistenciaInacistencia.SelectedValue.ToEntero, 100, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||
|
||||
'If ObjPersonal.AddAsistencia(CvePersonalSeleccionado, -1, DdlSubProyecto.SelectedValue.ToEntero, FechaSeleccionada, DdlAsistenciaInacistencia.SelectedValue.ToEntero, 100, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||
|
||||
If ObjPersonal.AddPreAsistencia(CvePersonalSeleccionado, FechaSeleccionada, DdlAsistenciaInacistencia.SelectedValue.ToEntero, 100, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Registro Actualizado Correctamente.")
|
||||
RegistraScript("$('#divDetallesDia').modal('hide');")
|
||||
CargaDatos()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
ObjPersonal.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEnviarAsistencia_Click(sender As Object, e As EventArgs)
|
||||
|
||||
'ValidaEnvioAsistencia
|
||||
'EnviarAsistencia
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ValidaEnvioAsistencia()
|
||||
|
||||
'Dim DTChecadorRegistros As New DataTable
|
||||
|
||||
Dim ObjPersonal As New ClsRH
|
||||
|
||||
'If ObjPersonal.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
' DTChecadorRegistros = ObjPersonal.DtResultados
|
||||
'End If
|
||||
|
||||
ObjPersonal.IniciaTransacSQL()
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim separador() As Char = {"|"c}
|
||||
|
||||
Try
|
||||
For Each GvRow As GridViewRow In GVRegDatos.Rows
|
||||
|
||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||
Dim NombreCompleto As String = GvRow.DataKey("NombreCompleto")
|
||||
|
||||
Dim Fecha As Date = FechaInicioPeriodo
|
||||
For x = 3 To GVRegDatos.Columns.Count - 1
|
||||
|
||||
If GVRegDatos.Columns(x).Visible Then
|
||||
|
||||
Dim lnkLinkSender As LinkButton = TryCast(GvRow.Cells(x).Controls(1), LinkButton)
|
||||
|
||||
If lnkLinkSender IsNot Nothing Then
|
||||
Dim arrayComands As String() = lnkLinkSender.CommandArgument.Split(separador)
|
||||
Dim TipoCorto = arrayComands(0)
|
||||
Dim Filtro = arrayComands(1)
|
||||
|
||||
If TipoCorto.Contiene("_ND", "") Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
Else
|
||||
'ok
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Fecha = Fecha.AddDays(1)
|
||||
Next
|
||||
If TieneError Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
End Try
|
||||
|
||||
|
||||
If TieneError Then
|
||||
ObjPersonal.RollBack()
|
||||
Alert("Se presento un error al enviar asistencia.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
ObjPersonal.Commit()
|
||||
Alert("Asistencia enviada correctamente.")
|
||||
End If
|
||||
|
||||
ObjPersonal.Dispose()
|
||||
|
||||
End Sub
|
||||
Private Sub EnviarAsistencia()
|
||||
'Dim DTChecadorRegistros As New DataTable
|
||||
|
||||
Dim ObjPersonal As New ClsRH
|
||||
|
||||
'If ObjPersonal.PreAsistenciaRegistrosGet(FechaInicioPeriodo, FechaFinPeriodo, DdlTurno.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
' DTChecadorRegistros = ObjPersonal.DtResultados
|
||||
'End If
|
||||
|
||||
ObjPersonal.IniciaTransacSQL()
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim separador() As Char = {"|"c}
|
||||
|
||||
Try
|
||||
For Each GvRow As GridViewRow In GVRegDatos.Rows
|
||||
|
||||
Dim CvePersonal As Integer = GvRow.DataKey("CvePersonal").ToEntero
|
||||
Dim NombreCompleto As String = GvRow.DataKey("NombreCompleto")
|
||||
|
||||
Dim Fecha As Date = FechaInicioPeriodo
|
||||
For x = 3 To GVRegDatos.Columns.Count - 1
|
||||
|
||||
If GVRegDatos.Columns(x).Visible Then
|
||||
|
||||
Dim lnkLinkSender As LinkButton = TryCast(GvRow.Cells(x).Controls(1), LinkButton)
|
||||
|
||||
If lnkLinkSender IsNot Nothing Then
|
||||
Dim arrayComands As String() = lnkLinkSender.CommandArgument.Split(separador)
|
||||
Dim TipoCorto = arrayComands(0)
|
||||
Dim Filtro = arrayComands(1)
|
||||
|
||||
If TipoCorto.Contiene("_ND", "") Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
Else
|
||||
Dim DTTipoAsistenciaInasistencia As DataTable = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & TipoCorto & "' ")
|
||||
|
||||
Dim CveAsistenciasInasistencias As Integer = DTTipoAsistenciaInasistencia(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
||||
Dim PorcentajePago As Integer = If(DTTipoAsistenciaInasistencia(0)("AplicaPago").ToString = "Aplica", 100, 0)
|
||||
|
||||
'If CveAsistenciasInasistencias > 0 Then
|
||||
' If Not ObjPersonal.AddAsistencia(CvePersonal, -1, DdlSubProyecto.SelectedValue.ToEntero, Fecha, CveAsistenciasInasistencias, PorcentajePago, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' End If
|
||||
'Else
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
'End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Fecha = Fecha.AddDays(1)
|
||||
Next
|
||||
If TieneError Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
End Try
|
||||
|
||||
|
||||
If TieneError Then
|
||||
ObjPersonal.RollBack()
|
||||
Alert("Se presento un error al enviar asistencia.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
ObjPersonal.Commit()
|
||||
Alert("Asistencia enviada correctamente.")
|
||||
End If
|
||||
|
||||
ObjPersonal.Dispose()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="Catálogo de Médicos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatMedicos.aspx.vb" Inherits="Ventas_CatMedicos" %>
|
||||
<%@ Page Title="Catálogo de Médicos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatMedicos.aspx.vb" Inherits="Ventas_CatMedicos" EnableEventValidation="false" %>
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<%@ Register Src="~/UserControl/AddMedico.ascx" TagPrefix="UserControl" TagName="AddMedico" %>
|
||||
|
||||
|
||||
@@ -390,7 +390,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 9--%>
|
||||
<asp:TemplateField HeaderText="IEPS" Visible="false" ItemStyle-HorizontalAlign="Right" >
|
||||
<asp:TemplateField HeaderText="IEPS" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlIEPS" runat="server" Text='<%# Eval("IEPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -591,7 +591,18 @@
|
||||
<asp:Literal ID="LtlDescripcionVenta" runat="server" Text='<%# Eval("DescripcionVenta") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 42--%>
|
||||
<asp:TemplateField HeaderText="Descargar XML" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlXML" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 43--%>
|
||||
<asp:TemplateField HeaderText="Descargar PDF" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlPDF" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -664,84 +675,128 @@
|
||||
<table class="table table-striped nobordertop table-advance table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkTipoDocto" runat="server" Text=" *Tipo Documento" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursal" runat="server" Text=" *Sucursal" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCobranza" runat="server" Text=" Sucursal Cobranza" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTipoDocto" runat="server" Text=" *Tipo Documento" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursal" runat="server" Text=" *Sucursal" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalCobranza" runat="server" Text=" Sucursal Cobranza" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkFolio" runat="server" Text=" *Folio" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFactura" runat="server" Text=" *Estatus de Factura" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalEjecucion" runat="server" Text=" Sucursal Ejecución" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolio" runat="server" Text=" *Folio" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEstatusFactura" runat="server" Text=" *Estatus de Factura" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalEjecucion" runat="server" Text=" Sucursal Ejecución" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkFecha" runat="server" Text=" *Fecha" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkVendedor" runat="server" Text=" Vendedor" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text=" Motivo Cancelacion" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFecha" runat="server" Text=" *Fecha" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkVendedor" runat="server" Text=" Vendedor" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text=" Motivo Cancelacion" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSubTotal" runat="server" Text=" *SubTotal" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkCodigo" runat="server" Text=" Código Cliente" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkUsuario" runat="server" Text=" Usuario" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubTotal" runat="server" Text=" *SubTotal" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCodigo" runat="server" Text=" Código Cliente" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkUsuario" runat="server" Text=" Usuario" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkDescuento" runat="server" Text=" *Descuento" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkCliente" runat="server" Text=" *Cliente" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFacturacion" runat="server" Text=" Estatus Facturación" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text=" *Descuento" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCliente" runat="server" Text=" *Cliente" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEstatusFacturacion" runat="server" Text=" Estatus Facturación" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkIVA" runat="server" Text=" *IVA" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkMailCliente" runat="server" Text=" Mail Cliente" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkFolioFacturacion" runat="server" Text=" Factura Cotización" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIVA" runat="server" Text=" *IVA" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMailCliente" runat="server" Text=" Mail Cliente" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolioFacturacion" runat="server" Text=" Factura Cotización" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkRetIVA" runat="server" Text=" Ret. IVA" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkCuentaContable" runat="server" Text=" Cuenta Contable" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkObservaciones" runat="server" Text=" Observaciones" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text=" Ret. IVA" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCuentaContable" runat="server" Text=" Cuenta Contable" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkObservaciones" runat="server" Text=" Observaciones" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkRetISR" runat="server" Text=" Ret. ISR" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCliente" runat="server" Text=" Sucursal Cliente" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkOrdenCompra" runat="server" Text=" OrdenCompra" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text=" Ret. ISR" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalCliente" runat="server" Text=" Sucursal Cliente" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkOrdenCompra" runat="server" Text=" OrdenCompra" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkTotalImpuestos" runat="server" Text=" Impuestos Locales" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSaldo" runat="server" Text=" Saldo" Checked="false" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkPedidoContrato" runat="server" Text=" Pedido Contrato" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTotalImpuestos" runat="server" Text=" Impuestos Locales" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSaldo" runat="server" Text=" Saldo" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkPedidoContrato" runat="server" Text=" Pedido Contrato" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkTotal" runat="server" Text=" *Total" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkFolioFiscal" runat="server" Text=" Folio Fiscal (UUID)" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChlMotivoDescuento" runat="server" Text=" Motivo Descuento" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text=" *Total" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolioFiscal" runat="server" Text=" Folio Fiscal (UUID)" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChlMotivoDescuento" runat="server" Text=" Motivo Descuento" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkMoneda" runat="server" Text=" *Moneda" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkMetodoPago" runat="server" Text=" Método de Pago" Checked="false" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkAmortizacion" runat="server" Text=" Amortización" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMoneda" runat="server" Text=" *Moneda" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMetodoPago" runat="server" Text=" Método de Pago" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkAmortizacion" runat="server" Text=" Amortización" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkIEPS" runat="server" Text=" *IEPS" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkFormaPago" runat="server" Text=" Forma de Pago" Checked="false" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSeTimbro" runat="server" Text=" Se Timbró" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text=" *IEPS" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFormaPago" runat="server" Text=" Forma de Pago" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeTimbro" runat="server" Text=" Se Timbró" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkTC" runat="server" Text=" TC" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkUsoCFDI" runat="server" Text=" Uso CFDI" Checked="false" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text=" Se envió Mail" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTC" runat="server" Text=" TC" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkUsoCFDI" runat="server" Text=" Uso CFDI" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text=" Se envió Mail" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescargarPDF" runat="server" Text=" Descargar PDF" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescargarXML" runat="server" Text=" Descargar XML" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkKilometraje" runat="server" Visible="False" Text=" Kilometraje" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"></td>
|
||||
<td style="text-align: left;"> </td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkKilometraje" runat="server" Visible="False" Text=" Kilometraje" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"></td>
|
||||
<td style="text-align: left;"> </td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkDescripcionVenta" runat="server" Visible="true" Text=" Descripción Venta" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescripcionVenta" runat="server" Visible="true" Text=" Descripción Venta" /></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@@ -751,7 +806,7 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="text-align:left">
|
||||
<div class="col-md-6" style="text-align: left">
|
||||
<asp:CheckBox ID="ChkGuardarPersonalizacion" runat="server" Text=" Guarda Personalización" TextAlign="Right" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
@@ -110,6 +110,15 @@ Partial Class RepVentaDetalle
|
||||
ViewState("Primeracontsulta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property ConsultaAlCargar As Boolean
|
||||
Get
|
||||
Return CBool((IfNull(ViewState("ConsultaAlCargar"), False, ViewState("ConsultaAlCargar"))))
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ConsultaAlCargar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
'pRivate ReadOnly Property ColumnasVisibles As
|
||||
@@ -120,15 +129,16 @@ Partial Class RepVentaDetalle
|
||||
CargaCombos()
|
||||
InicializaValores()
|
||||
ConfiguraEmpresa()
|
||||
If Request("Gpo") IsNot Nothing Then
|
||||
|
||||
If ConsultaAlCargar Then
|
||||
CargaDatos()
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
LblServicioDomicilioFiltro.Visible = True
|
||||
DVServicioDomicilio.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
PrePersonalizacion()
|
||||
CargaPersonalizacion()
|
||||
End If
|
||||
@@ -136,6 +146,8 @@ Partial Class RepVentaDetalle
|
||||
|
||||
|
||||
Private Sub InicializaValores()
|
||||
ConsultaAlCargar = True
|
||||
|
||||
Dim Grupo, CveCliente, CveSucursal, CveSubProyectoEjecucion, CveVendedor, CveUsuario, CveEstatusFactura, CveCorte, IVA, TipoDocto, CveClienteClasificacion, CveCondicionesPago, CveTipoRelacion As String
|
||||
Dim Anio, Mes, AnioMes, Fecha, FechaI, FechaF As String
|
||||
Dim AnioEjec, MesEjec, AnioMesEjec, FechaEjec, FechaIEjec, FechaFEjec As String
|
||||
@@ -276,6 +288,10 @@ Partial Class RepVentaDetalle
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
If Request("Menu") IsNot Nothing AndAlso Request("Menu").ToString() = "1" Then
|
||||
ConsultaAlCargar = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "CARGA COMBOS"
|
||||
@@ -539,6 +555,28 @@ Partial Class RepVentaDetalle
|
||||
If e.Row.DBCampo("Total").ToDouble < 0 Then e.Row.Cells(12).ForeColor = Drawing.Color.Red
|
||||
If e.Row.DBCampo("Total").ToDouble < 0 Then e.Row.Cells(13).ForeColor = Drawing.Color.Red
|
||||
|
||||
Dim Ruta As String = UsuarioActual.Empresa.Ruta
|
||||
|
||||
If IO.File.Exists($"{Ruta}XML\{e.Row.DBCampo("TipoDocto")}\{e.Row.DBCampo("SerieFolio")}.xml") Then
|
||||
e.Row.FCLiteral("LtlXML").Text = String.Format("<div class='truncate' style='width:40px;'><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?TipoDocto={0}&File={1}.xml&TipoArchivo=XML"">XML</a></div>", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("SerieFolio"))
|
||||
Else
|
||||
e.Row.FCLiteral("LtlXML").Text = "<div class='truncate' style='width:23px;'></div>"
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
If e.Row.DBCampo("TipoDocto") <> "Cot" AndAlso IO.File.Exists($"{Ruta}PDF\{e.Row.DBCampo("TipoDocto")}\{e.Row.DBCampo("SerieFolio")}.pdf") Then
|
||||
e.Row.FCLiteral("LtlPDF").Text = String.Format("<div class='truncate' style='width:40px;'><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?TipoDocto={0}&File={1}.pdf&TipoArchivo=PDF"">PDF</a></div>", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("SerieFolio"))
|
||||
Else
|
||||
e.Row.FCLiteral("LtlPDF").Text = "<div class='truncate' style='width:23px;'></div>"
|
||||
End If
|
||||
Else
|
||||
If IO.File.Exists($"{Ruta}PDF\{e.Row.DBCampo("TipoDocto")}\{e.Row.DBCampo("SerieFolio")}.pdf") Then
|
||||
e.Row.FCLiteral("LtlPDF").Text = String.Format("<div class='truncate' style='width:23px;'><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?TipoDocto={0}&File={1}.pdf&TipoArchivo=PDF"">PDF</a></div>", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("SerieFolio"))
|
||||
Else
|
||||
e.Row.FCLiteral("LtlPDF").Text = "<div class='truncate' style='width:23px;'></div>"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'If e.Row.DBCampo("MAX_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlMaxSubTotal").Text = ""
|
||||
'If e.Row.DBCampo("AVG_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlAVGSubTotal").Text = ""
|
||||
@@ -708,6 +746,10 @@ Partial Class RepVentaDetalle
|
||||
|
||||
If ChkDescripcionVenta.Checked Then ListPersonalizada.Add("DescripcionVenta")
|
||||
|
||||
If ChkDescargarPDF.Checked Then ListPersonalizada.Add("PDF")
|
||||
|
||||
If ChkDescargarXML.Checked Then ListPersonalizada.Add("XML")
|
||||
|
||||
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then
|
||||
'Alert("Personalizacion guardada")
|
||||
End If
|
||||
@@ -765,6 +807,9 @@ Partial Class RepVentaDetalle
|
||||
ChkFormaPago.Checked = False
|
||||
ChkUsoCFDI.Checked = False
|
||||
|
||||
ChkDescargarPDF.Checked = False
|
||||
ChkDescargarXML.Checked = False
|
||||
|
||||
Dim Personalizaciones As String() = strBasePersonalizacion.Split("|"c)
|
||||
|
||||
For Each personalizacion As String In Personalizaciones
|
||||
@@ -895,6 +940,12 @@ Partial Class RepVentaDetalle
|
||||
Case "DescripcionVenta"
|
||||
ChkDescripcionVenta.Checked = True
|
||||
Exit Select
|
||||
Case "XML"
|
||||
ChkDescargarXML.Checked = True
|
||||
Exit Select
|
||||
Case "PDF"
|
||||
ChkDescargarPDF.Checked = True
|
||||
Exit Select
|
||||
Case Else
|
||||
Exit Select
|
||||
End Select
|
||||
@@ -954,7 +1005,8 @@ Partial Class RepVentaDetalle
|
||||
GvDatos.Columns(39).Visible = ChkKilometraje.Checked
|
||||
GvDatos.Columns(40).Visible = ChkTC.Checked
|
||||
GvDatos.Columns(41).Visible = ChkDescripcionVenta.Checked
|
||||
|
||||
GvDatos.Columns(42).Visible = ChkDescargarXML.Checked
|
||||
GvDatos.Columns(43).Visible = ChkDescargarPDF.Checked
|
||||
|
||||
Personalizo = 1
|
||||
If Personalizo = 1 Then
|
||||
|
||||
@@ -6862,6 +6862,10 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
DdlUsoCFDI.Enabled = True
|
||||
End If
|
||||
|
||||
If NuevaFactura = 1 Then
|
||||
DdlUsoCFDI.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -16551,6 +16555,14 @@ Partial Class Ventas
|
||||
DirectCast(e.Row.FindControl("VCOAmortAnti"), AjaxControlToolkit.ValidatorCalloutExtender).ID = "VCOAmortAnti" & e.Row.RowIndex
|
||||
DirectCast(e.Row.FindControl("CVAmortAnti"), CompareValidator).ControlToValidate = "TxtAnticipo" & e.Row.RowIndex
|
||||
DirectCast(e.Row.FindControl("VCOAmortAnti"), AjaxControlToolkit.ValidatorCalloutExtender).TargetControlID = "CVAmortAnti" & e.Row.RowIndex
|
||||
|
||||
'SI NO TIENE PERMISO, NO PERMITIR APLICAR ANTICIPOS PUNTUALES
|
||||
If GVAnticipos.DataSource IsNot Nothing Then
|
||||
If CBool(e.Row.DBCampo("AnticipoPuntual")) AndAlso Not UsuarioActual.TienePermisoProceso(377) Then
|
||||
e.Row.FCCheckBox("Chk").Enabled = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GVAnticipos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAnticipos.RowDataBound
|
||||
|
||||
Reference in New Issue
Block a user