Merge branch 'master' of http://192.168.10.111:8383/SIG into oi_documentos
This commit is contained in:
@@ -898,7 +898,7 @@ Public Class ClsAcumuladores
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
||||
Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Decimal, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, ImporteCompras As Decimal, Observaciones As String, Optional CveMovimiento As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
'Data = New DataTable
|
||||
@@ -907,7 +907,7 @@ Public Class ClsAcumuladores
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@Cantidad", SqlDbType.Int).Value = Cantidad
|
||||
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
|
||||
.Add("@CveTamaño", SqlDbType.Int).Value = CveTamaño
|
||||
.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -5129,7 +5129,7 @@ Namespace Modelos
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Decimal = RowUsado("PUOriginal").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1) Then
|
||||
|
||||
@@ -49,7 +49,7 @@ Public Class E141 : Implements IHttpHandler
|
||||
Public ReadOnly Property TokenAutorizacion As String
|
||||
Get
|
||||
If EsProduccion Then
|
||||
Return "$2y$10$8Mk3YeIkJESilIwD.U5dG.SsA4JloycJKbaGls8TNEw/AKBE1qane"
|
||||
Return "$2y$10$EZlXnFrhUc4aRVwjy5/v0.3JPdFNjyeANDc64YXJ5eHD8pMsv93Q."
|
||||
Else
|
||||
Return "$2y$10$8Mk3YeIkJESilIwD.U5dG.SsA4JloycJKbaGls8TNEw/AKBE1qane"
|
||||
End If
|
||||
@@ -59,7 +59,7 @@ Public Class E141 : Implements IHttpHandler
|
||||
Public ReadOnly Property URLBase As String
|
||||
Get
|
||||
If EsProduccion Then
|
||||
Return "https://econollantas-pruebas.fidelityapps.mx"
|
||||
Return "https://services.fidelityapps.mx/"
|
||||
Else
|
||||
Return "https://econollantas-pruebas.fidelityapps.mx/"
|
||||
End If
|
||||
@@ -92,28 +92,31 @@ Public Class E141 : Implements IHttpHandler
|
||||
Else
|
||||
context.Response.ContentType = "text/html"
|
||||
|
||||
Dim FiltrarTodos = If(context.Request("FiltrarTodos") = Nothing, "", context.Request("FiltrarTodos").ToString())
|
||||
If Not String.IsNullOrEmpty(Metodo) Then
|
||||
Dim FiltrarTodos = If(context.Request("FiltrarTodos") = Nothing, "", context.Request("FiltrarTodos").ToString())
|
||||
|
||||
Dim respuesta As Boolean = False
|
||||
Dim respuesta As Boolean = False
|
||||
|
||||
'TAREAS PROGRAMADAS
|
||||
Select Case Metodo
|
||||
Case "CrearActualizarProductos"
|
||||
respuesta = CrearActualizarProductos(If(FiltrarTodos = "1", True, False))
|
||||
Case "ActualizarPrecios"
|
||||
respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False))
|
||||
Case "ActualizarExistencias"
|
||||
respuesta = ActualizarExistencias()
|
||||
Case "ActualizarVendedores"
|
||||
respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False))
|
||||
End Select
|
||||
'TAREAS PROGRAMADAS
|
||||
Select Case Metodo
|
||||
Case "CrearActualizarProductos"
|
||||
respuesta = CrearActualizarProductos(If(FiltrarTodos = "1", True, False))
|
||||
Case "ActualizarPrecios"
|
||||
respuesta = ActualizarPrecios(If(FiltrarTodos = "1", True, False))
|
||||
Case "ActualizarExistencias"
|
||||
respuesta = ActualizarExistencias()
|
||||
Case "ActualizarVendedores"
|
||||
respuesta = ActualizarVendedores(If(FiltrarTodos = "1", True, False))
|
||||
End Select
|
||||
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
retorno = "False"
|
||||
If respuesta Then
|
||||
retorno = "True"
|
||||
Else
|
||||
retorno = "False"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
context.Response.Write(retorno)
|
||||
@@ -202,7 +205,7 @@ Public Class E141 : Implements IHttpHandler
|
||||
Using httpClient = New HttpClient()
|
||||
httpClient.Timeout = New TimeSpan(0, 5, 0)
|
||||
Using request = New HttpRequestMessage(HttpMethod.Post, New Uri(url))
|
||||
request.Headers.Add("token", TokenAutorizacion)
|
||||
request.Headers.Add("X-PUBLIC-AUTH", TokenAutorizacion)
|
||||
|
||||
Using content = New StringContent(payload, Encoding.UTF8, "application/json")
|
||||
request.Content = content
|
||||
@@ -607,7 +610,7 @@ Public Class E141 : Implements IHttpHandler
|
||||
End Select
|
||||
|
||||
If VendedorData.Length > 4 Then
|
||||
Nombre = String.Concat(VendedorData(VendedorData.Length - 1), " ", VendedorData(VendedorData.Length))
|
||||
Nombre = String.Concat(VendedorData(VendedorData.Length - 2), " ", VendedorData(VendedorData.Length - 1))
|
||||
Apellido = String.Concat(VendedorData(0), " ", VendedorData(1))
|
||||
End If
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -251,8 +251,6 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlConcepto" CssClass="form-control input-sm select2me js-concepto-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpAgregar" AutoPostBack="true"></asp:DropDownList>
|
||||
<label for="<%= DdlConcepto.ClientID.ToString()%>">Concepto Contable</label>
|
||||
@@ -268,6 +266,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label ID="LblCuenta" runat="server" Text=""></asp:Label>
|
||||
<asp:DropDownList ID="DdlCtaContable" CssClass="form-control input-sm select2me js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="240px" ValidationGroup="GrpAgregar"></asp:DropDownList>
|
||||
<label for="<%= DdlCtaContable.ClientID.ToString()%>">Cuenta Contable:</label>
|
||||
</div>
|
||||
|
||||
@@ -351,6 +351,29 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
||||
End Sub
|
||||
|
||||
Private Sub DdlConcepto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlConcepto.SelectedIndexChanged
|
||||
|
||||
'cargar la cuenta
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 0 Then
|
||||
'busco en la cuenta contable, lo que tenga asignado
|
||||
Dim Con As New ClsContabilidad
|
||||
Dim dtt As DataTable
|
||||
If Con.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
dtt = Con.DtResultados
|
||||
End If
|
||||
DdlCtaContable.Visible = False
|
||||
Dim drr As DataRow = dtt.FiltroPrimero(String.Format("CveConceptoAdmin={0}", DdlConcepto.SelectedValue))
|
||||
|
||||
If drr IsNot Nothing Then
|
||||
LblCuenta.Text = drr("CtaCodigo").ToString
|
||||
Else
|
||||
LblCuenta.Text = ""
|
||||
End If
|
||||
|
||||
dtt.Dispose()
|
||||
Con.Dispose()
|
||||
End If
|
||||
|
||||
If DdlConcepto.SelectedValue.Contiene("130", "29") Then
|
||||
DdlPersonal.Visible = True
|
||||
LblPersonal.Visible = True
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -2709,7 +2709,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Decimal = RowUsado("PU").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU) Then
|
||||
|
||||
@@ -194,6 +194,7 @@
|
||||
<asp:ListItem Text="Marca,Modelo,Rin,Medida de Barrenación" Value="1" />
|
||||
<asp:ListItem Text="Familia,Marca,Rin,Medida de Barrenación" Value="2" />
|
||||
<asp:ListItem Text="Familia,Linea,Rin,Medida de Barrenación" Value="3" />
|
||||
<asp:ListItem Text="Rin,Medida de Barrenación" Value="4" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
|
||||
@@ -2377,7 +2377,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim CveVendedorActual = -1
|
||||
Dim CveClienteActual = -1
|
||||
|
||||
Dim CveAlmacenDestino = CveAlmacen
|
||||
Dim CveAlmacenDestino = CveAlmacenDevolucionProveedor
|
||||
Dim CveSeccionDestino As Integer = -1
|
||||
|
||||
'For Each RowAlmacen As DataRow In DtAlmacenesDevolucion.FiltraParametros("", DistinctColumns:={"CveAlmacenOrignal"}).Rows
|
||||
@@ -2713,13 +2713,13 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
|
||||
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveTipoAlmacenFiltro As Integer = If(CveTipoCompra = 9, 25, 24)
|
||||
|
||||
Dim CveAlmacenVirutal As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirutal, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G4")
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G4")
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
@@ -2865,11 +2865,11 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Next
|
||||
|
||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
|
||||
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirutal As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 25).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirutal, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G5")
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G5")
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
@@ -2884,6 +2884,66 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If SumarImporteUsados Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then
|
||||
ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal")
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
If RealizarMovimientoVirtual Then
|
||||
|
||||
Dim DtPSVirtual As New DataTable("DtTamanios")
|
||||
|
||||
Dim CveMovimientoRef As Integer = -1
|
||||
If RealizarTraspasoAlmacenDevolucion Then
|
||||
CveMovimientoRef = CveMovimientoSalidaTraspaso
|
||||
Else
|
||||
CveMovimientoRef = CveMovimiento
|
||||
End If
|
||||
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoRef, UsuarioActual.CveEmpresa) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados
|
||||
End If
|
||||
|
||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
|
||||
Dim CveTipoAlmacenFiltro As Integer = 24
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero()).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, 13, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimientoRef, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/VD")
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If SumarImporteUsados Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then
|
||||
ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal")
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -882,13 +882,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
dtvirtual = ObjInventario.DtResultados
|
||||
|
||||
If dtvirtual.Rows.Count > 0 Then
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida)
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida)
|
||||
FolioVirtualSalida = ObjInventario.Folio
|
||||
|
||||
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowVirtual("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualSalida, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
@@ -899,7 +899,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
AlmacenEntrada = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero)
|
||||
@@ -933,27 +933,23 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If Not ChkTransitorio.Checked Then 'SI NO ES TRANSITORIO SE HACE LA RECEPCION DE INMEDIATO
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
|
||||
'VIRTUAL ENTRADA
|
||||
If RealizarMovimientoVirtual Then
|
||||
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenDestino.SelectedValue}").ToEntero()
|
||||
|
||||
'SI EL ALMACEN DESTINO ES DE APOPYO LOGISTICO EL ALMACEN VIRTUAL DEBE SER DE APOYO LOGISTICO
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveSubProyectoOrigen).FiltroPrimeroValor("CveAlmacenVirtual", "").ToEntero()
|
||||
Dim dtvirtual As DataTable = Nothing
|
||||
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
||||
dtvirtual = ObjInventario.DtResultados
|
||||
If dtvirtual.Rows.Count > 0 Then
|
||||
''hay que verificar que se se tengan movimeintos por registrar
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/S3")
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtualEntrada, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/S3")
|
||||
FolioVirtualEntrada = ObjInventario.Folio
|
||||
|
||||
|
||||
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowVirtual("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowVirtual("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
@@ -965,70 +961,70 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
Dim Concepto As String = TxtObservaciones.Text
|
||||
If Concepto = "" Then Concepto = "Traspaso"
|
||||
'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO:
|
||||
If Not ErrorMovInv Then
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
'Dim IdCtaContableSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero
|
||||
'Dim IdCtaContableEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenDestino.SelectedValue.ToEntero)).ToEntero
|
||||
Dim Contabilizable As Boolean = True
|
||||
|
||||
If IdCtaContableOrigen = IdCtaContableDestino And TipoAlmacenDestino <> 26 Then Contabilizable = False
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
'si el tipo de almacen de entrada es Almacen sin costo, se registra al costo, la salida.
|
||||
If TipoAlmacenOrigen <> 26 AndAlso TipoAlmacenDestino = 26 Then
|
||||
|
||||
Dim tCveClasificacion As Integer = DtMovimientos.MAX("CveClasificacion").ToEntero
|
||||
Dim dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=tCveClasificacion).FiltroPrimero("")
|
||||
Dim IdCuentaCostos As Integer = -1
|
||||
If dr IsNot Nothing Then
|
||||
IdCuentaCostos = dr("IdCuentaCostos").ToString.ToEntero
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 69, TxtObservaciones.Text, Fecha, IdCuentaCostos, -1, CveClasificacion:=tCveClasificacion, CveSubProyecto:=CveSubProyectoOrigen, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then
|
||||
End If
|
||||
Dim Concepto As String = TxtObservaciones.Text
|
||||
If Concepto = "" Then Concepto = "Traspaso"
|
||||
'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO:
|
||||
If Not ErrorMovInv Then
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
'Dim IdCtaContableSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero
|
||||
'Dim IdCtaContableEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenDestino.SelectedValue.ToEntero)).ToEntero
|
||||
Dim Contabilizable As Boolean = True
|
||||
|
||||
If IdCtaContableOrigen = IdCtaContableDestino And TipoAlmacenDestino <> 26 Then Contabilizable = False
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
'si el tipo de almacen de entrada es Almacen sin costo, se registra al costo, la salida.
|
||||
If TipoAlmacenOrigen <> 26 AndAlso TipoAlmacenDestino = 26 Then
|
||||
|
||||
Dim tCveClasificacion As Integer = DtMovimientos.MAX("CveClasificacion").ToEntero
|
||||
Dim dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=tCveClasificacion).FiltroPrimero("")
|
||||
Dim IdCuentaCostos As Integer = -1
|
||||
If dr IsNot Nothing Then
|
||||
IdCuentaCostos = dr("IdCuentaCostos").ToString.ToEntero
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 69, TxtObservaciones.Text, Fecha, IdCuentaCostos, -1, CveClasificacion:=tCveClasificacion, CveSubProyecto:=CveSubProyectoOrigen, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Contabilizable = False
|
||||
importe = 0
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableDestino, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable, ImporteMX:=importe) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Not ErrorMovInv Then
|
||||
Dim Concepto As String = TxtObservaciones.Text
|
||||
If Concepto = "" Then Concepto = "Traspaso"
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen2", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorio.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Contabilizable = False
|
||||
importe = 0
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableDestino, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable, ImporteMX:=importe) Then
|
||||
ErrorMovInv = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Not ErrorMovInv Then
|
||||
Dim Concepto As String = TxtObservaciones.Text
|
||||
If Concepto = "" Then Concepto = "Traspaso"
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen2", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorio.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -1945,7 +1941,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
For Each RowVirtual As DataRow In dtvirtual.Rows
|
||||
Dim CvePS = RowVirtual("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Decimal = RowVirtual("Cantidad").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowVirtual("PU").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowVirtual("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowVirtual("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
@@ -2851,7 +2847,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim excelFile As ExcelFile = excelFile.Load(flatFilePath)
|
||||
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||
|
||||
Dim unnamed As Integer = 0
|
||||
Dim cols As Integer
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4179,8 +4179,10 @@
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="SaldoCliente" HeaderText="" />
|
||||
<asp:BoundField DataField="Puntos" HeaderText="Puntos" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
|
||||
<asp:BoundField DataField="Valor" HeaderText="Valor $" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
|
||||
<asp:BoundField DataField="Puntos" HeaderText="Puntos" DataFormatString="{0:N}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
|
||||
<asp:BoundField DataField="Valor" HeaderText="Valor $" DataFormatString="{0:N}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
|
||||
<asp:BoundField DataField="PuntosAcumulados" HeaderText="Puntos Acumulados" DataFormatString="{0:N}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
|
||||
<asp:BoundField DataField="ValorAcumulado" HeaderText="Valor Acumulado $" DataFormatString="{0:N}" ItemStyle-HorizontalAlign="Right" ControlStyle-BorderWidth="150px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -4290,7 +4292,7 @@
|
||||
<asp:BoundField DataField="EstadoBonificacion" HeaderText="F Bonificación" ItemStyle-HorizontalAlign="Center" />--%>
|
||||
|
||||
<asp:HyperLinkField DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Venta" />
|
||||
<asp:HyperLinkField DataTextField="SerieFolioNC" Target="_blank" DataNavigateUrlFields="CveVentaNC" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Notá de Credito" />
|
||||
<asp:BoundField DataField="TipoDocumento" HeaderText="Tipo Documento" />
|
||||
<asp:HyperLinkField DataTextField="SerieFolioBonificacion" Target="_blank" DataNavigateUrlFields="CveVentaBonificacion" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" HeaderText="V. Bonifi" />
|
||||
<asp:HyperLinkField DataTextField="Folio" Target="_blank" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Movto" />
|
||||
|
||||
|
||||
@@ -9141,7 +9141,7 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
Dim ImporteBonificacion As Decimal = 0
|
||||
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count > 0 Then
|
||||
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) AndAlso ObjAcum.DtResultados.Rows.Count >= 4 Then
|
||||
GvUsadosResumen.DataSource = ObjAcum.DtResultados
|
||||
ImporteBonificacion = ObjAcum.DtResultados.Rows(4)("Valor").ToString().ToDecimal()
|
||||
End If
|
||||
|
||||
@@ -2082,8 +2082,13 @@ Partial Class Ventas_ClientesAbonar
|
||||
Dim SubProyecto = DrSubProyecto("SubProyecto").ToString
|
||||
Dim Proyecto = DrSubProyecto("Proyecto").ToString
|
||||
|
||||
Dim CveSATNC = "84111506"
|
||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1).FiltroPrimero("")
|
||||
Dim CveSATNC As Integer
|
||||
Dim ArrayNC As String() = UsuarioActual.Empresa.Funcionalidad(591).Split(",".ToCharArray())
|
||||
Dim NCBonificacion As Integer = 0
|
||||
If ArrayNC.Length > 6 Then 'CONCEPTO DE PRONTO PAGO
|
||||
CveSATNC = ArrayNC(6).ToEntero()
|
||||
End If
|
||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveSATNC, AplicaParaVenta:=1).FiltroPrimero("")
|
||||
|
||||
For Each Dr As DataRow In DtImpuestos.Rows
|
||||
AgregaTempDTNC(ObjFacturaDevolucion.DtDetalle, DrPS("CvePS").ToString.ToEntero, DrPS("PS").ToString, DrPS("Codigo").ToString, DrPS("PSCodigo").ToString, DrPS("CveTipoPS").ToString.ToEntero, DrPS("Inv_CveMetodoInventario").ToString.ToEntero,
|
||||
|
||||
@@ -2700,11 +2700,14 @@ Partial Class PV
|
||||
Objeto.Attributes.Add("data-cvesubproyecto", DdlSubProyectoDatos.SelectedValue)
|
||||
'Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
|
||||
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
|
||||
Objeto.ddlWS.Attributes.Add("data-aplicaparaventa", "1")
|
||||
|
||||
If AplicaAlmacen Then
|
||||
Objeto.ddlWS.Attributes.Add("data-pagina", "ventas/ventas")
|
||||
Else
|
||||
Objeto.ddlWS.Attributes.Add("data-pagina", "-1")
|
||||
End If
|
||||
Objeto.ddlWS.Attributes.Add("data-aplicaparaventa", "1")
|
||||
Objeto.ddlWS.Attributes.Add("data-Estatus", "1")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -4570,7 +4570,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-1" style="padding-left: 20px;">Contrato:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList runat="server" ID="DdlFiltroContrato" AutoPostBack="true" CssClass=" form-control input-sm select2me text-left" Width="100%" DataTextField="ContratoCompleto" DataValueField="CveContrato" />
|
||||
<asp:DropDownList runat="server" ID="DdlFiltroContrato" AutoPostBack="true" CssClass=" form-control input-sm select2me" Width="100%" DataTextField="ContratoCompleto" DataValueField="CveContrato" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-1" style="padding-left: 0px; padding-right: 0px;">Moneda:</div>
|
||||
@@ -6038,6 +6038,15 @@
|
||||
<h4 class="modal-title">Facturas Relacionadas</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>Relación:</label></div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoRelacionARelacionar" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="DivDdlFacturaRela" runat="server" class="row">
|
||||
<div class="col-md-2">
|
||||
<label>Factura:</label></div>
|
||||
@@ -6048,15 +6057,6 @@
|
||||
<asp:LinkButton ID="LnkAgregarFacturaRelacionada" runat="server" CssClass="btn btn-sm btn-primary" OnClick="LnkAgregarFacturaRelacionada_Click"><i class="fa fa-plus"></i>Agregar</asp:LinkButton></div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>Relación:</label></div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoRelacionARelacionar" CssClass=" form-control input-sm select2me" runat="server" Width="100%" DataTextField="SATTipoRelacion" DataValueField="CveTipoRelacion">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvFacturasRelacionadas" runat="server" DataKeyNames="CveVenta,SerieFolio,FolioFiscal" GridLines="none" CssClass="tabla_correcto grides Widthall mysmallbtn" AutoGenerateColumns="False" ShowHeaderWhenEmpty="False">
|
||||
@@ -7235,13 +7235,14 @@
|
||||
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
}
|
||||
} else {
|
||||
if (SaldoMaximoUtilizable > 0) {
|
||||
TxtImporte.value = "";
|
||||
Chk.checked = false;
|
||||
} else {
|
||||
TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
}
|
||||
|
||||
TxtImporte.value = "";
|
||||
Chk.checked = false;
|
||||
//if (SaldoMaximoUtilizable > 0) {
|
||||
// TxtImporte.value = "";
|
||||
// Chk.checked = false;
|
||||
//} else {
|
||||
// TxtImporte.value = FormatoNumero(Saldo, 2);
|
||||
//}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -3526,6 +3526,8 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
CalculaUsados()
|
||||
|
||||
CalculaTotalesVenta()
|
||||
LbAgregar.Visible = False
|
||||
UpPS.Update()
|
||||
@@ -5690,7 +5692,7 @@ Partial Class Ventas
|
||||
DivVentasUsados.Visible = True
|
||||
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetHistorialVentas(CveCliente, 1000, CveClienteSucursal:=-1, TipoDocto:="Ing", CveEstatusFactura:=-1, FechaI:=Now.AddMonths(-1)) Then
|
||||
If ObjClientes.GetHistorialVentas(CveCliente, CveClienteSucursal:=-1, TipoDocto:="Ing", CveEstatusFactura:=-1, FechaI:=Now.AddMonths(-1)) Then
|
||||
DdlVentaUsado.DataSource = ObjClientes.DtResultados.FiltraParametros("UsadoMarcado = 0")
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
@@ -5789,7 +5791,7 @@ Partial Class Ventas
|
||||
UpFacturasRelacionadas.Update()
|
||||
End Sub
|
||||
Protected Sub CreaTmpFacturasRelacionadas()
|
||||
If CveVenta <= 0 Then
|
||||
If CveVenta <= 0 OrElse EsCreaApartirDe Then
|
||||
Me.TmpDTFacturasRelacionadas = New DataTable()
|
||||
Me.TmpDTFacturasRelacionadas.Columns.Add(New DataColumn("CveVenta", GetType(Integer)))
|
||||
Me.TmpDTFacturasRelacionadas.Columns.Add(New DataColumn("SerieFolio", GetType(String)))
|
||||
@@ -5797,7 +5799,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LnkAgregarFacturaRelacionada_Click(sender As Object, e As EventArgs)
|
||||
If CveVenta <= 0 Then
|
||||
If CveVenta <= 0 OrElse EsCreaApartirDe Then
|
||||
If Me.TmpDTFacturasRelacionadas Is Nothing Then
|
||||
CreaTmpFacturasRelacionadas()
|
||||
End If
|
||||
@@ -5827,7 +5829,7 @@ Partial Class Ventas
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnAgregarFacturasRelaciondas_Click(sender As Object, e As EventArgs)
|
||||
If CveVenta <= 0 Then
|
||||
If CveVenta <= 0 OrElse EsCreaApartirDe Then
|
||||
If Me.TmpDTFacturasRelacionadas Is Nothing OrElse Me.TmpDTFacturasRelacionadas.Rows.Count = 0 Then
|
||||
Me.AplicaRelacionManual = False
|
||||
Alert("No hay facturas para relacionar", TipoMensaje.MsgAdvertencia)
|
||||
@@ -7002,7 +7004,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If (CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot") AndAlso Not AplicaDevolucion Then
|
||||
If e.Row.DBCampo("CveConcepto").ToEntero() = 3 Then CveAlmacenDevolucion = e.Row.DBCampo("CveAlmacen").ToEntero()
|
||||
If e.Row.DBCampo("CveConcepto").ToEntero().Contiene(3, 40) Then CveAlmacenDevolucion = e.Row.DBCampo("CveAlmacen").ToEntero()
|
||||
e.Row.FCCheckBox("cbInv").Visible = False
|
||||
End If
|
||||
|
||||
@@ -8197,7 +8199,7 @@ Partial Class Ventas
|
||||
|
||||
'MUESTA ALERT OK
|
||||
' si es elrol 1165-Ventas,EMp:80, o la empresa 119, recarga ventas, para seguir registrando-.
|
||||
Dim Liga = If(UsuarioActual.CveRol = 1165 Or UsuarioActual.CveEmpresa = 119, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", If(CveEmpresaCRM > 0, $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=3"";"))
|
||||
Dim Liga = If(UsuarioActual.CveRol = 1165 Or UsuarioActual.CveEmpresa = 119, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", If(CveEmpresaCRM > 0, $"document.location.href=""/CRM/EmpresaCRM.aspx?CveEmpresaCRM={CveEmpresaCRM}"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=2"";"))
|
||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga)
|
||||
|
||||
MensajeAlert.Clear()
|
||||
@@ -10736,9 +10738,34 @@ Partial Class Ventas
|
||||
'SI SE FACTURA UNA RNC SE MUESTRA
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso factura.TipoDocto = "Egs" Then
|
||||
If Row("CveVentaDetalleRNC").ToString().ToEntero() > 0 Then
|
||||
|
||||
If Not ObjVentas.AddVentaDetalleRNCFacturada(Row("CveVentaDetalleRNC").ToString().ToEntero(), ObjVentas.CveVentaDetalle, Row("Cantidad").ToString().ToDecimal()) Then
|
||||
ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.")
|
||||
End If
|
||||
|
||||
'SI SE FACTURAN RNC DE CARGO, SE AGREGA EL CONCEPTO DE ACREDITAMIENTO
|
||||
If ClienteEsDistribuidor AndAlso RblRNCTipo.SelectedValue = "1" Then
|
||||
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
|
||||
|
||||
Dim CvePSCargo As Integer = -1
|
||||
For Each RNC In ListaRemisionesNC
|
||||
CvePSCargo = RNC.DtDetalle.FiltroPrimeroValor("CvePS", $"CveVentaDetalle={Row("CveVentaDetalleRNC").ToString()}").ToEntero()
|
||||
If CvePSCargo > 0 Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim CveTamanio As Integer = GlobalDTAcumTamaños().FiltroPrimeroValor("CveTamaño", $"CvePSCargo={CvePSCargo}").ToEntero()
|
||||
|
||||
If CveTamanio > 0 Then
|
||||
If Not ObjAcum.DistribuidorMovtosAdd(factura.CveCliente, Row("Cantidad").ToString().ToDecimal(), CveTamanio, 6, factura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0D, "") Then
|
||||
ErrorList.Add("Ocurrió un error al agregar la venta detalle devolución.")
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -14666,7 +14693,7 @@ Partial Class Ventas
|
||||
|
||||
'MUESTA Alert OK
|
||||
'MensajeAlert.Append("El Documento se generó correctamente")
|
||||
Dim Liga = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=3"";")
|
||||
Dim Liga = If(UsuarioActual.CveRol = 1165, "document.location.href=""/Ventas/Ventas.aspx?CveVenta=-1"";", $"document.location.href=""/Ventas/Clientes.aspx?CveCliente={CveCliente}&Opt=2"";")
|
||||
Alert(MensajeAlert.ToString(), TipoMensaje.MsgInformacion, Liga)
|
||||
|
||||
TrEmitir.Visible = False
|
||||
@@ -15728,7 +15755,13 @@ Partial Class Ventas
|
||||
TrVistaPrevia.Visible = True
|
||||
UpFacturar.Update()
|
||||
Else
|
||||
Alert("No tiene registrados Folios para " & DdlTipoComprobante.SelectedItem.Text & " en esta sucursal.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
If DdlTipoComprobante.Items.Count > 0 Then
|
||||
Alert("No tiene registrados Folios para " & DdlTipoComprobante.SelectedItem.Text & " en esta sucursal.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert("No tiene permisos para generar ningun tipo de documento.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
TrEmitir.Visible = False
|
||||
TrVistaPrevia.Visible = False
|
||||
BtnCrearApartirDe.Enabled = False
|
||||
@@ -17728,6 +17761,7 @@ Partial Class Ventas
|
||||
DtRemConceptosSurtidos = Nothing
|
||||
|
||||
Dim TieneMovimientosSinCosto As Boolean = False
|
||||
Dim TieneMovimientosContrato As Boolean = False
|
||||
|
||||
'Obtenemos los movimientos detalle
|
||||
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
||||
@@ -17765,6 +17799,8 @@ Partial Class Ventas
|
||||
|
||||
TieneMovimientosSinCosto = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen=26") > 0
|
||||
|
||||
TieneMovimientosContrato = DtMovimientosDetalles.COUNT("CveTipoAlmacen", "CveTipoAlmacen IN (11)") > 0
|
||||
|
||||
For Each dr As DataRow In DtMovimientos.Rows
|
||||
'Obtenemos los Movimientos de salida
|
||||
If ObjInventario.GetMovimientos(dr("CveMovimiento").ToString().ToEntero(), ConceptoMovimiento, -1, UsuarioActual.CveEmpresa) Then
|
||||
@@ -17787,7 +17823,12 @@ Partial Class Ventas
|
||||
If TieneMovimientosSinCosto Then
|
||||
MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}")
|
||||
Else
|
||||
MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND (TieneSalidaxFactura IS NULL OR SaldoAlmacen > 0)"))
|
||||
If TieneMovimientosContrato Then
|
||||
MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}"))
|
||||
Else
|
||||
MovDetalle = CuadrarFacturaMovimientos(DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")} AND (TieneSalidaxFactura IS NULL OR SaldoAlmacen > 0)"))
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
MovDetalle = DtMovimientosDetalles.FiltraParametros($"CveMovimiento = {dr("CveMovimiento")}")
|
||||
@@ -17841,10 +17882,6 @@ Partial Class Ventas
|
||||
'Le damos salida normal
|
||||
If ConSalida AndAlso Not OcurrioError Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura, ObjConta:=ObjConta)
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenParaSalida, CveConceptoSalidaAlmacen, CveMoneda, ObjFactura.CveVenta, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
|
||||
|
||||
@@ -17852,6 +17889,10 @@ Partial Class Ventas
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not OcurrioError AndAlso UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura, ObjConta:=ObjConta)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -18225,26 +18266,43 @@ Partial Class Ventas
|
||||
Dim CveConceptoMovimientoVirtual As Integer = 37
|
||||
Dim DtPSVirtual As DataTable = Nothing
|
||||
Dim DtTamanios As DataTable = Nothing
|
||||
Dim CveMovimientoEntradaDev As Integer = -1
|
||||
Dim CveSubProyecto As Integer = -1
|
||||
Dim CveMovimientoReferencia As Integer = -1
|
||||
|
||||
'SI LA REMISION SE SURTIO CON USADOS UTILIZAR ESTE MOVIMIENTO
|
||||
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ((CveTipoAlmacen = 24 AND CveConcepto = 2) OR (CveTipoAlmacen = 1 AND CveConcepto = 8)) AND CveVenta > 0")
|
||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND (CveTipoAlmacen = 24 AND CveConcepto = 2) AND CveVenta > 0")
|
||||
|
||||
If RowMovimiento IsNot Nothing Then
|
||||
CveMovimientoEntradaDev = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||
CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||
Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
||||
CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {tCveAlmacen}").ToEntero()
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
'SI NO SE SURTIO LA REMSION CON USADOS, UTILIZAR EL MOVIMIENTO DE SALIDA DEL INGRESO
|
||||
If CveMovimientoReferencia <= 0 Then
|
||||
If ObjInventario.GetInv_Mov(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ( (CveTipoAlmacen = 1 AND CveConcepto = 3) OR (CveTipoAlmacen = 10 AND CveConcepto = 40) ) AND CveVenta > 0")
|
||||
|
||||
If RowMovimiento IsNot Nothing Then
|
||||
CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||
Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados.Copy()
|
||||
Else
|
||||
OcurrioError = True
|
||||
@@ -18252,13 +18310,13 @@ Partial Class Ventas
|
||||
|
||||
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoEntradaDev)
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoReferencia)
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Decimal = RowUsado("PU").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1) Then
|
||||
@@ -18328,6 +18386,123 @@ Partial Class Ventas
|
||||
OcurrioError = True
|
||||
End Try
|
||||
|
||||
Return Not OcurrioError
|
||||
|
||||
End Function
|
||||
Private Function GenerarMovimientoAlmacenVirtualConsignacion(CveVenta As Integer, CveAlmacenContrato As Integer, ByRef ObjInventario As ClsInventarios, ObjFactura As Modelos.Factura, Optional ByRef ObjConta As ClsContabilidad = Nothing) As Boolean
|
||||
Dim OcurrioError As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
Try
|
||||
Dim CveMovimientoVirtual As Integer = -1
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenContrato).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
|
||||
Dim CveConceptoMovimientoVirtual As Integer = 37
|
||||
Dim DtPSVirtual As DataTable = Nothing
|
||||
Dim DtTamanios As DataTable = Nothing
|
||||
Dim CveMovimientoReferencia As Integer = -1
|
||||
Dim CveSubProyecto As Integer = -1
|
||||
|
||||
|
||||
If ObjInventario.GetInv_Mov(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ((CveTipoAlmacen = 24 AND CveConcepto = 2) OR (CveTipoAlmacen = 17 AND CveConcepto = 8)) AND CveVenta > 0")
|
||||
|
||||
If RowMovimiento IsNot Nothing Then
|
||||
CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados.Copy()
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoReferencia)
|
||||
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
'Agregamos las PrePolizas
|
||||
If Not OcurrioError Then
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen)
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
Dim DtCostos = ObjInventario.DtResultados.Copy
|
||||
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
|
||||
Dim IdCtaContable As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
Dim ValorInventario As Decimal
|
||||
Dim TotalCostoAcumulado As Decimal = 0D
|
||||
Dim Cont As Integer = 1
|
||||
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
|
||||
|
||||
For Each RowInv As DataRow In DtCostosDistinct.Rows
|
||||
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).RoundSQL
|
||||
IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||
CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero()
|
||||
TotalCostoAcumulado += ValorInventario
|
||||
|
||||
'cuando es el último movimiento y hay diferencias en los importes
|
||||
If Cont = DtCostosDistinct.Rows.Count AndAlso TotalCosto <> TotalCostoAcumulado Then
|
||||
ValorInventario = ValorInventario + (TotalCosto - TotalCostoAcumulado)
|
||||
End If
|
||||
|
||||
Try
|
||||
'If ValorInventario <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, ValorInventario, ObjFactura.SerieFolio, 69, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
'End If
|
||||
Catch ex As Exception
|
||||
OcurrioError = True
|
||||
Alert("Error inesperado (15148). Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
|
||||
End Try
|
||||
Cont += 1
|
||||
Next
|
||||
|
||||
If Not OcurrioError Then
|
||||
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacenVirtual)).ToEntero()
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, True, TotalCosto, ObjFactura.SerieFolio, 68, ObjFactura.SerieFolio, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoVirtual, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al generar el almacen virtual.", ex)
|
||||
OcurrioError = True
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
Return Not OcurrioError
|
||||
|
||||
End Function
|
||||
@@ -22359,7 +22534,7 @@ Partial Class Ventas
|
||||
Dim CveUnidad As Integer
|
||||
Dim Cantidad As Double
|
||||
Dim Existencia As Double
|
||||
For Each Dr As DataRow In TmpDT.Rows
|
||||
For Each Dr As DataRow In TmpDT.FiltraParametros("CveTipoPS=2").Rows
|
||||
CveProducto = Dr("CvePS").ToString().ToEntero()
|
||||
CveUnidad = Dr("CveUM").ToString().ToEntero()
|
||||
Cantidad = Dr("Cantidad").ToString().ToDouble
|
||||
@@ -22489,6 +22664,11 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
If Not GenerarMovimientoAlmacenVirtualConsignacion(factura.CveVenta, CveAlmacenExistenciasContrato, ObjInventario, factura, ObjConta) Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -23956,10 +24136,18 @@ Partial Class Ventas
|
||||
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
|
||||
Dim RowUsadosNC As DataRow = ObjAcum.DtResultados.Rows(2)
|
||||
DivSMU.Visible = True
|
||||
HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString()
|
||||
LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
|
||||
|
||||
Dim SaldoMaximo As Decimal = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal()
|
||||
If SaldoMaximo > 0 Then
|
||||
HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString()
|
||||
LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
|
||||
Else
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
|
||||
Else
|
||||
DivSMU.Visible = False
|
||||
'DivSMU.Visible = False
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
@@ -23999,8 +24187,15 @@ Partial Class Ventas
|
||||
DivSMU.Visible = True
|
||||
Dim FacUsado As New Modelos.Factura(UsuarioActual, CveVentaUsado, UsuarioActual.CveEmpresa)
|
||||
Dim SaldoMaximoUsados As Decimal = FacUsado.DtDetalle.SUM("Total", "EsCargo = True").ToDecimal() + FacUsado.DtDetalle.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
|
||||
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
|
||||
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados)
|
||||
|
||||
If SaldoMaximoUsados > 0 Then
|
||||
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
|
||||
LtlSMU.Text = String.Format("{0:N2}", SaldoMaximoUsados)
|
||||
Else
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
|
||||
Else
|
||||
Dim ObjAcum As New ClsAcumuladores
|
||||
If ObjAcum.GetMovimientosDistribuidorResumen(CveCliente, UsuarioActual.CveEmpresa) Then
|
||||
@@ -24009,7 +24204,7 @@ Partial Class Ventas
|
||||
HdnSaldoMaximoUsados.Value = RowUsadosNC("ValorConImpuestos").ToString()
|
||||
LtlSMU.Text = RowUsadosNC("ValorConImpuestos").ToString().ToDecimal().FormatoNumero(2)
|
||||
Else
|
||||
DivSMU.Visible = False
|
||||
'DivSMU.Visible = False
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
@@ -24041,9 +24236,14 @@ Partial Class Ventas
|
||||
GvDescNCBonificaciones.DataBind()
|
||||
|
||||
Dim SaldoMaximoUsados As Decimal = Me.TmpDT.SUM("Total", "EsCargo = True").ToDecimal() + Me.TmpDT.SUM("ImporteIVA", "EsCargo = True").ToDecimal()
|
||||
If SaldoMaximoUsados > 0 Then
|
||||
LblSaldoMaximoUsados.Text = String.Format("{0:N2}", SaldoMaximoUsados)
|
||||
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
|
||||
Else
|
||||
HdnSaldoMaximoUsados.Value = "0"
|
||||
LtlSMU.Text = "0"
|
||||
End If
|
||||
|
||||
LblSaldoMaximoUsados.Text = String.Format("{0:N2}", SaldoMaximoUsados)
|
||||
HdnSaldoMaximoUsados.Value = SaldoMaximoUsados.ToString()
|
||||
|
||||
UpDescNC.Update()
|
||||
End Sub
|
||||
@@ -27347,6 +27547,13 @@ Partial Class Ventas
|
||||
|
||||
BloqueaCondiconesPago()
|
||||
|
||||
|
||||
DivDdlFacturaRela.Visible = True
|
||||
BtnAgregarFacturasRelaciondas.Visible = True
|
||||
DdlTipoRelacionARelacionar.Enabled = True
|
||||
|
||||
GvFacturasRelacionadas.Columns(2).Visible = True
|
||||
|
||||
UpnTools.Update()
|
||||
UpCliente.Update()
|
||||
UpParametros.Update()
|
||||
@@ -27359,6 +27566,7 @@ Partial Class Ventas
|
||||
UpEstatus.Update()
|
||||
UpParametros.Update()
|
||||
UpINV.Update()
|
||||
UpFacturasRelacionadas.Update()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -142,6 +142,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user