Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -6912,6 +6912,26 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GethorariosChecador(CveChecadorHorario As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_RH_ChecadorHorariosGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveChecadorHorario", SqlDbType.Int).Value = CveChecadorHorario
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar las vacaciones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -5158,7 +5158,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div id="DvModalContratos" class="modal ADS fade" role="dialog">
|
||||
<%-- <div id="DvModalContratos" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
@@ -5197,7 +5197,111 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DivmodalConmtrato" class="modal ADS fade">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalContrato" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4>
|
||||
<asp:Label Text="Contratos" ID="LblTituloContrato" runat="server" />
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList runat="server" ID="DdlContratosObra" AutoPostBack="true" OnSelectedIndexChanged="DdlContratosCompras_SelectedIndexChanged" DataTextField="ContratoCompleto" DataValueField="CveContrato" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlContratosObra.ClientID.ToString()%>">Contrato:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoGastoObra" runat="server" DataTextField="TipoGasto" DataValueField="CveTipoGasto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoGastoObra.ClientID.ToString()%>">Tipo de Gasto:</label>
|
||||
|
||||
|
||||
<asp:RequiredFieldValidator runat="server" Enabled="true" InitialValue="-1" Display="None" ID="RFVDdlTipoGastoObra" ControlToValidate="DdlTipoGastoObra" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Gasto''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpAplicaContrato"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlTipoGastoObra" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlTipoGastoObra" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvContratosControl" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas"
|
||||
DataKeyNames="CveContratoDetalle,CvePS,PS,Cantidad,PU,CantidadMax,CveUnidadMedida,Abreviatura,CveSubProyecto,SubProyecto,Codigo,CveProyecto,Proyecto,IVA,RetISR,RetIVA,IEPSPorcentaje,IEPSGrabaIVA,CveClasificacion,Clasificacion,CveTipoPS,CveSATPS"
|
||||
CssClass="table GVEstimacion table-advance table-hover" GridLines="None" Width="100%">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField HeaderText="Producto">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblPS" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Width="250px"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Text="" type="number" step="any"
|
||||
Width="90" runat="server" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="PU">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtPU" Text='<%# Eval("PU", "{0:N2}")%>' type="number" step="any" Width="60px" >
|
||||
</asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Importe">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtImporte" Text="" CssClass='<%# String.Format("ImporteCSS CssImporte{0}", Eval("CveContratoDetalle")) %>' type="number" step="any" Width="90" runat="server" onkeydown="keydownenabledtab(event)"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-10" style="text-align:right!important">Sub Total: </div>
|
||||
<div class="col-md-2"><asp:Label runat="server" ClientIDMode="Static" id="LblTotalContrato"></asp:Label></div>
|
||||
|
||||
<br />
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:Button ID="BtnAplicarContrato" runat="server" Text="Aceptar" ClientIDMode="Static" CssClass="btn btn-success" OnClick="BtnAplicarContrato_Click" ValidationGroup="GrpAplicaContrato" CausesValidation="true" />
|
||||
<button type="button" class="btn default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="server">
|
||||
@@ -6292,14 +6396,80 @@
|
||||
}
|
||||
|
||||
|
||||
//function ScrollVentanaAddProducto() {
|
||||
// let wh = $(window).height();
|
||||
|
||||
// if (wh <= 770) {
|
||||
// // $('#DVBodyAddProducto').css("max-height", 450);
|
||||
// }
|
||||
//}
|
||||
|
||||
function ValidateCant(ncss, SubtotalValidar) {
|
||||
|
||||
let SubTotal = 0.0;
|
||||
|
||||
let CantidadS = $(".CssCantidad" + ncss).val();
|
||||
let PuS = $(".CssPU" + ncss).val();
|
||||
|
||||
let Cantidad = 0.0;
|
||||
let Pu = 0.0;
|
||||
|
||||
try{
|
||||
|
||||
if (CantidadS.length > 0 && PuS.length > 0) {
|
||||
|
||||
Cantidad = parseFloat(CantidadS);
|
||||
Pu = parseFloat(PuS);
|
||||
|
||||
$(".CssImporte" + ncss).val(Cantidad * Pu);
|
||||
|
||||
|
||||
}else{
|
||||
$(".CssImporte" + ncss).val("0");
|
||||
}
|
||||
|
||||
|
||||
} catch (error) {
|
||||
$(".CssImporte" + ncss).val("0");
|
||||
}
|
||||
|
||||
//$('.ImporteCSS').each(function () {
|
||||
|
||||
|
||||
// if(! isNaN(parseFloat($(this).val()) )){
|
||||
// SubTotal = SubTotal + parseFloat($(this).val())
|
||||
// }
|
||||
|
||||
//});
|
||||
|
||||
ValidaBotonContrato(SubtotalValidar);
|
||||
|
||||
|
||||
|
||||
//if (SubtotalValidar == SubTotal) {
|
||||
// $('#BtnAplicarContrato').prop('disabled', false);
|
||||
//} else {
|
||||
// $('#BtnAplicarContrato').prop('disabled', true);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
function ValidaBotonContrato(SubtotalValidar) {
|
||||
|
||||
let SubTotal = 0.0;
|
||||
|
||||
|
||||
|
||||
$('.ImporteCSS').each(function () {
|
||||
|
||||
if (!isNaN(parseFloat($(this).val()))) {
|
||||
SubTotal = SubTotal + parseFloat($(this).val())
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
if (SubtotalValidar == SubTotal) {
|
||||
$('#BtnAplicarContrato').prop('disabled', false);
|
||||
} else {
|
||||
$('#BtnAplicarContrato').prop('disabled', true);
|
||||
}
|
||||
|
||||
$('#LblTotalContrato').text(SubTotal);
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1181,6 +1181,37 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
|
||||
Private Property MaxIVAProcentaje As Decimal
|
||||
Get
|
||||
If ViewState("MaxIVAProcentaje") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("MaxIVAProcentaje").ToString.ToDecimal
|
||||
End If
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("MaxIVAProcentaje") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property MAXRetIVAPorcentaje As Decimal
|
||||
Get
|
||||
If ViewState("MAXRetIVAPorcentaje") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("MAXRetIVAPorcentaje").ToString.ToDecimal
|
||||
End If
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("MAXRetIVAPorcentaje") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1206,7 +1237,7 @@ Partial Class Compras_Compras
|
||||
CveConceptoContableAlmacen = 0
|
||||
EsNoDeducible = False
|
||||
CveTipoConcepto = 1
|
||||
CargaContratos()
|
||||
'CargaContratos()
|
||||
'******** Prorrateo ********************************************
|
||||
If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then
|
||||
btnProrateo.Visible = True
|
||||
@@ -1781,31 +1812,42 @@ Partial Class Compras_Compras
|
||||
Xml.Append(Replace(Replace(Replace(nodeconceptos.OuterXml, "<cfdi:", "<"), "</cfdi:", "</"), "xmlns:cfdi=""http://www.sat.gob.mx/cfd/3""", ""))
|
||||
If ObjeFacturas.GetFacturasComparacionXML(Version, Xml.ToString, UsuarioActual.CveEmpresa) Then
|
||||
TmpDT = ObjeFacturas.DtResultados
|
||||
|
||||
If ObjeFacturas.DtResultados.Rows.Count > 0 Then
|
||||
MaxIVAProcentaje = ObjeFacturas.DtResultados.MAX("IVAPorcentaje").ToDecimal
|
||||
MAXRetIVAPorcentaje = ObjeFacturas.DtResultados.MAX("RetIVAPorcentaje").ToDecimal
|
||||
Else
|
||||
MaxIVAProcentaje = 0
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
'TmpDT.Columns.Add("IVAPorcentaje")
|
||||
'TmpDT.Columns.Add("RetIVAPorcentaje")
|
||||
'TmpDT.Columns.Add("RetISRPorcentaje")
|
||||
'TmpDT.Columns.Add("IEPSPSPorcentaje")
|
||||
'TmpDT.Columns.Add("IEPSPSIVAPorcentaje")
|
||||
SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal
|
||||
AddPS2(False)
|
||||
AddPS2(False)
|
||||
|
||||
|
||||
'VALIDA QUE EL XML SI VIENE CON EL CODIGO SAT 01010101
|
||||
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||
For Each drr As DataRow In TmpDT.FiltraParametros("ClaveProdServ = '01010101'").Rows
|
||||
'VALIDA QUE EL XML SI VIENE CON EL CODIGO SAT 01010101
|
||||
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||
For Each drr As DataRow In TmpDT.FiltraParametros("ClaveProdServ = '01010101'").Rows
|
||||
|
||||
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", drr("PS"))
|
||||
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", drr("PS"))
|
||||
|
||||
Next
|
||||
Next
|
||||
|
||||
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||
Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||
Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
Else
|
||||
CargaConceptosXML(XMLDoc)
|
||||
End If
|
||||
|
||||
@@ -1831,7 +1873,7 @@ Partial Class Compras_Compras
|
||||
DdlTipoCompra.Items.Add(New ListItem("Apoyo Logístico", "9"))
|
||||
DdlTipoCompra.Items.Add(New ListItem("NC Por Devolución", "11"))
|
||||
|
||||
|
||||
LiAccionesContratos.Visible = True
|
||||
End Select
|
||||
|
||||
'DIV ALIAS
|
||||
@@ -20475,22 +20517,183 @@ Partial Class Compras_Compras
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub CargaContratos()
|
||||
DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ")
|
||||
DdlContrato.DataBind()
|
||||
DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
'Private Sub CargaContratos()
|
||||
' DdlContrato.DataSource = GlobalDTContratos.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveContratoTipo IN(30,31) ")
|
||||
' DdlContrato.DataBind()
|
||||
' DdlContrato.Items.Insert(0, New System.Web.UI.WebControls.ListItem("Todos", "-1"))
|
||||
'End Sub
|
||||
|
||||
Protected Sub BtnModalContratos_Click(sender As Object, e As EventArgs)
|
||||
'Protected Sub BtnModalContratos_Click(sender As Object, e As EventArgs)
|
||||
|
||||
RegistraScript("$('#DvModalContratos').modal('hide');")
|
||||
CveContratoObra = DdlContrato.SelectedValue.ToEntero
|
||||
' RegistraScript("$('#DvModalContratos').modal('hide');")
|
||||
' CveContratoObra = DdlContrato.SelectedValue.ToEntero
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkContratos_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript("$('#DvModalContratos').modal('show');")
|
||||
|
||||
'RegistraScript("$('#DvModalContratos').modal('show');")
|
||||
|
||||
DdlContratosObra.Items.Clear()
|
||||
DdlContratosObra.DataSource = GlobalDTContratos.FiltraParametros(String.Format($"CveContratoTipo in (30,31) AND CveEmpresa = {UsuarioActual.CveEmpresa}"))
|
||||
DdlContratosObra.DataBind()
|
||||
'DdlContratosObra.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
DdlTipoGastoObra.Items.Clear()
|
||||
DdlTipoGastoObra.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
DdlTipoGastoObra.DataBind()
|
||||
DdlTipoGastoObra.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
|
||||
|
||||
RegistraScript($"$('#DivmodalConmtrato').modal('show'); $( '#BtnAplicarContrato' ).prop( 'disabled', true ); ValidaBotonContrato({TxtSubTotal2.Text.ToDecimal});")
|
||||
UpModalContrato.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlContratosCompras_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
If DdlContratosObra.SelectedValue.ToEntero > 0 Then
|
||||
Dim ObjContratos As New ClsContratos()
|
||||
|
||||
If ObjContratos.GetContratosObraCompras(DdlContratosObra.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||
GvContratosControl.DataSource = ObjContratos.DtResultados
|
||||
'BtnAplicarContrato.Visible = True
|
||||
Else
|
||||
GvContratosControl.DataSource = Nothing
|
||||
'BtnAplicarContrato.Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
ObjContratos.Dispose()
|
||||
|
||||
GvContratosControl.DataBind()
|
||||
|
||||
UpModalContrato.Update()
|
||||
End If
|
||||
|
||||
RegistraScript("$( '#BtnAplicarContrato' ).prop( 'disabled', true );")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub BtnAplicarContrato_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
TmpDT.Rows.Clear()
|
||||
|
||||
Dim CveTipoGastoObra As Integer = DdlTipoGasto.SelectedValue.ToEntero
|
||||
|
||||
For Each GvRow As GridViewRow In GvContratosControl.Rows
|
||||
|
||||
Dim CveContratoDetalle As Integer = GvRow.DataKey("CveContratoDetalle").ToEntero
|
||||
|
||||
Dim Cantidad As Double = GvRow.FCTextBox("TxtCantidad").Text.ToDouble
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim PS As String = GvRow.DataKey("PS")
|
||||
Dim PU As Double = GvRow.FCTextBox("TxtPU").Text.ToDouble
|
||||
Dim TotalPS As Double = GvRow.FCTextBox("TxtImporte").Text.ToDouble
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim UMAbreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
|
||||
Dim SubProyecto As String = GvRow.DataKey("SubProyecto")
|
||||
Dim CveSubProyecto As Integer = GvRow.DataKey("CveSubProyecto").ToEntero
|
||||
Dim Codigo As String = "" 'GvRow.DataKey("Codigo")
|
||||
|
||||
Dim Proyecto As String = GvRow.DataKey("Proyecto")
|
||||
Dim CveProyecto As Integer = GvRow.DataKey("CveProyecto").ToEntero
|
||||
|
||||
Dim RetISR As Double = GvRow.DataKey("RetISR").ToString.ToDouble
|
||||
Dim RetIVA As Double = MAXRetIVAPorcentaje 'GvRow.DataKey("RetIVA").ToString.ToDouble
|
||||
|
||||
Dim IvaPS As Double = MaxIVAProcentaje
|
||||
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToString.ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion")
|
||||
|
||||
|
||||
Dim IEPSPS As Double = GvRow.DataKey("IEPSPorcentaje").ToString.ToDouble
|
||||
Dim IEPSPSIVA As Double = If(GvRow.DataKey("IEPSGrabaIVA").ToString = "True", IEPSPS, 0)
|
||||
|
||||
|
||||
Dim CveTipoPS As Integer = GvRow.DataKey("CveTipoPS").ToEntero
|
||||
|
||||
Dim CveSATPS As Integer = GvRow.DataKey("CveSATPS").ToEntero
|
||||
|
||||
|
||||
Dim IdCuentaPorEjercer As Integer = -1
|
||||
Dim IdCuentaComprometido As Integer = -1
|
||||
|
||||
Dim TotalRow As Decimal = (PU * Cantidad).RoundSQL(2).ToDecimal
|
||||
|
||||
If Cantidad > 0 Then
|
||||
|
||||
|
||||
AddPS(Cantidad, CveUnidadMedida, UMAbreviatura, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyecto.ToString, SubProyecto, Proyecto, CveProyecto.ToString, "", PU, TotalRow, IvaPS, RetIVA, RetISR, IEPSPS, IEPSPSIVA, 0, -1, False,
|
||||
CantidadF:=0, EntregaDirecta:=0, CveSATPS:=CveSATPS, CveTipoGasto:=DdlTipoGastoObra.SelectedValue.ToEntero, TipoGasto:=DdlTipoGastoObra.SelectedItem.Text, CveContratoDetalle:=CveContratoDetalle, CveCultivoCuadroDetalle:=-1)
|
||||
|
||||
|
||||
'AddPS(Cantidad, CvePS, PS, PS, PU, 0, TotalPS,
|
||||
'CveUnidadMedida, IvaPS, IEPSPS, IEPSPSIVA, CveClasificacion, UMAbreviatura, Clasificacion, CveProyecto, Proyecto,
|
||||
'CveSubProyecto, SubProyecto, Codigo, -1, 0, -1, -1, IdCuentaPorEjercer,
|
||||
'IdCuentaComprometido, -1, -1, -1, -1,
|
||||
'-1, RetIVA, RetISR, CveContratoDetalle:=CveContratoDetalle, CveTipoGastoObra:=CveTipoGastoObra, CveCultivoCuadroDetalle:=-1, Cuadro:="")
|
||||
|
||||
|
||||
'' ContratoObraAplciado = True
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
'CargaSuperior()
|
||||
'CargaDatosDetalles()
|
||||
|
||||
|
||||
|
||||
GvPS.DataSource = TmpDT
|
||||
GvPS.DataBind()
|
||||
UpPS.Update()
|
||||
|
||||
RegistraScript("$('#DivmodalConmtrato').modal('hide')")
|
||||
' UPPDetalle.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvContratosControl_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratosControl.RowDataBound
|
||||
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim CveContratoDetalle As Integer = e.Row.DataKey("CveContratoDetalle").ToEntero
|
||||
|
||||
e.Row.FCTextBox("TxtCantidad").CssClass = $"CssCantidad{CveContratoDetalle}"
|
||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"ValidateCant('{CveContratoDetalle}',{TxtSubTotal2.Text.ToDecimal})")
|
||||
|
||||
e.Row.FCTextBox("TxtPU").CssClass = $"CssPU{CveContratoDetalle}"
|
||||
e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", $"ValidateCant('{CveContratoDetalle}',{TxtSubTotal2.Text.ToDecimal})")
|
||||
|
||||
|
||||
e.Row.FCTextBox("TxtImporte").CssClass = $"ImporteCSS CssImporte{CveContratoDetalle}"
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class MMensajeDevolucion
|
||||
|
||||
@@ -1365,7 +1365,7 @@
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvDatosAvanceControl" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados"
|
||||
DataKeyNames="CveClasificacion,CvePS,CodigoPS,Clasificacion"
|
||||
DataKeyNames="CveClasificacion,CvePS,CodigoPS,Clasificacion,CveContratoDetalle"
|
||||
CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="30%" />
|
||||
@@ -1375,12 +1375,12 @@
|
||||
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceCantidad" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
<asp:LinkButton ID="LBAvanceCantidad" OnClick="MuestaModalVentasAvanceInterno" Text='<%# Eval("AvanceCantidad", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Importe $" ItemStyle-Width="7.5%" ItemStyle-CssClass="Derecha">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvance" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
<asp:LinkButton ID="LBAvanceImporte" OnClick="MuestaModalVentasAvanceInterno" Text='<%# Eval("AvanceImporte", "{0:###,###,##0.00##}") %>' runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="%" DataField="AvancePorcentaje" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
@@ -2391,7 +2391,8 @@
|
||||
</table>
|
||||
|
||||
<div style="overflow-y: auto; height: 400px;">
|
||||
<asp:GridView ID="GvDatosVentasAvance" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
|
||||
<asp:GridView ID="GvDatosVentasAvance" Visible="false" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="SerieFolio" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:HyperLinkField HeaderText="Fecha" DataTextField="Fecha" Target="_blank" ItemStyle-Width="10%" ItemStyle-CssClass="Texto" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
@@ -2401,6 +2402,18 @@
|
||||
<asp:HyperLinkField HeaderText="Total" DataTextField="SubTotalDetalle" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Derecha" DataTextFormatString="{0:###,###,##0.00##}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
<asp:GridView ID="GvDatosVentasAvanceInterno" Visible="false" ClientIDMode="Static" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Folio" DataTextField="SerieFolio" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" />
|
||||
<asp:HyperLinkField HeaderText="Fecha" DataTextField="Fecha" Target="_blank" ItemStyle-Width="10%" ItemStyle-CssClass="Texto" DataTextFormatString="{0:d}" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" />
|
||||
<asp:HyperLinkField HeaderText="Sucursal" DataTextField="SubProyecto" Target="_blank" ItemStyle-Width="15%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" />
|
||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="Proveedor" Target="_blank" ItemStyle-Width="35%" ItemStyle-CssClass="Texto Izquierda" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" />
|
||||
<asp:HyperLinkField HeaderText="Cantidad" DataTextField="Cantidad" Target="_blank" ItemStyle-Width="5%" ItemStyle-CssClass="Texto Derecha" DataTextFormatString="{0:###,##0.00##}" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" />
|
||||
<asp:HyperLinkField HeaderText="Total" DataTextField="SubTotalDetalle" Target="_blank" ItemStyle-Width="20%" ItemStyle-CssClass="Texto Derecha" DataTextFormatString="{0:###,###,##0.00##}" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -2299,7 +2299,7 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
If e.Row.DBCampo("CveClasificacion").ToString.ToEntero = 0 Then
|
||||
e.Row.CssClass = "Totales white"
|
||||
ElseIf e.Row.DBCampo("CvePS").ToString.ToEntero = 0 Then
|
||||
ElseIf e.Row.DBCampo("CveContratoDetalle").ToString.Length = 0 And e.Row.DBCampo("CveClasificacion").ToString.ToEntero <> 0 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
@@ -2313,10 +2313,13 @@ Partial Class Contratos_ContratoObra
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub MuestaModalVentasAvance(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
|
||||
|
||||
GvDatosVentasAvance.Visible = True
|
||||
GvDatosVentasAvanceInterno.Visible = False
|
||||
|
||||
'Dim Btn = CType(sender, LinkButton)
|
||||
'Dim Parametros = Btn.CommandArgument.Split("|"c)
|
||||
@@ -2347,6 +2350,43 @@ Partial Class Contratos_ContratoObra
|
||||
UpVentasAvance.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub MuestaModalVentasAvanceInterno(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = CType(((CType(sender, LinkButton)).NamingContainer), GridViewRow)
|
||||
|
||||
|
||||
GvDatosVentasAvance.Visible = False
|
||||
GvDatosVentasAvanceInterno.Visible = True
|
||||
|
||||
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim CodigoPS As String = GvRow.DataKey("CodigoPS")
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion")
|
||||
|
||||
Dim ObjContratos As New ClsContratos
|
||||
|
||||
If ObjContratos.GetVentasAvanceObra(CveContrato, CveClasificacion, CvePS, 2) Then
|
||||
GvDatosVentasAvanceInterno.DataSource = ObjContratos.DtResultados
|
||||
RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;")
|
||||
Else
|
||||
Alert("Ocurrió un error al obtener el Listado de Ventas de Avance. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjContratos.Dispose()
|
||||
GvDatosVentasAvanceInterno.DataBind()
|
||||
|
||||
LbTituloModalVentasAvance.Text = "Compras de Avance"
|
||||
|
||||
LbClasificacionVentasAvance.Text = Clasificacion
|
||||
LbPSVentasAvance.Text = CodigoPS
|
||||
|
||||
UpVentasAvance.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " TAB: REPORTE AVANCES POR DOCUMENTO "
|
||||
|
||||
5081
Empresas/72/Formatos/SobreRecibo.rdlc
Normal file
5081
Empresas/72/Formatos/SobreRecibo.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -135,7 +135,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>COMPUPROVEEDORES SA DE CV</Value>
|
||||
<Value />
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -241,7 +241,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>San luis Potosi No. 21 Col Centro C.P. 83000</Value>
|
||||
<Value />
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -276,7 +276,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>R.F.C</Value>
|
||||
<Value />
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -305,7 +305,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>COM-890602-EE8</Value>
|
||||
<Value />
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -445,7 +445,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Hermosillo,Sonora,Mexico</Value>
|
||||
<Value />
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
|
||||
@@ -1755,10 +1755,54 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
lconc.Add(SubTotales);
|
||||
lconc.Add(Totales);
|
||||
|
||||
DataTable dtCon = new DataTable();
|
||||
dtCon.Columns.Add(new DataColumn("NoConceptoP", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("ConceptoP", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("LabelValorP", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("CveConceptoP", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("ImporteP", typeof(double)));
|
||||
dtCon.Columns.Add(new DataColumn("ValorP", typeof(double)));
|
||||
dtCon.Columns.Add(new DataColumn("EstatusP", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("isEditedP", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("isOnlyBisibleP", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("NoConceptoD", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("ConceptoD", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("LabelValorD", typeof(string)));
|
||||
dtCon.Columns.Add(new DataColumn("CveConceptoD", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("ImporteD", typeof(double)));
|
||||
dtCon.Columns.Add(new DataColumn("ValorD", typeof(double)));
|
||||
dtCon.Columns.Add(new DataColumn("EstatusD", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("isEditedD", typeof(int)));
|
||||
dtCon.Columns.Add(new DataColumn("isOnlyBisibleD", typeof(int)));
|
||||
foreach(NConcepto itc in lconc)
|
||||
{
|
||||
DataRow dr = dtCon.NewRow();
|
||||
dr["NoConceptoP"] = itc.NoConceptoP;
|
||||
dr["ConceptoP"] = itc.ConceptoP;
|
||||
dr["LabelValorP"] = itc.LabelValorP;
|
||||
dr["CveConceptoP"] = itc.CveConceptoP;
|
||||
dr["ImporteP"] = itc.ImporteP;
|
||||
dr["ValorP"] = itc.ValorP;
|
||||
dr["EstatusP"] = itc.EstatusP;
|
||||
dr["isEditedP"] = itc.isEditedP;
|
||||
dr["isOnlyBisibleP"] = itc.isOnlyBisibleP;
|
||||
dr["NoConceptoD"] = itc.NoConceptoD;
|
||||
dr["ConceptoD"] = itc.ConceptoD;
|
||||
dr["LabelValorD"] = itc.LabelValorD;
|
||||
dr["CveConceptoD"] = itc.CveConceptoD;
|
||||
dr["ImporteD"] = itc.ImporteD;
|
||||
dr["ValorD"] = itc.ValorD;
|
||||
dr["EstatusD"] = itc.EstatusD;
|
||||
dr["isEditedD"] = itc.isEditedD;
|
||||
dr["isOnlyBisibleD"] = itc.isOnlyBisibleD;
|
||||
dtCon.Rows.Add(dr);
|
||||
}
|
||||
dtCon.AcceptChanges();
|
||||
List<Microsoft.Reporting.WebForms.ReportDataSource> lrds = new List<Microsoft.Reporting.WebForms.ReportDataSource>();
|
||||
Microsoft.Reporting.WebForms.ReportDataSource rds = new Microsoft.Reporting.WebForms.ReportDataSource();
|
||||
rds.Name = "DataSet1";
|
||||
rds.Value = lconc;
|
||||
rds.Value = dtCon;// lconc;
|
||||
lrds.Add(rds);
|
||||
List<Microsoft.Reporting.WebForms.ReportParameter> parametros = new List<Microsoft.Reporting.WebForms.ReportParameter>();
|
||||
|
||||
@@ -1821,8 +1865,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
||||
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
||||
//parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", ""));
|
||||
;
|
||||
ImprimirPDF(System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc"), lrds, parametros, "SobreRecibo", "PDF", null);
|
||||
string urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, string.Format("Empresas/{0}/Formatos/SobreRecibo.rdlc",UsuarioActual.CveEmpresa ));
|
||||
if (!System.IO.File.Exists(urlfile))
|
||||
{
|
||||
urlfile = System.IO.Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Empresas/Grales/Formatos/SobreRecibo.rdlc");
|
||||
}
|
||||
|
||||
ImprimirPDF(urlfile, lrds, parametros, "SobreRecibo", "PDF", null);
|
||||
}
|
||||
protected void BtnGuardarInfornavit_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -4,13 +4,14 @@ Imports System.Data
|
||||
|
||||
Partial Class RH_RepChecadorPreAsistencia
|
||||
Inherits ClsPaginas
|
||||
#Region "Propiedades"
|
||||
|
||||
Private Property FiltroAplicado As String
|
||||
Get
|
||||
If ViewState("CveRegistroDetalle") Is Nothing Then
|
||||
Return "-1"
|
||||
Else
|
||||
Return ViewState("CveRegistroDetalle").ToString
|
||||
Return ViewState("CveRegistroDetalle").ToString()
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
@@ -125,6 +126,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub RH_RepChecadorIncidencias_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
@@ -172,8 +174,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
lblTituloPagina.Text = DdlRango.SelectedItem.Text
|
||||
|
||||
Dim DtTemp As DataTable = DTPeridos.FiltraParametros("CvePeriodo = " & DdlRango.SelectedValue.ToEntero)
|
||||
FechaInicioPeriodo = DtTemp(0)("FechaInicio").ToString.ToDate
|
||||
FechaFinPeriodo = DtTemp(0)("FechaFin").ToString.ToDate
|
||||
FechaInicioPeriodo = DtTemp(0)("FechaInicio").ToString().ToDate
|
||||
FechaFinPeriodo = DtTemp(0)("FechaFin").ToString().ToDate
|
||||
End If
|
||||
|
||||
UpTituloPagina.Update()
|
||||
@@ -190,7 +192,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
If DdlTipoPeriodo.SelectedIndex <> 0 Then
|
||||
|
||||
CveTipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero
|
||||
DiasPeriodo = DTTipoPeriodoDatos.FiltraParametros(" CveTipoPeriodo = " & DdlTipoPeriodo.SelectedValue)(0)("DiasPeriodo").ToString.ToEntero
|
||||
DiasPeriodo = DTTipoPeriodoDatos.FiltraParametros(" CveTipoPeriodo = " & DdlTipoPeriodo.SelectedValue)(0)("DiasPeriodo").ToString().ToEntero
|
||||
|
||||
Dim objNomina As New ClsNominas
|
||||
|
||||
@@ -228,7 +230,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DdlRango.DataBind()
|
||||
|
||||
If DtTempFechaInicial.Rows.Count > 0 Then
|
||||
Dim temCvePeriodoNomi As Integer = DtTempFechaInicial(0)("CvePeriodo").ToString.ToEntero
|
||||
Dim temCvePeriodoNomi As Integer = DtTempFechaInicial(0)("CvePeriodo").ToString().ToEntero
|
||||
DdlRango.SelectedValueExist(temCvePeriodoNomi)
|
||||
End If
|
||||
|
||||
@@ -292,10 +294,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim CveAsistenciaInasistenciaDescanso As Integer = -1
|
||||
|
||||
Try
|
||||
CveASistenciaInasistenciaAsistio = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'A' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
||||
CveAsistenciaInasistenciaFalta = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'F' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
||||
CveAsistenciaInasistenciaRetardo = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'R' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
||||
CveAsistenciaInasistenciaDescanso = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'D' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
||||
CveASistenciaInasistenciaAsistio = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'A' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||
CveAsistenciaInasistenciaFalta = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'F' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||
CveAsistenciaInasistenciaRetardo = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'R' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||
CveAsistenciaInasistenciaDescanso = GlobalDTAsistenciasInasistencias.FiltraParametros(" TipoCorto = 'D' AND CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa)(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||
|
||||
Catch ex As Exception
|
||||
Alert("Se presento un error al obtener las claves de asistencia.", TipoMensaje.MsgError)
|
||||
@@ -350,9 +352,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim FiltroSubProyecto As String = ""
|
||||
|
||||
If DdlSubProyecto.SelectedIndex > 0 Then
|
||||
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } AND CveEstado = 1 AND CveTurno = { DdlTurno.SelectedValue} AND CveSubProyecto = { DdlSubProyecto.SelectedValue.ToEntero }"
|
||||
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } AND CveTurno = { DdlTurno.SelectedValue} AND CveSubProyecto = { DdlSubProyecto.SelectedValue.ToEntero }"
|
||||
Else
|
||||
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } AND CveEstado = 1 AND CveTurno = { DdlTurno.SelectedValue} "
|
||||
FiltroSubProyecto = $" CveTipoPeriodo = {DdlTipoPeriodo.SelectedValue } AND CveTurno = { DdlTurno.SelectedValue} "
|
||||
End If
|
||||
|
||||
DtPersonal = GlobalDTRHPersonal(UsuarioActual.Empresa.CveEmpresa).FiltraParametros(FiltroSubProyecto)
|
||||
@@ -365,15 +367,15 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim TMCveChecadorHorario As Integer = -1
|
||||
|
||||
If DTTemp.Rows.Count > 0 Then
|
||||
TMCveChecadorHorario = DTTemp(0)("CveChecadorHorario").ToString.ToEntero
|
||||
TMCveChecadorHorario = DTTemp(0)("CveChecadorHorario").ToString().ToEntero
|
||||
Dim DtHorarioTemp = DTHorarios.FiltraParametros("CveChecadorHorario = " & TMCveChecadorHorario)
|
||||
|
||||
If DtHorarioTemp.Rows.Count > 0 Then
|
||||
TolRetAcumulados = DtHorarioTemp(0)("TolRetAcumulados").ToString.ToEntero
|
||||
TolRetEntradaMin = DtHorarioTemp(0)("TolRetEntradaMin").ToString.ToEntero
|
||||
TolFalEntradaMin = DtHorarioTemp(0)("TolFalEntradaMin").ToString.ToEntero
|
||||
RetSalidaAntes = Boolean.Parse(DtHorarioTemp(0)("RetSalidaAntes").ToString)
|
||||
TolSalidaAntesMin = DtHorarioTemp(0)("TolSalidaAntesMin").ToString.ToEntero
|
||||
TolRetAcumulados = DtHorarioTemp(0)("TolRetAcumulados").ToString().ToEntero
|
||||
TolRetEntradaMin = DtHorarioTemp(0)("TolRetEntradaMin").ToString().ToEntero
|
||||
TolFalEntradaMin = DtHorarioTemp(0)("TolFalEntradaMin").ToString().ToEntero
|
||||
RetSalidaAntes = Boolean.Parse(DtHorarioTemp(0)("RetSalidaAntes").ToString())
|
||||
TolSalidaAntesMin = DtHorarioTemp(0)("TolSalidaAntesMin").ToString().ToEntero
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -416,22 +418,22 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim Fecha As Date = FechaInicioPeriodo
|
||||
Dim ContadorFaltas As Integer = 0
|
||||
Dim registrosPersonal As DataTable = DTChecadorRegistros.FiltraParametros(" CvePersonal = " & dRow(0).ToString)
|
||||
Dim registrosPersonal As DataTable = DTChecadorRegistros.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||
|
||||
If registrosPersonal.Rows.Count > 0 Then
|
||||
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & registrosPersonal(0)("CveHorario").ToString & "")
|
||||
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & registrosPersonal(0)("CveHorario").ToString() & "")
|
||||
Retardos = 0
|
||||
|
||||
For x As Integer = 1 To (DiasPeriodo)
|
||||
|
||||
Dim ReRow As DataRow = Resultados.NewRow
|
||||
ReRow("CvePersonal") = dRow(0).ToString
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
ReRow("CveAsistenciasInasistencias") = "-1"
|
||||
ReRow("PorcentajePago") = "0"
|
||||
ReRow("Fecha") = Fecha.ToString
|
||||
ReRow("Fecha") = Fecha.ToString()
|
||||
ReRow("Retraso") = "False"
|
||||
ReRow("Asistio") = "True"
|
||||
ReRow("Inconsistencia") = "False"
|
||||
@@ -454,12 +456,12 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim Asistencia As Boolean = True
|
||||
|
||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString)
|
||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
||||
|
||||
Dim HorarioEntrada As TimeSpan = TimeSpan.Parse(Horario(0)(1).ToString)
|
||||
Dim HorarioSalidaComida As TimeSpan = TimeSpan.Parse(Horario(0)(2).ToString)
|
||||
Dim HorarioEntradaComida As TimeSpan = TimeSpan.Parse(Horario(0)(3).ToString)
|
||||
Dim HorarioSalida As TimeSpan = TimeSpan.Parse(Horario(0)(4).ToString)
|
||||
Dim HorarioEntrada As TimeSpan = TimeSpan.Parse(Horario(0)(1).ToString())
|
||||
Dim HorarioSalidaComida As TimeSpan = TimeSpan.Parse(Horario(0)(2).ToString())
|
||||
Dim HorarioEntradaComida As TimeSpan = TimeSpan.Parse(Horario(0)(3).ToString())
|
||||
Dim HorarioSalida As TimeSpan = TimeSpan.Parse(Horario(0)(4).ToString())
|
||||
|
||||
Dim FechaHoraEntrada As DateTime
|
||||
Dim FechahoraSalida As DateTime
|
||||
@@ -478,10 +480,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim tempDatetime1 As DateTime = FechaHoraEntrada.AddHours(-2) 'la entrada se podra checar hasta dos horas antes de la hora de entrada
|
||||
Dim tempDatetime2 As DateTime = FechahoraSalida.AddHours(4) 'Legalmente no se pueden hacer mas de 3 horas extras al día
|
||||
|
||||
Dim tabladelDia As DataTable = registrosPersonal.FiltraParametros(" CvePersonal = " & dRow(0).ToString & " AND FechaRegistro >= '" & tempDatetime1.ToShortDateString & "' AND FechaRegistro <= '" & tempDatetime2.ToString & "'")
|
||||
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 DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND Fecha >= '" & Fecha & "'").Rows.Count > 0 Then
|
||||
ReRow("CveAsistenciasInasistencias") = DTAsistenciasInasistencias(0)("CveAsistenciasInasistencias").ToString()
|
||||
End If
|
||||
|
||||
Dim CountRegistros As Integer = tabladelDia.Rows.Count
|
||||
@@ -494,11 +496,11 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("Descanso") = "True"
|
||||
End If
|
||||
|
||||
Dim TempDTValidaciones As DataTable = DTDiasInhabiles.FiltraParametros(" FechaInhabil = '" & Fecha.ToString & "'")
|
||||
Dim TempDTValidaciones As DataTable = DTDiasInhabiles.FiltraParametros(" FechaInhabil = '" & Fecha.ToString() & "'")
|
||||
If TempDTValidaciones.Rows.Count > 0 Then
|
||||
ReRow("PorcentajePago") = "100"
|
||||
ReRow("DiaInhabil") = "True"
|
||||
ReRow("DiaInhabilStr") = TempDTValidaciones(0)("DiaInhabil").ToString
|
||||
ReRow("DiaInhabilStr") = TempDTValidaciones(0)("DiaInhabil").ToString()
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaDescanso
|
||||
ReRow("PorcentajePago") = "100"
|
||||
Else
|
||||
@@ -506,7 +508,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("DiaInhabilStr") = ""
|
||||
End If
|
||||
|
||||
TempDTValidaciones = DtVacaciones.FiltraParametros(" Fecha = '" & Fecha.ToString & "' AND CvePersonal = " & dRow(0).ToString)
|
||||
TempDTValidaciones = DtVacaciones.FiltraParametros(" Fecha = '" & Fecha.ToString() & "' AND CvePersonal = " & dRow(0).ToString())
|
||||
|
||||
If TempDTValidaciones.Rows.Count > 0 Then
|
||||
ReRow("DiaVacacion") = "True"
|
||||
@@ -524,23 +526,23 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("PorcentajePago") = "100"
|
||||
Else
|
||||
|
||||
If ReRow("DiaVacacion").ToString <> "True" And ReRow("Descanso").ToString <> "True" Then
|
||||
If ReRow("DiaVacacion").ToString() <> "True" And ReRow("Descanso").ToString() <> "True" Then
|
||||
|
||||
If CountRegistros > 0 Then
|
||||
|
||||
FechaHoraRegistroEntrada = DateTime.Parse(tabladelDia(0)("FechaRegistro").ToString)
|
||||
FechaHoraRegistroSalida = DateTime.Parse(tabladelDia(tabladelDia.Rows.Count - 1)("FechaRegistro").ToString)
|
||||
FechaHoraRegistroEntrada = DateTime.Parse(tabladelDia(0)("FechaRegistro").ToString())
|
||||
FechaHoraRegistroSalida = DateTime.Parse(tabladelDia(tabladelDia.Rows.Count - 1)("FechaRegistro").ToString())
|
||||
|
||||
If Not (FechaHoraRegistroEntrada - FechaHoraEntrada).TotalMinutes > TolFalEntradaMin Then
|
||||
If (FechaHoraRegistroEntrada - FechaHoraEntrada).TotalMinutes > TolRetEntradaMin Then
|
||||
|
||||
Retardos = Retardos + 1
|
||||
ReRow("Mensaje") = ReRow("Mensaje").ToString & vbLf & "Retardo"
|
||||
ReRow("Mensaje") = ReRow("Mensaje").ToString() & vbLf & "Retardo"
|
||||
|
||||
If Retardos >= TolRetAcumulados Then
|
||||
ReRow("Asistio") = "False"
|
||||
ReRow("FaltaRetardosAcumulados") = "True"
|
||||
ReRow("Mensaje") = ReRow("Mensaje").ToString & vbLf & " Falta por " & TolRetAcumulados & " acumulados. "
|
||||
ReRow("Mensaje") = ReRow("Mensaje").ToString() & vbLf & " Falta por " & TolRetAcumulados & " acumulados. "
|
||||
Retardos = 0
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||
ReRow("PorcentajePago") = "0"
|
||||
@@ -557,7 +559,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End If
|
||||
Else
|
||||
Asistencia = False
|
||||
ReRow("Mensaje") = ReRow("Mensaje").ToString & vbLf & "Falta por retardo."
|
||||
ReRow("Mensaje") = ReRow("Mensaje").ToString() & vbLf & "Falta por retardo."
|
||||
ReRow("FaltaRetraso") = "True"
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||
ReRow("PorcentajePago") = "0"
|
||||
@@ -565,20 +567,20 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
If FechahoraSalida > FechaHoraRegistroSalida Then
|
||||
|
||||
Dim diferenciasalidaMinutos As Integer = (FechahoraSalida - FechaHoraRegistroSalida).TotalMinutes.ToString.ToEntero
|
||||
Dim diferenciasalidaMinutos As Integer = (FechahoraSalida - FechaHoraRegistroSalida).TotalMinutes.ToString().ToEntero
|
||||
|
||||
If RetSalidaAntes Then
|
||||
If diferenciasalidaMinutos > TolSalidaAntesMin Then
|
||||
|
||||
ReRow("Asistio") = "True"
|
||||
ReRow("Retraso") = "True"
|
||||
ReRow("Mensaje") = ReRow("Mensaje").ToString & vbLf & "Retraso por salida antes de tiempo (" & diferenciasalidaMinutos & " minutos)."
|
||||
ReRow("Mensaje") = ReRow("Mensaje").ToString() & vbLf & "Retraso por salida antes de tiempo (" & diferenciasalidaMinutos & " minutos)."
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaRetardo
|
||||
ReRow("PorcentajePago") = "100"
|
||||
Else
|
||||
ReRow("Asistio") = "True"
|
||||
ReRow("Retraso") = "False"
|
||||
ReRow("Mensaje") = ReRow("Mensaje").ToString & vbLf & "Salida antes de tiempo (" & diferenciasalidaMinutos & " minutos)."
|
||||
ReRow("Mensaje") = ReRow("Mensaje").ToString() & vbLf & "Salida antes de tiempo (" & diferenciasalidaMinutos & " minutos)."
|
||||
ReRow("CveAsistenciasInasistencias") = CveASistenciaInasistenciaAsistio
|
||||
ReRow("PorcentajePago") = "100"
|
||||
|
||||
@@ -595,7 +597,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
End If
|
||||
|
||||
If ReRow("Asistio").ToString = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
||||
If ReRow("Asistio").ToString() = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
||||
|
||||
|
||||
Resultados.Rows.Add(ReRow)
|
||||
@@ -608,15 +610,15 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim ReRow As DataRow = Resultados.NewRow
|
||||
|
||||
ReRow("CvePersonal") = dRow(0).ToString
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||
ReRow("PorcentajePago") = "0"
|
||||
|
||||
ReRow("Fecha") = Fecha.ToString
|
||||
ReRow("Fecha") = Fecha.ToString()
|
||||
ReRow("Retraso") = "False"
|
||||
ReRow("Inconsistencia") = "False"
|
||||
ReRow("Descanso") = "False"
|
||||
@@ -633,9 +635,9 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("TipoCorto") = ""
|
||||
ReRow("Sancion") = "False"
|
||||
|
||||
If dRow("CveChecadorHorario").ToString.ToEntero > 0 Then
|
||||
If dRow("CveChecadorHorario").ToString().ToEntero > 0 Then
|
||||
|
||||
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & dRow("CveChecadorHorario").ToString.ToEntero & "")
|
||||
DTHorarioPersonal = DTHorarios.FiltraParametros(" CveChecadorHorario = " & dRow("CveChecadorHorario").ToString().ToEntero & "")
|
||||
|
||||
If Fecha >= Now Then
|
||||
ReRow("Asistio") = "True"
|
||||
@@ -646,7 +648,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End If
|
||||
|
||||
Dim Horario As DataTable = HorarioDiario(Fecha, DTHorarioPersonal)
|
||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString)
|
||||
Dim DiaLaboral As Boolean = Boolean.Parse(Horario(0)(0).ToString())
|
||||
|
||||
If Not DiaLaboral Then
|
||||
|
||||
@@ -655,11 +657,11 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("Descanso") = "True"
|
||||
Else
|
||||
|
||||
Dim TempDTValidaciones As DataTable = DTDiasInhabiles.FiltraParametros(" FechaInhabil = '" & Fecha.ToString & "'")
|
||||
Dim TempDTValidaciones As DataTable = DTDiasInhabiles.FiltraParametros(" FechaInhabil = '" & Fecha.ToString() & "'")
|
||||
|
||||
If TempDTValidaciones.Rows.Count > 0 Then
|
||||
ReRow("DiaInhabil") = "True"
|
||||
ReRow("DiaInhabilStr") = TempDTValidaciones(0)("DiaInhabil").ToString
|
||||
ReRow("DiaInhabilStr") = TempDTValidaciones(0)("DiaInhabil").ToString()
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaDescanso
|
||||
ReRow("PorcentajePago") = "100"
|
||||
Else
|
||||
@@ -668,7 +670,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("PorcentajePago") = "0"
|
||||
End If
|
||||
|
||||
TempDTValidaciones = DtVacaciones.FiltraParametros(" Fecha = '" & Fecha.ToString & "' AND CvePersonal = " & dRow(0).ToString)
|
||||
TempDTValidaciones = DtVacaciones.FiltraParametros(" Fecha = '" & Fecha.ToString() & "' AND CvePersonal = " & dRow(0).ToString())
|
||||
|
||||
If TempDTValidaciones.Rows.Count > 0 Then
|
||||
ReRow("DiaVacacion") = "True"
|
||||
@@ -697,21 +699,21 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
For Each dRow As DataRow In DtPersonal.Rows
|
||||
Dim Fecha As Date = FechaInicioPeriodo
|
||||
Dim ContadorFaltas As Integer = 0
|
||||
Dim registrosPersonal As DataTable = DTAsistenciasInasistenciasReg.FiltraParametros(" CvePersonal = " & dRow(0).ToString)
|
||||
Dim registrosPersonal As DataTable = DTAsistenciasInasistenciasReg.FiltraParametros(" CvePersonal = " & dRow(0).ToString())
|
||||
|
||||
If registrosPersonal.Rows.Count > 0 Then
|
||||
|
||||
For x As Integer = 1 To (DiasPeriodo)
|
||||
|
||||
Dim ReRow As DataRow = Resultados.NewRow
|
||||
ReRow("CvePersonal") = dRow(0).ToString
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
|
||||
ReRow("CveAsistenciasInasistencias") = "-1"
|
||||
ReRow("PorcentajePago") = "0"
|
||||
ReRow("Fecha") = Fecha.ToString
|
||||
ReRow("Fecha") = Fecha.ToString()
|
||||
ReRow("Retraso") = "False"
|
||||
ReRow("Asistio") = "True"
|
||||
ReRow("Inconsistencia") = "False"
|
||||
@@ -733,18 +735,18 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||
Dim Asistencia As Boolean = True
|
||||
|
||||
Dim tabladelDia As DataTable = registrosPersonal.FiltraParametros(" CvePersonal = " & dRow(0).ToString & " AND Fecha = '" & Fecha.ToShortDateString & "'")
|
||||
Dim tabladelDia As DataTable = registrosPersonal.FiltraParametros(" CvePersonal = " & dRow(0).ToString() & " AND Fecha = '" & Fecha.ToShortDateString & "'")
|
||||
|
||||
If tabladelDia.Rows.Count > 0 Then
|
||||
ReRow("TipoCorto") = tabladelDia(0)("TipoCorto").ToString
|
||||
ReRow("CveAsistenciasInasistencias") = tabladelDia(0)("CveAsistenciasInasistencias").ToString
|
||||
ReRow("TipoCorto") = tabladelDia(0)("TipoCorto").ToString()
|
||||
ReRow("CveAsistenciasInasistencias") = tabladelDia(0)("CveAsistenciasInasistencias").ToString()
|
||||
Else
|
||||
ReRow("Asistio") = "False"
|
||||
ReRow("TipoCorto") = "F"
|
||||
ReRow("CveAsistenciasInasistencias") = "-1"
|
||||
End If
|
||||
|
||||
If ReRow("Asistio").ToString = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
||||
If ReRow("Asistio").ToString() = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
||||
Resultados.Rows.Add(ReRow)
|
||||
Fecha = Fecha.AddDays(1)
|
||||
|
||||
@@ -754,14 +756,14 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
Dim ReRow As DataRow = Resultados.NewRow
|
||||
|
||||
ReRow("CvePersonal") = dRow(0).ToString
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString
|
||||
ReRow("CvePersonal") = dRow(0).ToString()
|
||||
ReRow("NombreCompleto") = dRow("NombreCompleto").ToString()
|
||||
ReRow("CveSubProyecto") = dRow("CveSubProyecto").ToString()
|
||||
ReRow("SalarioDiario") = dRow("SalarioDiario").ToString()
|
||||
ReRow("CveAsistenciasInasistencias") = CveAsistenciaInasistenciaFalta
|
||||
ReRow("PorcentajePago") = "0"
|
||||
ReRow("Asistio") = "False"
|
||||
ReRow("Fecha") = Fecha.ToString
|
||||
ReRow("Fecha") = Fecha.ToString()
|
||||
ReRow("Retraso") = "False"
|
||||
ReRow("Inconsistencia") = "False"
|
||||
ReRow("Descanso") = "False"
|
||||
@@ -778,7 +780,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ReRow("TipoCorto") = ""
|
||||
|
||||
|
||||
If ReRow("Asistio").ToString = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
||||
If ReRow("Asistio").ToString() = "True" Then ReRow("PorcentajePago") = "100" Else ReRow("PorcentajePago") = "0"
|
||||
Resultados.Rows.Add(ReRow)
|
||||
Fecha = Fecha.AddDays(1)
|
||||
|
||||
@@ -845,7 +847,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ColumN = 3
|
||||
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString.ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString.ToDate))
|
||||
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString().ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString().ToDate))
|
||||
GVRegDatos.Columns(ColumN).Visible = True
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
@@ -867,7 +869,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
|
||||
filtro = " CvePersonal = " & pRow("CvePersonal").ToString & " AND Fecha ='" & drow(0).ToString & "' "
|
||||
filtro = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
||||
ResumenDia = DtResultados.FiltraParametros(filtro)
|
||||
|
||||
TipoCorto = ""
|
||||
@@ -876,33 +878,33 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
RRow(ColumN) = "-"
|
||||
|
||||
If ResumenDia(0)("Asistio").ToString = "True" Or ResumenDia(0)("TipoCorto").ToString = "A" Then
|
||||
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
|
||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||
RRow(ColumN) = "V|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("Asistio").ToString = "False" Or ResumenDia(0)("TipoCorto").ToString = "F" Then
|
||||
If ResumenDia(0)("Asistio").ToString() = "False" Or ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||
RRow(ColumN) = "F|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("Retraso").ToString = "True" Or ResumenDia(0)("TipoCorto").ToString = "R" Then
|
||||
If ResumenDia(0)("Retraso").ToString() = "True" Or ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||
RRow(ColumN) = "R|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("FaltaRetraso").ToString = "True" Or TipoCorto = "FR" Then
|
||||
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Or TipoCorto = "FR" Then
|
||||
RRow(ColumN) = "FR|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("Descanso").ToString = "True" Or ResumenDia(0)("DiaInhabil").ToString = "True" Then
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Or ResumenDia(0)("DiaInhabil").ToString() = "True" Then
|
||||
RRow(ColumN) = "D|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("Inconsistencia").ToString = "True" Then
|
||||
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||
RRow(ColumN) = "IN|" & filtro
|
||||
If ResumenDia(0)("Descanso").ToString = "True" Then
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "IND|" & filtro
|
||||
End If
|
||||
End If
|
||||
@@ -910,7 +912,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
DTTempAsistencias = DTAsistenciasInasistenciasReg.FiltraParametros(filtro)
|
||||
If DTTempAsistencias.Rows.Count > 0 Then
|
||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString
|
||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||
Else
|
||||
TipoCorto = "F"
|
||||
End If
|
||||
@@ -931,7 +933,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
Next
|
||||
|
||||
|
||||
Dim SalidaTiempo As Integer = (Now - medida).TotalSeconds.ToString.ToEntero
|
||||
Dim SalidaTiempo As Integer = (Now - medida).TotalSeconds.ToString().ToEntero
|
||||
SalidaTiempo = SalidaTiempo
|
||||
DtDatosTabla = dt
|
||||
|
||||
@@ -1022,7 +1024,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
ColumN = 3
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString.ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString.ToDate))
|
||||
GVRegDatos.Columns(ColumN).HeaderText = String.Format("<div class='Widthall' style='text-align:center;font-size:11px!important'>{1}</div><div class='Widthall' style='text-align:center'> {0} </div>", drow(0).ToString().ToDate.ToString("dd/MM/yyyy"), ObtenerDiaSemana(drow(0).ToString().ToDate))
|
||||
GVRegDatos.Columns(ColumN).Visible = True
|
||||
ColumN = ColumN + 1
|
||||
Next
|
||||
@@ -1036,14 +1038,14 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
ColumN = 2
|
||||
For Each drow As DataRow In DTFechas.Rows
|
||||
|
||||
Dim filtro As String = " CvePersonal = " & pRow("CvePersonal").ToString & " AND Fecha ='" & drow(0).ToString & "' "
|
||||
Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString & " AND Fecha ='" & drow(0).ToString & "' ")
|
||||
Dim filtro As String = " CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' "
|
||||
Dim ResumenDia As DataTable = DtResultados.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
|
||||
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString & " AND Fecha ='" & drow(0).ToString & "' ")
|
||||
Dim DTTempAsistencias As DataTable = DTAsistenciasInasistencias.FiltraParametros(" CvePersonal = " & pRow("CvePersonal").ToString() & " AND Fecha ='" & drow(0).ToString() & "' ")
|
||||
Dim TipoCorto As String = ""
|
||||
|
||||
If DTTempAsistencias.Rows.Count > 1 Then
|
||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString
|
||||
TipoCorto = DTTempAsistencias(0)("TipoCorto").ToString()
|
||||
End If
|
||||
|
||||
If TipoCorto <> "" Then
|
||||
@@ -1082,40 +1084,40 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
RRow(ColumN) = "-"
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString = "" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "" Then
|
||||
|
||||
If ResumenDia(0)("Asistio").ToString = "True" Then
|
||||
If ResumenDia(0)("Asistio").ToString() = "True" Then
|
||||
RRow(ColumN) = "A|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("DiaVacacion").ToString = "True" Then
|
||||
If ResumenDia(0)("DiaVacacion").ToString() = "True" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Asistio").ToString = "False" Then
|
||||
If ResumenDia(0)("Asistio").ToString() = "False" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Retraso").ToString = "True" Then
|
||||
If ResumenDia(0)("Retraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("FaltaRetraso").ToString = "True" Then
|
||||
If ResumenDia(0)("FaltaRetraso").ToString() = "True" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
Else
|
||||
If ResumenDia(0)("Descanso").ToString = "True" Then
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("Inconsistencia").ToString = "True" Then
|
||||
If ResumenDia(0)("Inconsistencia").ToString() = "True" Then
|
||||
RRow(ColumN) = "IN" & "|" & filtro
|
||||
|
||||
If ResumenDia(0)("Descanso").ToString = "True" Then
|
||||
If ResumenDia(0)("Descanso").ToString() = "True" Then
|
||||
RRow(ColumN) = "IND" & "|" & filtro
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString = "S" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString = "M" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
RRow(ColumN) = "M" & "|" & filtro
|
||||
|
||||
End If
|
||||
@@ -1131,38 +1133,38 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
End If
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString = "A" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "A" Then
|
||||
RRow(ColumN) = "A" & "|" & filtro
|
||||
End If
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString = "V" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "V" Then
|
||||
RRow(ColumN) = "V" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString = "F" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "F" Then
|
||||
RRow(ColumN) = "F" & "|" & filtro
|
||||
Else
|
||||
|
||||
If ResumenDia(0)("TipoCorto").ToString = "R" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "R" Then
|
||||
RRow(ColumN) = "R" & "|" & filtro
|
||||
Else
|
||||
If TipoCorto = "FR" Then
|
||||
RRow(ColumN) = "FR" & "|" & filtro
|
||||
lblModalMensaje.Text = "Falta por retardo"
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString = "D" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "D" Then
|
||||
RRow(ColumN) = "D" & "|" & filtro
|
||||
|
||||
End If
|
||||
If ResumenDia(0)("TipoCorto").ToString = "I" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "I" Then
|
||||
RRow(ColumN) = "I" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString = "C" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "C" Then
|
||||
RRow(ColumN) = "C" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString = "S" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "S" Then
|
||||
RRow(ColumN) = "S" & "|" & filtro
|
||||
Else
|
||||
If ResumenDia(0)("TipoCorto").ToString = "M" Then
|
||||
If ResumenDia(0)("TipoCorto").ToString() = "M" Then
|
||||
RRow(ColumN) = "M" & "|" & filtro
|
||||
End If
|
||||
End If
|
||||
@@ -1193,58 +1195,63 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
respuesta.Columns.Add("ENTRADACOMIDA", System.Type.GetType("System.TimeSpan"))
|
||||
respuesta.Columns.Add("SALIDA", System.Type.GetType("System.TimeSpan"))
|
||||
Dim Drow As DataRow = respuesta.NewRow
|
||||
Dim drp As DataRow = Nothing
|
||||
If DTHorarioPersonal.Rows.Count > 0 Then
|
||||
drp = DTHorarioPersonal(0)
|
||||
End If
|
||||
|
||||
Dim diaSemana As Integer = Fecha.DayOfWeek
|
||||
|
||||
Select Case diaSemana
|
||||
Case 0
|
||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Domingo").ToString)
|
||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("DomingoEntrada").ToString)
|
||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("DomingoSalidaComida").ToString)
|
||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("DomingoEntradaComida").ToString)
|
||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("DomingoSalida").ToString)
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Domingo").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("DomingoEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("DomingoSalida").ToString()))
|
||||
|
||||
Exit Select
|
||||
Case 1
|
||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Lunes").ToString)
|
||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("LunesEntrada").ToString)
|
||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("LunesSalidaComida").ToString)
|
||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("LunesEntradaComida").ToString)
|
||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("LunesSalida").ToString)
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Lunes").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("LunesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("LunesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 2
|
||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Martes").ToString)
|
||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("MartesEntrada").ToString)
|
||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("MartesSalidaComida").ToString)
|
||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("MartesEntradaComida").ToString)
|
||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("MartesSalida").ToString)
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Martes").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MartesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MartesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 3
|
||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Miercoles").ToString)
|
||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("MiercolesEntrada").ToString)
|
||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("MiercolesSalidaComida").ToString)
|
||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("MiercolesEntradaComida").ToString)
|
||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("MiercolesSalida").ToString)
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Miercoles").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("MiercolesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("MiercolesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 4
|
||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Jueves").ToString)
|
||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("JuevesEntrada").ToString)
|
||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("JuevesSalidaComida").ToString)
|
||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("JuevesEntradaComida").ToString)
|
||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("JuevesSalida").ToString)
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Jueves").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("JuevesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("JuevesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 5
|
||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Viernes").ToString)
|
||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("ViernesEntrada").ToString)
|
||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("ViernesSalidaComida").ToString)
|
||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("ViernesEntradaComida").ToString)
|
||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("ViernesSalida").ToString)
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "true", drp("Viernes").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("ViernesEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("ViernesSalida").ToString()))
|
||||
Exit Select
|
||||
Case 6
|
||||
Drow(0) = Boolean.Parse(DTHorarioPersonal(0)("Sabado").ToString)
|
||||
Drow(1) = TimeSpan.Parse(DTHorarioPersonal(0)("SabadoEntrada").ToString)
|
||||
Drow(2) = TimeSpan.Parse(DTHorarioPersonal(0)("SabadoSalidaComida").ToString)
|
||||
Drow(3) = TimeSpan.Parse(DTHorarioPersonal(0)("SabadoEntradaComida").ToString)
|
||||
Drow(4) = TimeSpan.Parse(DTHorarioPersonal(0)("SabadoSalida").ToString)
|
||||
Drow(0) = Boolean.Parse(If(IsNothing(drp), "False", drp("Sabado").ToString()))
|
||||
Drow(1) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntrada").ToString()))
|
||||
Drow(2) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoSalidaComida").ToString()))
|
||||
Drow(3) = TimeSpan.Parse(If(IsNothing(drp), "00:00", drp("SabadoEntradaComida").ToString()))
|
||||
Drow(4) = TimeSpan.Parse(If(IsNothing(drp), "09:00", drp("SabadoSalida").ToString()))
|
||||
Exit Select
|
||||
End Select
|
||||
|
||||
@@ -1285,14 +1292,14 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
If DTNomPeriodos.Rows.Count > 0 Then
|
||||
|
||||
FechaInicialPeriodos = DTNomPeriodos(DTNomPeriodos.Rows.Count - 1)("FechaFin").ToString.ToDate
|
||||
FechaInicialPeriodos = DTNomPeriodos(DTNomPeriodos.Rows.Count - 1)("FechaFin").ToString().ToDate
|
||||
|
||||
For Each Row As DataRow In DTNomPeriodos.Rows
|
||||
Dim Drow As DataRow = DTRespuesta.NewRow
|
||||
Drow("Valor") = Row("FechaInicio").ToString.ToDate().ToString("dd/MM/yyyy") & "-" & Row("FechaFin").ToString.ToDate.ToString("dd/MM/yyyy") & "-" & Row("Numero").ToString
|
||||
Drow("Texto") = Row("FechaInicio").ToString.ToDate().ToString("dd/MM/yyyy") & " - " & Row("FechaFin").ToString.ToDate.ToString("dd/MM/yyyy") & " #" & Row("Numero").ToString & " Cerrado"
|
||||
Drow("Numero") = Row("Numero").ToString
|
||||
Drow("Orden") = ContadorOrden.ToString
|
||||
Drow("Valor") = Row("FechaInicio").ToString().ToDate().ToString("dd/MM/yyyy") & "-" & Row("FechaFin").ToString().ToDate.ToString("dd/MM/yyyy") & "-" & Row("Numero").ToString()
|
||||
Drow("Texto") = Row("FechaInicio").ToString().ToDate().ToString("dd/MM/yyyy") & " - " & Row("FechaFin").ToString().ToDate.ToString("dd/MM/yyyy") & " #" & Row("Numero").ToString() & " Cerrado"
|
||||
Drow("Numero") = Row("Numero").ToString()
|
||||
Drow("Orden") = ContadorOrden.ToString()
|
||||
DTRespuesta.Rows.Add(Drow)
|
||||
ContadorOrden += 1
|
||||
Next
|
||||
@@ -1311,7 +1318,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
While FechaLoop <= Now
|
||||
Dim Drow As DataRow = DTRespuesta.NewRow
|
||||
Drow("Orden") = ContadorOrden.ToString
|
||||
Drow("Orden") = ContadorOrden.ToString()
|
||||
ContadorOrden += 1
|
||||
|
||||
'Quincenal
|
||||
@@ -1578,7 +1585,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias.FiltraParametros(" CveEmpresa = " & UsuarioActual.Empresa.CveEmpresa & " AND TipoCorto = '" & Instruccion & "' ")
|
||||
|
||||
If DTTipoAsistenciaInasistencia.Rows.Count > 0 Then
|
||||
CveEstado = DTTipoAsistenciaInasistencia(0)(0).ToString.ToEntero
|
||||
CveEstado = DTTipoAsistenciaInasistencia(0)(0).ToString().ToEntero
|
||||
Else
|
||||
CveEstado = -1
|
||||
End If
|
||||
@@ -1596,7 +1603,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
RegistraScript("$('#divDetallesDia').modal({ backdrop: 'static', keyboard: false});")
|
||||
|
||||
DTDatos = DtResultados.FiltraParametros(Filtro)
|
||||
lblModalFecha.Text = DTDatos(0)("Fecha").ToString.ToDate.ToString("dd/MM/yyyy")
|
||||
lblModalFecha.Text = DTDatos(0)("Fecha").ToString().ToDate.ToString("dd/MM/yyyy")
|
||||
|
||||
lnkModalImg.Text = ""
|
||||
|
||||
@@ -1727,11 +1734,11 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
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 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.FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("AplicaFalta").ToString
|
||||
Dim AplicaFalta As String = GlobalDTAsistenciasInasistencias.FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("AplicaFalta").ToString()
|
||||
|
||||
|
||||
myRow = DtResultados.Select(filtro)
|
||||
@@ -1746,7 +1753,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
|
||||
myRow(0)("CveAsistenciasInasistencias") = DdlAsistenciaInacistencia.SelectedValue
|
||||
|
||||
myRow(0)("TipoCorto") = GlobalDTAsistenciasInasistencias.FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("TipoCorto").ToString
|
||||
myRow(0)("TipoCorto") = GlobalDTAsistenciasInasistencias.FiltraParametros(String.Format(" CveAsistenciasInasistencias = {0} ", DdlAsistenciaInacistencia.SelectedValue))(0)("TipoCorto").ToString()
|
||||
|
||||
RegistraScript("$('#divDetallesDia').modal('hide');")
|
||||
Alert("Actualizado correctamente.")
|
||||
@@ -1766,17 +1773,17 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
For Each dRow As DataRow In DtResultados.Rows
|
||||
'Dim DDROW As DataRow = dRow
|
||||
|
||||
Dim _CvePersonal As Integer = dRow("CvePersonal").ToString.ToEntero
|
||||
Dim _CveSubProyecto As Integer = dRow("CveSubProyecto").ToString.ToEntero
|
||||
Dim _CvePersonal As Integer = dRow("CvePersonal").ToString().ToEntero
|
||||
Dim _CveSubProyecto As Integer = dRow("CveSubProyecto").ToString().ToEntero
|
||||
Dim _CveTuero As Integer = DdlTurno.SelectedValue.ToEntero
|
||||
Dim _Fechas As Date = dRow("Fecha").ToString.ToDate
|
||||
Dim _CveAsistenciasInasistencias As Integer = dRow("CveAsistenciasInasistencias").ToString.ToEntero
|
||||
Dim _PorcentajePago As Double = Double.Parse(dRow("PorcentajePago").ToString)
|
||||
Dim _Fechas As Date = dRow("Fecha").ToString().ToDate
|
||||
Dim _CveAsistenciasInasistencias As Integer = dRow("CveAsistenciasInasistencias").ToString().ToEntero
|
||||
Dim _PorcentajePago As Double = Double.Parse(dRow("PorcentajePago").ToString())
|
||||
Dim _HorasDobles As Double = 0
|
||||
Dim _HorasTriples As Double = 0
|
||||
Dim _CveMotivoHoraExtra As Integer = -1
|
||||
Dim _Observaciones As String = ""
|
||||
Dim _SalarioDiario As Double = dRow("SalarioDiario").ToString.ToDouble
|
||||
Dim _SalarioDiario As Double = dRow("SalarioDiario").ToString().ToDouble
|
||||
Dim _Semodifico As Integer = 0
|
||||
|
||||
If objRh.PreAsistenciaRegistrosAdd(_CvePersonal, _CveSubProyecto, _CveTuero, _Fechas, _CveAsistenciasInasistencias, _PorcentajePago, _HorasDobles, _HorasTriples, _CveMotivoHoraExtra,
|
||||
@@ -1830,17 +1837,17 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
' For x As Integer = 0 To DtResultados.Columns.Count - 1
|
||||
|
||||
|
||||
' If Drow(x).ToString.Trim = "" Then
|
||||
' If Drow(x).ToString().Trim = "" Then
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' Dim arrayData As String() = Drow.ToString.Split(separador)
|
||||
' Dim arrayData As String() = Drow.ToString().Split(separador)
|
||||
|
||||
' If arrayData.Length < 2 Then
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' TipoCorto = arrayData(0).ToString
|
||||
' TipoCorto = arrayData(0).ToString()
|
||||
' If TipoCorto = "FR" Then
|
||||
' TipoCorto = "F"
|
||||
' End If
|
||||
@@ -1848,7 +1855,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
' TempDatos = DTAsistenciasInasistencias.FiltraParametros(String.Format(" TipoCorto = '{0}'", TipoCorto))
|
||||
|
||||
' If TempDatos.Rows.Count = 1 Then
|
||||
' CveAsisteciaInasistencia = DTAsistenciasInasistencias.FiltraParametros(String.Format(" TipoCorto = '{0}' ", TipoCorto))(0)("CveAsistenciasInasistencias").ToString.ToEntero
|
||||
' CveAsisteciaInasistencia = DTAsistenciasInasistencias.FiltraParametros(String.Format(" TipoCorto = '{0}' ", TipoCorto))(0)("CveAsistenciasInasistencias").ToString().ToEntero
|
||||
' Else
|
||||
' CveAsisteciaInasistencia = -1
|
||||
' Pendientes = True
|
||||
@@ -1862,16 +1869,16 @@ Partial Class RH_RepChecadorPreAsistencia
|
||||
' For Each Drow As DataRow In DtResultados.Rows
|
||||
|
||||
' For x As Integer = 0 To DtResultados.Columns.Count - 1
|
||||
' If Drow(x).ToString.Trim = "" Then
|
||||
' If Drow(x).ToString().Trim = "" Then
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' Dim arrayData As String() = Drow.ToString.Split(separador)
|
||||
' Dim arrayData As String() = Drow.ToString().Split(separador)
|
||||
|
||||
' If arrayData.Length < 2 Then
|
||||
' Exit For
|
||||
' End If
|
||||
' TipoCorto = arrayData(0).ToString
|
||||
' TipoCorto = arrayData(0).ToString()
|
||||
' Next
|
||||
|
||||
' Next
|
||||
|
||||
@@ -57,7 +57,11 @@
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<a id="BtnClonarModal" runat="server" data-toggle="modal" style="width: 100%; margin-bottom: 10px;" href="#DivClonar"><i class="fa fa-clone"></i>Clonar Usuario </a>
|
||||
|
||||
<%--<a id="BtnClonarModal" runat="server" data-toggle="modal" style="width: 100%; margin-bottom: 10px;" href="#DivClonar"><i class="fa fa-clone"></i>Clonar Usuario </a>--%>
|
||||
|
||||
<asp:LinkButton runat="server" ID="LnkClonarUsuario" OnClick="LnkClonarUsuario_Click" ><i class="fa fa-clone"></i> Clonar Usuario</asp:LinkButton>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a id="BtnUpdateMasivoUsuarioResponsable" runat="server" data-toggle="modal" style="width: 100%; margin-bottom: 10px;" href="#DivUpdateUsuarioResponsable">Actualizar Gestor Cobranza </a>
|
||||
@@ -2398,7 +2402,17 @@
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<p>
|
||||
<asp:Label runat="server" ID="LblClonarMensaje"></asp:Label>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4" runat="server" id="DivClonarProyectos" visible="false">
|
||||
<asp:CheckBox Text="Proyectos" ID="ChkProyectos" TextAlign="Right" runat="server" />
|
||||
</div>
|
||||
|
||||
@@ -3701,9 +3701,16 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
|
||||
End If
|
||||
|
||||
ObjUsuarios.Dispose()
|
||||
End If
|
||||
|
||||
ObjUsuarios.Dispose()
|
||||
|
||||
LblClonarMensaje.Text = $"En el usuario {TxtUsuario.Text} se reemplazará la información del usuario {DdlUsuarioClonar.SelectedItem.Text} con las siguientes secciones que seleccione."
|
||||
Else
|
||||
LblClonarMensaje.Text = ""
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
UpClonarUsuario.Update()
|
||||
End Sub
|
||||
Protected Sub BtnClonar_Click(sender As Object, e As EventArgs)
|
||||
@@ -4832,5 +4839,14 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
End Try
|
||||
|
||||
Return resultado
|
||||
End Function
|
||||
End Function
|
||||
|
||||
Protected Sub LnkClonarUsuario_Click(sender As Object, e As EventArgs)
|
||||
|
||||
RegistraScript("$('#DivClonar').modal('show');")
|
||||
LblClonarMensaje.Text = ""
|
||||
UpClonarUsuario.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -540,7 +540,7 @@ Partial Class Ventas_ActualizarPrecios
|
||||
|
||||
For Each Franquicia In Franquicias
|
||||
Dim CveFranquicia As Integer = Franquicia.ToEntero
|
||||
Dim CvePS As Integer = GlobalDTPS(CveFranquicia, Codigo:=Codigo).FiltroPrimeroValor("CvePS", "").ToEntero
|
||||
Dim CvePS As Integer = GlobalDTPS(CveFranquicia, Codigo:=Codigo.ToUpper).FiltroPrimeroValor("CvePS", "").ToEntero
|
||||
Dim CvePrecioLisa As Integer = GlobalDTPrecioListas(CveFranquicia).FiltroPrimeroValor("CvePrecioLista", String.Format("PrecioLista = '{0}'", PrecioLista)).ToEntero
|
||||
|
||||
If CvePS <= 0 Then
|
||||
|
||||
@@ -142,6 +142,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user