This commit is contained in:
Hector
2021-08-13 11:29:53 -07:00
15 changed files with 285 additions and 146 deletions

View File

@@ -108,18 +108,18 @@
<tr> <tr>
<td class="text-right"><b>Tipo de Activo Fijo:</b></td> <td class="text-right"><b>Tipo de Activo Fijo:</b></td>
<td> <td>
<asp:DropDownList ID="DdlTipoActivoFijo" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" Width="206px" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlTipoActivoFijo" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoActivoFijo" DataValueField="CveTipoActivoFijo" Width="206px" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoActivoFijo" runat="server" ControlToValidate="DdlTipoActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTipoActivoFijo" runat="server" ControlToValidate="DdlTipoActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOTipoActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOTipoActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender>
</td> </td>
<%--</tr>--%> <%--</tr>--%>
<%--<tr>--%> <%--<tr>--%>
<td class="text-right"><b>SubTipo de Activo Fijo:</b></td> <td class="text-right"><b>SubTipo de A.F:</b></td>
<td> <td>
<asp:DropDownList ID="DdlSubTipoActivoFijo" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="SubTipoActivoFijo" DataValueField="CveSubTipoActivoFijo" Width="206px" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlSubTipoActivoFijo" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="SubTipoActivoFijo" DataValueField="CveSubTipoActivoFijo" Width="206px" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVSubTipoActivoFijo" runat="server" ControlToValidate="DdlSubTipoActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubTipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVSubTipoActivoFijo" runat="server" ControlToValidate="DdlSubTipoActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubTipo de Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOSubTipoActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubTipoActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOSubTipoActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RFVSubTipoActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -161,8 +161,8 @@
<tr> <tr>
<td class="text-right"><b>Estado:</b></td> <td class="text-right"><b>Estado:</b></td>
<td> <td>
<asp:DropDownList ID="DdlEstadoActivoFijo" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" DataTextField="EstadoActivoFijo" DataValueField="CveEstadoActivoFijo" Width="200px" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlEstadoActivoFijo" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="EstadoActivoFijo" DataValueField="CveEstadoActivoFijo" Width="200px" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Sin Estado Asignado" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVEstadoActivoFijo" runat="server" ControlToValidate="DdlEstadoActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVEstadoActivoFijo" runat="server" ControlToValidate="DdlEstadoActivoFijo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estado Activo Fijo''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOEstadoActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RFVEstadoActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOEstadoActivoFijo" runat="server" HighlightCssClass="vco" TargetControlID="RFVEstadoActivoFijo" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -171,8 +171,8 @@
<tr>--%> <tr>--%>
<td class="text-right"><b>Responsable:</b></td> <td class="text-right"><b>Responsable:</b></td>
<td> <td>
<asp:DropDownList ID="DdlResponsable" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CvePersonal" Width="200px" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlResponsable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CvePersonal" Width="200px" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Sin Responsable Asignado" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</td> </td>
</tr> </tr>
@@ -181,8 +181,8 @@
<asp:Label runat="server" ID="LblProyecto" Font-Bold="true">Proyecto:</asp:Label> <asp:Label runat="server" ID="LblProyecto" Font-Bold="true">Proyecto:</asp:Label>
</td> </td>
<td runat="server" id="tdDdlProyecto"> <td runat="server" id="tdDdlProyecto">
<asp:DropDownList ID="DdlProyecto" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="200px" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="200px" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Sin Proyecto asignado" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</td> </td>
<%-- </tr> <%-- </tr>
@@ -191,17 +191,18 @@
<asp:Label runat="server" ID="LblSubProyectos" Font-Bold="true">SubProyecto:</asp:Label> <asp:Label runat="server" ID="LblSubProyectos" Font-Bold="true">SubProyecto:</asp:Label>
</td> </td>
<td> <td>
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="200px" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="200px" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Sin SubProyecto asignado" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="text-right"><b>Cliente:</b></td> <td class="text-right"><b>Cliente:</b></td>
<td> <td>
<asp:DropDownList ID="DdlCliente" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Nombre" DataValueField="CveCliente" Width="200px" ValidationGroup="GrpGuardar"> <ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
<asp:ListItem Selected="True" Text="Sin Cliente Asignado" Value="-1"></asp:ListItem> <%-- <asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>--%>
</td> </td>
</tr> </tr>
<tr> <tr>

View File

@@ -189,7 +189,7 @@ Partial Class AF_PopUpBuscarAF
DdlSubTipoActivoFijo.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoActivoFijo = '" & DdlTipoActivoFijo.SelectedValue & "'") DdlSubTipoActivoFijo.DataSource = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoActivoFijo = '" & DdlTipoActivoFijo.SelectedValue & "'")
'DdlSubTipoActivoFijo.DataSource = GlobalDTSubTipoActivoFijo.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa & " AND CveTipoActivoFijo = '" & DdlTipoActivoFijo.SelectedValue & "'") 'DdlSubTipoActivoFijo.DataSource = GlobalDTSubTipoActivoFijo.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa & " AND CveTipoActivoFijo = '" & DdlTipoActivoFijo.SelectedValue & "'")
DdlSubTipoActivoFijo.DataBind() DdlSubTipoActivoFijo.DataBind()
DdlSubTipoActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlSubTipoActivoFijo.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub End Sub
Private Sub CargaCaracteristicas() Private Sub CargaCaracteristicas()
@@ -214,7 +214,7 @@ Partial Class AF_PopUpBuscarAF
' DdlModeloActivoFijo.Items.Clear() ' DdlModeloActivoFijo.Items.Clear()
' DdlModeloActivoFijo.DataSource = GlobalDTModeloActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ' DdlModeloActivoFijo.DataSource = GlobalDTModeloActivoFijo(UsuarioActual.CveEmpresa).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
' DdlModeloActivoFijo.DataBind() ' DdlModeloActivoFijo.DataBind()
' DdlModeloActivoFijo.Items.Insert(0, New ListItem("Seleccione", "-1")) ' DdlModeloActivoFijo.Items.Insert(0, New ListItem("Todos", "-1"))
'End Sub 'End Sub
Private Sub CargaMarcaActivoFijo() Private Sub CargaMarcaActivoFijo()
'DdlMarcaActivoFijo.DataSource = GlobalDTMarcaActivoFijo.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) 'DdlMarcaActivoFijo.DataSource = GlobalDTMarcaActivoFijo.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
@@ -238,15 +238,18 @@ Partial Class AF_PopUpBuscarAF
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind() DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Sin SubProyecto asignado", "-1")) DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub End Sub
Private Sub CargaEstatusActivoFijo() Private Sub CargaEstatusActivoFijo()
DdlEstadoActivoFijo.DataSource = GlobalDTEstadoActivoFijo DdlEstadoActivoFijo.DataSource = GlobalDTEstadoActivoFijo
DdlEstadoActivoFijo.DataBind() DdlEstadoActivoFijo.DataBind()
End Sub End Sub
Private Sub CargaCliente() Private Sub CargaCliente()
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
DdlCliente.DataBind() DdlClientes.setEsWebService(True)
' DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
'DdlCliente.DataBind()
End Sub End Sub
#End Region #End Region
@@ -265,7 +268,6 @@ Partial Class AF_PopUpBuscarAF
Dim CveProyecto As Integer = -1 Dim CveProyecto As Integer = -1
Dim CveSubProyecto As Integer = -1 Dim CveSubProyecto As Integer = -1
Dim EstadoActivoFijo As Integer = -1 Dim EstadoActivoFijo As Integer = -1
Dim CveCliente As Integer = -1
If TxtCodigo.Text.Trim <> String.Empty Then Codigo = TxtCodigo.Text.Trim If TxtCodigo.Text.Trim <> String.Empty Then Codigo = TxtCodigo.Text.Trim
If TxtDescripcion.Text.Trim <> String.Empty Then Descripcion = TxtDescripcion.Text.Trim If TxtDescripcion.Text.Trim <> String.Empty Then Descripcion = TxtDescripcion.Text.Trim
@@ -278,7 +280,8 @@ Partial Class AF_PopUpBuscarAF
If DdlProyecto.SelectedValue <> String.Empty Then CveProyecto = DdlProyecto.SelectedValue.ToEntero If DdlProyecto.SelectedValue <> String.Empty Then CveProyecto = DdlProyecto.SelectedValue.ToEntero
If DdlSubProyecto.SelectedValue <> String.Empty Then CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero If DdlSubProyecto.SelectedValue <> String.Empty Then CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
If DdlEstadoActivoFijo.SelectedValue <> String.Empty Then EstadoActivoFijo = DdlEstadoActivoFijo.SelectedValue.ToEntero If DdlEstadoActivoFijo.SelectedValue <> String.Empty Then EstadoActivoFijo = DdlEstadoActivoFijo.SelectedValue.ToEntero
If DdlCliente.SelectedValue <> String.Empty Then CveCliente = DdlCliente.SelectedValue.ToEntero 'If DdlCliente.SelectedValue <> String.Empty Then CveCliente = DdlCliente.SelectedValue.ToEntero
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
Dim strSQL1 As New StringBuilder Dim strSQL1 As New StringBuilder
Dim booPrimerCampo As Boolean = False Dim booPrimerCampo As Boolean = False

View File

@@ -5656,7 +5656,11 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
Return Retorno Return Retorno
End Function End Function
Public Function SolicitudVacacionesAdd(CvePersonal As Integer, Fecha As Date, FechaFin As Date, Estatus As Integer, CveUsuario As Integer, CveAutoriza As Integer, Folio As Integer, Optional Motivo As String = "", Optional FechaPago As String = "", Optional diasinabiles As Integer = 0, Optional PorcentajePrimaVac As Decimal = -1, Optional CveTipoPago As Integer = 0, Optional diasExtras As Integer = 0) As Boolean Public Function SolicitudVacacionesAdd(CvePersonal As Integer, Fecha As Date, FechaFin As Date, Estatus As Integer, CveUsuario As Integer,
CveAutoriza As Integer, Folio As Integer, Optional Motivo As String = "", Optional FechaPago As String = "",
Optional diasinabiles As Integer = 0, Optional PorcentajePrimaVac As Decimal = -1,
Optional CveTipoPago As Integer = 0, Optional diasExtras As Integer = 0,
Optional Ejercicio As Integer = 0, Optional PrimaVacacional As Integer = 1, Optional CobrarImss As Integer = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_RH_SolicitudVacacionesAdd") DataAdapter("PA_RH_SolicitudVacacionesAdd")
@@ -5674,6 +5678,9 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo
.Add("@FechaPago", SqlDbType.VarChar).Value = FechaPago .Add("@FechaPago", SqlDbType.VarChar).Value = FechaPago
.Add("@CveTipoPago", SqlDbType.Int).Value = CveTipoPago .Add("@CveTipoPago", SqlDbType.Int).Value = CveTipoPago
.Add("@diasExtras", SqlDbType.Int).Value = diasExtras .Add("@diasExtras", SqlDbType.Int).Value = diasExtras
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
.Add("@PrimaVacacional", SqlDbType.Int).Value = PrimaVacacional
.Add("@CobrarImss", SqlDbType.Int).Value = CobrarImss
'.Add("@Motivo", SqlDbType.VarChar).Value = MotivoFechaPago As String = "", Optional diasinabiles '.Add("@Motivo", SqlDbType.VarChar).Value = MotivoFechaPago As String = "", Optional diasinabiles
End With End With

View File

@@ -813,7 +813,7 @@ Public Class Timbrado
'validación especial. 'validación especial.
If Ventas.TipoDocto.Contiene("Ing", "Dev") Then If Ventas.TipoDocto.Contiene("Ing", "Dev") Then
Dim CodigoIncorrecto = (From c In Ventas.Timbre.Conceptos Where (c.ClaveProdServ = "01010101") OrElse (c.ClaveProdServ = "84111506" AndAlso Not UsuarioActual.CveEmpresa.Contiene(2, 70)) Dim CodigoIncorrecto = (From c In Ventas.Timbre.Conceptos Where (c.ClaveProdServ = "01010101") OrElse (c.ClaveProdServ = "84111506" AndAlso Not UsuarioActual.CveEmpresa.Contiene(2, 70, 144))
Select c.ClaveProdServ, c.Descripcion) Select c.ClaveProdServ, c.Descripcion)
Dim Str As New StringBuilder Dim Str As New StringBuilder
Str.Append("Los siguentes productos tienen especificado un código no permitido por el SAT: <br/>") Str.Append("Los siguentes productos tienen especificado un código no permitido por el SAT: <br/>")

View File

@@ -2112,7 +2112,7 @@
<asp:TemplateField> <asp:TemplateField>
<ItemTemplate> <ItemTemplate>
<asp:Label runat="server" Visible="false" ID="LbCveAF" Text='<%# Eval("CodAF")%>'></asp:Label> <asp:Label runat="server" Visible="false" ID="LbCveAF" Text='<%# Eval("CodAF")%>'></asp:Label>
<asp:TextBox ID="LblCodigo" Text='<%# Eval("CodAF")%>' runat="server" Width="100px" Visible="true"></asp:TextBox> <asp:TextBox ID="LblCodigo" Text='<%# Eval("CodAF")%>' runat="server" Width="80px" Visible="true"></asp:TextBox>
<asp:HyperLink runat="server" ID="HLBuscarAF"><i class="fa fa-search" aria-hidden="true"></i></asp:HyperLink> <asp:HyperLink runat="server" ID="HLBuscarAF"><i class="fa fa-search" aria-hidden="true"></i></asp:HyperLink>
<asp:Label runat="server" ID="LblValido" Style="display: none" Text="<i class='fa fa-check' style='color:green'></i>"></asp:Label> <asp:Label runat="server" ID="LblValido" Style="display: none" Text="<i class='fa fa-check' style='color:green'></i>"></asp:Label>
@@ -2129,7 +2129,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left">
<ItemTemplate> <ItemTemplate>
<asp:DropDownList ID="DdlTipoMantemiento" runat="server" CssClass="form-control select2me" Width="200px" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoMantemiento_SelectedIndexChanged"> <asp:DropDownList ID="DdlTipoMantemiento" runat="server" CssClass="form-control select2me" Width="100px" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoMantemiento_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
<asp:ListItem Text="Preventivo" Value="1"></asp:ListItem> <asp:ListItem Text="Preventivo" Value="1"></asp:ListItem>
<asp:ListItem Text="Correctivo" Value="2"></asp:ListItem> <asp:ListItem Text="Correctivo" Value="2"></asp:ListItem>

View File

@@ -2708,6 +2708,11 @@ Partial Class Compras_Compras
TmpDT.Columns.Add("CveSATPSActualizado", GetType(Integer)) TmpDT.Columns.Add("CveSATPSActualizado", GetType(Integer))
End If End If
If Not TmpDT.Columns.Contains("ImporteSinImpuestos") Then
TmpDT.Columns.Add("ImporteSinImpuestos", GetType(Decimal))
End If
GvPS.DataSource = TmpDT GvPS.DataSource = TmpDT
GvPS.DataBind() GvPS.DataBind()
@@ -10146,6 +10151,7 @@ Partial Class Compras_Compras
If Not ErrorAC Then If Not ErrorAC Then
Dim Cont As Integer = 0 Dim Cont As Integer = 0
Dim indiceTR = 0
For Each Row As DataRow In TmpDT.Rows For Each Row As DataRow In TmpDT.Rows
'actualizar las clasificaciones, que se hallan hecho 'actualizar las clasificaciones, que se hallan hecho
@@ -10170,14 +10176,40 @@ Partial Class Compras_Compras
'Si es AF-COMPRA se guarda en CveActivoFijoCompra 'Si es AF-COMPRA se guarda en CveActivoFijoCompra
Dim CveAFCompra = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 2, Row("CveActivoFijo").ToString.ToEntero, -1) Dim CveAFCompra = If(Row("CveActivoFijo").ToString.ToEntero > 0 AndAlso Row("TipoAF").ToString.ToEntero = 2, Row("CveActivoFijo").ToString.ToEntero, -1)
If Not ObjCompra.UpdateCompraDetalle(Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, Row("IVA").ToString.ToDouble, Row("Total").ToString.ToDouble, If Row("CveCompraDetalle").ToString.ToEntero > 0 Then
Row("Descuento").ToString.ToDouble, Row("Obs").ToString, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero, CveAF, Row("CveCompraDetalle").ToString.ToEntero, CvePersonal:=CvePersonal, CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, If Not ObjCompra.UpdateCompraDetalle(Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, Row("IVA").ToString.ToDouble, Row("Total").ToString.ToDouble,
RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble, Row("Descuento").ToString.ToDouble, Row("Obs").ToString, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero, CveAF, Row("CveCompraDetalle").ToString.ToEntero, CvePersonal:=CvePersonal, CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia,
IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False)) Then RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble,
IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble, IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False)) Then
Retorno = False Retorno = False
Exit For Exit For
End If
Else
Dim TipoRecepcion As Integer = -1
If GvInv.Rows.Count > indiceTR Then
If GvInv.Rows(indiceTR).FCCheckBox("cbInv").Checked = True And GvInv.Rows(indiceTR).FCDropDownList("DdlRecibirInv").SelectedValue = "1" Then
TipoRecepcion = 1
ElseIf GvInv.Rows(indiceTR).FCCheckBox("cbInv").Checked = True And GvInv.Rows(indiceTR).FCDropDownList("DdlRecibirInv").SelectedValue = "0" Then
TipoRecepcion = 2
End If
End If
If Not ObjCompra.AddCompraDetalle(CveCompra, Row("CveUM").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("CveSubProyecto").ToString.ToEntero, -1, CveAF,
Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, Row("IVA").ToString.ToDouble, Row("Total").ToString.ToDouble, Row("Descuento").ToString.ToDouble,
Row("Obs").ToString, Row("CveOrdenCompraDetalle").ToString.ToEntero, TipoRecepcion, Row("CveContrato").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero,
AplicaCostoIndirecto:=Row("AplicaCostoIndirecto").ToString.ToEntero, EstatusAlmacen:=Row("EntregaDirecta").ToString.ToEntero, CvePersonal:=CvePersonal,
CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia, OtrosGastos:=Row("OtrosGastos").ToString.ToDecimal,
RetIVA:=Row("RetIVA").ToString.ToDouble, RetISR:=Row("RetISR").ToString.ToDouble, IEPSPS:=Row("IEPSPS").ToString.ToDouble.RoundSQL, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDouble,
IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDouble, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDouble, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDouble,
IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDouble, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDouble, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso EsNoDeducible, True, False),
CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero, CveCultivoCuadroDetalle:=Row("CveCultivoCuadroDetalle").ToString.ToEntero) Then
Retorno = False
Exit For
End If
End If End If
indiceTR = indiceTR + 1
'If Not ObjCompra.VerificaPrepolizas(UsuarioActual.CveEmpresa, CveCompra) Then 'If Not ObjCompra.VerificaPrepolizas(UsuarioActual.CveEmpresa, CveCompra) Then
' Retorno = False ' Retorno = False
@@ -12388,16 +12420,18 @@ Partial Class Compras_Compras
dr.ItemArray = dr1.ItemArray dr.ItemArray = dr1.ItemArray
dr1("Cantidad") = (dr1("Cantidad").ToString.ToDouble - Cantidad.ToDouble) dr1("Cantidad") = (dr1("Cantidad").ToString.ToDouble - Cantidad.ToDouble)
dr1("Total") = dr1("PU").ToString.ToDouble * dr1("Cantidad").ToString.ToDouble dr1("Total") = dr1("PU").ToString.ToDouble * dr1("Cantidad").ToString.ToDecimal
dr1("IVA") = Math.Round(dr1("IVAPorcentaje").ToString.ToDouble * dr1("Total").ToString.ToDouble, 6) dr1("Importe") = dr1("Total")
dr1("IVA") = Math.Round(dr1("IVAPorcentaje").ToString.ToDecimal * dr1("Total").ToString.ToDecimal, 6)
TmpDT.AcceptChanges() TmpDT.AcceptChanges()
dr("CveActivoFijo") = 0 dr("CveActivoFijo") = 0
dr("CodAF") = "" dr("CodAF") = ""
dr("Cantidad") = Cantidad.ToDouble dr("Cantidad") = Cantidad.ToDecimal
dr("Total") = dr("PU").ToString.ToDouble * Cantidad.ToDouble dr("Total") = dr("PU").ToString.ToDecimal * Cantidad.ToDecimal
dr("IVA") = Math.Round(dr("IVAPorcentaje").ToString.ToDouble * dr("Total").ToString.ToDouble, 6) dr("Importe") = dr("Total")
dr("IVA") = Math.Round(dr("IVAPorcentaje").ToString.ToDecimal * dr("Total").ToString.ToDecimal, 6)
TmpDT.Rows.InsertAt(dr, Index + 1) TmpDT.Rows.InsertAt(dr, Index + 1)
@@ -12522,27 +12556,36 @@ Partial Class Compras_Compras
#Region " AJUSTA IMPORTES " #Region " AJUSTA IMPORTES "
Private Sub AjustaImporteUltimoConcepto(ImporteAjuste As Decimal, Optional EsCarga As Boolean = False) Private Sub AjustaImporteUltimoConcepto(ImporteAjuste As Decimal, Optional EsCarga As Boolean = False)
'Dim TempSubTotal = TxtSubTotal.Text.ToDouble
If ImporteAjuste = 0 Then Exit Sub
Dim Amortizacion As Decimal = 0 Dim Amortizacion As Decimal = 0
If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then If ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 Then
Amortizacion = LblAmortizacion.Text.ToDecimal Amortizacion = LblAmortizacion.Text.ToDecimal
End If End If
If TmpDT.Rows.Count > 0 Then ' si hay movimientos y si esta afectando al total, que se haga el ajuste If TmpDT.Rows.Count > 0 Then ' si hay movimientos y si esta afectando al total, que se haga el ajuste
'Dim ImporteAjuste As Decimal = Total - (SubTotal2 + IVA - RetencionIVA - RetencionIVA - RetencionISR + IEPS + OtrosImpuestos)
Dim Indice As Integer = If(TmpDT.Rows(TmpDT.Rows.Count - 1)("CvePS").ToString = UsuarioActual.Empresa.Funcionalidad(112).ToString, TmpDT.Rows.Count - 2, TmpDT.Rows.Count - 1) Dim Indice As Integer = If(TmpDT.Rows(TmpDT.Rows.Count - 1)("CvePS").ToString = UsuarioActual.Empresa.Funcionalidad(112).ToString, TmpDT.Rows.Count - 2, TmpDT.Rows.Count - 1)
Dim tPU As Decimal Dim tPU As Decimal
If TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal > 0 Then If TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal > 0 Then
tPU = ImporteAjuste / TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal tPU = ImporteAjuste / TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal
Else Else
tPU = 0 tPU = 0
End If End If
TmpDT.Rows(Indice)("PU") = TmpDT.Rows(Indice)("PU").ToString.ToDouble + tPU If TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU < 0 Then 'si es negativo, que tome el dato anterior
TmpDT.Rows(Indice)("Total") = TmpDT.Rows(Indice)("Total").ToString.ToDouble + ImporteAjuste Indice = Indice - 1
TmpDT.Rows(Indice)("IEPSPS") = (TmpDT.Rows(Indice)("Total").ToString.ToDouble() * TmpDT.Rows(Indice)("IEPSPSPorcentaje").ToString.ToDouble()).RoundAD(2) If TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal > 0 Then
tPU = ImporteAjuste / TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal
Else
tPU = 0
End If
End If
TmpDT.Rows(Indice)("PU") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal + tPU
TmpDT.Rows(Indice)("Total") = TmpDT.Rows(Indice)("Total").ToString.ToDecimal + ImporteAjuste
TmpDT.Rows(Indice)("IEPSPS") = (TmpDT.Rows(Indice)("Total").ToString.ToDecimal() * TmpDT.Rows(Indice)("IEPSPSPorcentaje").ToString.ToDecimal()).RoundAD(2)
'TmpDT.Rows(Indice)("IVA") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal 'TmpDT.Rows(Indice)("IVA") = TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal
TmpDT.Rows(Indice)("IVA") = (TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal - TmpDT.Rows(Indice)("Descuento").ToString.ToDecimal) * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal TmpDT.Rows(Indice)("IVA") = (TmpDT.Rows(Indice)("PU").ToString.ToDecimal * TmpDT.Rows(Indice)("Cantidad").ToString.ToDecimal - TmpDT.Rows(Indice)("Descuento").ToString.ToDecimal) * TmpDT.Rows(Indice)("IVAPorcentaje").ToString.ToDecimal
'Row("IEPSPS") = Math.Round(IEPSPS, DecimalesPermitidos) 'Row("IEPSPS") = Math.Round(IEPSPS, DecimalesPermitidos)
@@ -12550,9 +12593,9 @@ Partial Class Compras_Compras
TmpDT.AcceptChanges() TmpDT.AcceptChanges()
End If End If
SubTotal = TmpDT.SUM("Total").ToString.ToDecimal SubTotal = TmpDT.SUMD("Total")
If Not EsCarga Then If Not EsCarga Then
Descuentos = TmpDT.SUM("Descuento").ToString.ToDecimal Descuentos = TmpDT.SUMD("Descuento")
End If End If
TxtSubTotal.Text = (SubTotal + Descuentos).FormatoNumero() TxtSubTotal.Text = (SubTotal + Descuentos).FormatoNumero()
TxtSubTotal2.Text = (SubTotal - Amortizacion).FormatoNumero TxtSubTotal2.Text = (SubTotal - Amortizacion).FormatoNumero
@@ -12560,15 +12603,6 @@ Partial Class Compras_Compras
SubTotalConceptos = SubTotal SubTotalConceptos = SubTotal
GvPS.DataSource = TmpDT : GvPS.DataBind() GvPS.DataSource = TmpDT : GvPS.DataBind()
'If TxtOtrosImpuestos.Text.ToDouble > 0 Then TxtOtrosImpuestos.Text = "" : TrOtrosImpuestos.Visible = False
'EN ESPERA DE ALGUN CASO QUE LO NECESITE - IPP 5 DICIEMBRE 2016
'TempSubTotal = TempSubTotal - SubTotal
'If TempSubTotal > 0 Then
' TxtTotal.Text = TempSubTotal.ToString.FormatoNumero
'End If
'GVAF.DataSource = TmpDT : GVAF.DataBind()
End Sub End Sub
Protected Sub ImgAjustePorcentaje_Click(sender As Object, e As ImageClickEventArgs) Handles ImgAjustePorcentaje.Click Protected Sub ImgAjustePorcentaje_Click(sender As Object, e As ImageClickEventArgs) Handles ImgAjustePorcentaje.Click
@@ -12675,10 +12709,10 @@ Partial Class Compras_Compras
dr = DtAcreedores.FiltroPrimero(String.Format("CveProveedor = {0}", DdlAcreedor.SelectedValue)) dr = DtAcreedores.FiltroPrimero(String.Format("CveProveedor = {0}", DdlAcreedor.SelectedValue))
If dr IsNot Nothing Then If dr IsNot Nothing Then
Dim tSaldo As Double = dr("Saldo").ToString.ToDouble Dim tSaldo As Decimal = dr("Saldo").ToString.ToDecimal
RVContadoAcreedor.MaximumValue = tSaldo.ToString RVContadoAcreedor.MaximumValue = tSaldo.ToString
'si el saldo es mayor de la compra poner el valor de la compra sino el valor del saldo 'si el saldo es mayor de la compra poner el valor de la compra sino el valor del saldo
TxtContadoAcreedor.Text = If(tSaldo > TxtTotal.Text.ToDouble, TxtTotal.Text, tSaldo.ToString).FormatoNumero TxtContadoAcreedor.Text = If(tSaldo > TxtTotal.Text.ToDecimal, TxtTotal.Text, tSaldo.ToString).FormatoNumero
LblDetalle.Visible = True LblDetalle.Visible = True
DdlAcreedorDetalle.Visible = True DdlAcreedorDetalle.Visible = True
@@ -19070,7 +19104,7 @@ Partial Class Compras_Compras
If CveCompra > 0 And GvInvMov.Rows.Count > 0 Then If CveCompra > 0 And GvInvMov.Rows.Count > 0 Then
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, -1, UsuarioActual.CveEmpresa, -1) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
DtPendientesAlmacen = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0").Copy DtPendientesAlmacen = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0").Copy
End If End If
ObjInventarios.Dispose() ObjInventarios.Dispose()
@@ -19128,7 +19162,7 @@ Partial Class Compras_Compras
If ChkNCInvNC.Checked Then If ChkNCInvNC.Checked Then
Dim ObjInventarios As New ClsInventarios Dim ObjInventarios As New ClsInventarios
If ObjInventarios.RecepcionAlmacenGet(-1, -1, UsuarioActual.CveEmpresa, CveProveedor) AndAlso ObjInventarios.DtResultados.FiltraParametros($"CantidadF > 0").Rows.Count > 0 Then If ObjInventarios.RecepcionAlmacenGet(-1, -1, CveProveedor, UsuarioActual.CveEmpresa, -1) AndAlso ObjInventarios.DtResultados.FiltraParametros($"CantidadF > 0").Rows.Count > 0 Then
DtPendientesAlmacen = ObjInventarios.DtResultados.FiltraParametros($"CantidadF > 0").Copy DtPendientesAlmacen = ObjInventarios.DtResultados.FiltraParametros($"CantidadF > 0").Copy
End If End If
ObjInventarios.Dispose() ObjInventarios.Dispose()

View File

@@ -603,22 +603,25 @@ Partial Class Inventarios_TraspasoAlmacen
Dim Retorno = True Dim Retorno = True
Dim ExistenciaEspecificada As Decimal Dim ExistenciaEspecificada As Decimal
Dim PendienteporSurtir As Decimal
Dim CantidadEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(Serie <> "-1", $" AND Serie = '{Serie}'", "")}") Dim CantidadEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(Serie <> "-1", $" AND Serie = '{Serie}'", "")}")
Dim Existencia As Decimal Dim Existencia As Decimal
Dim Inv As New ClsInventarios Dim Inv As New ClsInventarios
If Inv.GetExistenciasProducto(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm")) Then If Inv.GetExistenciasProducto(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm")) Then
'si hay existencia en almacen costeado, lo tengo que sacar 'si hay existencia en almacen costeado, lo tengo que sacar
Existencia = Inv.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal Existencia = Inv.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
PendienteporSurtir = Inv.DtResultados.FiltroPrimeroValor("PendientePorSurtir", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
End If End If
'Existencia= Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), PendientePorSurtir:=1) 'Existencia= Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), PendientePorSurtir:=1)
If Existencia > 0 Then If Existencia > Cantidad Then
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir 'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
'las segunda consulta, que tenga existencia, ya con los parametros especificos 'las segunda consulta, que tenga existencia, ya con los parametros especificos
If (FechaCaducidad > MinFecha OrElse Not Serie.Contiene("", "-1") OrElse Not Lote.Contiene("", "-1")) Then If (FechaCaducidad > MinFecha OrElse Not Serie.Contiene("", "-1") OrElse Not Lote.Contiene("", "-1")) Then
If Inv.GetExistenciasProducto(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then If Inv.GetExistenciasProducto(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
ExistenciaEspecificada = Inv.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal 'aqui se toma la COLUMNA Existencia, porque ya está validado que hay existencia suficiente para surtir, considerando lo pendiente por surtir, entonces se asume no se tomará la serie/lote
ExistenciaEspecificada = Inv.DtResultados.FiltroPrimeroValor("Existencia", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
End If End If
'ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1) 'ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
Dim StrB As New StringBuilder Dim StrB As New StringBuilder

View File

@@ -1359,9 +1359,9 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" style=" padding-top: 0px;"> <div class="form-group form-md-line-input input-iconright" style="padding-top: 0px;">
<asp:Label runat="server" AssociatedControlID="DdlFormapagovacaciones" style=" padding-bottom: 0px;margin-bottom: 0px;">Forma de pago</asp:Label><br /> <asp:Label runat="server" AssociatedControlID="DdlFormapagovacaciones" Style="padding-bottom: 0px; margin-bottom: 0px;">Forma de pago</asp:Label><br />
<asp:DropDownList ID="DdlFormapagovacaciones" DataValueField="Cve" style=" margin-top: -4px;" DataTextField="Texto" Width="100%" CssClass="form-control select2me " runat="server"> <asp:DropDownList ID="DdlFormapagovacaciones" DataValueField="Cve" Style="margin-top: -4px;" DataTextField="Texto" Width="100%" CssClass="form-control select2me " runat="server">
<asp:ListItem Text="Pagadas por anticipado" Value="1" Selected="True"></asp:ListItem> <asp:ListItem Text="Pagadas por anticipado" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Por pagar" Value="2"></asp:ListItem> <asp:ListItem Text="Por pagar" Value="2"></asp:ListItem>
<asp:ListItem Text="Trabajadas" Value="3"></asp:ListItem> <asp:ListItem Text="Trabajadas" Value="3"></asp:ListItem>
@@ -1374,7 +1374,7 @@
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVacDiasExtra" CssClass="form-control input-sm " runat="server"></asp:TextBox> <asp:TextBox ID="TxtVacDiasExtra" CssClass="form-control input-sm " runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtVacDiasExtra">Días extras</asp:Label> <asp:Label runat="server" AssociatedControlID="TxtVacDiasExtra">Días extras</asp:Label>
</div> </div>
</div> </div>
@@ -1382,27 +1382,28 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtVacEjercicio" CssClass="form-control input-sm " Text="2021" runat="server"></asp:TextBox> <asp:TextBox ID="TxtVacEjercicio" CssClass="form-control input-sm " Text="2021" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtVacEjercicio">Ejercicio</asp:Label> <asp:Label runat="server" AssociatedControlID="TxtVacEjercicio">Ejercicio</asp:Label>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div style="padding-top: 0px; padding-bottom: 0px;"> <div style="padding-top: 0px; padding-bottom: 0px;">
¿Prima Vacacional? ¿Prima Vacacional?
</div> </div>
<asp:CheckBox ID="ChkVacPrimaVacacional" CssClass="chksino " Text=" " runat="server" /> <asp:CheckBox ID="ChkVacPrimaVacacional" CssClass="chksino " Text=" " runat="server" />
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="col-md-6"> <div class="col-md-6">
<div style="padding-top: 0px; padding-bottom: 0px;"> <div style="padding-top: 0px; padding-bottom: 0px;">
¿Cobrar IMSS? ¿Cobrar IMSS?
</div>
<asp:CheckBox ID="ChkVacCobrarIMSS" CssClass="chksino " Text=" " runat="server" />
</div> </div>
<asp:CheckBox ID="ChkVacCobrarIMSS" CssClass="chksino " Text=" " runat="server" /> </div>
</div></div>
</div> </div>
<div class="text-right"> <div class="text-right">
<asp:LinkButton ID="LnkSRVacacionesUP" OnClick="LnkSRVacacionesUP_Click" Visible="false" CssClass="btn btn-success" ValidationGroup="VG_Vacaciones" runat="server">Actualizar</asp:LinkButton> <asp:LinkButton ID="LnkSRVacacionesUP" OnClick="LnkSRVacacionesUP_Click" Visible="false" CssClass="btn btn-success" ValidationGroup="VG_Vacaciones" runat="server">Actualizar</asp:LinkButton>
@@ -1687,20 +1688,45 @@
<asp:ListItem Value="-1" Text="Seleccione"></asp:ListItem> <asp:ListItem Value="-1" Text="Seleccione"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="row">
<asp:TextBox CssClass="form-control" ID="TxtmcImporte" runat="server" MaxLength="10"></asp:TextBox> <div class="col-md-9"></div>
<asp:Label runat="server" AssociatedControlID="TxtmcImporte" Enabled="false" Text="Importe"></asp:Label> <div class="col-md-3">Calcular automatico</div>
<i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="row">
<asp:TextBox CssClass="form-control" ID="TxtmcImporteGrabado" runat="server" MaxLength="10"></asp:TextBox> <div class="col-md-9">
<asp:Label runat="server" AssociatedControlID="TxtmcImporteGrabado" Enabled="false" Text="Gravado"></asp:Label> <div class="form-group form-md-line-input input-iconright">
<i></i> <asp:TextBox CssClass="form-control" ID="Txtmcvalor" runat="server" MaxLength="10"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="Txtmcvalor" Enabled="false" Text="Valor"></asp:Label>
<i></i>
</div>
</div>
<div class="col-md-3 text-center">
<asp:CheckBox ID="ChkCalAutomaticoV" OnCheckedChanged="ChkCalAutomaticoV_CheckedChanged" AutoPostBack="true" runat="server" />
</div>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="row">
<asp:TextBox CssClass="form-control" ID="Txtmcvalor" runat="server" MaxLength="10"></asp:TextBox> <div class="col-md-9">
<asp:Label runat="server" AssociatedControlID="Txtmcvalor" Enabled="false" Text="Valor"></asp:Label> <div class="form-group form-md-line-input input-iconright">
<i></i> <asp:TextBox CssClass="form-control" ID="TxtmcImporte" runat="server" MaxLength="10"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtmcImporte" Enabled="false" Text="Importe"></asp:Label>
<i></i>
</div>
</div>
<div class="col-md-3 text-center">
<asp:CheckBox ID="ChkCalAutomatico" OnCheckedChanged="ChkCalAutomatico_CheckedChanged" AutoPostBack="true" runat="server" />
</div>
</div>
<div class="row">
<div class="col-md-9">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtmcImporteGrabado" runat="server" MaxLength="10"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtmcImporteGrabado" Enabled="false" Text="Gravado"></asp:Label>
<i></i>
</div>
</div>
<div class="col-md-3 text-center">
<asp:CheckBox ID="ChkCalAutomaticoG" OnCheckedChanged="ChkCalAutomaticoG_CheckedChanged" AutoPostBack="true" runat="server" />
</div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
@@ -2257,17 +2283,16 @@
</asp:DropDownList> </asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlTipoPeriodoCM">Tipo Periodo:</asp:Label> <asp:Label runat="server" AssociatedControlID="DdlTipoPeriodoCM">Tipo Periodo:</asp:Label>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-3 bold">Salario Diario</div> <div class="col-sm-3 bold">Salario Diario</div>
<div class="col-sm-3"> <div class="col-sm-3">
<asp:Label ID="LblSalarioDiarioSimula" runat="server"></asp:Label> <asp:Label ID="LblSalarioDiarioSimula" runat="server"></asp:Label>
</div> </div>
<div class="col-sm-3 bold"> </div> <div class="col-sm-3 bold"></div>
<div class="col-sm-3"> <div class="col-sm-3">
</div> </div>
</div> </div>
<%--<table class="table table-striped table-hover Widthall GvConceptossimulador"> <%--<table class="table table-striped table-hover Widthall GvConceptossimulador">
</table>--%> </table>--%>

View File

@@ -1823,11 +1823,33 @@ public partial class Nomina_Nomina2 : ClsPaginas
TxtmcImporte.Text = ""; TxtmcImporte.Text = "";
TxtmcImporteGrabado.Text = ""; TxtmcImporteGrabado.Text = "";
Txtmcvalor.Text = ""; Txtmcvalor.Text = "";
ChkCalAutomaticoG.Checked = false;
ChkCalAutomatico.Checked = false;
ChkCalAutomaticoV.Checked = false;
if (CveConcepto > 0) if (CveConcepto > 0)
{ {
DataRow drow = dtempleadosConceptos.FiltroPrimero(string.Format("CveConcepto={0} AND CvePersonal ={1}", CveConcepto, CvePersonal)); DataRow drow = dtempleadosConceptos.FiltroPrimero(string.Format("CveConcepto={0} AND CvePersonal ={1}", CveConcepto, CvePersonal));
if (drow != null) if (drow != null)
{ {
int TipoCalculo = drow["Estatus"].ToString().ToEntero();
ChkCalAutomaticoG.Checked = true;
ChkCalAutomatico.Checked = true;
ChkCalAutomaticoV.Checked = true;
if (TipoCalculo >= 5)
{
TipoCalculo -= 5;
ChkCalAutomaticoG.Checked = false;
}
if (TipoCalculo >= 3)
{
TipoCalculo -= 3;
ChkCalAutomatico.Checked = false;
}
if (TipoCalculo >= 1)
{
ChkCalAutomaticoV.Checked = false;
}
TxtmcImporte.Text = string.Format("{0:N2}", drow["Importe"]); TxtmcImporte.Text = string.Format("{0:N2}", drow["Importe"]);
TxtmcImporteGrabado.Text = string.Format("{0:N2}", drow["ImporteGravado"]); TxtmcImporteGrabado.Text = string.Format("{0:N2}", drow["ImporteGravado"]);
Txtmcvalor.Text = string.Format("{0:N2}", drow["Valor"]); Txtmcvalor.Text = string.Format("{0:N2}", drow["Valor"]);
@@ -1841,12 +1863,30 @@ public partial class Nomina_Nomina2 : ClsPaginas
} }
} }
UPpanelModalUpConcepto.Update(); UPpanelModalUpConcepto.Update();
ChkCalAutomaticoV_CheckedChanged(ChkCalAutomaticoV, null);
ChkCalAutomatico_CheckedChanged(ChkCalAutomatico, null);
ChkCalAutomaticoG_CheckedChanged(ChkCalAutomaticoG, null);
}
protected void ChkCalAutomaticoV_CheckedChanged(object sender, EventArgs e)
{
Txtmcvalor.Enabled = !ChkCalAutomaticoV.Checked;
}
protected void ChkCalAutomatico_CheckedChanged(object sender, EventArgs e)
{
TxtmcImporte.Enabled = !ChkCalAutomatico.Checked;
}
protected void ChkCalAutomaticoG_CheckedChanged(object sender, EventArgs e)
{
TxtmcImporteGrabado.Enabled = !ChkCalAutomaticoG.Checked;
} }
protected void BtnAceptarMC_Click(object sender, EventArgs e) protected void BtnAceptarMC_Click(object sender, EventArgs e)
{ {
int chkImporte = 1; int chkImporte = ChkCalAutomatico.Checked? 0:1;
int chkImporteGravado = 1; int chkImporteGravado = ChkCalAutomaticoG.Checked ? 0 : 1;
int chkImporteValor = 1; int chkImporteValor = ChkCalAutomaticoV.Checked ? 0 : 1;
bool continuar = true; bool continuar = true;
int CveNomina = 0; int CveNomina = 0;
double Total = 0; double Total = 0;
@@ -1858,12 +1898,15 @@ public partial class Nomina_Nomina2 : ClsPaginas
CvePersonal = DdlmcPersonal.SelectedValue.ToEntero(); CvePersonal = DdlmcPersonal.SelectedValue.ToEntero();
} }
int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero(); int CveConcepto = DdlmcConceptos.SelectedValue.ToEntero();
if (CveConcepto > 0 && CvePersonal > 0)
{
decimal ImporteConcepto = TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal(); decimal ImporteConcepto = TxtmcImporte.Text.Replace("$", "").Replace(",", "").ToDecimal();
decimal ImporteGravadoConcepto = TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal(); decimal ImporteGravadoConcepto = ChkCalAutomaticoG.Checked ? 0.0m : TxtmcImporteGrabado.Text.Replace("$", "").Replace(",", "").ToDecimal();
decimal ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto; decimal ImporteExentoConcepto = ImporteConcepto - ImporteGravadoConcepto;
decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal(); decimal ImporteValor = Txtmcvalor.Text.Replace("$", "").Replace(",", "").ToDecimal();
if ((ImporteConcepto>= 0 && ImporteGravadoConcepto<= ImporteConcepto)|| (ImporteConcepto < 0 && ImporteGravadoConcepto >= ImporteConcepto))
{
if (CveConcepto > 0 && CvePersonal > 0)
{
using (ClsNominas objNomina = new ClsNominas()) using (ClsNominas objNomina = new ClsNominas())
{ {
@@ -1933,6 +1976,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
{ {
Alert("Debe seleccionar un concepto.", TipoMensaje.MsgAdvertencia); Alert("Debe seleccionar un concepto.", TipoMensaje.MsgAdvertencia);
} }
}
}
else
{
Alert("el importe gravado no puede ser mayor al importe total, en caso de que el importe total sea negativo no puede ser menor.",TipoMensaje.MsgAdvertencia );
} }
} }
@@ -5728,7 +5776,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
VacFolioActual = VacFolioActual + 1; VacFolioActual = VacFolioActual + 1;
ClsRH objRH = new ClsRH(); ClsRH objRH = new ClsRH();
// Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones) // Dim continuar As Boolean = objRH.SolicitudVacacionesAdd(CvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, motivoVacaciones)
bool continuar = objRH.SolicitudVacacionesAdd(SRCvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago: fechapago, diasinabiles: diasinhabil, CveTipoPago: DdlFormapagovacaciones.SelectedValue.ToEntero(), diasExtras: TxtVacDiasExtra.Text.ToEntero());// bool continuar = objRH.SolicitudVacacionesAdd(SRCvePersonal, fInicio, fFin, 0, UsuarioActual.CveUsuario, VacCveSupervisor, VacFolioActual, FechaPago: fechapago,
diasinabiles: diasinhabil, CveTipoPago: DdlFormapagovacaciones.SelectedValue.ToEntero(), diasExtras: TxtVacDiasExtra.Text.ToEntero());
if (objRH.DtResultados.Rows.Count > 0) if (objRH.DtResultados.Rows.Count > 0)
{ {
string ShowError = objRH.DtResultados.Rows[0]["ShowError"].ToString(); string ShowError = objRH.DtResultados.Rows[0]["ShowError"].ToString();
@@ -6733,4 +6782,5 @@ public partial class Nomina_Nomina2 : ClsPaginas
LnkSRVacacionesADD.Visible = true; LnkSRVacacionesADD.Visible = true;
} }
} }

View File

@@ -939,7 +939,16 @@
<asp:CompareValidator ID="CVFechaIngreso" runat="server" ControlToValidate="TxtFechaIngreso" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaIngreso''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarAddS"></asp:CompareValidator> <asp:CompareValidator ID="CVFechaIngreso" runat="server" ControlToValidate="TxtFechaIngreso" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaIngreso''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarAddS"></asp:CompareValidator>
</div> </div>
</div> </div>
<div class="col-md-3" style="display: none;"> <div class="col-md-3">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtSalarioDiario" runat="server" MaxLength="10"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtSalarioDiario" Enabled="false" Text="Salario Diario (SDD):"></asp:Label>
<%--<asp:CompareValidator ID="CVSalarioDiario" runat="server" ControlToValidate="TxtSalarioDiario" CssClass="help-block errorimput" ErrorMessage="El campo <b>''Salario Diario''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>--%>
<i></i>
</div>
</div>
<div class="col-md-5" style="display: none;">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtCodigo" runat="server" MaxLength="12" Text="-1"></asp:TextBox> <asp:TextBox CssClass="form-control" ID="TxtCodigo" runat="server" MaxLength="12" Text="-1"></asp:TextBox>
<asp:Label AssociatedControlID="TxtCodigo" runat="server" Text="Código:"></asp:Label> <asp:Label AssociatedControlID="TxtCodigo" runat="server" Text="Código:"></asp:Label>
@@ -1098,7 +1107,7 @@
<div class="modal-footer"> <div class="modal-footer">
<asp:LinkButton ID="LnkGuardar" OnClick="LnkGuardar_Click" CssClass="btn btn-primary" ValidationGroup="GrpGuardarAddS" runat="server">Agregar</asp:LinkButton> <asp:LinkButton ID="LnkGuardar" OnClick="LnkGuardar_Click" CssClass="btn btn-primary" ValidationGroup="GrpGuardarAddS" runat="server">Agregar</asp:LinkButton>
<asp:Button ID="ClickOnHideModal" ClientIDMode="Static" OnClick="ClickOnHideModal_Click" CssClass="hidden" runat="server" Text="Button" /> <asp:Button ID="ClickOnHideModal" ClientIDMode="Static" OnClick="ClickOnHideModal_Click" CssClass="hidden" runat="server" Text="Button" />
<button type="button" class="btn btn-default" data-dismiss="modal">Terminar</button> <button type="button" class="btn btn-default" data-dismiss="modal">Terminar</button>
</div> </div>
</div> </div>

View File

@@ -1121,13 +1121,14 @@ Partial Class RH_CatPersonal
Dim isSindicalizado As Boolean = (DDlSindicalizado.SelectedValue = "1") Dim isSindicalizado As Boolean = (DDlSindicalizado.SelectedValue = "1")
Dim CvePuesto As Integer = DdlPuestoAdd.SelectedValue.ToEntero() Dim CvePuesto As Integer = DdlPuestoAdd.SelectedValue.ToEntero()
Dim CveSATRiesgoPuesto As Integer = DdlRiesgoPuesto.SelectedValue.ToEntero() Dim CveSATRiesgoPuesto As Integer = DdlRiesgoPuesto.SelectedValue.ToEntero()
Dim SalarioDiario As Decimal = TxtSalarioDiario.Text.ToDecimal()
Dim continuar As Boolean = False Dim continuar As Boolean = False
Dim CvePersonal As Integer = 0 Dim CvePersonal As Integer = 0
Using ObjPersonal As New ClsRH() Using ObjPersonal As New ClsRH()
If ObjPersonal.AddPersonal("-1", TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim, "", TxtFechaIngreso.Text.ToDate, If ObjPersonal.AddPersonal("-1", TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtNombres.Text.Trim, "", TxtFechaIngreso.Text.ToDate,
DdlTipoPeriodoAdd.SelectedValue.ToEntero, TxtNumeroSS.Text.Trim, ChkSeInscribioSS.Checked, 0, DdlTipoPeriodoAdd.SelectedValue.ToEntero, TxtNumeroSS.Text.Trim, True, SalarioDiario,
0, 0, 0, 0, 15, 25, DdlMetodoPagoAdd.SelectedValue.ToEntero, TxtFechaIngreso.Text.Trim.ToDate, "-1", SalarioDiario, 0, 0, 0, 15, 25, DdlMetodoPagoAdd.SelectedValue.ToEntero, TxtFechaIngreso.Text.Trim.ToDate, "-1",
DdlTipoContratoAdd.SelectedValue.ToEntero, "", DdlTipoContratoAdd.SelectedValue.ToEntero, "",
DdlTurno.SelectedValue.ToEntero, CvePuesto, DdlTurno.SelectedValue.ToEntero, CvePuesto,
DdlDepartamentoAdd.SelectedValue.ToEntero, DdlDepartamentoAdd.SelectedValue.ToEntero,

View File

@@ -645,22 +645,22 @@
</div> </div>
<div class="portlet-body form"> <div class="portlet-body form">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList Width="100%" ID="DdlEstatusPersonal" runat="server" AppendDataBoundItems="True" AutoPostBack="True" DataTextField="EstatusPersonal" DataValueField="CveEstatusPersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar"> <asp:DropDownList Width="100%" ID="DdlEstatusPersonal" Enabled="false" runat="server" AppendDataBoundItems="True" AutoPostBack="True" DataTextField="EstatusPersonal" DataValueField="CveEstatusPersonal" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlEstatusPersonal.ClientID.ToString()%>">Estatus: </label> <label for="<%= DdlEstatusPersonal.ClientID.ToString()%>">Estatus: </label>
<asp:RequiredFieldValidator ID="RFVEstatusPersonal" runat="server" ControlToValidate="DdlEstatusPersonal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''EstatusPersonal''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVEstatusPersonal" runat="server" ControlToValidate="DdlEstatusPersonal" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''EstatusPersonal''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <%-- <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList Width="100%" ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar"> <asp:DropDownList Width="100%" ID="DdlMotivoBaja" runat="server" AppendDataBoundItems="True" DataTextField="MotivoBaja" DataValueField="CveMotivoBaja" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Sin asignar Motivo de Baja" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Sin asignar Motivo de Baja" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlMotivoBaja.ClientID.ToString()%>">Motivo de Baja: </label> <label for="<%= DdlMotivoBaja.ClientID.ToString()%>">Motivo de Baja: </label>
<i></i> <i></i>
</div> </div>--%>
<div runat="server" id="DivFechaActivo" visible="true" class="form-group form-md-line-input input-iconright"> <%-- <div runat="server" id="DivFechaActivo" visible="true" class="form-group form-md-line-input input-iconright">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style=" padding: 5px 0px;"> <div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style=" padding: 5px 0px;">
<asp:TextBox ID="TxtFechaActivo" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox> <asp:TextBox ID="TxtFechaActivo" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox>
@@ -677,9 +677,9 @@
<i></i> <i></i>
</div> </div>--%>
<div runat="server" id="DivFechaBaja" visible="true" class="form-group form-md-line-input input-iconright"> <%-- <div runat="server" id="DivFechaBaja" visible="true" class="form-group form-md-line-input input-iconright">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style=" padding: 5px 0px;"> <div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style=" padding: 5px 0px;">
<asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox> <asp:TextBox ID="TxtFechaBaja" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox>
@@ -696,9 +696,9 @@
<asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario " ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RfvTxtFechaBaja" runat="server" ControlToValidate="TxtFechaBaja" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Baja''</b> es necesario " ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<i></i> <i></i>
</div> </div>--%>
<div runat="server" id="DivFechaReingreso" visible="true" class="form-group form-md-line-input input-iconright"> <%-- <div runat="server" id="DivFechaReingreso" visible="true" class="form-group form-md-line-input input-iconright">
<div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style=" padding: 5px 0px;"> <div class="input-group input-sm date date-picker" data-date-format="dd/mm/yyyy" style=" padding: 5px 0px;">
<asp:TextBox ID="TxtFechaReingreso" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox> <asp:TextBox ID="TxtFechaReingreso" runat="server" CausesValidation="True" CssClass="form-control input-sm"></asp:TextBox>
@@ -715,7 +715,7 @@
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFechaReingreso" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Reingreso''</b> es necesario " ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFechaReingreso" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Reingreso''</b> es necesario " ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<i></i> <i></i>
</div> </div>--%>
<div> <div>
@@ -4813,7 +4813,7 @@
<div style=" width: 200px; <div style=" width: 200px;
display: inline-block;"> display: inline-block;">
<div class="form-group form-md-line-input"> <div class="form-group form-md-line-input">
<asp:TextBox ID="TxtFechamodSalario" Enabled="false" CssClass="form-control" runat="server"></asp:TextBox> <asp:TextBox ID="TxtFechamodSalario" CssClass="form-control" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtFechamodSalario">Fecha:</asp:Label> <asp:Label runat="server" AssociatedControlID="TxtFechamodSalario">Fecha:</asp:Label>
<ajax:MaskedEditExtender ID="MEEFechaModSalario" runat="server" TargetControlID="TxtFechamodSalario" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaModSalario" runat="server" TargetControlID="TxtFechamodSalario" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEEFechaModSalario" TargetControlID="TxtFechamodSalario" PopupButtonID="LnkFechaModSalario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CEEFechaModSalario" TargetControlID="TxtFechamodSalario" PopupButtonID="LnkFechaModSalario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>

View File

@@ -1075,8 +1075,8 @@ Partial Class RH_Personal
End Sub End Sub
Private Sub CargaMotivoBaja() Private Sub CargaMotivoBaja()
DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) 'DdlMotivoBaja.DataSource = GlobalDTMotivoBaja.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlMotivoBaja.DataBind() 'DdlMotivoBaja.DataBind()
End Sub End Sub
Private Sub CargaEstatusPersonal() Private Sub CargaEstatusPersonal()
@@ -1524,14 +1524,13 @@ Partial Class RH_Personal
DdlPuesto.SelectedValue = ObjPersonal.CvePuesto.ToString() DdlPuesto.SelectedValue = ObjPersonal.CvePuesto.ToString()
DdlRuta.SelectedValue = ObjPersonal.CveRuta.ToString() DdlRuta.SelectedValue = ObjPersonal.CveRuta.ToString()
DdlMotivoBaja.SelectedValue = ObjPersonal.CveMotivoBaja.ToString() 'DdlMotivoBaja.SelectedValue = ObjPersonal.CveMotivoBaja.ToString()
TxtFechaBaja.Text = If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString)
If ObjPersonal.DtResultados IsNot Nothing AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then 'If ObjPersonal.DtResultados IsNot Nothing AndAlso ObjPersonal.DtResultados.Rows.Count > 0 Then
TxtFechaActivo.Text = If(drow("FechaActivo").ToString().Length > 0, drow("FechaActivo").ToString().ToDate.ToString("dd/MM/yyyy"), drow("FechaIng").ToString().ToDate.ToString("dd/MM/yyyy")) ' TxtFechaActivo.Text = If(drow("FechaActivo").ToString().Length > 0, drow("FechaActivo").ToString().ToDate.ToString("dd/MM/yyyy"), drow("FechaIng").ToString().ToDate.ToString("dd/MM/yyyy"))
TxtFechaReingreso.Text = If(drow("FechaReingreso").ToString().Length > 0, drow("FechaReingreso").ToString().ToDate.ToString("dd/MM/yyyy"), "") ' TxtFechaReingreso.Text = If(drow("FechaReingreso").ToString().Length > 0, drow("FechaReingreso").ToString().ToDate.ToString("dd/MM/yyyy"), "")
End If 'End If
DdlEstatusPersonal.SelectedValue = ObjPersonal.CveEstatusPersonal.ToString() DdlEstatusPersonal.SelectedValue = ObjPersonal.CveEstatusPersonal.ToString()
@@ -1713,19 +1712,18 @@ Partial Class RH_Personal
Dim Mensaje = "" Dim Mensaje = ""
Dim Accion = "" Dim Accion = ""
Dim FechaBaja As Date = MinFecha 'Dim FechaBaja As Date = MinFecha
Dim FechaActivo As Date = MinFecha 'Dim FechaActivo As Date = MinFecha
Dim FechaReingreso As Date = MinFecha 'Dim FechaReingreso As Date = MinFecha
If DdlEstatusPersonal.SelectedValue.ToEntero <> CvePersonalEstatusInicial Then 'If DdlEstatusPersonal.SelectedValue.ToEntero <> CvePersonalEstatusInicial Then
If DdlEstatusPersonal.SelectedValue.ToEntero = 1 Then ' If DdlEstatusPersonal.SelectedValue.ToEntero = 1 Then
FechaActivo = TxtFechaActivo.Text.ToDate ' FechaActivo = TxtFechaActivo.Text.ToDate
ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 2 Then ' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 2 Then
FechaBaja = TxtFechaBaja.Text.ToDate ' ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 5 Then
ElseIf DdlEstatusPersonal.SelectedValue.ToEntero = 5 Then ' FechaReingreso = TxtFechaReingreso.Text.ToDate
FechaReingreso = TxtFechaReingreso.Text.ToDate ' End If
End If 'End If
End If
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
TxtSalarioCotizado.Text = TxtSDI.Text TxtSalarioCotizado.Text = TxtSDI.Text
@@ -1745,7 +1743,7 @@ Partial Class RH_Personal
DdlEscolaridad.SelectedValue.ToEntero, DdlEscolaridad.SelectedValue.ToEntero,
DdlEstadoCivil.SelectedValue.ToEntero, DdlEstadoCivil.SelectedValue.ToEntero,
DdlGenero.SelectedValue.ToEntero, DdlGenero.SelectedValue.ToEntero,
DdlMotivoBaja.SelectedValue.ToEntero, If(DdlEstatusPersonal.SelectedValue = "2", TxtFechaBaja.Text.Trim, "-1"), -1, "-1",
DdlEstatusPersonal.SelectedValue.ToEntero, TxtFechaNacimiento.Text.ToDate, DdlEstatusPersonal.SelectedValue.ToEntero, TxtFechaNacimiento.Text.ToDate,
TxtLugarNacimiento.Text.Trim, TxtCalle.Text.Trim, TxtNumExt.Text.Trim, TxtNumInt.Text.Trim, TxtColonia.Text.Trim, TxtCP.Text.Trim, TxtCiudad.Text.Trim, TxtLugarNacimiento.Text.Trim, TxtCalle.Text.Trim, TxtNumExt.Text.Trim, TxtNumInt.Text.Trim, TxtColonia.Text.Trim, TxtCP.Text.Trim, TxtCiudad.Text.Trim,
DdlEstados.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim, DdlEstados.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
@@ -1816,7 +1814,7 @@ Partial Class RH_Personal
DdlEscolaridad.SelectedValue.ToEntero, DdlEscolaridad.SelectedValue.ToEntero,
DdlEstadoCivil.SelectedValue.ToEntero, DdlEstadoCivil.SelectedValue.ToEntero,
DdlGenero.SelectedValue.ToEntero, DdlGenero.SelectedValue.ToEntero,
DdlMotivoBaja.SelectedValue.ToEntero, If(DdlEstatusPersonal.SelectedValue = "2", TxtFechaBaja.Text.Trim, "-1"), -1, "-1",
DdlEstatusPersonal.SelectedValue.ToEntero, TxtFechaNacimiento.Text.ToDate, DdlEstatusPersonal.SelectedValue.ToEntero, TxtFechaNacimiento.Text.ToDate,
TxtLugarNacimiento.Text.Trim, TxtCalle.Text.Trim, TxtNumExt.Text.Trim, TxtNumInt.Text.Trim, TxtColonia.Text.Trim, TxtCP.Text.Trim, TxtCiudad.Text.Trim, TxtLugarNacimiento.Text.Trim, TxtCalle.Text.Trim, TxtNumExt.Text.Trim, TxtNumInt.Text.Trim, TxtColonia.Text.Trim, TxtCP.Text.Trim, TxtCiudad.Text.Trim,
DdlEstados.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim, DdlEstados.SelectedValue.ToEntero, TxtTelefono.Text.Trim, TxtCelular.Text.Trim, TxtRFC.Text.Trim,
@@ -1826,7 +1824,7 @@ Partial Class RH_Personal
URL, DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text, URL, DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text,
DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero, DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero,
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario, TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario,
FechaActivo:=FechaActivo, FechaReingreso:=FechaReingreso, CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), CvePais:=DdlPais.SelectedValue.ToEntero) Then CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), CvePais:=DdlPais.SelectedValue.ToEntero) Then
'Funsion usa RH Familiares 'Funsion usa RH Familiares
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
@@ -2652,16 +2650,18 @@ Partial Class RH_Personal
Private Sub MostrarOcultarFechasEstatus() Private Sub MostrarOcultarFechasEstatus()
'DivFechaReingreso.Visible = False
'DivFechaActivo.Visible = False
If DdlEstatusPersonal.SelectedValue.ToEntero.Contiene(1, 2, 5) Then 'If DdlEstatusPersonal.SelectedValue.ToEntero.Contiene(1, 2, 5) Then
DivFechaActivo.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 1, True, False) ' DivFechaActivo.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 1, True, False)
DivFechaBaja.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 2, True, False) ' 'DivFechaBaja.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 2, True, False)
DivFechaReingreso.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 5, True, False) ' 'DivFechaReingreso.Visible = If(DdlEstatusPersonal.SelectedValue.ToEntero = 5, True, False)
Else 'Else
DivFechaActivo.Visible = False ' DivFechaActivo.Visible = False
DivFechaBaja.Visible = False ' 'DivFechaBaja.Visible = False
DivFechaReingreso.Visible = False ' DivFechaReingreso.Visible = False
End If 'End If
End Sub End Sub
@@ -3396,7 +3396,7 @@ Partial Class RH_Personal
params.Add(New ReportParameter("Proyecto", DdlProyectoAsignado.SelectedItem.Text)) params.Add(New ReportParameter("Proyecto", DdlProyectoAsignado.SelectedItem.Text))
params.Add(New ReportParameter("SubProyecto", DdlSubProyectoAsignado.SelectedItem.Text)) params.Add(New ReportParameter("SubProyecto", DdlSubProyectoAsignado.SelectedItem.Text))
params.Add(New ReportParameter("Estatus", If(DdlEstatusPersonal.SelectedValue = "-1", "", DdlEstatusPersonal.SelectedItem.Text))) params.Add(New ReportParameter("Estatus", If(DdlEstatusPersonal.SelectedValue = "-1", "", DdlEstatusPersonal.SelectedItem.Text)))
params.Add(New ReportParameter("MotivoBaja", If(DdlMotivoBaja.SelectedValue = "-1", "", DdlMotivoBaja.SelectedItem.Text))) params.Add(New ReportParameter("MotivoBaja", ""))
params.Add(New ReportParameter("FechaInicio", ObjPersonal.FechaIng.ToShortDateString)) params.Add(New ReportParameter("FechaInicio", ObjPersonal.FechaIng.ToShortDateString))
params.Add(New ReportParameter("FechaFin", If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString))) params.Add(New ReportParameter("FechaFin", If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString)))
params.Add(New ReportParameter("CuentaContable", DdlViaticos.SelectedItem.Text)) params.Add(New ReportParameter("CuentaContable", DdlViaticos.SelectedItem.Text))
@@ -3490,7 +3490,7 @@ Partial Class RH_Personal
params.Add(New ReportParameter("Proyecto", DdlProyectoAsignado.SelectedItem.Text)) params.Add(New ReportParameter("Proyecto", DdlProyectoAsignado.SelectedItem.Text))
params.Add(New ReportParameter("SubProyecto", DdlSubProyectoAsignado.SelectedItem.Text)) params.Add(New ReportParameter("SubProyecto", DdlSubProyectoAsignado.SelectedItem.Text))
params.Add(New ReportParameter("Estatus", If(DdlEstatusPersonal.SelectedValue = "-1", "", DdlEstatusPersonal.SelectedItem.Text))) params.Add(New ReportParameter("Estatus", If(DdlEstatusPersonal.SelectedValue = "-1", "", DdlEstatusPersonal.SelectedItem.Text)))
params.Add(New ReportParameter("MotivoBaja", If(DdlMotivoBaja.SelectedValue = "-1", "", DdlMotivoBaja.SelectedItem.Text))) params.Add(New ReportParameter("MotivoBaja", ""))
params.Add(New ReportParameter("FechaInicio", ObjPersonal.FechaIng.ToShortDateString)) params.Add(New ReportParameter("FechaInicio", ObjPersonal.FechaIng.ToShortDateString))
params.Add(New ReportParameter("FechaFin", If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString))) params.Add(New ReportParameter("FechaFin", If(ObjPersonal.FechaBaja.ToShortDateString = "01/01/0001", "", ObjPersonal.FechaBaja.ToShortDateString)))
params.Add(New ReportParameter("CuentaContable", DdlViaticos.SelectedItem.Text)) params.Add(New ReportParameter("CuentaContable", DdlViaticos.SelectedItem.Text))

View File

@@ -8244,7 +8244,7 @@ Partial Class Ventas
If (TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2") OrElse (ListaNCDesc IsNot Nothing AndAlso ListaNCDesc.Count > 0) Then If (TieneAnticipo AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2") OrElse (ListaNCDesc IsNot Nothing AndAlso ListaNCDesc.Count > 0) Then
CreaObjetosVentaAmortizacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento) CreaObjetosVentaAmortizacion(ObjVentas, FolioFiscalRelacionado, CveVentaRelacionada, NCDescuento:=NCDescuento)
If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, Nothing, If RegistrarNCAmortizacion(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, Nothing,
Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDesc, IndexNC:=(DtVentasNC.Rows.Count - 1)) Then Nothing, NCDescuento:=NCDescuento, ListaNCDescuento:=ListaNCDesc, IndexNC:=(If(DtVentasNC IsNot Nothing, DtVentasNC.Rows.Count - 1, 0))) Then
Obj2.Add(ObjFacturaDevolucion) Obj2.Add(ObjFacturaDevolucion)
End If End If
End If End If

View File

@@ -290,6 +290,12 @@