Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -4565,7 +4565,7 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddTrasladoSolicitudDetalle(CveTrasladoSolicitud As Integer, Cantidad As Integer, CveUM As Integer, CvePS As Integer, Precio As Decimal, Observaciones As String,
|
Public Function AddTrasladoSolicitudDetalle(CveTrasladoSolicitud As Integer, Cantidad As Decimal, CveUM As Integer, CvePS As Integer, Precio As Decimal, Observaciones As String,
|
||||||
CveContratoDetalle As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean
|
CveContratoDetalle As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Dim CveTraspasoSolicitud As Integer = 0
|
Dim CveTraspasoSolicitud As Integer = 0
|
||||||
@@ -4573,7 +4573,7 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveTrasladoSolicitud", SqlDbType.Int).Value = CveTrasladoSolicitud
|
.Add("@CveTrasladoSolicitud", SqlDbType.Int).Value = CveTrasladoSolicitud
|
||||||
.Add("@Cantidad", SqlDbType.Int).Value = Cantidad
|
.Add("@Cantidad", SqlDbType.Money).Value = Cantidad
|
||||||
.Add("@CveUM", SqlDbType.Int).Value = CveUM
|
.Add("@CveUM", SqlDbType.Int).Value = CveUM
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@Precio", SqlDbType.Float).Value = Precio
|
.Add("@Precio", SqlDbType.Float).Value = Precio
|
||||||
@@ -4597,6 +4597,41 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function UpdateTrasladoSolicitudDetalle(CveTrasladoSolicitudDetalle As Integer, CveEmpresa As Integer, CveTrasladoSolicitud As Integer, Cantidad As Decimal, CveUM As Integer, CvePS As Integer, Precio As Decimal, Observaciones As String,
|
||||||
|
CveContratoDetalle As Integer, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
Dim CveTraspasoSolicitud As Integer = 0
|
||||||
|
DataAdapter("PA_Inv_TraspasoSolicitudDetalleUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveTrasladoSolicitudDetalle", SqlDbType.Int).Value = CveTrasladoSolicitudDetalle
|
||||||
|
.Add("@CveTrasladoSolicitud", SqlDbType.Int).Value = CveTrasladoSolicitud
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Cantidad", SqlDbType.Money).Value = Cantidad
|
||||||
|
.Add("@CveUM", SqlDbType.Int).Value = CveUM
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@Precio", SqlDbType.Float).Value = Precio
|
||||||
|
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||||
|
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
||||||
|
.Add("@Serie", SqlDbType.NVarChar).Value = Serie
|
||||||
|
.Add("@Lote", SqlDbType.NVarChar).Value = Lote
|
||||||
|
.Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch Ex1 As SqlException
|
||||||
|
Me.OnError("Ocurrió un error al actualizar los detalles del movimiento.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar los detalles del movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function AddTrasladoSolicitudGet(CveTrasladoSolicitud As Integer, CveEmpresa As Integer) As Boolean
|
Public Function AddTrasladoSolicitudGet(CveTrasladoSolicitud As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
Dim CveTraspasoSolicitud As Integer = 0
|
Dim CveTraspasoSolicitud As Integer = 0
|
||||||
|
|||||||
@@ -342,10 +342,11 @@ Public Class ClsNominas
|
|||||||
End Try
|
End Try
|
||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function PersonalAplicaCalculoAnual(CveEmpresa As Integer, CveUsuario As Integer, CvePersonal As Integer, Aplica As Integer, motivo As String) As Boolean
|
Public Function PersonalAplicaCalculoAnual(CveEmpresa As Integer, CveUsuario As Integer, Ejercicio As Integer, CvePersonal As Integer, Aplica As Integer, motivo As String) As Boolean
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
DataAdapter("PA_Nom_PersonalAplicaCalculoAnual", CommandType.StoredProcedure)
|
DataAdapter("PA_Nom_PersonalAplicaCalculoAnual", CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
@@ -611,6 +612,29 @@ Public Class ClsNominas
|
|||||||
End Try
|
End Try
|
||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GuardarAguinaldo(CveEmpresa As Integer, CveUsuario As Integer, registros As String, EJercicio As Integer) As Boolean
|
||||||
|
Dim retorno As Boolean = False
|
||||||
|
|
||||||
|
Try
|
||||||
|
DataAdapter("PA_Nom_GuardarAguinaldo", CommandType.StoredProcedure)
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveUsuario", SqlDbType.Decimal).Value = CveUsuario
|
||||||
|
.Add("@registros", SqlDbType.Xml).Value = registros
|
||||||
|
.Add("@EJercicio", SqlDbType.Xml).Value = EJercicio
|
||||||
|
End With
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
retorno = True
|
||||||
|
Catch sqEx As SqlException
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al guardar Aguinaldo.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Catch ex As Exception
|
||||||
|
retorno = False
|
||||||
|
OnError("Ocurrió un error al guardar Aguinaldo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
Public Function RegistraProvision(CvePeriodo As Int32, CveUsuario As Int32, CveEmpresa As Int32) As Boolean
|
Public Function RegistraProvision(CvePeriodo As Int32, CveUsuario As Int32, CveEmpresa As Int32) As Boolean
|
||||||
Dim retorno As Boolean = False
|
Dim retorno As Boolean = False
|
||||||
DataAdapter("PA_Nom_RegistraProvision", CommandType.StoredProcedure)
|
DataAdapter("PA_Nom_RegistraProvision", CommandType.StoredProcedure)
|
||||||
|
|||||||
@@ -2300,7 +2300,7 @@ Public Class ClsRH
|
|||||||
.Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS
|
.Add("@SalarioDiarioSS", SqlDbType.Money).Value = SalarioDiarioSS
|
||||||
.Add("@CalcularSDI", SqlDbType.Bit).Value = CalcularSDI
|
.Add("@CalcularSDI", SqlDbType.Bit).Value = CalcularSDI
|
||||||
.Add("@ActualizaSalarioV", SqlDbType.Bit).Value = ActualizaSalarioV
|
.Add("@ActualizaSalarioV", SqlDbType.Bit).Value = ActualizaSalarioV
|
||||||
.Add("@OrigenU", SqlDbType.Bit).Value = OrigenU
|
.Add("@OrigenU", SqlDbType.VarChar).Value = OrigenU
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ Public Class ClsVentas
|
|||||||
Public Function GetVentas(CveEmpresa As Integer, TipoDocto As String, Serie As String, Folio As Integer, Codigo As String, CveCliente As Integer,
|
Public Function GetVentas(CveEmpresa As Integer, TipoDocto As String, Serie As String, Folio As Integer, Codigo As String, CveCliente As Integer,
|
||||||
CveSubProyecto As Integer, CveEstatus As Integer, CveUsuario As Integer, FechaI As String, FechaF As String, FolioFiscal As String, Optional CveClienteSucursal As Integer = -1, Optional CvePS As Integer = -1, Optional PedidoContrato As String = "-1",
|
CveSubProyecto As Integer, CveEstatus As Integer, CveUsuario As Integer, FechaI As String, FechaF As String, FolioFiscal As String, Optional CveClienteSucursal As Integer = -1, Optional CvePS As Integer = -1, Optional PedidoContrato As String = "-1",
|
||||||
Optional OrdenCompra As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional ClienteRFC As String = "-1",
|
Optional OrdenCompra As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional ClienteRFC As String = "-1",
|
||||||
Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional TopSelect As Integer = 1000) As Boolean
|
Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional TopSelect As Integer = 1000, Optional CveVendedor As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Vta_VentasGetBuscar")
|
DataAdapter("PA_Vta_VentasGetBuscar")
|
||||||
@@ -319,6 +319,7 @@ Public Class ClsVentas
|
|||||||
.Add("@CveEmpresaCRM", SqlDbType.Int).Value = CveEmpresaCRM
|
.Add("@CveEmpresaCRM", SqlDbType.Int).Value = CveEmpresaCRM
|
||||||
.Add("@CveAcercamientoCRM", SqlDbType.Int).Value = CveAcercamientoCRM
|
.Add("@CveAcercamientoCRM", SqlDbType.Int).Value = CveAcercamientoCRM
|
||||||
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
|
||||||
|
.Add("@CveVendedorFiltro", SqlDbType.Int).Value = CveVendedor
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -2473,20 +2474,21 @@ Public Class ClsVentas
|
|||||||
'End Function
|
'End Function
|
||||||
|
|
||||||
#Region " PROMOCIONES "
|
#Region " PROMOCIONES "
|
||||||
Public Function GetPromociones(CvePromocion As Integer, Fecha As String, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer,
|
Public Function GetPromociones(CvePromocion As Integer, Fecha As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer,
|
||||||
CveSubProyecto As Integer, Optional CveMarca As Integer = -1) As Boolean
|
CveSubProyecto As Integer, Optional CveMarca As Integer = -1, Optional CveUsuario As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_PromocionesGet")
|
DataAdapter("PA_Vta_PromocionesGet")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion
|
.Add("@CvePromocion", SqlDbType.Int).Value = CvePromocion
|
||||||
.Add("@Fecha", SqlDbType.VarChar).Value = Fecha
|
.Add("@Fecha", SqlDbType.Date).Value = Fecha
|
||||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
|
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuario
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -1311,7 +1311,7 @@
|
|||||||
ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall mysmallbtn" Visible="false">
|
ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall mysmallbtn" Visible="false">
|
||||||
<Columns>
|
<Columns>
|
||||||
<%--0--%>
|
<%--0--%>
|
||||||
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Aplica<br />
|
Aplica<br />
|
||||||
Inventario<br />
|
Inventario<br />
|
||||||
@@ -1322,7 +1322,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--1--%>
|
<%--1--%>
|
||||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TbCantidad" runat="server" Width="50px" Mask="999,999.99" Text='<%# Eval("CantidadF", "{0:N2}")%>'></asp:TextBox>
|
<asp:TextBox ID="TbCantidad" runat="server" Width="50px" Mask="999,999.99" Text='<%# Eval("CantidadF", "{0:N2}")%>'></asp:TextBox>
|
||||||
<br />
|
<br />
|
||||||
@@ -1331,10 +1331,9 @@
|
|||||||
<asp:Button Text="D" ID="BtnDividirCompra" runat="server" OnClick="BtnDividirCompra_Click" Style="display: none;" />
|
<asp:Button Text="D" ID="BtnDividirCompra" runat="server" OnClick="BtnDividirCompra_Click" Style="display: none;" />
|
||||||
<asp:Button Text="Serie" ID="BtnSerieLote" OnClick="BtnSerieLote_Click" CssClass="btn btn-primary mysmallbtn" runat="server" />
|
<asp:Button Text="Serie" ID="BtnSerieLote" OnClick="BtnSerieLote_Click" CssClass="btn btn-primary mysmallbtn" runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<HeaderStyle CssClass="Titulos" />
|
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--2--%>
|
<%--2--%>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField ItemStyle-Width="80px" >
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Unidad
|
Unidad
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
@@ -1343,9 +1342,9 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--3--%>
|
<%--3--%>
|
||||||
<asp:BoundField ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" HeaderText=" Producto" DataField="PS" />
|
<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderText=" Producto" DataField="CodigoPS" />
|
||||||
<%--4--%>
|
<%--4--%>
|
||||||
<asp:BoundField ItemStyle-Width="7.5%" HeaderText="P.U." DataField="PU" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField ItemStyle-Width="120px" HeaderText="P.U." DataField="PU" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<%--5--%>
|
<%--5--%>
|
||||||
<asp:TemplateField ItemStyle-Width="10%">
|
<asp:TemplateField ItemStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -5162,7 +5161,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="DivDevolucion" class="modal fade">
|
<div id="DivDevolucion" class="modal fade">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog" style="width: 750px;">
|
||||||
<asp:UpdatePanel ID="UPPSolDev" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPPSolDev" runat="server" class="modal-content rowpadding" tabindex="-1" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -5172,10 +5171,9 @@
|
|||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12" style="text-align:right">
|
<div class="col-md-12" style="text-align:right">
|
||||||
<asp:CheckBox runat="server" ID="ChkEsDevolucionDevInv" Text="Es Temporal" Visible="false" />
|
<asp:CheckBox runat="server" ID="ChkEsDevolucionDevInv" Text="Genera Saldo a favor" Visible="false" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:GridView ID="GvSolDev" runat="server" AutoGenerateColumns="false" GridLines="none" BorderWidth="0"
|
<asp:GridView ID="GvSolDev" runat="server" AutoGenerateColumns="false" GridLines="none" BorderWidth="0"
|
||||||
DataKeyNames="Cantidad,CveCompraDetalle,CvePS,PU,CveUM,CodigoPS"
|
DataKeyNames="Cantidad,CveCompraDetalle,CvePS,PU,CveUM,CodigoPS"
|
||||||
@@ -5191,7 +5189,8 @@
|
|||||||
<asp:BoundField DataField="Cantidad" HeaderText="Total" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.######}" />
|
<asp:BoundField DataField="Cantidad" HeaderText="Total" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.######}" />
|
||||||
<asp:BoundField DataField="UM" HeaderText="UM" />
|
<asp:BoundField DataField="UM" HeaderText="UM" />
|
||||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto" />
|
<asp:BoundField DataField="CodigoPS" HeaderText="Producto" />
|
||||||
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="PU" DataFormatString="{0:#,##0.00####}" HeaderText ="PU" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00####}" HeaderText="Total" ItemStyle-HorizontalAlign="Right" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1377,7 +1377,7 @@ Partial Class Compras_Compras
|
|||||||
DdlMedico.DataBind()
|
DdlMedico.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(590).ToString.ToEntero = 1 Then
|
If UsuarioActual.Empresa.Funcionalidad(590).ToString = "1" Then
|
||||||
DVCultivosCuadro.Visible = True
|
DVCultivosCuadro.Visible = True
|
||||||
DdlSubProyecto.AutoPostBack = True
|
DdlSubProyecto.AutoPostBack = True
|
||||||
|
|
||||||
@@ -1906,24 +1906,11 @@ Partial Class Compras_Compras
|
|||||||
TmpDT.Columns.Add("CveSATPSActualizado")
|
TmpDT.Columns.Add("CveSATPSActualizado")
|
||||||
SubTotalConceptos = TmpDT.SUMD("Total").RoundSQL
|
SubTotalConceptos = TmpDT.SUMD("Total").RoundSQL
|
||||||
|
|
||||||
If Not TmpDT.Columns.Contains("Amortizacion") Then
|
If Not TmpDT.Columns.Contains("Amortizacion") Then TmpDT.Columns.Add("Amortizacion", GetType(Decimal))
|
||||||
TmpDT.Columns.Add("Amortizacion", GetType(Decimal))
|
If Not TmpDT.Columns.Contains("AplicaLote") Then TmpDT.Columns.Add("AplicaLote", GetType(Boolean))
|
||||||
End If
|
If Not TmpDT.Columns.Contains("AplicaCaducidad") Then TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean))
|
||||||
|
If Not TmpDT.Columns.Contains("Lote") Then TmpDT.Columns.Add("Lote", GetType(String))
|
||||||
If Not TmpDT.Columns.Contains("AplicaLote") Then
|
If Not TmpDT.Columns.Contains("FechaCaducidad") Then TmpDT.Columns.Add("FechaCaducidad", GetType(Date))
|
||||||
TmpDT.Columns.Add("AplicaLote", GetType(Boolean))
|
|
||||||
End If
|
|
||||||
If Not TmpDT.Columns.Contains("AplicaCaducidad") Then
|
|
||||||
TmpDT.Columns.Add("AplicaCaducidad", GetType(Boolean))
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
If Not TmpDT.Columns.Contains("Lote") Then
|
|
||||||
TmpDT.Columns.Add("Lote", GetType(String))
|
|
||||||
End If
|
|
||||||
If Not TmpDT.Columns.Contains("FechaCaducidad") Then
|
|
||||||
TmpDT.Columns.Add("FechaCaducidad", GetType(Date))
|
|
||||||
End If
|
|
||||||
|
|
||||||
AddPS2(False)
|
AddPS2(False)
|
||||||
|
|
||||||
@@ -2324,6 +2311,19 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
'consideración si el usuarioactual, solo tienen un centro de costo, que lo asigne en automático
|
||||||
|
Dim dtsubAsignados As DataTable = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||||
|
If dtsubAsignados.Rows.Count = 1 Then
|
||||||
|
Dim drtt As DataRow = dtsubAsignados.FiltroPrimero("")
|
||||||
|
For Each item As DataRow In TmpDT.Rows
|
||||||
|
item("CveSubProyecto") = drtt("CveSubProyecto")
|
||||||
|
item("SubProyecto") = drtt("SubProyecto")
|
||||||
|
item("CveProyecto") = drtt("CveProyecto")
|
||||||
|
item("Proyecto") = drtt("Proyecto")
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
GvPS.DataSource = TmpDT
|
GvPS.DataSource = TmpDT
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
@@ -4391,24 +4391,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
''VERIFICA SI LOS PRODUCTOS/SERVICIOS EXISTEN EN EL CATALOGO DEL SAT
|
|
||||||
'If UsuarioActual.CveEmpresa = 72 Then
|
|
||||||
|
|
||||||
' Dim DtNoEncontrados As DataTable = TmpDT.FiltraParametros("ISNULL(CveSATPS,0) = 46920 ")
|
|
||||||
' If DtNoEncontrados IsNot Nothing AndAlso DtNoEncontrados.Rows.Count > 0 Then
|
|
||||||
' Dim StrNoEncontrados As New StringBuilder
|
|
||||||
' StrNoEncontrados.Append("Los siguientes productos no tiene asignado la clave Producto SAT o Unidad Medida SAT<br/><br/>")
|
|
||||||
' For Each drt As DataRow In DtNoEncontrados.Rows
|
|
||||||
' StrNoEncontrados.AppendFormat("{0} <br/>", drt("CodigoPS"))
|
|
||||||
' Next
|
|
||||||
' Alert(StrNoEncontrados.ToString(), TipoMensaje.MsgAdvertencia)
|
|
||||||
' DtNoEncontrados.Dispose()
|
|
||||||
' StrNoEncontrados.Clear()
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
' DtNoEncontrados.Dispose()
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'Verifica funcionalidad 128 "Require orden de compra para factura de compra"
|
'Verifica funcionalidad 128 "Require orden de compra para factura de compra"
|
||||||
|
|
||||||
Dim EsViatico As Boolean = False
|
Dim EsViatico As Boolean = False
|
||||||
@@ -4447,21 +4429,6 @@ Partial Class Compras_Compras
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
''DF - 10/04/2017
|
|
||||||
'If UsuarioActual.TienePermisoProceso(187) Then
|
|
||||||
' If TxtSerie.Text <> SerieVieja Then
|
|
||||||
' Dim dtt As DataTable = GlobalDTProveedorSucursales(CveProveedor, UsuarioActual.CveEmpresa)
|
|
||||||
' If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
|
||||||
' Dim SerieNueva As String = dtt.FiltroPrimeroValor("Serie", $"Serie = '{TxtSerie.Text}'").ToString
|
|
||||||
' If SerieNueva = "" Then
|
|
||||||
' Alert("La Serie no es válida, por favor revise que se encuentre dentro de la lista de las sucursales del proveedor.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'Excede el limite de credito
|
'Excede el limite de credito
|
||||||
If RBLPago.SelectedValue = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Fac") AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(185) Then
|
If RBLPago.SelectedValue = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("Fac") AndAlso UsuarioActual.Empresa.Funcionalidad(518) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(185) Then
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
@@ -4527,31 +4494,29 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
ValidaFechaDeAlamacen()
|
ValidaFechaDeAlamacen()
|
||||||
Else
|
Else
|
||||||
Dim x As Integer = 0
|
'GvInv.Rows(x).FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero 'Charlie
|
||||||
For Each Dr As GridViewRow In GvInv.Rows
|
'pestaña de almacen, si hay especificado una entrada por partida dealmacen, debe de existir el almacen.
|
||||||
If Dr.FCCheckBox("cbInv").Checked Then
|
If GvInv.Rows.Count > 0 Then
|
||||||
x = x + 1
|
If DdlTipoComprobante.SelectedValue.Contiene("Fac") Then
|
||||||
End If
|
Dim x As Integer = 0
|
||||||
Next
|
For Each Dr As GridViewRow In GvInv.Rows
|
||||||
If Not (CveCompraRefacturacion > 0 AndAlso ChkRefacturacionConAlmacen.Checked) Then
|
If Dr.FCCheckBox("cbInv").Checked Then
|
||||||
If x = 0 AndAlso GvInv.Rows.Count > 0 Then
|
If Dr.FCDropDownList("ddlEAlmacen").SelectedValue.ToEntero <= 0 Then
|
||||||
Alert("Favor de seleccionar un producto en la pestaña de almacen", TipoMensaje.MsgAdvertencia)
|
Alert("Favor de seleccionar almacen en la pestaña de almacén.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
End If
|
||||||
|
x = x + 1
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not (CveCompraRefacturacion > 0 AndAlso ChkRefacturacionConAlmacen.Checked) Then
|
||||||
|
If x = 0 AndAlso GvInv.Rows.Count > 0 Then
|
||||||
|
Alert("Favor de seleccionar un producto en la pestaña de almacén", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(538) = "1" Then
|
|
||||||
If TmpDT.MIN("CvePS").ToEntero <= 0 Then
|
|
||||||
Alert("Todos los Productos/Servicios deben estar registrados o aliados a un productos ya registrado.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -11496,7 +11461,7 @@ Partial Class Compras_Compras
|
|||||||
e.Row.FCDropDownList("ddlAlmacenConsignacionGeneral").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 4)
|
e.Row.FCDropDownList("ddlAlmacenConsignacionGeneral").DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 4)
|
||||||
e.Row.FCDropDownList("ddlAlmacenConsignacionGeneral").DataBind()
|
e.Row.FCDropDownList("ddlAlmacenConsignacionGeneral").DataBind()
|
||||||
|
|
||||||
'que no sea recepcion alamcen adelatnado. DdlOCVinculaInv
|
'que no sea recepcion almacen adelantado. DdlOCVinculaInv
|
||||||
If UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso DdlOCVinculaInv.SelectedValue <> "176" Then
|
If UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso DdlOCVinculaInv.SelectedValue <> "176" Then
|
||||||
If e.Row.FCDropDownList("ddlAlmacen").Items.Count > 1 Then
|
If e.Row.FCDropDownList("ddlAlmacen").Items.Count > 1 Then
|
||||||
e.Row.FCDropDownList("ddlAlmacen").SelectedIndex = 1
|
e.Row.FCDropDownList("ddlAlmacen").SelectedIndex = 1
|
||||||
@@ -19146,7 +19111,11 @@ Partial Class Compras_Compras
|
|||||||
Else
|
Else
|
||||||
HplDevv.Text = "<i class='fa fa-pencil'></i> Solicitar Devolución Almacén"
|
HplDevv.Text = "<i class='fa fa-pencil'></i> Solicitar Devolución Almacén"
|
||||||
HplDevv.ToolTip = "¿Está seguro de Solicitar la Devolución de Almacén?"
|
HplDevv.ToolTip = "¿Está seguro de Solicitar la Devolución de Almacén?"
|
||||||
ChkEsDevolucionDevInv.Visible = True
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
ChkEsDevolucionDevInv.Visible = True
|
||||||
|
ChkEsDevolucionDevInv.Checked = True
|
||||||
|
ChkEsDevolucionDevInv.Enabled = False
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -19175,35 +19144,23 @@ Partial Class Compras_Compras
|
|||||||
Dim tCveSubProyeto As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
|
Dim tCveSubProyeto As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0").ToEntero
|
||||||
ObjCompras.IniciaTransacSQL()
|
ObjCompras.IniciaTransacSQL()
|
||||||
|
|
||||||
If ChkEsDevolucionDevInv.Checked Then
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim ImporteCompra As Decimal = 0
|
Dim ImporteCompra As Decimal = 0
|
||||||
|
|
||||||
If EstatusAlmacen = 0 Then
|
If EstatusAlmacen = 0 Then
|
||||||
|
|
||||||
For Each gvr As GridViewRow In GvSolDev.Rows
|
For Each gvr As GridViewRow In GvSolDev.Rows
|
||||||
|
Dim Cantidad As Decimal = gvr.FCTextBox("TxtCant").Text.ToDecimal
|
||||||
Dim Canidad As Decimal = gvr.FCTextBox("TxtCant").Text.ToDecimal
|
|
||||||
Dim PU As Decimal = gvr.DataKey("PU").ToDecimal
|
Dim PU As Decimal = gvr.DataKey("PU").ToDecimal
|
||||||
|
|
||||||
If gvr.FCTextBox("TxtCant").Text.ToDecimal > 0 Then
|
If gvr.FCTextBox("TxtCant").Text.ToDecimal > 0 Then
|
||||||
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0, UsuarioActual.CveUsuario, CantidadDevolucion:=gvr.FCTextBox("TxtCant").Text.ToDecimal)
|
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 0, UsuarioActual.CveUsuario, CantidadDevolucion:=gvr.FCTextBox("TxtCant").Text.ToDecimal)
|
||||||
ImporteCompra = ImporteCompra + ((PU * Canidad))
|
ImporteCompra = ImporteCompra + ((PU * Cantidad))
|
||||||
Else
|
Else
|
||||||
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1, UsuarioActual.CveUsuario, CantidadDevolucion:=0)
|
ObjCompras.UpdateEstatusAlmacenDetalle(gvr.DataKey("CveCompraDetalle").ToEntero, 1, UsuarioActual.CveUsuario, CantidadDevolucion:=0)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ImporteRNC = ImporteCompra
|
ImporteRNC = ImporteCompra.RoundSQL
|
||||||
|
|
||||||
If ObjCompras.UpdateEstatusAlmacen(CveCompra, If(EstatusAlmacen = 1, 0, 1), UsuarioActual.CveUsuario) Then
|
|
||||||
EstatusAlmacen = If(EstatusAlmacen = 1, 0, 1)
|
|
||||||
Alert(If(EstatusAlmacen = 1, "La solicitud de devolución de almacen se guardo correctamente.", "La solicitud de almacen se canceló correctamente."))
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ChkEsDevolucionDevInv.Checked Then
|
If ChkEsDevolucionDevInv.Checked Then
|
||||||
|
|
||||||
@@ -19259,33 +19216,27 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not TieneError AndAlso ObjCompras.UpdateEstatusAlmacen(CveCompra, If(EstatusAlmacen = 1, 0, 1), UsuarioActual.CveUsuario) Then
|
||||||
|
EstatusAlmacen = If(EstatusAlmacen = 1, 0, 1)
|
||||||
|
Alert(If(EstatusAlmacen = 1, "La solicitud de devolución de almacen se guardo correctamente.", "La solicitud de almacen se canceló correctamente."))
|
||||||
|
End If
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
ObjCompras.Commit()
|
ObjCompras.Commit()
|
||||||
Else
|
Else
|
||||||
|
Alert("No se pudo registrar la devolución.", TipoMensaje.MsgAdvertencia)
|
||||||
ObjCompras.RollBack()
|
ObjCompras.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjCompras.Dispose()
|
ObjCompras.Dispose()
|
||||||
|
|
||||||
InicializaDevolucionAlmacen()
|
InicializaDevolucionAlmacen()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Function RegistroInventarioDevTemporal(ByRef transaccion As SqlTransaction, tCveSubProyecto As Integer, CveCompraDRMCRelacionada As Integer, EsCancelacion As Boolean) As Boolean
|
Function RegistroInventarioDevTemporal(ByRef transaccion As SqlTransaction, tCveSubProyecto As Integer, CveCompraDRMCRelacionada As Integer, EsCancelacion As Boolean) As Boolean
|
||||||
|
|
||||||
'Dim CveConceptoInv As Integer = If(OpcionOrigen = 1, 2, 3)
|
|
||||||
|
|
||||||
Dim CveConceptoSalida As Integer = If(EsCancelacion, 2, 13)
|
Dim CveConceptoSalida As Integer = If(EsCancelacion, 2, 13)
|
||||||
'Dim CveConceptoEntrada As Integer = 2 'OIC FIXME Ver Con Rene
|
|
||||||
|
|
||||||
Dim Respuesta As Boolean = True
|
Dim Respuesta As Boolean = True
|
||||||
|
|
||||||
'Dim ObjOC As New ClsOC(transaccion)
|
|
||||||
|
|
||||||
Dim CveAlmacenOrigen As Integer = -1
|
Dim CveAlmacenOrigen As Integer = -1
|
||||||
'Dim CveAlmacenDestino As Integer = -1
|
|
||||||
|
|
||||||
|
|
||||||
For Each gvRow As GridViewRow In GvInvMov.Rows
|
For Each gvRow As GridViewRow In GvInvMov.Rows
|
||||||
CveAlmacenOrigen = gvRow.DataKey("CveAlmacen").ToEntero
|
CveAlmacenOrigen = gvRow.DataKey("CveAlmacen").ToEntero
|
||||||
@@ -19299,31 +19250,12 @@ Partial Class Compras_Compras
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CveAlmacenDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveSubProyecto = {tCveSubProyecto} AND CveTipoAlmacen = 21 ").ToEntero
|
|
||||||
'If CveAlmacenDestino <= 0 Then
|
|
||||||
' CveAlmacenDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen = 21 ").ToEntero
|
|
||||||
'End If
|
|
||||||
'If CveAlmacenDestino <= 0 Then
|
|
||||||
' Alert("Almacén destino de devolución proveedor no esta asignado.")
|
|
||||||
' Return False
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad(transaccion)
|
Dim ObjConta As New ClsContabilidad(transaccion)
|
||||||
Dim ObjInventario As New ClsInventarios(transaccion)
|
Dim ObjInventario As New ClsInventarios(transaccion)
|
||||||
|
Dim CvePrePolizaSalida As Integer = ObjConta.AddPrePolizas("Comp/InvDevSal", 53, 0, 0, 1, Now, $"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
||||||
'Dim CveConceptoInv As Integer = If(TipoTermino = 1, 3, 2)
|
|
||||||
|
|
||||||
Dim CvePrePolizaSalida As Integer = ObjConta.AddPrePolizas("Comp/InvDevSal", 53, 0, 0, 1, TxtFecha.Text.Replace(",", "").ToDate, $"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
|
||||||
'Dim CvePrePolizaEntrada As Integer = ObjConta.AddPrePolizas("Comp/InvDevEnt", 53, 0, 0, 1, TxtFecha.Text.Replace(",", "").ToDate, $"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
|
||||||
|
|
||||||
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenOrigen, CveConceptoSalida, 1, NowADS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraDRMCRelacionada, -1, tCveSubProyecto, -1, Observaciones:=$"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}",
|
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenOrigen, CveConceptoSalida, 1, NowADS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraDRMCRelacionada, -1, tCveSubProyecto, -1, Observaciones:=$"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}",
|
||||||
CveAlmacenDestino:=-1, Modulo:="ComprasDev/1")
|
CveAlmacenDestino:=-1, Modulo:="ComprasDev/1")
|
||||||
|
|
||||||
Dim FolioMtoSalida As Integer = ObjInventario.Folio
|
Dim FolioMtoSalida As Integer = ObjInventario.Folio
|
||||||
Dim FolioMtoEntrada As Integer = 0 'Se asigna mas abajo
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If CveMovimientoSalida <= 0 OrElse CvePrePolizaSalida <= 0 Then
|
If CveMovimientoSalida <= 0 OrElse CvePrePolizaSalida <= 0 Then
|
||||||
Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError)
|
Alert("No se pudo almacenar el movimiento correctamente", TipoMensaje.MsgError)
|
||||||
@@ -19342,15 +19274,12 @@ Partial Class Compras_Compras
|
|||||||
Dim Cantidad As Decimal = gvRow.DataKey("Cantidad").ToDecimal
|
Dim Cantidad As Decimal = gvRow.DataKey("Cantidad").ToDecimal
|
||||||
|
|
||||||
If Cantidad > 0 Then
|
If Cantidad > 0 Then
|
||||||
|
|
||||||
Dim CveUM As Integer = gvRow.DataKey("CveUM").ToString.ToEntero
|
Dim CveUM As Integer = gvRow.DataKey("CveUM").ToString.ToEntero
|
||||||
Dim CvePS As Integer = gvRow.DataKey("CvePS").ToString.ToEntero
|
Dim CvePS As Integer = gvRow.DataKey("CvePS").ToString.ToEntero
|
||||||
'Dim CveCompraDetalle As Integer = gvRow.DataKey("CveCompraDetalle").ToEntero' OIC 2024-12-26 se quita relacion
|
'Dim CveCompraDetalle As Integer = gvRow.DataKey("CveCompraDetalle").ToEntero' OIC 2024-12-26 se quita relacion
|
||||||
Dim PU As Decimal = gvRow.DataKey("PU").ToDecimal
|
Dim PU As Decimal = gvRow.DataKey("PU").ToDecimal
|
||||||
Dim CodigoPS As String = gvRow.DataKey("CodigoPS")
|
Dim CodigoPS As String = gvRow.DataKey("CodigoPS")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(114) Or EsCancelacion Then
|
If UsuarioActual.TienePermisoProceso(114) Or EsCancelacion Then
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUM, CvePS, PU, -1, Observaciones:=$"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}", CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUM, CvePS, PU, -1, Observaciones:=$"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}", CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
||||||
CveOrdenCompraDetalle:=-1) Then
|
CveOrdenCompraDetalle:=-1) Then
|
||||||
@@ -19364,9 +19293,6 @@ Partial Class Compras_Compras
|
|||||||
Respuesta = False
|
Respuesta = False
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Cont += 1
|
Cont += 1
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -19379,7 +19305,6 @@ Partial Class Compras_Compras
|
|||||||
Dim Cantidad As Decimal = gvRow.FCTextBox("TxtCant").Text.ToDecimal
|
Dim Cantidad As Decimal = gvRow.FCTextBox("TxtCant").Text.ToDecimal
|
||||||
|
|
||||||
If Cantidad > 0 Then
|
If Cantidad > 0 Then
|
||||||
|
|
||||||
Dim CveUM As Integer = gvRow.DataKey("CveUM").ToString.ToEntero
|
Dim CveUM As Integer = gvRow.DataKey("CveUM").ToString.ToEntero
|
||||||
Dim CvePS As Integer = gvRow.DataKey("CvePS").ToString.ToEntero
|
Dim CvePS As Integer = gvRow.DataKey("CvePS").ToString.ToEntero
|
||||||
'Dim CveCompraDetalle As Integer = gvRow.DataKey("CveCompraDetalle").ToEntero' OIC 2024-12-26 se quita relacion
|
'Dim CveCompraDetalle As Integer = gvRow.DataKey("CveCompraDetalle").ToEntero' OIC 2024-12-26 se quita relacion
|
||||||
@@ -19394,7 +19319,6 @@ Partial Class Compras_Compras
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(114) Or EsCancelacion Then
|
If UsuarioActual.TienePermisoProceso(114) Or EsCancelacion Then
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUM, CvePS, PU, -1, Observaciones:=$"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}", CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUM, CvePS, PU, -1, Observaciones:=$"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}", CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
||||||
CveOrdenCompraDetalle:=-1) Then
|
CveOrdenCompraDetalle:=-1) Then
|
||||||
@@ -19408,47 +19332,14 @@ Partial Class Compras_Compras
|
|||||||
Respuesta = False
|
Respuesta = False
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Cont += 1
|
Cont += 1
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
''Se quita entrada
|
|
||||||
'Dim CveMovimientoEntrada As Integer = ObjInventario.AddMovimiento(CveAlmacenDestino, CveConceptoEntrada, 1, NowADS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, tCveSubProyecto, -1, Observaciones:=$"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}",
|
|
||||||
' Modulo:="ComprasDev/2", CveMovimientoRelacionado:=CveMovimientoSalida)
|
|
||||||
'FolioMtoEntrada = ObjInventario.Folio
|
|
||||||
'If Respuesta AndAlso CveMovimientoEntrada > 0 Then
|
|
||||||
' If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
|
||||||
' For Each dRow As DataRow In ObjInventario.DtResultados.Rows
|
|
||||||
' Dim Cantidad As Decimal = dRow("Cantidad").ToString.ToDecimal
|
|
||||||
' If Cantidad > 0 Then
|
|
||||||
' Dim CveUM As Integer = dRow("CveUM").ToString.ToEntero
|
|
||||||
' Dim CvePS As Integer = dRow("CvePS").ToString.ToEntero
|
|
||||||
' Dim CveMovimientoDetalle As Integer = dRow("CveMovimientoDetalle").ToString.ToEntero
|
|
||||||
' Dim PU As Decimal = dRow("PU").ToString.ToDecimal
|
|
||||||
' Dim CodigoPS As String = dRow("CodigoPS").ToString
|
|
||||||
' Dim ImporteConcepto As Decimal = PU
|
|
||||||
' If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, ImporteConcepto, Observaciones:=$"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}", CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
|
||||||
' CveMovimientoDetalleEntrada:=CveMovimientoDetalle) Then
|
|
||||||
' Mensaje = "Error al guardar los movimientos"
|
|
||||||
' Respuesta = False
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
' Cont += 1
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
'PrePoliza Movmiento de salida
|
'PrePoliza Movmiento de salida
|
||||||
Dim EsContabilizable As Boolean = False
|
Dim EsContabilizable As Boolean = True
|
||||||
'Registro la prepóliza
|
'Registro la prepóliza
|
||||||
If Respuesta AndAlso ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
If Respuesta AndAlso ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||||
Dim tValorInventario As Decimal = ObjInventario.DtResultados.SUMD("Total", "").RoundSQL() '* (If(EsCancelacion, -1, 1))
|
Dim tValorInventario As Decimal = ObjInventario.DtResultados.SUMD("Total", "").RoundSQL() '* (If(EsCancelacion, -1, 1))
|
||||||
@@ -19457,7 +19348,6 @@ Partial Class Compras_Compras
|
|||||||
Dim TipoMovtoAlmacen As Boolean = False
|
Dim TipoMovtoAlmacen As Boolean = False
|
||||||
Dim TipoMovtoOtro As Boolean = True
|
Dim TipoMovtoOtro As Boolean = True
|
||||||
|
|
||||||
|
|
||||||
Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", CveAlmacenOrigen))
|
Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", CveAlmacenOrigen))
|
||||||
If drA2 IsNot Nothing Then
|
If drA2 IsNot Nothing Then
|
||||||
tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero
|
tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero
|
||||||
@@ -19469,40 +19359,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Dim CveConceptoContable As Integer = 260
|
Dim CveConceptoContable As Integer = 260
|
||||||
Dim CveClasificacion As Integer = -1
|
Dim CveClasificacion As Integer = -1
|
||||||
Select Case CveConceptoSalida
|
|
||||||
Case 2, 32
|
|
||||||
CveConceptoContable = 78
|
|
||||||
EsContabilizable = True
|
|
||||||
Case 28, 31
|
|
||||||
CveConceptoContable = 51
|
|
||||||
If CveConceptoSalida = 28 Then
|
|
||||||
''cuando es 28, es otros ingresos.78
|
|
||||||
CveConceptoContable = 78
|
|
||||||
End If
|
|
||||||
EsContabilizable = True
|
|
||||||
Case 30
|
|
||||||
CveConceptoContable = 181
|
|
||||||
TipoMovtoOtro = False
|
|
||||||
If DdlSubProyecto.Visible = True AndAlso DdlSubProyecto.SelectedValue.ToEntero > 0 Then tCveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
|
||||||
|
|
||||||
Case 34
|
|
||||||
CveConceptoContable = 51
|
|
||||||
EsContabilizable = True
|
|
||||||
Case 13, 29
|
|
||||||
CveConceptoContable = 69
|
|
||||||
TipoMovtoOtro = True
|
|
||||||
'tValorOtro = -tValorOtro
|
|
||||||
Dim drr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
|
||||||
If drr IsNot Nothing Then
|
|
||||||
CveClasificacion = drr("CveClasificacion").ToString.ToEntero
|
|
||||||
End If
|
|
||||||
Case 3
|
|
||||||
CveConceptoContable = 51
|
|
||||||
EsContabilizable = True
|
|
||||||
Case Else
|
|
||||||
CveConceptoContable = 95
|
|
||||||
|
|
||||||
End Select
|
|
||||||
|
|
||||||
'2-78
|
'2-78
|
||||||
Dim Obs As String = $"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}"
|
Dim Obs As String = $"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}"
|
||||||
@@ -19517,137 +19373,23 @@ Partial Class Compras_Compras
|
|||||||
Respuesta = False
|
Respuesta = False
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
'If CveConceptoContable.Contiene(181, 78, 51, 69) Then
|
|
||||||
' Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
|
|
||||||
|
|
||||||
' For Each Dr As DataRow In Dt.Rows
|
|
||||||
' Dim Total As Decimal = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion")}").SUM("Total").RoundSQL()
|
|
||||||
|
|
||||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaSalida, Not TipoMovtoAlmacen, Total, Total, CveConceptoContable, LblFolio.Text, Obs, 0, CveMovimientoAlmacen:=CveMovimientoSalida, CveClasificacion:=Dr("CveClasificacion").ToString.ToEntero, CveSubProyecto:=tCveSubProyecto) Then
|
|
||||||
' Respuesta = False
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
'Else
|
|
||||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaSalida, Not TipoMovtoAlmacen, tValorInventario, tValorInventario, CveConceptoContable, Obs, Obs, CveMovimientoAlmacen:=CveMovimientoSalida, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then
|
|
||||||
' Respuesta = False
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
''PrePoliza Movmiento de entrada
|
|
||||||
'If Respuesta AndAlso ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
|
||||||
' Dim tValorInventario As Decimal = ObjInventario.DtResultados.SUMD("Total", "").RoundSQL()
|
|
||||||
' Dim tValorOtro As Decimal = tValorInventario
|
|
||||||
|
|
||||||
' Dim TipoMovtoAlmacen As Boolean = False
|
|
||||||
' Dim TipoMovtoOtro As Boolean = True
|
|
||||||
|
|
||||||
|
|
||||||
' Dim drA2 As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen = {0}", CveAlmacenOrigen))
|
|
||||||
' If drA2 IsNot Nothing Then
|
|
||||||
' tCveSubProyecto = drA2("CveSubProyecto").ToString.ToEntero
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Dim OrigenMov As Integer = GlobalDTInvConceptos.FiltroPrimeroValor("Origen", "CveConcepto = " & CveConceptoEntrada).ToEntero
|
|
||||||
' If OrigenMov = 1 Then TipoMovtoAlmacen = False Else TipoMovtoAlmacen = True
|
|
||||||
' TipoMovtoOtro = Not TipoMovtoAlmacen
|
|
||||||
|
|
||||||
' Dim CveConceptoContable As Integer = 260
|
|
||||||
' Dim CveClasificacion As Integer = -1
|
|
||||||
' Select Case CveConceptoEntrada
|
|
||||||
' Case 2, 32
|
|
||||||
' CveConceptoContable = 78
|
|
||||||
' EsContabilizable = True
|
|
||||||
' Case 28, 31
|
|
||||||
' CveConceptoContable = 51
|
|
||||||
' If CveConceptoEntrada = 28 Then
|
|
||||||
' ''cuando es 28, es otros ingresos.78
|
|
||||||
' CveConceptoContable = 78
|
|
||||||
' End If
|
|
||||||
' EsContabilizable = True
|
|
||||||
' Case 30
|
|
||||||
' CveConceptoContable = 181
|
|
||||||
' TipoMovtoOtro = False
|
|
||||||
' If DdlSubProyecto.Visible = True AndAlso DdlSubProyecto.SelectedValue.ToEntero > 0 Then tCveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
|
||||||
|
|
||||||
' Case 34
|
|
||||||
' CveConceptoContable = 51
|
|
||||||
' EsContabilizable = True
|
|
||||||
' Case 13, 29
|
|
||||||
' CveConceptoContable = 69
|
|
||||||
' TipoMovtoOtro = True
|
|
||||||
' tValorOtro = -tValorOtro
|
|
||||||
' Dim drr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimero("")
|
|
||||||
' If drr IsNot Nothing Then
|
|
||||||
' CveClasificacion = drr("CveClasificacion").ToString.ToEntero
|
|
||||||
' End If
|
|
||||||
' Case 3
|
|
||||||
' CveConceptoContable = 51
|
|
||||||
' EsContabilizable = True
|
|
||||||
' Case Else
|
|
||||||
' CveConceptoContable = 95
|
|
||||||
|
|
||||||
' End Select
|
|
||||||
|
|
||||||
' '2-78
|
|
||||||
' Dim Obs As String = $"Devolución proveedor {TxtSerie.Text}{TxtFolio.Text}"
|
|
||||||
|
|
||||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaEntrada, TipoMovtoAlmacen, tValorInventario, tValorInventario, 68, Obs, Obs, CveMovimientoAlmacen:=CveMovimientoEntrada, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then
|
|
||||||
' Respuesta = False
|
|
||||||
' Else
|
|
||||||
|
|
||||||
' 'Dim Total As Decimal = 0
|
|
||||||
' If CveConceptoContable.Contiene(181, 78, 51, 69) Then
|
|
||||||
' Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
|
|
||||||
|
|
||||||
' For Each Dr As DataRow In Dt.Rows
|
|
||||||
' Dim Total As Decimal = ObjInventario.DtResultados.FiltraParametros($"CveClasificacion = {Dr("CveClasificacion")}").SUM("Total").RoundSQL()
|
|
||||||
|
|
||||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaEntrada, Not TipoMovtoAlmacen, Total, Total, CveConceptoContable, LblFolio.Text, Obs, 0, CveMovimientoAlmacen:=CveMovimientoEntrada, CveClasificacion:=Dr("CveClasificacion").ToString.ToEntero, CveSubProyecto:=tCveSubProyecto) Then
|
|
||||||
' Respuesta = False
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
' Else
|
|
||||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaEntrada, Not TipoMovtoAlmacen, tValorInventario, tValorInventario, CveConceptoContable, Obs, Obs, CveMovimientoAlmacen:=CveMovimientoEntrada, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then
|
|
||||||
' Respuesta = False
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'Else
|
|
||||||
' Respuesta = False
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Respuesta Then
|
If Respuesta Then
|
||||||
Alert($"Movimientos Guardados Correctamente Folio Salida: {FolioMtoSalida}, Folio Entrada: {FolioMtoEntrada}", TipoMensaje.MsgInformacion)
|
Alert($"Solicitud de devolución guardada. <br/> Folio Salida: <b><a href = '/Inventarios/EntradasSalidas.aspx?CveMovimiento={CveMovimientoSalida}' class='Titulo'>{FolioMtoSalida}</a><b> ", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return Respuesta
|
Return Respuesta
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
'Protected Sub LBDevolucionAlmacen_Click(sender As Object, e As EventArgs)
|
|
||||||
' Dim ObjCompras As New ClsCompras
|
|
||||||
|
|
||||||
' If ObjCompras.UpdateEstatusAlmacen(CveCompra, If(EstatusAlmacen = 1, 0, 1)) Then
|
|
||||||
' EstatusAlmacen = If(EstatusAlmacen = 1, 0, 1)
|
|
||||||
' Alert(If(EstatusAlmacen = 1, "La solicitud de devolución de almacen se guardo correctamente.", "La solicitud de almacen se canceló correctamente."))
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' ObjCompras.Dispose()
|
|
||||||
|
|
||||||
' InicializaDevolucionAlmacen()
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
Private Sub HabilitaNCInv()
|
Private Sub HabilitaNCInv()
|
||||||
|
|
||||||
@@ -22213,7 +21955,7 @@ Partial Class Compras_Compras
|
|||||||
#Region "PRONTO PAGO"
|
#Region "PRONTO PAGO"
|
||||||
|
|
||||||
Public Function GeneraRNC(ByRef sqltransaccion As SqlTransaction, CveCompraRegistrada As Integer, ByRef CompraActual As Compra, ByRef ObjConta As ClsContabilidad, CvePrePoliza As Integer,
|
Public Function GeneraRNC(ByRef sqltransaccion As SqlTransaction, CveCompraRegistrada As Integer, ByRef CompraActual As Compra, ByRef ObjConta As ClsContabilidad, CvePrePoliza As Integer,
|
||||||
CveProveedor As Integer, NombreProveedor As String, Fecha As Date, Descripcion As String, CveMoneda As Integer, Serie As String, Folio As String, Optional EsDRMN As Boolean = False) As Boolean
|
CveProveedor As Integer, NombreProveedor As String, Fecha As Date, Descripcion As String, CveMoneda As Integer, Serie As String, Folio As String, Optional EsDRMN As Boolean = False, Optional TmpListadoPS As DataTable = Nothing) As Boolean
|
||||||
CveCompraDRMC = -1
|
CveCompraDRMC = -1
|
||||||
Dim respuesta As Boolean = True
|
Dim respuesta As Boolean = True
|
||||||
Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||||
@@ -22247,7 +21989,7 @@ Partial Class Compras_Compras
|
|||||||
.NombreProveedor = NombreProveedor,
|
.NombreProveedor = NombreProveedor,
|
||||||
.Fecha = Fecha,
|
.Fecha = Fecha,
|
||||||
.CveMoneda = CveMoneda,
|
.CveMoneda = CveMoneda,
|
||||||
.Serie = If(EsDRMN, $"DRNC{Serie}", Serie),
|
.Serie = If(EsDRMN, $"DRNC-{Serie}", Serie),
|
||||||
.Folio = Folio,
|
.Folio = Folio,
|
||||||
.CveCompraAmortizacion = CveCompraRegistrada
|
.CveCompraAmortizacion = CveCompraRegistrada
|
||||||
}
|
}
|
||||||
@@ -22779,7 +22521,7 @@ Public Class ClsCompraManagerCompras
|
|||||||
Public Property AplicoPromocion As Boolean = False
|
Public Property AplicoPromocion As Boolean = False
|
||||||
Public Property CveConceptoContableAlmacen As Integer = -1
|
Public Property CveConceptoContableAlmacen As Integer = -1
|
||||||
Public Property NoDeducible As Integer = 0
|
Public Property NoDeducible As Integer = 0
|
||||||
Public Property CveTipoCompra As Integer = 1
|
Public Property CveTipoCompra As Integer = -1
|
||||||
Public Property TotalOriginal As Decimal = 0D
|
Public Property TotalOriginal As Decimal = 0D
|
||||||
Public Property CveTipoConcepto As Integer = 1 'FIX ME Esto tiene que ver con el CveTipoProveedor 1 y 3 es CveTipoConcepto 1 y 2 es CveTipoConcepto 2
|
Public Property CveTipoConcepto As Integer = 1 'FIX ME Esto tiene que ver con el CveTipoProveedor 1 y 3 es CveTipoConcepto 1 y 2 es CveTipoConcepto 2
|
||||||
Public Property CveSubProyectoPrincipal As Integer = -1
|
Public Property CveSubProyectoPrincipal As Integer = -1
|
||||||
|
|||||||
@@ -299,7 +299,7 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<asp:GridView ID="GvSolicitudes" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvSolicitudes" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CvePS, CodigoPS, CveUM, Cantidad, Precio, Observaciones, CveContratoDetalle,UnidadMedida,Serie, Lote, FechaCaducidad" EmptyDataText="No se encontraron Productos registrados"
|
DataKeyNames="CveTrasladoSolicitudDetalle,CvePS, CodigoPS, CveUM, Cantidad, Precio, Observaciones, CveContratoDetalle,UnidadMedida,Serie, Lote, FechaCaducidad" EmptyDataText="No se encontraron Productos registrados"
|
||||||
ToolTip="Listado de Productos" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None"
|
ToolTip="Listado de Productos" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None"
|
||||||
OnRowDataBound="GvSolicitudes_RowDataBound" >
|
OnRowDataBound="GvSolicitudes_RowDataBound" >
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -359,7 +359,7 @@
|
|||||||
$chk.prop('checked', true);
|
$chk.prop('checked', true);
|
||||||
} else if (valorTxt > cantidad) {
|
} else if (valorTxt > cantidad) {
|
||||||
$chk.prop('checked', true);
|
$chk.prop('checked', true);
|
||||||
$txt.val(cantidad);
|
//$txt.val(cantidad);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -270,7 +270,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
'CodigoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero).FiltroPrimeroValor("PSCodigo", "")
|
'CodigoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero).FiltroPrimeroValor("PSCodigo", "")
|
||||||
Existencia = ObjInventarios.GetExistenciasPS(DdlProductoServicio.SelectedValue.ToEntero, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=NowADS.ToString("yyyy/MM/dd 23:59"))
|
Existencia = ObjInventarios.GetExistenciasPS(DdlProductoServicio.SelectedValue.ToEntero, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=NowADS.ToString("yyyy/MM/dd 23:59"))
|
||||||
|
|
||||||
If Existencia - (TempDT.SUM("Cantidad", $"CvePS = {DdlProductoServicio.SelectedValue.ToEntero} AND CveUM = {CveUnidadMedida}") + TxtCantidad.Text.Trim.ToDecimal) <= 0 Then
|
If Existencia - (TempDT.SUM("Cantidad", $"CvePS = {DdlProductoServicio.SelectedValue.ToEntero} AND CveUM = {CveUnidadMedida}") + TxtCantidad.Text.Trim.ToDecimal) < 0 Then
|
||||||
MensajeExistencia.AppendFormat("<br/> - <b>{0}.</b> Existencia: {1}", DdlProductoServicio.SelectedText, Existencia)
|
MensajeExistencia.AppendFormat("<br/> - <b>{0}.</b> Existencia: {1}", DdlProductoServicio.SelectedText, Existencia)
|
||||||
TieneErrorExistencia = True
|
TieneErrorExistencia = True
|
||||||
End If
|
End If
|
||||||
@@ -503,8 +503,9 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
TextoExistencia.Append("Los siguiente productos no tienen existencia:<br/>")
|
TextoExistencia.Append("Los siguiente productos no tienen existencia:<br/>")
|
||||||
|
|
||||||
For Each gvr As GridViewRow In GvSolicitudes.Rows
|
For Each gvr As GridViewRow In GvSolicitudes.Rows
|
||||||
Dim Existencia As Decimal = 0
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim Existencia As Decimal = 0
|
||||||
Dim MsgAdicional As String = ""
|
Dim MsgAdicional As String = ""
|
||||||
|
|
||||||
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, CveAlmacenOrigen, FechaMovto:=NowADS.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", Caducidad:=MinFecha) Then
|
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, CveAlmacenOrigen, FechaMovto:=NowADS.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", Caducidad:=MinFecha) Then
|
||||||
@@ -606,15 +607,32 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
|
|
||||||
For Each gvr As GridViewRow In GvSolicitudes.Rows
|
For Each gvr As GridViewRow In GvSolicitudes.Rows
|
||||||
|
|
||||||
Dim Cantidad As Decimal = gvr.FCTextBox("TxtCantidad").Text.ToDecimal
|
Dim CveTrasladoSolicitudDetalle As Integer = gvr.DataKey("CveTrasladoSolicitudDetalle").ToEntero
|
||||||
If gvr.FCCheckBox("Chk").Checked AndAlso Cantidad > 0 Then
|
Dim CantidadOriginal As Decimal = gvr.DataKey("Cantidad").ToDecimal
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, CveAF:=-1, CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", FechaCaducidad:=MinFecha, Observaciones:="") Then
|
Dim CantidadAceptada As Decimal = gvr.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||||
|
|
||||||
|
|
||||||
|
If gvr.FCCheckBox("Chk").Checked AndAlso CantidadAceptada > 0 Then
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadAceptada, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, CveAF:=-1, CveSeccionAlmacen:=-1, Serie:="-1", Lote:="-1", FechaCaducidad:=MinFecha, Observaciones:="") Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If CantidadOriginal <> CantidadAceptada Then
|
||||||
|
If Not ObjInventario.UpdateTrasladoSolicitudDetalle(CveTrasladoSolicitudDetalle, UsuarioActual.CveEmpresa, -1, CantidadAceptada, -1, -1, -1, "-1", -1, "-1", "-1", MinFecha) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
TextoError = "Ocurrió un error al actuazliar el detalle de traslado"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Cont += 1
|
Cont += 1
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'For Each Dr As DataRow In DtMovimientos.RowsF
|
'For Each Dr As DataRow In DtMovimientos.RowsF
|
||||||
@@ -752,9 +770,12 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
Protected Sub GvSolicitudes_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GvSolicitudes_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
Dim Cantidad As Decimal = e.Row.DataKey("Cantidad").ToDecimal
|
Dim Cantidad As Decimal = e.Row.DataKey("Cantidad").ToDecimal
|
||||||
|
|
||||||
e.Row.FCCheckBox("chk").Attributes.Add("onclick", $"validaCantidadSolicitud({Cantidad},'{e.Row.FCTextBox("TxtCantidad").ClientID}','{e.Row.FCCheckBox("Chk").ClientID}',1);")
|
e.Row.FCCheckBox("chk").Attributes.Add("onclick", $"validaCantidadSolicitud({Cantidad},'{e.Row.FCTextBox("TxtCantidad").ClientID}','{e.Row.FCCheckBox("Chk").ClientID}',1);")
|
||||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"validaCantidadSolicitud({Cantidad},'{e.Row.FCTextBox("TxtCantidad").ClientID}','{e.Row.FCCheckBox("Chk").ClientID}',2);")
|
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"validaCantidadSolicitud({Cantidad},'{e.Row.FCTextBox("TxtCantidad").ClientID}','{e.Row.FCCheckBox("Chk").ClientID}',2);")
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Aguinaldo.aspx.cs" Inherits="Nomina_Aguinaldo" %>
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Aguinaldo.aspx.cs" Inherits="Nomina_Aguinaldo" %>
|
||||||
|
|
||||||
<%@ Import Namespace="Extensiones" %>
|
<%@ Import Namespace="Extensiones" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
@@ -8,10 +9,12 @@
|
|||||||
.dSala {
|
.dSala {
|
||||||
width: 90px;
|
width: 90px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dSalaz input {
|
.dSalaz input {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dlab {
|
.dlab {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
}
|
}
|
||||||
@@ -38,6 +41,21 @@
|
|||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkDownExcel" OnClick="LnkDownExcel_Click" runat="server"><i class="fa fa-download"></i> Descargar excel</asp:LinkButton>
|
<asp:LinkButton ID="LnkDownExcel" OnClick="LnkDownExcel_Click" runat="server"><i class="fa fa-download"></i> Descargar excel</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="Upacciones" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkAutorizarModal" OnClick="LnkAutorizarModal_Click" Visible="false" runat="server"><i class="fa fa-check" ></i> Autorizar</asp:LinkButton>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkCargarExcel" OnClick="LnkCargarExcel_Click" Visible="false" runat="server"><i class="fa fa-upload" ></i> Cargar Excel</asp:LinkButton>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -71,7 +89,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<asp:Button ID="BtnCalcular" runat="server" Text="Calcular" OnClick="BtnCalcular_Click" class="btn btn-primary" />
|
<asp:Button ID="BtnCalcular" runat="server" Text="Calcular" OnClick="BtnCalcular_Click" class="btn btn-primary" />
|
||||||
<asp:Button ID="LnkAutorizarModal" runat="server" Text="Autorizar" OnClick="LnkAutorizarModal_Click" Visible="false" class="btn btn-primary" />
|
<asp:Button ID="BtnGuardar" Visible ="false" runat="server" Text="Aplicar Cambios" OnClick="BtnGuardar_Click" class="btn btn-success" />
|
||||||
|
<asp:Button ID="BtnLimpiar" Visible ="false" runat="server" Text="Limpiar" OnClick="BtnLimpiar_Click" class="btn btn-danger" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -138,8 +157,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<asp:Button ID="BtnRecalcular" CssClass="btn btn-primary" OnClick="BtnRecalcular_Click" runat="server" Text="Recalcular" />
|
<%--<asp:Button ID="BtnRecalcular" CssClass="btn btn-primary" OnClick="BtnRecalcular_Click" runat="server" Text="Recalcular" />--%>
|
||||||
<asp:TextBox ID="TxtBusqueda" runat="server" CssClass="form-control input-sm" style="display: inline-block; margin-right: -20px; width: 150px;"></asp:TextBox>
|
<asp:TextBox ID="TxtBusqueda" runat="server" CssClass="form-control input-sm" Style="display: inline-block; margin-right: -20px; width: 150px;"></asp:TextBox>
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('{1}','{0}')", GVCalcularAguinaldo.ClientID,TxtBusqueda.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('{1}','{0}')", GVCalcularAguinaldo.ClientID,TxtBusqueda.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -148,13 +167,14 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Nombre ">
|
<asp:TemplateField HeaderText="Nombre ">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="HypnombreCompleto" Visible='<%# Eval("CvePersonal").ToString().ToEntero() > 0%>' runat="server" Text='<%# Eval("Nombre")%>' NavigateUrl='<%# Eval("CvePersonal","/RH/Personal.aspx?CvePersonal={0}")%>'> </asp:HyperLink>
|
<asp:HyperLink ID="HypnombreCompleto" Visible='<%# Eval("CvePersonal").ToString().ToEntero() > 0%>' runat="server" Text='<%# Eval("Nombre")%>' NavigateUrl='<%# Eval("CvePersonal","/RH/Personal.aspx?CvePersonal={0}")%>'> </asp:HyperLink>
|
||||||
<asp:Label ID="lblnombreCompleto" Visible='<%# (Eval("CvePersonal").ToString().ToEntero() <= 0)%>' runat="server" Text='<%# Eval("Nombre")%>'> </asp:Label>
|
<asp:Label ID="lblnombreCompleto" Visible='<%# (Eval("CvePersonal").ToString().ToEntero() <= 0)%>' runat="server" Text='<%# Eval("Nombre")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Fecha<br />ingreso
|
Fecha<br />
|
||||||
|
ingreso
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblfechaingreso" runat="server" Text='<%# Eval("FechaInicio", "{0:dd/MM/yyyy}")%>'> </asp:Label>
|
<asp:Label ID="lblfechaingreso" runat="server" Text='<%# Eval("FechaInicio", "{0:dd/MM/yyyy}")%>'> </asp:Label>
|
||||||
@@ -163,7 +183,8 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Salario<br />diario
|
Salario<br />
|
||||||
|
diario
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblsueldoDiario" runat="server" Text='<%# Eval("SalarioDiario", "${0:N2}")%>'> </asp:Label>
|
<asp:Label ID="lblsueldoDiario" runat="server" Text='<%# Eval("SalarioDiario", "${0:N2}")%>'> </asp:Label>
|
||||||
@@ -173,7 +194,8 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Salario<br />Aguinaldo
|
Salario<br />
|
||||||
|
Aguinaldo
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblSalarioAguinaldo" runat="server" Text='<%# Eval("SalarioAguinaldo", "${0:N2}")%>'> </asp:Label>
|
<asp:Label ID="lblSalarioAguinaldo" runat="server" Text='<%# Eval("SalarioAguinaldo", "${0:N2}")%>'> </asp:Label>
|
||||||
@@ -181,27 +203,33 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" CssClass="dSala" />
|
<ItemStyle HorizontalAlign="Right" CssClass="dSala" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Días <br />laborados
|
Días
|
||||||
|
<br />
|
||||||
|
laborados
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="TxtdiasLaborados" runat="server" Text='<%# Eval("DiasLaborados", "{0:N0}")%>'> </asp:Label>
|
<asp:Label ID="TxtdiasLaborados" runat="server" Text='<%# Eval("DiasLaborados", "{0:N0}")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" CssClass="dlab" />
|
<ItemStyle HorizontalAlign="Right" CssClass="dlab" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Días <br />Faltados
|
Días
|
||||||
|
<br />
|
||||||
|
Faltados
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="TxtdiasFaltados" runat="server" Text='<%# Eval("DiasFaltados", "{0:N0}")%>'> </asp:Label>
|
<asp:Label ID="TxtdiasFaltados" runat="server" Text='<%# Eval("DiasFaltados", "{0:N0}")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" CssClass="dlab" />
|
<ItemStyle HorizontalAlign="Right" CssClass="dlab" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Días <br />Incapacidad
|
Días
|
||||||
|
<br />
|
||||||
|
Incapacidad
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="TxtdiasIncapacidad" runat="server" Text='<%# Eval("DiasIncapacidad", "{0:N0}")%>'> </asp:Label>
|
<asp:Label ID="TxtdiasIncapacidad" runat="server" Text='<%# Eval("DiasIncapacidad", "{0:N0}")%>'> </asp:Label>
|
||||||
@@ -210,16 +238,20 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Días <br />base
|
Días
|
||||||
|
<br />
|
||||||
|
base
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="TxtdiasAguinaldo" runat="server" Text='<%# Eval("NumDiasAguinaldo")%>'> </asp:Label>
|
<asp:Label ID="TxtdiasAguinaldo" runat="server" Text='<%# Eval("NumDiasAguinaldo")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" CssClass="dlab" />
|
<ItemStyle HorizontalAlign="Right" CssClass="dlab" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Días <br /> pago
|
Días
|
||||||
|
<br />
|
||||||
|
pago
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtdiasAguinaldoprop" runat="server" Text='<%# Eval("diasPropAgui", "{0:N2}")%>'> </asp:TextBox>
|
<asp:TextBox ID="TxtdiasAguinaldoprop" runat="server" Text='<%# Eval("diasPropAgui", "{0:N2}")%>'> </asp:TextBox>
|
||||||
@@ -227,9 +259,9 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" CssClass="dSalaz" />
|
<ItemStyle HorizontalAlign="Right" CssClass="dSalaz" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Aguinaldo
|
Aguinaldo
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblsueldoAguinaldoz" runat="server" Text='<%# Eval("Aguinaldo", "${0:N2}")%>'> </asp:Label>
|
<asp:Label ID="lblsueldoAguinaldoz" runat="server" Text='<%# Eval("Aguinaldo", "${0:N2}")%>'> </asp:Label>
|
||||||
@@ -239,28 +271,32 @@
|
|||||||
<asp:TemplateField HeaderText="Ajuste($)">
|
<asp:TemplateField HeaderText="Ajuste($)">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtAjuste" runat="server" Text='<%# Eval("Ajuste", "{0:N2}")%>'> </asp:TextBox>
|
<asp:TextBox ID="TxtAjuste" runat="server" Text='<%# Eval("Ajuste", "{0:N2}")%>'> </asp:TextBox>
|
||||||
<asp:Label ID="lblAjuste" runat="server" > </asp:Label>
|
<asp:Label ID="lblAjuste" runat="server"> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" CssClass="dSala" />
|
<ItemStyle HorizontalAlign="Right" CssClass="dSala" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Aguinaldo <br /> Por Pagar
|
Aguinaldo
|
||||||
|
<br />
|
||||||
|
Por Pagar
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblsueldoAguinaldo" runat="server" Text='<%# Eval("Aguinaldo", "${0:N2}")%>'> </asp:Label>
|
<asp:Label ID="lblsueldoAguinaldo" runat="server" Text='<%# Eval("Aguinaldo", "${0:N2}")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%-- <asp:TemplateField HeaderText="Aguinaldo exento">
|
<%-- <asp:TemplateField HeaderText="Aguinaldo exento">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label runat="server" Text='<%# Eval("AguinaldoExento", "${0:N2}")%>'> </asp:Label>
|
<asp:Label runat="server" Text='<%# Eval("AguinaldoExento", "${0:N2}")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" CssClass="dSala" />
|
<ItemStyle HorizontalAlign="Right" CssClass="dSala" />
|
||||||
</asp:TemplateField>--%>
|
</asp:TemplateField>--%>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Aguinaldo <br /> gravado
|
Aguinaldo
|
||||||
|
<br />
|
||||||
|
gravado
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblAguinaldoGravado" runat="server" Text='<%# Eval("AguinaldoGravado", "${0:N2}")%>'> </asp:Label>
|
<asp:Label ID="lblAguinaldoGravado" runat="server" Text='<%# Eval("AguinaldoGravado", "${0:N2}")%>'> </asp:Label>
|
||||||
@@ -270,44 +306,44 @@
|
|||||||
|
|
||||||
<asp:TemplateField HeaderText="Fraccion I">
|
<asp:TemplateField HeaderText="Fraccion I">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblFraccion1" runat="server" > </asp:Label>
|
<asp:Label ID="lblFraccion1" runat="server"> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fraccion II">
|
<asp:TemplateField HeaderText="Fraccion II">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblFraccion2" runat="server" > </asp:Label>
|
<asp:Label ID="lblFraccion2" runat="server"> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fraccion III">
|
<asp:TemplateField HeaderText="Fraccion III">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblFraccion3" runat="server" > </asp:Label>
|
<asp:Label ID="lblFraccion3" runat="server"> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fraccion IV">
|
<asp:TemplateField HeaderText="Fraccion IV">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblFraccion4" runat="server" > </asp:Label>
|
<asp:Label ID="lblFraccion4" runat="server"> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Total Gravado" >
|
<asp:TemplateField HeaderText="Total Gravado">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbltotalgravado" runat="server" > </asp:Label>
|
<asp:Label ID="lbltotalgravado" runat="server"> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="I.S.R. Total">
|
<asp:TemplateField HeaderText="I.S.R. Total">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblISRTotal" runat="server" > </asp:Label>
|
<asp:Label ID="lblISRTotal" runat="server"> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="I.S.R. Mensual">
|
<asp:TemplateField HeaderText="I.S.R. Mensual">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblISRMensual" runat="server" > </asp:Label>
|
<asp:Label ID="lblISRMensual" runat="server"> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" />
|
<ItemStyle HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -321,7 +357,7 @@
|
|||||||
<asp:TemplateField HeaderText="Descuento">
|
<asp:TemplateField HeaderText="Descuento">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtDescuento" runat="server" Text=''> </asp:TextBox>
|
<asp:TextBox ID="TxtDescuento" runat="server" Text=''> </asp:TextBox>
|
||||||
<asp:Label ID="lblDescuento" runat="server" > </asp:Label>
|
<asp:Label ID="lblDescuento" runat="server"> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle HorizontalAlign="Right" CssClass="dSala" />
|
<ItemStyle HorizontalAlign="Right" CssClass="dSala" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -356,7 +392,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
<div id="ModalAutorizar" class="modal ADS fade" role="dialog">
|
<div id="ModalAutorizar" class="modal ADS fade" role="dialog">
|
||||||
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAutorizar" UpdateMode="Conditional">
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAutorizar" UpdateMode="Conditional">
|
||||||
@@ -397,6 +432,30 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="Modalxls" class="modal ADS fade" role="dialog">
|
||||||
|
|
||||||
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<h4 class="modal-title">Cargar Excel</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<asp:TextBox ID="TxtFileaguinaldo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:LinkButton ID="LnkProcesarXls" OnClick="LnkProcesarXls_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script>
|
<script>
|
||||||
@@ -404,13 +463,13 @@
|
|||||||
FiltrarTabla('<%= TxtBusqueda.ClientID %>', '<%= GVCalcularAguinaldo.ClientID %>');
|
FiltrarTabla('<%= TxtBusqueda.ClientID %>', '<%= GVCalcularAguinaldo.ClientID %>');
|
||||||
}
|
}
|
||||||
function ADSReady() {
|
function ADSReady() {
|
||||||
// onkeyup = String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVCalcularAguinaldo.ClientID)'
|
// onkeyup = String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVCalcularAguinaldo.ClientID)'
|
||||||
setTimeout(filtraaguinaldo, 250);
|
setTimeout(filtraaguinaldo, 250);
|
||||||
$('#<%= TxtBusqueda.ClientID %> ').keyup(function () {
|
$('#<%= TxtBusqueda.ClientID %> ').keyup(function () {
|
||||||
filtraaguinaldo();
|
filtraaguinaldo();
|
||||||
});
|
});
|
||||||
$('#<%= TxtBusqueda.ClientID %> ').bind("copy paste cut ", function () {
|
$('#<%= TxtBusqueda.ClientID %> ').bind("copy paste cut ", function () {
|
||||||
filtraaguinaldo();
|
filtraaguinaldo();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ using System.Text;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
|
using System.Xml.Linq;
|
||||||
using Extensiones;
|
using Extensiones;
|
||||||
|
using static Stimulsoft.Report.StiOptions.Export;
|
||||||
|
|
||||||
public partial class Nomina_Aguinaldo : ClsPaginas
|
public partial class Nomina_Aguinaldo : ClsPaginas
|
||||||
{
|
{
|
||||||
@@ -28,13 +30,24 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return ViewState["tipocalculo"].ToString().ToEntero();
|
return ViewState["tipocalculo"].ToString().ToEntero();
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
ViewState["tipocalculo"] = value;
|
ViewState["tipocalculo"] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private int ejercicioActual
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ViewState["ejercicioActual"].ToString().ToEntero();
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
ViewState["ejercicioActual"] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
@@ -84,6 +97,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
int ejercicio = DdlEjercicios.SelectedValue.ToEntero();
|
int ejercicio = DdlEjercicios.SelectedValue.ToEntero();
|
||||||
int CveTipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero();
|
int CveTipoPeriodo = DdlTipoPeriodo.SelectedValue.ToEntero();
|
||||||
int CvePeriodo = -1;
|
int CvePeriodo = -1;
|
||||||
|
ejercicioActual = ejercicio;
|
||||||
|
|
||||||
using (ClsNominas objnom = new ClsNominas())
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
{
|
{
|
||||||
@@ -98,8 +112,12 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
|
|
||||||
GVCalcularAguinaldo.DataBind();
|
GVCalcularAguinaldo.DataBind();
|
||||||
LnkAutorizarModal.Visible = true;
|
LnkAutorizarModal.Visible = true;
|
||||||
|
BtnGuardar.Visible = true;
|
||||||
|
BtnLimpiar.Visible = true;
|
||||||
|
LnkCargarExcel.Visible = true;
|
||||||
BtnRecalcular_Click(sender, null);
|
BtnRecalcular_Click(sender, null);
|
||||||
upDatosPA_N.Update();
|
upDatosPA_N.Update();
|
||||||
|
Upacciones.Update();
|
||||||
}
|
}
|
||||||
private void CargaPeriodos()
|
private void CargaPeriodos()
|
||||||
{
|
{
|
||||||
@@ -266,7 +284,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
if (CveNomina > 0)
|
if (CveNomina > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (continuar && !objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, ImporteValor, UsuarioActual.CveUsuario, false, 1, 1, 1,false))
|
if (continuar && !objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, ImporteValor, UsuarioActual.CveUsuario, false, 1, 1, 1, false))
|
||||||
{
|
{
|
||||||
continuar = false;
|
continuar = false;
|
||||||
}
|
}
|
||||||
@@ -337,6 +355,8 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
{
|
{
|
||||||
int CveNomina = e.Row.DBCampo("CveNomina").ToString().ToEntero();
|
int CveNomina = e.Row.DBCampo("CveNomina").ToString().ToEntero();
|
||||||
int CvePersonal = e.Row.DBCampo("CvePersonal").ToString().ToEntero();
|
int CvePersonal = e.Row.DBCampo("CvePersonal").ToString().ToEntero();
|
||||||
|
e.Row.FCTextBox("TxtAjuste").Text = e.Row.DBCampo("Ajuste").ToString();
|
||||||
|
e.Row.FCTextBox("TxtDescuento").Text = e.Row.DBCampo("descuento").ToString();
|
||||||
if (CveNomina > 0)
|
if (CveNomina > 0)
|
||||||
{
|
{
|
||||||
e.Row.CssClass = "success";
|
e.Row.CssClass = "success";
|
||||||
@@ -361,7 +381,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
protected void BtnRecalcular_Click(object sender, EventArgs e)
|
protected void BtnRecalcular_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
tipocalculo = ddltipoCalculo.SelectedValue.ToEntero();
|
tipocalculo = ddltipoCalculo.SelectedValue.ToEntero();
|
||||||
GVCalcularAguinaldo.Columns[13].Visible = (tipocalculo ==1 || tipocalculo == 3);
|
GVCalcularAguinaldo.Columns[13].Visible = (tipocalculo == 1 || tipocalculo == 3);
|
||||||
GVCalcularAguinaldo.Columns[14].Visible = (tipocalculo == 1 || tipocalculo == 3);
|
GVCalcularAguinaldo.Columns[14].Visible = (tipocalculo == 1 || tipocalculo == 3);
|
||||||
GVCalcularAguinaldo.Columns[15].Visible = (tipocalculo == 1 || tipocalculo == 3);
|
GVCalcularAguinaldo.Columns[15].Visible = (tipocalculo == 1 || tipocalculo == 3);
|
||||||
GVCalcularAguinaldo.Columns[16].Visible = (tipocalculo == 1 || tipocalculo == 3);
|
GVCalcularAguinaldo.Columns[16].Visible = (tipocalculo == 1 || tipocalculo == 3);
|
||||||
@@ -392,7 +412,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
|
|
||||||
decimal Aguinaldoapagar = 0;
|
decimal Aguinaldoapagar = 0;
|
||||||
decimal descuento = 0;
|
decimal descuento = 0;
|
||||||
decimal ajuste =0;
|
decimal ajuste = 0;
|
||||||
|
|
||||||
decimal aguinaldoSubproyeto = 0;
|
decimal aguinaldoSubproyeto = 0;
|
||||||
decimal aguinaldogravadoSubproyeto = 0;
|
decimal aguinaldogravadoSubproyeto = 0;
|
||||||
@@ -409,9 +429,9 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
decimal ISRTOTAL = 0;
|
decimal ISRTOTAL = 0;
|
||||||
decimal AguinaldoapagarTotal = 0;
|
decimal AguinaldoapagarTotal = 0;
|
||||||
|
|
||||||
decimal totalgravado= 0;
|
decimal totalgravado = 0;
|
||||||
decimal isrtotalgravado = 0;
|
decimal isrtotalgravado = 0;
|
||||||
decimal isrmensual= 0;
|
decimal isrmensual = 0;
|
||||||
decimal lisr = 0;
|
decimal lisr = 0;
|
||||||
|
|
||||||
GridViewRow gvrowTotal = null;
|
GridViewRow gvrowTotal = null;
|
||||||
@@ -442,7 +462,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
|
|
||||||
diasaguipago = gvrow.FCTextBox("TxtdiasAguinaldoprop").Text.ToDecimal();// (diaslaborados / diasanio) * diasaguinaldo;
|
diasaguipago = gvrow.FCTextBox("TxtdiasAguinaldoprop").Text.ToDecimal();// (diaslaborados / diasanio) * diasaguinaldo;
|
||||||
salariomensual = salariodiario * 30;
|
salariomensual = salariodiario * 30;
|
||||||
aguinaldo = (diasaguipago * salarioAguinaldo)+ ajuste;
|
aguinaldo = (diasaguipago * salarioAguinaldo) + ajuste;
|
||||||
/*if (gvrow.FCTextBox("TxtAguinaldoExento").Text.Length > 0)
|
/*if (gvrow.FCTextBox("TxtAguinaldoExento").Text.Length > 0)
|
||||||
{
|
{
|
||||||
aguinaldoexcento = (aguinaldoExcentoreg > aguinaldo ? aguinaldo : aguinaldoExcentoreg);
|
aguinaldoexcento = (aguinaldoExcentoreg > aguinaldo ? aguinaldo : aguinaldoExcentoreg);
|
||||||
@@ -456,7 +476,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
if (aguinaldogravado > 0)
|
if (aguinaldogravado > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
totalgravado = aguinaldogravado + salariomensual;
|
totalgravado = aguinaldogravado + salariomensual;
|
||||||
if (objbase.CalculosISRAguinaldo(totalgravado, salariomensual, diasmes, DdlEjercicios.SelectedValue.ToEntero()))
|
if (objbase.CalculosISRAguinaldo(totalgravado, salariomensual, diasmes, DdlEjercicios.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
DataRow drow = objbase.DtResultados.Rows[0];
|
DataRow drow = objbase.DtResultados.Rows[0];
|
||||||
@@ -464,7 +484,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
isrmensual = drow["isrFraccionIII_1"].ToString().ToDecimal();
|
isrmensual = drow["isrFraccionIII_1"].ToString().ToDecimal();
|
||||||
}
|
}
|
||||||
else { break; }
|
else { break; }
|
||||||
lisr = isrtotalgravado- isrmensual;
|
lisr = isrtotalgravado - isrmensual;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -478,7 +498,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
//str.AppendFormat("SELECT dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionII_2,", FraccionII_1, diasmes, DdlEjercicios.SelectedValue);
|
//str.AppendFormat("SELECT dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionII_2,", FraccionII_1, diasmes, DdlEjercicios.SelectedValue);
|
||||||
//str.AppendFormat(" dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionIII_1", salariomensual, diasmes, DdlEjercicios.SelectedValue);
|
//str.AppendFormat(" dbo.Fnc_NomValues(40, 0, {2}, -1, {0}, {1}, {1}) isrFraccionIII_1", salariomensual, diasmes, DdlEjercicios.SelectedValue);
|
||||||
//if (objbase.runQuerystr(str.ToString()))
|
//if (objbase.runQuerystr(str.ToString()))
|
||||||
if(objbase.CalculosISRAguinaldo(FraccionII_1, salariomensual, diasmes, DdlEjercicios.SelectedValue.ToEntero()))
|
if (objbase.CalculosISRAguinaldo(FraccionII_1, salariomensual, diasmes, DdlEjercicios.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
DataRow drow = objbase.DtResultados.Rows[0];
|
DataRow drow = objbase.DtResultados.Rows[0];
|
||||||
FraccionII_2 = drow["isrFraccionII_2"].ToString().ToDecimal();
|
FraccionII_2 = drow["isrFraccionII_2"].ToString().ToDecimal();
|
||||||
@@ -495,8 +515,8 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
{
|
{
|
||||||
|
|
||||||
totalgravado = 0;
|
totalgravado = 0;
|
||||||
isrtotalgravado = 0;
|
isrtotalgravado = 0;
|
||||||
isrmensual = 0;
|
isrmensual = 0;
|
||||||
lisr = 0;
|
lisr = 0;
|
||||||
|
|
||||||
|
|
||||||
@@ -516,7 +536,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
{
|
{
|
||||||
FraccionIV = lisr;
|
FraccionIV = lisr;
|
||||||
}
|
}
|
||||||
if (tipocalculo == 3 && FraccionIV > lisr)
|
if (tipocalculo == 3 && FraccionIV > lisr)
|
||||||
{
|
{
|
||||||
FraccionIV = lisr;
|
FraccionIV = lisr;
|
||||||
}
|
}
|
||||||
@@ -666,7 +686,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
cxc = 1;
|
cxc = 1;
|
||||||
libro.Cell(fila, cxc++).Value = string.Format("'{0}",gvrow.DataKey("Codigo"));
|
libro.Cell(fila, cxc++).Value = string.Format("'{0}", gvrow.DataKey("Codigo"));
|
||||||
libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblnombreCompleto").Text;
|
libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblnombreCompleto").Text;
|
||||||
libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblfechaingreso").Text;
|
libro.Cell(fila, cxc++).Value = gvrow.FCLabel("lblfechaingreso").Text;
|
||||||
libro.Cell(fila, cxc++).Value = gvrow.FCTextBox("TxtsueldoDiario").Text.ToDecimal();
|
libro.Cell(fila, cxc++).Value = gvrow.FCTextBox("TxtsueldoDiario").Text.ToDecimal();
|
||||||
@@ -695,7 +715,7 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
|
|
||||||
libro.Range(filatitulo, 1, fila, 18).Columns();
|
libro.Range(filatitulo, 1, fila, 18).Columns();
|
||||||
libro.Range(filatitulo + 1, 4, fila + 1, 20).DataType = ClosedXML.Excel.XLDataType.Number;
|
libro.Range(filatitulo + 1, 4, fila + 1, 20).DataType = ClosedXML.Excel.XLDataType.Number;
|
||||||
libro.Range(filatitulo + 1, 4, fila + 1,5).Style.NumberFormat.Format = "$###,###,###,##0.00";
|
libro.Range(filatitulo + 1, 4, fila + 1, 5).Style.NumberFormat.Format = "$###,###,###,##0.00";
|
||||||
libro.Range(filatitulo + 1, 11, fila + 1, 20).Style.NumberFormat.Format = "$###,###,###,##0.00";
|
libro.Range(filatitulo + 1, 11, fila + 1, 20).Style.NumberFormat.Format = "$###,###,###,##0.00";
|
||||||
libro.ColumnsUsed().AdjustToContents();
|
libro.ColumnsUsed().AdjustToContents();
|
||||||
|
|
||||||
@@ -718,4 +738,125 @@ public partial class Nomina_Aguinaldo : ClsPaginas
|
|||||||
Response.BinaryWrite(memoryStream.ToArray());
|
Response.BinaryWrite(memoryStream.ToArray());
|
||||||
Response.End();
|
Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void BtnGuardar_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
System.Xml.Linq.XDocument xmlregistros = null;
|
||||||
|
|
||||||
|
xmlregistros = new System.Xml.Linq.XDocument(
|
||||||
|
new System.Xml.Linq.XElement("registros",
|
||||||
|
GVCalcularAguinaldo.Rows.Cast<GridViewRow>().Where(row =>
|
||||||
|
{
|
||||||
|
// Obtener el valor de CvePersonal (por DataKeys o celda)
|
||||||
|
if (int.TryParse(GVCalcularAguinaldo.DataKeys[row.RowIndex]["CvePersonal"]?.ToString(), out var cvePersonal))
|
||||||
|
{
|
||||||
|
return cvePersonal > 0;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
.Select(row =>
|
||||||
|
{
|
||||||
|
// Obtener valores directamente desde las celdas o controles
|
||||||
|
var TxtdiasAguinaldoprop = ((TextBox)row.FindControl("TxtdiasAguinaldoprop"))?.Text;
|
||||||
|
var txtAjuste = ((TextBox)row.FindControl("TxtAjuste"))?.Text;
|
||||||
|
var txtDescuento = ((TextBox)row.FindControl("TxtDescuento"))?.Text;
|
||||||
|
|
||||||
|
return new XElement("registro",
|
||||||
|
new XElement("EJercicio", ejercicioActual),
|
||||||
|
new XElement("CveSubProyecto", GVCalcularAguinaldo.DataKeys[row.RowIndex]["CveSubProyecto"]),
|
||||||
|
new XElement("CvePersonal", GVCalcularAguinaldo.DataKeys[row.RowIndex]["CvePersonal"]),
|
||||||
|
new XElement("diasAguinaldo", decimal.TryParse(TxtdiasAguinaldoprop, out var diasPropAgui) ? diasPropAgui : 0),
|
||||||
|
new XElement("Ajuste", decimal.TryParse(txtAjuste, out var ajuste) ? ajuste : 0),
|
||||||
|
new XElement("descuento", decimal.TryParse(txtDescuento, out var descuento) ? descuento : 0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
)));
|
||||||
|
string xml = xmlregistros.ToString();
|
||||||
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
|
{
|
||||||
|
objnom.GuardarAguinaldo(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, xml, ejercicioActual);
|
||||||
|
}
|
||||||
|
BtnCalcular_Click(null, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void BtnLimpiar_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
string xml = "<registros></registros>";
|
||||||
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
|
{
|
||||||
|
objnom.GuardarAguinaldo(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, xml, ejercicioActual);
|
||||||
|
}
|
||||||
|
BtnCalcular_Click(null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void LnkCargarExcel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RegistraScript("$('#Modalxls').modal();");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void LnkProcesarXls_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
List<Archivo> Filesgral = TxtFileaguinaldo.getfiles().Archivos;
|
||||||
|
|
||||||
|
bool continuar = Filesgral.Count > 0;
|
||||||
|
string stringError = "";
|
||||||
|
Archivo fileItem = continuar ? Filesgral[0] : null;
|
||||||
|
if (continuar)
|
||||||
|
{
|
||||||
|
string FileExtension = fileItem.Extension.ToUpper();
|
||||||
|
if (FileExtension == "XLS" | FileExtension == "XLSX" | FileExtension == "CSV")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
continuar = false;
|
||||||
|
stringError = "No se inserto un archivo de tipo Excel";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stringError = "favor de ingresar el archivo y esperar a que cargue";
|
||||||
|
|
||||||
|
}
|
||||||
|
DataTable dtxz = Extensiones.ModExtensiones.ReadExcelFile(fileItem.FileUrl, true);
|
||||||
|
|
||||||
|
|
||||||
|
// Filtrar filas con longitud de "Concepto" > 0
|
||||||
|
DataRow[] filteredRows = dtxz.Select("LEN(Código) > 0");
|
||||||
|
|
||||||
|
// Crear nuevo DataTable con las filas filtradas
|
||||||
|
DataTable filteredTable = dtxz.Clone(); // Clona la estructura del DataTable original
|
||||||
|
foreach (DataRow row in filteredRows)
|
||||||
|
{
|
||||||
|
filteredTable.ImportRow(row);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (GridViewRow gvrow in GVCalcularAguinaldo.Rows)
|
||||||
|
{
|
||||||
|
string Codigo = gvrow.DataKey("Codigo");
|
||||||
|
string TxtdiasAguinaldoprop = "";
|
||||||
|
string TxtAjuste = "";
|
||||||
|
string TxtDescuento = "";
|
||||||
|
DataRow drow = filteredTable.FiltroPrimero(string.Format(" Código='{0}'", Codigo));
|
||||||
|
if (drow != null)
|
||||||
|
{
|
||||||
|
TxtdiasAguinaldoprop = drow["Días aguinaldo"].ToString();
|
||||||
|
TxtAjuste = drow["Ajuste"].ToString();
|
||||||
|
TxtDescuento = drow["Descuento"].ToString();
|
||||||
|
((TextBox)gvrow.FindControl("TxtdiasAguinaldoprop")).Text = TxtdiasAguinaldoprop;
|
||||||
|
((TextBox)gvrow.FindControl("TxtAjuste")).Text = TxtAjuste;
|
||||||
|
((TextBox)gvrow.FindControl("TxtDescuento")).Text = TxtDescuento;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BtnRecalcular_Click(sender, null);
|
||||||
|
RegistraScript("$('#Modalxls').modal('hide');");
|
||||||
|
upDatosPA_N.Update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
.GVCalculoISRAnual tr td:nth-child(5) {
|
.GVCalculoISRAnual tr td:nth-child(5) {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.GVCalculoISRAnual tr td:nth-child(6) {
|
.GVCalculoISRAnual tr td:nth-child(6) {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@@ -134,25 +135,31 @@
|
|||||||
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# string.Format("{0} - {1:dd/MM/yyyy}",Eval("TipoIngreso"), Eval("FechaInicio"))%>'> </asp:Label>
|
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# string.Format("{0} - {1:dd/MM/yyyy}",Eval("TipoIngreso"), Eval("FechaInicio"))%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<span data-toggle="tooltip" data-html="true" title="Suma de percepciones <br/>capturadas en los distintos <br/>periodos del año">Ingresos <br/>totales</span>
|
<span data-toggle="tooltip" data-html="true" title="Suma de percepciones <br/>capturadas en los distintos <br/>periodos del año">Ingresos
|
||||||
|
<br />
|
||||||
|
totales</span>
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblingresosTotales" runat="server" Text='<%# Eval("IngresosTotales","{0:N2}")%>'> </asp:Label>
|
<asp:Label ID="lblingresosTotales" runat="server" Text='<%# Eval("IngresosTotales","{0:N2}")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<span data-toggle="tooltip" data-html="true" title="">Base <br/>gravada</span>
|
<span data-toggle="tooltip" data-html="true" title="">Base
|
||||||
|
<br />
|
||||||
|
gravada</span>
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label runat="server" Text='<%# Eval("BaseGravada","{0:N2}")%>'> </asp:Label>
|
<asp:Label runat="server" Text='<%# Eval("BaseGravada","{0:N2}")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<span data-toggle="tooltip" data-html="true" title="">Base <br/>exenta</span>
|
<span data-toggle="tooltip" data-html="true" title="">Base
|
||||||
|
<br />
|
||||||
|
exenta</span>
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label runat="server" Text='<%# Eval("BaseExcenta","{0:N2}")%>'> </asp:Label>
|
<asp:Label runat="server" Text='<%# Eval("BaseExcenta","{0:N2}")%>'> </asp:Label>
|
||||||
@@ -160,7 +167,9 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="">
|
<asp:TemplateField HeaderText="">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<span data-toggle="tooltip" data-html="true" title="Suma del isr capturado <br/>en los distintos <br/>periodos del año">ISR <br/>retenido</span>
|
<span data-toggle="tooltip" data-html="true" title="Suma del isr capturado <br/>en los distintos <br/>periodos del año">ISR
|
||||||
|
<br />
|
||||||
|
retenido</span>
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbliSRRetenido" runat="server" Text='<%# Eval("ISRRetenido","{0:N2}")%>'> </asp:Label>
|
<asp:Label ID="lbliSRRetenido" runat="server" Text='<%# Eval("ISRRetenido","{0:N2}")%>'> </asp:Label>
|
||||||
@@ -174,9 +183,10 @@
|
|||||||
<asp:Label ID="lblart152" runat="server" Text='<%# Eval("Art152","{0:N2}")%>'> </asp:Label>
|
<asp:Label ID="lblart152" runat="server" Text='<%# Eval("Art152","{0:N2}")%>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField >
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<span data-toggle="tooltip" data-html="true" title=" suma de importes <br/>durante el ejercicio <br/>(subsidio acreditalbe -<br/> ajuste al subsidio causado)">Subs.<br />correspondiente</span>
|
<span data-toggle="tooltip" data-html="true" title=" suma de importes <br/>durante el ejercicio <br/>(subsidio acreditalbe -<br/> ajuste al subsidio causado)">Subs.<br />
|
||||||
|
correspondiente</span>
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblsubsCorrespondiente" runat="server" Text='<%# Eval("SubsCorrespondiente","{0:N2}")%>'> </asp:Label>
|
<asp:Label ID="lblsubsCorrespondiente" runat="server" Text='<%# Eval("SubsCorrespondiente","{0:N2}")%>'> </asp:Label>
|
||||||
@@ -184,7 +194,8 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Impuesto anual">
|
<asp:TemplateField HeaderText="Impuesto anual">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<span data-toggle="tooltip" data-html="true" title="">Impuesto<br />anual</span>
|
<span data-toggle="tooltip" data-html="true" title="">Impuesto<br />
|
||||||
|
anual</span>
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblimpuestoAnual" runat="server" Text='<%# Eval("ImpuestoAnual","{0:N2}")%>'> </asp:Label>
|
<asp:Label ID="lblimpuestoAnual" runat="server" Text='<%# Eval("ImpuestoAnual","{0:N2}")%>'> </asp:Label>
|
||||||
@@ -251,18 +262,33 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:Label runat="server" Text="Modalidad:" AssociatedControlID=""></asp:Label>
|
||||||
|
<asp:DropDownList ID="ddldivision" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar" AutoPostBack="true" OnSelectedIndexChanged="ddldivision_SelectedIndexChanged">
|
||||||
|
<asp:ListItem Value="1" Text="diferir cargos a futuros periodos" Selected="True"></asp:ListItem>
|
||||||
|
<asp:ListItem Value="2" Text="aplicar en periodo de diciembre"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6" style =" padding-top: 25px;">
|
||||||
|
<div runat="server" ID="divnumeropagos" class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtNumerodePagos" Text="1" type="number" min="1" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
|
<asp:Label runat="server" Text="Dividir en pagos:" AssociatedControlID="TxtNumerodePagos"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:Label runat="server" Text="Concepto a cargo:" AssociatedControlID=""></asp:Label>
|
<asp:Label runat="server" Text="Concepto a cargo:" AssociatedControlID=""></asp:Label>
|
||||||
<asp:DropDownList ID="DdlConceptoCargo" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
<asp:DropDownList ID="DdlConceptoCargo" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtNumerodePagos" Text="1" type="number" min="1" CssClass="form-control" runat="server"></asp:TextBox>
|
|
||||||
<asp:Label runat="server" Text="Dividir en pagos:" AssociatedControlID="TxtNumerodePagos"></asp:Label>
|
|
||||||
</div>
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:Label runat="server" Text="Concepto a compensar:" AssociatedControlID=""></asp:Label>
|
<asp:Label runat="server" Text="Concepto a compensar:" AssociatedControlID=""></asp:Label>
|
||||||
<asp:DropDownList ID="DdlConceptoCompensar" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
<asp:DropDownList ID="DdlConceptoCompensar" runat="server" DataTextField="CodigoConcepto" DataValueField="CveConcepto" Class="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardar"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<%--<asp:CheckBox ID="chk" Text=" Calcular en último periodo de diciembre " Checked="false" runat="server" />--%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
|
|||||||
CvePersonal = gvrow.DataKey("CvePersonal").ToString().ToEntero();
|
CvePersonal = gvrow.DataKey("CvePersonal").ToString().ToEntero();
|
||||||
using (ClsNominas onom = new ClsNominas())
|
using (ClsNominas onom = new ClsNominas())
|
||||||
{
|
{
|
||||||
if (onom.PersonalAplicaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CvePersonal, 1, ""))
|
if (onom.PersonalAplicaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Ejercicio, CvePersonal, 1, ""))
|
||||||
{
|
{
|
||||||
Alert("El empleado sera incluido al calculo anual");
|
Alert("El empleado sera incluido al calculo anual");
|
||||||
CargaCalculoISRAnual();
|
CargaCalculoISRAnual();
|
||||||
@@ -205,7 +205,7 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
|
|||||||
{
|
{
|
||||||
using (ClsNominas onom = new ClsNominas())
|
using (ClsNominas onom = new ClsNominas())
|
||||||
{
|
{
|
||||||
if (onom.PersonalAplicaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CvePersonal, 0, TxtMotivo.Text))
|
if (onom.PersonalAplicaCalculoAnual(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Ejercicio, CvePersonal, 0, TxtMotivo.Text))
|
||||||
{
|
{
|
||||||
Alert("El empleado sera omitido del calculo anual");
|
Alert("El empleado sera omitido del calculo anual");
|
||||||
RegistraScript("$('#DModalcancelarEmpleado').modal('hide');");
|
RegistraScript("$('#DModalcancelarEmpleado').modal('hide');");
|
||||||
@@ -345,4 +345,9 @@ public partial class Nomina_CalculoISRAnual : ClsPaginas
|
|||||||
Response.End();
|
Response.End();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void ddldivision_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
divnumeropagos.Visible=(ddldivision.SelectedValue == "1");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -143,13 +143,14 @@ Partial Class OC_PopUpBuscarReq
|
|||||||
ViewState("CveProveedor") = DdlProveedorMultiple.SelectedValue
|
ViewState("CveProveedor") = DdlProveedorMultiple.SelectedValue
|
||||||
tCveProveedor = DdlProveedorMultiple.SelectedValue.ToEntero
|
tCveProveedor = DdlProveedorMultiple.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
|
Dim CveEstatus As Integer = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatus", "Tipo = 'OC' and TipoTermino = 3").ToEntero
|
||||||
'Cargar Datos
|
'Cargar Datos
|
||||||
Dim ObjOC As New ClsOC
|
Dim ObjOC As New ClsOC
|
||||||
ObjOC.GetOrdenesCompraVinculacion("OC", -1, -1, -1, MinFecha, MaxFecha, -1, tCveProveedor, -1, -1, UsuarioActual.CveEmpresa)
|
ObjOC.GetOrdenesCompraVinculacion("OC", -1, -1, CveEstatus, MinFecha, MaxFecha, -1, tCveProveedor, -1, -1, UsuarioActual.CveEmpresa)
|
||||||
Dim DtOC As Data.DataTable = ObjOC.DtResultados
|
Dim DtOC As Data.DataTable = ObjOC.DtResultados
|
||||||
ObjOC.Dispose()
|
ObjOC.Dispose()
|
||||||
|
|
||||||
If DtOC.Rows.Count > 0 Then ' tipotermino, esattus inicial
|
If DtOC.Rows.Count > 0 Then ' tipotermino, estatus inicial
|
||||||
BtnVincularOC.Visible = True
|
BtnVincularOC.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<asp:TextBox ID="TxtCodigo" runat="server" MaxLength="12" Width="100px"></asp:TextBox></td>
|
<asp:TextBox ID="TxtCodigo" runat="server" MaxLength="12" Width="100px"></asp:TextBox></td>
|
||||||
<td class="text-right"><b>Nombre:</b></td>
|
<td class="text-right"><b>Nombre:</b></td>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<asp:TextBox ID="TxtNombre" runat="server" MaxLength="100" Width="362px" autofocus></asp:TextBox></td>
|
<asp:TextBox ID="TxtNombre" runat="server" MaxLength="100" Width="362px" autofocus="autofocus"></asp:TextBox></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="left">
|
<tr align="left">
|
||||||
<td class="text-right"><b>NSS:</b></td>
|
<td class="text-right"><b>NSS:</b></td>
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<td class="text-right"><b>Puesto:</b></td>
|
<td class="text-right"><b>Puesto:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlPuestos" runat="server" AppendDataBoundItems="true" DataTextField="Puesto" DataValueField="CvePuesto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlPuestos" runat="server" AppendDataBoundItems="true" DataTextField="Puesto" DataValueField="CvePuesto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right"><b>RFC:</b></td>
|
<td class="text-right"><b>RFC:</b></td>
|
||||||
@@ -54,19 +54,19 @@
|
|||||||
<td class="text-right"><b>Tipo de Período:</b></td>
|
<td class="text-right"><b>Tipo de Período:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right"><b>Tipo de Contrato:</b></td>
|
<td class="text-right"><b>Tipo de Contrato:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlTipoContrato" runat="server" AppendDataBoundItems="true" DataTextField="TipoContrato" DataValueField="CveTipoContrato" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlTipoContrato" runat="server" AppendDataBoundItems="true" DataTextField="TipoContrato" DataValueField="CveTipoContrato" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right"><b>Departamento:</b></td>
|
<td class="text-right"><b>Departamento:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlDepartamentos" runat="server" AppendDataBoundItems="true" DataTextField="Departamento" DataValueField="CveDepartamento" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlDepartamentos" runat="server" AppendDataBoundItems="true" DataTextField="Departamento" DataValueField="CveDepartamento" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -74,19 +74,19 @@
|
|||||||
<td class="text-right"><b>Género:</b></td>
|
<td class="text-right"><b>Género:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlGenero" runat="server" AppendDataBoundItems="true" DataTextField="Genero" DataValueField="CveGenero" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlGenero" runat="server" AppendDataBoundItems="true" DataTextField="Genero" DataValueField="CveGenero" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right"><b>Estado Civil:</b></td>
|
<td class="text-right"><b>Estado Civil:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlEstadoCivil" runat="server" AppendDataBoundItems="true" DataTextField="EstadoCivil" DataValueField="CveEstadoCivil" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlEstadoCivil" runat="server" AppendDataBoundItems="true" DataTextField="EstadoCivil" DataValueField="CveEstadoCivil" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right"><b>Escolaridad:</b></td>
|
<td class="text-right"><b>Escolaridad:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlEscolaridad" runat="server" AppendDataBoundItems="true" DataTextField="Escolaridad" DataValueField="CveEscolaridad" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlEscolaridad" runat="server" AppendDataBoundItems="true" DataTextField="Escolaridad" DataValueField="CveEscolaridad" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -101,13 +101,13 @@
|
|||||||
<td class="text-right"><b>Turno:</b></td>
|
<td class="text-right"><b>Turno:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlTurnos" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlTurnos" runat="server" AppendDataBoundItems="true" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right"><b>Cliente:</b></td>
|
<td class="text-right"><b>Cliente:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlClienteAsignado" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlClienteAsignado" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -115,19 +115,19 @@
|
|||||||
<td class="text-right"><b>Proyecto:</b></td>
|
<td class="text-right"><b>Proyecto:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlProyecto" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right"><b>Sub Proyecto:</b></td>
|
<td class="text-right"><b>Sub Proyecto:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right"><b>Ruta:</b></td>
|
<td class="text-right"><b>Ruta:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlRuta" runat="server" AppendDataBoundItems="true" DataTextField="Ruta" DataValueField="CveRuta" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlRuta" runat="server" AppendDataBoundItems="true" DataTextField="Ruta" DataValueField="CveRuta" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
<td class="text-right"><b>Estatus:</b></td>
|
<td class="text-right"><b>Estatus:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusPersonal" DataValueField="CveEstatusPersonal" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusPersonal" DataValueField="CveEstatusPersonal" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right"><b>clasificación:</b></td>
|
<td class="text-right"><b>clasificación:</b></td>
|
||||||
@@ -175,8 +175,6 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<asp:GridView ID="GvCrt2" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False"
|
<asp:GridView ID="GvCrt2" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-hover table-advance Widthall" AutoGenerateColumns="False"
|
||||||
|
|||||||
@@ -387,7 +387,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="text-align: center; padding-top: 20px;">
|
<div style="text-align: center; padding-top: 20px;">
|
||||||
<asp:Button runat="server" Text="Guardar Cambios" ValidationGroup="GrpGuardar"
|
<asp:Button runat="server" Text="Guardar Cambios" ValidationGroup="GrpGuardar" ID="BtnGuardar"
|
||||||
CssClass="btn btn-primary" OnClick="UpdateContrato" />
|
CssClass="btn btn-primary" OnClick="UpdateContrato" />
|
||||||
<asp:Button runat="server" Text="Eliminar" CssClass="btn btn-danger"
|
<asp:Button runat="server" Text="Eliminar" CssClass="btn btn-danger"
|
||||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de eliminar el contrato?(Si es contrato masivo, se eliminarán todos)"
|
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro de eliminar el contrato?(Si es contrato masivo, se eliminarán todos)"
|
||||||
|
|||||||
@@ -140,6 +140,18 @@ Partial Class RepContratoDetalle
|
|||||||
ViewState("CveMonedaOriginal") = value
|
ViewState("CveMonedaOriginal") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property CveClienteOriginal As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveClienteOriginal") Is Nothing Then
|
||||||
|
ViewState("CveClienteOriginal") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("CveClienteOriginal").ToString.ToEntero
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveClienteOriginal") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Private Property ImporteOrigial As Decimal
|
Private Property ImporteOrigial As Decimal
|
||||||
@@ -357,6 +369,7 @@ Partial Class RepContratoDetalle
|
|||||||
|
|
||||||
CveSubProyectoOriginal = drc("CveSubProyecto").ToString.ToEntero
|
CveSubProyectoOriginal = drc("CveSubProyecto").ToString.ToEntero
|
||||||
CveMonedaOriginal = drc("CveMoneda").ToString.ToEntero
|
CveMonedaOriginal = drc("CveMoneda").ToString.ToEntero
|
||||||
|
CveClienteOriginal = drc("CveCliente").ToString.ToEntero
|
||||||
ImporteOrigial = Importe
|
ImporteOrigial = Importe
|
||||||
DescripcionOriginal = drc("DescripcionContrato").ToString
|
DescripcionOriginal = drc("DescripcionContrato").ToString
|
||||||
TipoAFOriginal = DdlTipoAF.SelectedItem.Text
|
TipoAFOriginal = DdlTipoAF.SelectedItem.Text
|
||||||
@@ -601,10 +614,11 @@ Partial Class RepContratoDetalle
|
|||||||
ImporteOrigial <> TxtImporte.Text.ToDecimal OrElse
|
ImporteOrigial <> TxtImporte.Text.ToDecimal OrElse
|
||||||
DescripcionOriginal <> TxtDescripcion.Text OrElse
|
DescripcionOriginal <> TxtDescripcion.Text OrElse
|
||||||
TipoAFOriginal <> DdlTipoAF.SelectedItem.Text OrElse
|
TipoAFOriginal <> DdlTipoAF.SelectedItem.Text OrElse
|
||||||
FolioOriginal <> TxtFolio.Text.Trim) Then
|
FolioOriginal <> TxtFolio.Text.Trim OrElse
|
||||||
|
CveClienteOriginal <> DdlClientes.SelectedValue.ToEntero) Then
|
||||||
|
|
||||||
Dim ObsRemisionPartida As String = $"{DdlTipoAF.SelectedItem.Text}-{ TxtDescripcion.Text}-{TxtFolio.Text}"
|
Dim ObsRemisionPartida As String = $"{DdlTipoAF.SelectedItem.Text}-{ TxtDescripcion.Text}-{TxtFolio.Text}"
|
||||||
If Not UpdateRemision(ObjContratos.IniciaTransacSQL(), DdlSubProyecto.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, TxtImporte.Text.ToDecimal, ObsRemisionPartida) Then
|
If Not UpdateRemision(ObjContratos.IniciaTransacSQL(), DdlSubProyecto.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, TxtImporte.Text.ToDecimal, ObsRemisionPartida, DdlClientes.SelectedValue.ToEntero) Then
|
||||||
ErrorProceso = True
|
ErrorProceso = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -653,7 +667,7 @@ Partial Class RepContratoDetalle
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function UpdateRemision(ByRef transaccionSql As SqlTransaction, CveSubProyectoNew As Integer, CveMonedaNew As Integer, TotalNew As Decimal, DescripcionNew As String) As Boolean
|
Private Function UpdateRemision(ByRef transaccionSql As SqlTransaction, CveSubProyectoNew As Integer, CveMonedaNew As Integer, TotalNew As Decimal, DescripcionNew As String, CveClienteNew As Integer) As Boolean
|
||||||
|
|
||||||
Dim Respuesta As Boolean = False
|
Dim Respuesta As Boolean = False
|
||||||
Dim TmpDT As DataTable = New DataTable
|
Dim TmpDT As DataTable = New DataTable
|
||||||
@@ -675,12 +689,9 @@ Partial Class RepContratoDetalle
|
|||||||
PorcentajeIVA = ObjVentas.DtResultados.MAX("PorcentajeIVA").ToDecimal
|
PorcentajeIVA = ObjVentas.DtResultados.MAX("PorcentajeIVA").ToDecimal
|
||||||
|
|
||||||
If PorcentajeIVA > 0 Then
|
If PorcentajeIVA > 0 Then
|
||||||
|
|
||||||
IVANew = (TotalNew * (PorcentajeIVA * 100)) / (100 + (PorcentajeIVA * 100))
|
IVANew = (TotalNew * (PorcentajeIVA * 100)) / (100 + (PorcentajeIVA * 100))
|
||||||
SubTotalNew = TotalNew - IVANew
|
SubTotalNew = TotalNew - IVANew
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TmpDT Is Nothing OrElse TmpDT.Rows.Count = 0 Or FechaVenta = MinFecha Then
|
If TmpDT Is Nothing OrElse TmpDT.Rows.Count = 0 Or FechaVenta = MinFecha Then
|
||||||
@@ -697,7 +708,7 @@ Partial Class RepContratoDetalle
|
|||||||
UsuarioActual.CveEmpresa, CveVentaRemision,
|
UsuarioActual.CveEmpresa, CveVentaRemision,
|
||||||
Vigencia:=FechaVenta, CondicionesPago:=-1,
|
Vigencia:=FechaVenta, CondicionesPago:=-1,
|
||||||
PedidoContrato:="-1", AtencionA:="-1", CveMetodoPago33:=-1,
|
PedidoContrato:="-1", AtencionA:="-1", CveMetodoPago33:=-1,
|
||||||
CveFormaPago33:=-1, TipoDocto:="Rem", CveCliente:=-1, CveClienteSucursal:=-1,
|
CveFormaPago33:=-1, TipoDocto:="Rem", CveCliente:=CveClienteNew, CveClienteSucursal:=-1,
|
||||||
OrdenCompra:="-1", RetIVA:=0, RetISR:=0, Kilometraje:=0D, CveUsoCFDi:=-1,
|
OrdenCompra:="-1", RetIVA:=0, RetISR:=0, Kilometraje:=0D, CveUsoCFDi:=-1,
|
||||||
CveVendedor:=-1, ServicioDomicilio:=False, CveMedico:=-1, CveProcedimiento:=-1,
|
CveVendedor:=-1, ServicioDomicilio:=False, CveMedico:=-1, CveProcedimiento:=-1,
|
||||||
FechaParaSurtir:=MinFecha, Paciente:="-1", Episodio:="-1", CveCondicionEntrega:=-1, FolioRemision:="-1") Then
|
FechaParaSurtir:=MinFecha, Paciente:="-1", Episodio:="-1", CveCondicionEntrega:=-1, FolioRemision:="-1") Then
|
||||||
@@ -721,7 +732,6 @@ Partial Class RepContratoDetalle
|
|||||||
|
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
Dim DTPrePoliza As New DataTable
|
Dim DTPrePoliza As New DataTable
|
||||||
|
|
||||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
DTPrePoliza = ObjConta.DtResultados
|
DTPrePoliza = ObjConta.DtResultados
|
||||||
If DTPrePoliza.Rows.Count = 0 Then
|
If DTPrePoliza.Rows.Count = 0 Then
|
||||||
@@ -733,8 +743,7 @@ Partial Class RepContratoDetalle
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
For Each dRow As DataRow In DTPrePoliza.Rows
|
For Each dRow As DataRow In DTPrePoliza.Rows
|
||||||
|
If Not ObjConta.UpdatePrePolizasDetalle(dRow("CvePrePolizaDetalle").ToString.ToEntero, dRow("Concepto").ToString, dRow("CveSubProyecto").ToString.ToEntero, -1, Boolean.Parse(dRow("TipoMovto").ToString), ImporteMN:=TotalNew, Importe:=TotalNew, TipoCambio:=TC, CveCliente:=CveClienteNew) Then
|
||||||
If Not ObjConta.UpdatePrePolizasDetalle(dRow("CvePrePolizaDetalle").ToString.ToEntero, dRow("Concepto").ToString, dRow("CveSubProyecto").ToString.ToEntero, -1, Boolean.Parse(dRow("TipoMovto").ToString), ImporteMN:=TotalNew, Importe:=TotalNew, TipoCambio:=TC) Then
|
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -759,6 +768,13 @@ Partial Class RepContratoDetalle
|
|||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:="BtnRefrescarPagina();")
|
' Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:="BtnRefrescarPagina();")
|
||||||
|
CveSubProyectoOriginal = DdlSubProyecto.SelectedValue.ToEntero
|
||||||
|
CveMonedaOriginal = DdlMoneda.SelectedValue.ToEntero
|
||||||
|
ImporteOrigial = TxtImporte.Text.ToDecimal
|
||||||
|
DescripcionOriginal = TxtDescripcion.Text
|
||||||
|
TipoAFOriginal = DdlTipoAF.SelectedItem.Text
|
||||||
|
FolioOriginal = TxtFolio.Text.Trim
|
||||||
|
CveClienteOriginal = DdlClientes.SelectedValue.ToEntero
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ Partial Class Ventas_CatAutorizacionLimites
|
|||||||
Dim DiasVencidosAutorizacion As Integer = gvRow.DataKey("DiasVencidosAutorizacion").ToEntero()
|
Dim DiasVencidosAutorizacion As Integer = gvRow.DataKey("DiasVencidosAutorizacion").ToEntero()
|
||||||
|
|
||||||
If DiasVencidos > DiasVencidosAutorizacion Then
|
If DiasVencidos > DiasVencidosAutorizacion Then
|
||||||
Alert($"No se puede autorizar, los días vencidos del cliente son mayores a la autorización. Dias Vencidos: {DiasVencidos:N0} . Dias autorizados. {DiasVencidosAutorizacion:N0}", TipoMensaje.MsgAdvertencia)
|
Alert($"No se puede autorizar, los días vencidos del cliente son mayores a la autorización. <br/> Dias Vencidos: {DiasVencidos:N0} . Dias autorizados. {DiasVencidosAutorizacion:N0}", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -57,16 +57,16 @@
|
|||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover" runat="server" AutoGenerateColumns="False" GridLines="None">
|
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" runat="server" AutoGenerateColumns="False" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Promoción" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Promoción" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink runat="server" ID="HLPromocion" Text='<%# Eval("Promocion").ToString %>' CssClass="Texto"></asp:HyperLink>
|
<asp:HyperLink runat="server" ID="HLPromocion" Text='<%# Eval("Promocion").ToString %>' NavigateUrl ='<%# Eval("CvePromocion", "/Ventas/Promociones.aspx?CvePromocion={0}") %>' CssClass="Texto"></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="FechaInicio" DataFormatString="{0:d}" HeaderText="F. Inicio" ItemStyle-Width="70px" />
|
<asp:BoundField DataField="FechaInicio" DataFormatString="{0:d}" HeaderText="F. Inicio" ItemStyle-Width="80px" />
|
||||||
<asp:BoundField DataField="FechaFin" DataFormatString="{0:d}" HeaderText="F. Fin" ItemStyle-Width="70px" />
|
<asp:BoundField DataField="FechaFin" DataFormatString="{0:d}" HeaderText="F. Fin" ItemStyle-Width="80px" />
|
||||||
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" ItemStyle-Width="100px" />
|
<asp:BoundField DataField="SubProyecto" HeaderText="Sucursal" ItemStyle-Width="125px" />
|
||||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="70px">
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="70px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label runat="server" ID="LbEstatus" Text='<%#If(Eval("Estatus").ToString = "True", "Activo", "Inactivo") %>' />
|
<asp:Label runat="server" ID="LbEstatus" Text='<%#If(Eval("Estatus").ToString = "True", "Activo", "Inactivo") %>' />
|
||||||
@@ -83,24 +83,5 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
function pageLoad() {
|
|
||||||
$(document).ready(function () {
|
|
||||||
gridviewScroll();
|
|
||||||
});
|
|
||||||
|
|
||||||
function gridviewScroll() {
|
|
||||||
var Tam = TamañoVentana();
|
|
||||||
var Alto = Tam.height - 210;
|
|
||||||
|
|
||||||
$('#<%=GvDatos.ClientID%>').gridviewScroll({
|
|
||||||
width: 995,
|
|
||||||
height: Alto,
|
|
||||||
freezesize: 1,
|
|
||||||
headerrowcount: 1
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ Partial Class Ventas_CatPromociones
|
|||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If ObjVentas.GetPromociones(-1, "-1", -1, -1, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero) Then
|
If ObjVentas.GetPromociones(-1, MinFecha, -1, -1, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, CveUsuario:=UsuarioActual.CveUsuario) Then
|
||||||
DtDatos = ObjVentas.DtResultados
|
DtDatos = ObjVentas.DtResultados
|
||||||
Else
|
Else
|
||||||
DtDatos = Nothing
|
DtDatos = Nothing
|
||||||
@@ -58,12 +58,5 @@ Partial Class Ventas_CatPromociones
|
|||||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
|
||||||
|
|
||||||
e.Row.FCHyperLink("HLPromocion").NavigateUrl = String.Format("/Ventas/Promociones.aspx?CvePromocion={0}", e.Row.DBCampo("CvePromocion"))
|
|
||||||
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -1108,7 +1108,7 @@
|
|||||||
<div id="DivAnticipos" class="modal ADS fade" role="dialog">
|
<div id="DivAnticipos" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional" RenderMode="Inline">
|
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional" RenderMode="Inline">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog" style ="width: 700px;">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
@@ -1189,7 +1189,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
|
<asp:GridView ID="GVAnticipos" runat="server" AutoGenerateColumns="False" ClientIDMode="Static" EmptyDataText="No se encontraron Anticipos del Cliente"
|
||||||
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" data-height="300" Style="text-align: center;" GridLines="None"
|
ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" data-height="300" GridLines="None"
|
||||||
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,DevolucionImportePagado,CveCliente,Descuentos">
|
DataKeyNames="ISTotal,Saldo,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,CveConceptoContableAmor, TotalAnticipo, SubTotalAnticipo, IVAAnticipo,IEPS, ImpuestosLocalesAnticipo, SubTotalAmortizacion, SubTotal, Original, IVA, RetIVA, RetISR, FolioFiscal, CveClasificacionNC, TipoCambio,TipoCambioPago,TipoCambioHoy, CveMoneda,Fecha,SaldoSubTotal,SaldoConImpuestos,RegresarImpuesto,DevolucionImportePagado,CveCliente,Descuentos">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -300,8 +300,8 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario})")
|
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario})")
|
||||||
'si hay ya asignado, solo la mostrará
|
'si hay ya asignado, solo la mostrará
|
||||||
Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario}")
|
'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario}")
|
||||||
If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
||||||
GvDatos.DataSource = dtt
|
GvDatos.DataSource = dtt
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1740,19 +1740,19 @@ Partial Class Ventas_PVCobranza
|
|||||||
Me.TmpDTAnticiposNCIxCCliente = ObjMovtos.DtResultados.Copy()
|
Me.TmpDTAnticiposNCIxCCliente = ObjMovtos.DtResultados.Copy()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'AGREGAR LOS ANTICIPOS, DEV, IxC QUE ESTEN EN PUBLICO GENERAL
|
''AGREGAR LOS ANTICIPOS, DEV, IxC QUE ESTEN EN PUBLICO GENERAL
|
||||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing AndAlso UsuarioActual.CveEmpresa.Contiene(189, 190, 192, 195, 197) Then
|
'If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing AndAlso UsuarioActual.CveEmpresa.Contiene(189, 190, 192, 195, 197) Then
|
||||||
Dim CveClientePublicoGeneral = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
' Dim CveClientePublicoGeneral = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
|
||||||
If CveClientePublicoGeneral > 0 Then
|
' If CveClientePublicoGeneral > 0 Then
|
||||||
If CveCliente <> CveClientePublicoGeneral Then
|
' If CveCliente <> CveClientePublicoGeneral Then
|
||||||
If ObjMovtos.GetAnticiposNCIxCCliente(CveClientePublicoGeneral) Then
|
' If ObjMovtos.GetAnticiposNCIxCCliente(CveClientePublicoGeneral) Then
|
||||||
For Each DrGeneral As DataRow In ObjMovtos.DtResultados.Rows
|
' For Each DrGeneral As DataRow In ObjMovtos.DtResultados.Rows
|
||||||
Me.TmpDTAnticiposNCIxCCliente.Rows.Add(DrGeneral.ItemArray)
|
' Me.TmpDTAnticiposNCIxCCliente.Rows.Add(DrGeneral.ItemArray)
|
||||||
Next
|
' Next
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
ObjMovtos.Dispose()
|
ObjMovtos.Dispose()
|
||||||
|
|
||||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||||
@@ -1850,11 +1850,11 @@ Partial Class Ventas_PVCobranza
|
|||||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||||
For Each dr As DataRow In dtt.Rows
|
For Each dr As DataRow In dtt.Rows
|
||||||
Dim NumeroTelefono = "526621143532"
|
Dim NumeroTelefono = "526621143532"
|
||||||
'If EsProduccion Then
|
If EsProduccion Then
|
||||||
' NumeroTelefono = String.Format("52{0}", dr("Celular").ToString())
|
NumeroTelefono = String.Format("52{0}", dr("Celular").ToString())
|
||||||
'End If
|
End If
|
||||||
EnvioMsg = ModExtensiones.EnviarNotificacionWhatsApp2(NumeroTelefono, "", $"Solicitud de activación de anticipo.\\nFolio: {Folio}.\\nCliente: {NombreCliente}.")
|
EnvioMsg = ModExtensiones.EnviarNotificacionWhatsApp2(NumeroTelefono, "", $"Solicitud de activación de anticipo.\\nFolio: {Folio}.\\nCliente: {NombreCliente}.")
|
||||||
'ClsSisNotificaciones.EnviarAlerta("Solicitud de Anticipo", $"Solicitud de activación de anticipo Folio: {Folio} <br/><a href='/Ventas/Clientes.aspx?CveCliente={CveCliente}&op=ant'>Ir Activar</a>", dr("CveUsuario").ToString, Tipo:=TipoNotificacion.ToastInformacionB)
|
ClsSisNotificaciones.EnviarAlerta("Solicitud de Anticipo", $"Solicitud de activación de anticipo Folio: {Folio} <br/><a href='/Ventas/Clientes.aspx?CveCliente={CveCliente}&op=ant'>Ir Activar</a>", dr("CveUsuario").ToString, Tipo:=TipoNotificacion.ToastInformacionB)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -164,6 +164,18 @@
|
|||||||
<asp:TextBox ID="TxtOrdenCompra" runat="server" CssClass="form-control" Width="230px" Height="30px" style="padding: 0px"></asp:TextBox>
|
<asp:TextBox ID="TxtOrdenCompra" runat="server" CssClass="form-control" Width="230px" Height="30px" style="padding: 0px"></asp:TextBox>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr align="left" runat="server" id="TRVendedores" >
|
||||||
|
<td class="text-right"><b>Vendedor:</b></td>
|
||||||
|
<td>
|
||||||
|
<asp:DropDownList ID="DdlVendedor" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="228px" >
|
||||||
|
<asp:ListItem Selected="true" Text="Todos" Value="-1" ></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="text-right"></td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td style="text-align: center;" colspan="4">
|
<td style="text-align: center;" colspan="4">
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ Partial Class PopUpBuscarFolio
|
|||||||
CargaPS(-1)
|
CargaPS(-1)
|
||||||
'CargaCodigoCliente()
|
'CargaCodigoCliente()
|
||||||
|
|
||||||
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros("VendedorTipo = 1")
|
||||||
|
DdlVendedor.DataBind()
|
||||||
|
|
||||||
RegistraScript($"$('#{TxtFolio.ClientID}').focus();", "A1")
|
RegistraScript($"$('#{TxtFolio.ClientID}').focus();", "A1")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -138,7 +141,7 @@ Partial Class PopUpBuscarFolio
|
|||||||
Dim ObjVentas As New ClsVentas()
|
Dim ObjVentas As New ClsVentas()
|
||||||
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero,
|
If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero,
|
||||||
DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1),
|
DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1),
|
||||||
DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TopSelect:=100) Then
|
DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TopSelect:=100, CveVendedor:=DdlVendedor.SelectedValue.ToEntero) Then
|
||||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0)
|
||||||
GV.DataSource = ObjVentas.DtResultados
|
GV.DataSource = ObjVentas.DtResultados
|
||||||
|
|||||||
@@ -3345,12 +3345,10 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
Dim CvePS As Integer = GlobalDTPSSimplificado(CveEmpresaFranquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper).FiltroPrimeroValor("CvePS").ToEntero
|
||||||
If ObjPS.GetPS(-1, -1, CveEmpresaFranquicia, Codigo:=TxtCodigo.Text.Trim.ToUpper) Then
|
If CvePS > 0 Then
|
||||||
|
'Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero()
|
||||||
If ObjPS.DtResultados IsNot Nothing AndAlso ObjPS.DtResultados.Rows.Count = 1 Then
|
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
|
||||||
Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero()
|
|
||||||
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
|
|
||||||
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,
|
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,
|
||||||
EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveEmpresaFranquicia, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia,
|
EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveEmpresaFranquicia, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia,
|
||||||
AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
|
AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
|
||||||
@@ -3363,15 +3361,8 @@ Partial Class ProductosyServicios
|
|||||||
ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
|
ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
|
||||||
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked,
|
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked,
|
||||||
TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then
|
TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then
|
||||||
Return True
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
Alert(String.Format("El producto no existe en la franquicia: '{0}'", GlobalDTEmpresas(CveEmpresaFranquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert(String.Format("Se presento un error al consultar la existencia en la franquicia: '{0}'", GlobalDTEmpresas(CveEmpresaFranquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
Alert(String.Format("Se presento un error al consultar la existencia en la franquicia: '{0}'", GlobalDTEmpresas(CveEmpresaFranquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||||
Return True
|
Return True
|
||||||
|
|||||||
@@ -217,23 +217,23 @@
|
|||||||
<asp:BoundField HeaderText="Promoción" DataField="Promocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
|
<asp:BoundField HeaderText="Promoción" DataField="Promocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
|
||||||
<%--5--%>
|
<%--5--%>
|
||||||
<asp:BoundField HeaderText="P.U. Promoción" DataField="PUPromocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
|
<asp:BoundField HeaderText="P.U. Promoción" DataField="PUPromocion" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" />
|
||||||
|
|
||||||
<asp:BoundField HeaderText="Ultimo Costo" DataField="UltimoCosto" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" Visible="false" />
|
|
||||||
<asp:BoundField HeaderText="% Utilidad" DataField="UtilidadPorcentaje" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00}" ItemStyle-Width="10%" Visible="false" />
|
|
||||||
|
|
||||||
<%--6--%>
|
<%--6--%>
|
||||||
<asp:BoundField HeaderText="Condiciones" ItemStyle-HorizontalAlign="Center" DataField="AplicaRestriccionTexto" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="Ultimo Costo" DataField="UltimoCosto" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00##}" ItemStyle-Width="10%" Visible="false" />
|
||||||
<%--7--%>
|
<%--7--%>
|
||||||
<asp:BoundField HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" DataField="Clasificacion"/>
|
<asp:BoundField HeaderText="% Utilidad" DataField="UtilidadPorcentaje" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.00}" ItemStyle-Width="10%" Visible="false" />
|
||||||
<%--8--%>
|
<%--8--%>
|
||||||
<asp:BoundField HeaderText="Rin" ItemStyle-HorizontalAlign="Left" DataField="RinTamaño" Visible="false"/>
|
<asp:BoundField HeaderText="Condiciones" ItemStyle-HorizontalAlign="Center" DataField="AplicaRestriccionTexto" ItemStyle-Width="15%" />
|
||||||
<%--9--%>
|
<%--9--%>
|
||||||
|
<asp:BoundField HeaderText="Clasificacion" ItemStyle-HorizontalAlign="Left" DataField="Clasificacion"/>
|
||||||
|
<%--10--%>
|
||||||
|
<asp:BoundField HeaderText="Rin" ItemStyle-HorizontalAlign="Left" DataField="RinTamaño" Visible="false"/>
|
||||||
|
<%--11--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkGvDetalleEditar" runat="server" AlternateText="Editar" CausesValidation="False" CommandArgument='<%# Container.DataItemIndex%>' CommandName="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
<asp:LinkButton ID="LnkGvDetalleEditar" runat="server" AlternateText="Editar" CausesValidation="False" CommandArgument='<%# Container.DataItemIndex%>' CommandName="Editar" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%--10--%>
|
<%--12--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkGvDetalleEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
<asp:LinkButton ID="LnkGvDetalleEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||||
@@ -333,7 +333,7 @@
|
|||||||
<asp:Label Text="" ID="LbPUActual" runat="server" />
|
<asp:Label Text="" ID="LbPUActual" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row" runat="server" visible ="true" id="DVUltimoCostoCostoPromedio">
|
||||||
<label class="col-md-3 truncate">Ultimo Costo:</label>
|
<label class="col-md-3 truncate">Ultimo Costo:</label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<asp:Label Text="" ID="LblUltimoCosto" runat="server" />
|
<asp:Label Text="" ID="LblUltimoCosto" runat="server" />
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ Partial Class Ventas_Promociones
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property TempDTOrigial As DataTable
|
Private Property TempDTOriginal As DataTable
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("TempDTOrigial"), DataTable)
|
Return CType(ViewState("TempDTOriginal"), DataTable)
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
ViewState("TempDTOrigial") = value
|
ViewState("TempDTOriginal") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -146,8 +146,6 @@ Partial Class Ventas_Promociones
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
@@ -176,8 +174,7 @@ Partial Class Ventas_Promociones
|
|||||||
CargaDatos()
|
CargaDatos()
|
||||||
LnkAgrgarPlantillaPS.Visible = False
|
LnkAgrgarPlantillaPS.Visible = False
|
||||||
|
|
||||||
|
'ValidaPromociones(False)
|
||||||
ValidaPromosiones(False)
|
|
||||||
If EmpresaGrupoDiaz Then
|
If EmpresaGrupoDiaz Then
|
||||||
|
|
||||||
If ChkEstatus.Checked = False AndAlso BloqueadoPromocionPorcentaje AndAlso Not PermisoAutorizPromocionPorcentaje Then
|
If ChkEstatus.Checked = False AndAlso BloqueadoPromocionPorcentaje AndAlso Not PermisoAutorizPromocionPorcentaje Then
|
||||||
@@ -187,7 +184,6 @@ Partial Class Ventas_Promociones
|
|||||||
If ChkEstatus.Checked = True And Not PermisoAutorizPromocionPorcentaje Then
|
If ChkEstatus.Checked = True And Not PermisoAutorizPromocionPorcentaje Then
|
||||||
BtnGuardar.Visible = False
|
BtnGuardar.Visible = False
|
||||||
ButBtnEliminar.Visible = False
|
ButBtnEliminar.Visible = False
|
||||||
'UpBotones.Update()
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -198,6 +194,12 @@ Partial Class Ventas_Promociones
|
|||||||
CreaDT()
|
CreaDT()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If EmpresaGrupoDiaz AndAlso Not PermisoAutorizPromocionPorcentaje Then
|
||||||
|
DVUltimoCostoCostoPromedio.Visible = False
|
||||||
|
GvDatos.Columns(6).Visible = False
|
||||||
|
GvDatos.Columns(7).Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
CargaGvBitacora()
|
CargaGvBitacora()
|
||||||
|
|
||||||
|
|
||||||
@@ -346,7 +348,7 @@ Partial Class Ventas_Promociones
|
|||||||
TempDT.Columns.Add("UtilidadPorcentaje", GetType(Decimal))
|
TempDT.Columns.Add("UtilidadPorcentaje", GetType(Decimal))
|
||||||
|
|
||||||
|
|
||||||
TempDTOrigial = TempDT.Copy
|
TempDTOriginal = TempDT.Copy
|
||||||
|
|
||||||
'366 Estatus
|
'366 Estatus
|
||||||
'367 CvePS
|
'367 CvePS
|
||||||
@@ -419,7 +421,7 @@ Partial Class Ventas_Promociones
|
|||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
If ObjVentas.GetPromociones(CvePromocion, "-1", -1, -1, -1, UsuarioActual.CveEmpresa, -1) AndAlso ObjVentas.DtResultados.Rows.Count = 1 Then
|
If ObjVentas.GetPromociones(CvePromocion, MinFecha, -1, -1, -1, UsuarioActual.CveEmpresa, -1) AndAlso ObjVentas.DtResultados.Rows.Count = 1 Then
|
||||||
Dim Dr As DataRow = ObjVentas.DtResultados.Rows(0)
|
Dim Dr As DataRow = ObjVentas.DtResultados.Rows(0)
|
||||||
TxtPromocion.Text = Dr("Promocion").ToString
|
TxtPromocion.Text = Dr("Promocion").ToString
|
||||||
TxtFechaI.Text = Dr("FechaInicio").ToString.ToDate.ToShortDateString
|
TxtFechaI.Text = Dr("FechaInicio").ToString.ToDate.ToShortDateString
|
||||||
@@ -438,11 +440,6 @@ Partial Class Ventas_Promociones
|
|||||||
Else
|
Else
|
||||||
DdlClientes.SelectedValue = Dr("CveCliente").ToString
|
DdlClientes.SelectedValue = Dr("CveCliente").ToString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ChkEstatus.Checked = If(Dr("Estatus").ToString = "True", True, False)
|
ChkEstatus.Checked = If(Dr("Estatus").ToString = "True", True, False)
|
||||||
@@ -455,12 +452,12 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
If ObjVentas.GetPromocionesDetalle(CvePromocion, UsuarioActual.CveEmpresa) Then
|
If ObjVentas.GetPromocionesDetalle(CvePromocion, UsuarioActual.CveEmpresa) Then
|
||||||
TempDT = ObjVentas.DtResultados.Copy
|
TempDT = ObjVentas.DtResultados.Copy
|
||||||
TempDTOrigial = ObjVentas.DtResultados.Copy
|
TempDTOriginal = ObjVentas.DtResultados.Copy
|
||||||
CargaGrid()
|
CargaGrid()
|
||||||
Else
|
Else
|
||||||
Alert("Ocurrió un error al consultar los detalles de la promoción. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al consultar los detalles de la promoción. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
CargaGvBitacora()
|
||||||
Else
|
Else
|
||||||
Alert("Ocurrió un error al consultar la promoción. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al consultar la promoción. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
@@ -480,7 +477,6 @@ Partial Class Ventas_Promociones
|
|||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaMonedas()
|
Private Sub CargaMonedas()
|
||||||
DdlMoneda.DataSource = GlobalDTMonedas
|
DdlMoneda.DataSource = GlobalDTMonedas
|
||||||
DdlMoneda.DataBind()
|
DdlMoneda.DataBind()
|
||||||
@@ -633,8 +629,6 @@ Partial Class Ventas_Promociones
|
|||||||
Dr("UltimoCosto") = UltimoCosto
|
Dr("UltimoCosto") = UltimoCosto
|
||||||
Dr("CostoPromedio") = CostoPromedio
|
Dr("CostoPromedio") = CostoPromedio
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If UltimoCosto > 0 Then
|
If UltimoCosto > 0 Then
|
||||||
|
|
||||||
Dim Promocion As Decimal = TxtPromocionConcepto.Text.ToDecimal
|
Dim Promocion As Decimal = TxtPromocionConcepto.Text.ToDecimal
|
||||||
@@ -654,12 +648,6 @@ Partial Class Ventas_Promociones
|
|||||||
Dr("UtilidadPorcentaje") = 0.0D
|
Dr("UtilidadPorcentaje") = 0.0D
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If CveConsecutivo >= 0 Then
|
If CveConsecutivo >= 0 Then
|
||||||
Dr.AcceptChanges()
|
Dr.AcceptChanges()
|
||||||
Else
|
Else
|
||||||
@@ -669,20 +657,18 @@ Partial Class Ventas_Promociones
|
|||||||
CargaGrid()
|
CargaGrid()
|
||||||
RegistraScript("$('#DivAgregar').modal('hide')")
|
RegistraScript("$('#DivAgregar').modal('hide')")
|
||||||
|
|
||||||
ValidaPromosiones(True)
|
ValidaPromociones(True)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub ValidaPromosiones(Bloquear As Boolean)
|
Private Sub ValidaPromociones(Bloquear As Boolean)
|
||||||
|
|
||||||
|
|
||||||
If Not EmpresaGrupoDiaz Then
|
If Not EmpresaGrupoDiaz Then
|
||||||
BloqueadoPromocionPorcentaje = False
|
BloqueadoPromocionPorcentaje = False
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim DTPSUltimoCosto = New DataTable
|
Dim DTPSUltimoCosto = New DataTable
|
||||||
|
|
||||||
Dim ObjInv As New ClsInventarios
|
Dim ObjInv As New ClsInventarios
|
||||||
@@ -691,8 +677,6 @@ Partial Class Ventas_Promociones
|
|||||||
End If
|
End If
|
||||||
ObjInv.Dispose()
|
ObjInv.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If PorMinMasCostoVentaFnc129 > 0 Then
|
If PorMinMasCostoVentaFnc129 > 0 Then
|
||||||
|
|
||||||
For Each dRow As DataRow In TempDT.Rows
|
For Each dRow As DataRow In TempDT.Rows
|
||||||
@@ -724,11 +708,9 @@ Partial Class Ventas_Promociones
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
BloqueadoPromocionPorcentaje = True
|
BloqueadoPromocionPorcentaje = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -736,7 +718,6 @@ Partial Class Ventas_Promociones
|
|||||||
ChkEstatus.Checked = False
|
ChkEstatus.Checked = False
|
||||||
ChkEstatus.Enabled = False
|
ChkEstatus.Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpGenerales.Update()
|
UpGenerales.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -751,7 +732,6 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " GV PS "
|
#Region " GV PS "
|
||||||
Private Sub GvDatos_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvDatos.RowCommand
|
Private Sub GvDatos_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvDatos.RowCommand
|
||||||
|
|
||||||
@@ -835,7 +815,7 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ValidaPromosiones(True)
|
ValidaPromociones(True)
|
||||||
|
|
||||||
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
@@ -950,7 +930,7 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim Dr2 As DataRow = TempDTOrigial.FiltraParametros($"CvePromocionDetalle = {Dr("CvePromocionDetalle").ToString}").Rows(0)
|
Dim Dr2 As DataRow = TempDTOriginal.FiltraParametros($"CvePromocionDetalle = {Dr("CvePromocionDetalle").ToString}").Rows(0)
|
||||||
|
|
||||||
If Not TieneError And Dr("CvePS").ToString <> Dr2("CvePS").ToString Then
|
If Not TieneError And Dr("CvePS").ToString <> Dr2("CvePS").ToString Then
|
||||||
If Not ObjGral.AddHistorialBitacora(367, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr("CodigoPS").ToString, Dr2("CodigoPS").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
|
If Not ObjGral.AddHistorialBitacora(367, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Dr("CodigoPS").ToString, Dr2("CodigoPS").ToString, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, "Se elimino " & Dr("CodigoPS").ToString, "PS", "", CvePromocion:=CvePromocion) Then
|
||||||
@@ -1271,14 +1251,12 @@ Partial Class Ventas_Promociones
|
|||||||
Dim contenido As Byte() = System.IO.File.ReadAllBytes(rutaArchivoPlantilla)
|
Dim contenido As Byte() = System.IO.File.ReadAllBytes(rutaArchivoPlantilla)
|
||||||
Response.BinaryWrite(contenido)
|
Response.BinaryWrite(contenido)
|
||||||
|
|
||||||
|
|
||||||
Response.Flush()
|
Response.Flush()
|
||||||
Response.End()
|
Response.End()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub BrnAgregarPlantilla_Click(sender As Object, e As EventArgs)
|
Protected Sub BrnAgregarPlantilla_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||||
@@ -1374,15 +1352,13 @@ Partial Class Ventas_Promociones
|
|||||||
CargaGrid()
|
CargaGrid()
|
||||||
RegistraScript("$('#DivAgregarPlantilla').modal('hide')")
|
RegistraScript("$('#DivAgregarPlantilla').modal('hide')")
|
||||||
|
|
||||||
ValidaPromosiones(True)
|
ValidaPromociones(True)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ValidaDTPlantilla(ByRef DTPlantilla As DataTable) As Boolean
|
Private Function ValidaDTPlantilla(ByRef DTPlantilla As DataTable) As Boolean
|
||||||
|
|
||||||
Dim Errores As New StringBuilder
|
Dim Errores As New StringBuilder
|
||||||
|
|
||||||
|
|
||||||
DTPlantilla.Columns.Add("CveClasificacion", GetType(Integer))
|
DTPlantilla.Columns.Add("CveClasificacion", GetType(Integer))
|
||||||
DTPlantilla.Columns.Add("CvePS", GetType(Integer))
|
DTPlantilla.Columns.Add("CvePS", GetType(Integer))
|
||||||
DTPlantilla.Columns.Add("CveTipoPromosicion", GetType(Integer))
|
DTPlantilla.Columns.Add("CveTipoPromosicion", GetType(Integer))
|
||||||
@@ -1396,13 +1372,13 @@ Partial Class Ventas_Promociones
|
|||||||
|
|
||||||
Dim DTPS As DataTable = New DataTable
|
Dim DTPS As DataTable = New DataTable
|
||||||
Dim DTRines As DataTable = New DataTable
|
Dim DTRines As DataTable = New DataTable
|
||||||
Dim ObjPS As New ClsProductosServicios
|
'Dim ObjPS As New ClsProductosServicios
|
||||||
If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then
|
'If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
DTPS = ObjPS.DtResultados
|
' DTPS = ObjPS.DtResultados
|
||||||
End If
|
'End If
|
||||||
ObjPS.Dispose()
|
'ObjPS.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
DTPS = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||||
DTRines = GlobalDTPSRinTamaños(UsuarioActual.CveEmpresa)
|
DTRines = GlobalDTPSRinTamaños(UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim RegistroActual As Integer = 1
|
Dim RegistroActual As Integer = 1
|
||||||
@@ -1436,7 +1412,6 @@ Partial Class Ventas_Promociones
|
|||||||
If ClasificacionStr.Length > 0 And CodigoStr.Length > 0 Then
|
If ClasificacionStr.Length > 0 And CodigoStr.Length > 0 Then
|
||||||
SBErrorRegistro.Append($"No se puede agregar Clasificación y codigo en un mismo registro. ")
|
SBErrorRegistro.Append($"No se puede agregar Clasificación y codigo en un mismo registro. ")
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If ClasificacionStr.Length > 0 Then
|
If ClasificacionStr.Length > 0 Then
|
||||||
SBErrorRegistro.Append(If(CveClasificacion > 0, "", $"No se encontro Clasificación '{ClasificacionStr}'. </br>"))
|
SBErrorRegistro.Append(If(CveClasificacion > 0, "", $"No se encontro Clasificación '{ClasificacionStr}'. </br>"))
|
||||||
Else
|
Else
|
||||||
@@ -1513,9 +1488,7 @@ Partial Class Ventas_Promociones
|
|||||||
LblCostoPromedio.Text = DTPSUltimoCosto.FiltroPrimeroValor("CostoPromedio", "").FormatoNumero(4)
|
LblCostoPromedio.Text = DTPSUltimoCosto.FiltroPrimeroValor("CostoPromedio", "").FormatoNumero(4)
|
||||||
LbPUActual.Text = DTPSUltimoCosto.FiltroPrimeroValor("Importe", "").FormatoNumero(4)
|
LbPUActual.Text = DTPSUltimoCosto.FiltroPrimeroValor("Importe", "").FormatoNumero(4)
|
||||||
|
|
||||||
|
|
||||||
UpAgregar.Update()
|
UpAgregar.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user