Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -259,6 +259,35 @@ Public Class ClsFinanzas
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function GetRazonesFinancierasBalanceGeneralRep(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Finan_RF_BalanceGeneralRepGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||
.Add("@Periodo", SqlDbType.Int).Value = Periodo
|
||||
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al consultar el Reporte Balance General.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function GetRazonesFinancierasEstadoResultadosRep(FechaI As Date, FechaF As Date, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Finan_RF_EstadoResultadosRepGet")
|
||||
|
||||
@@ -6041,7 +6041,8 @@ Public Class ClsPaginas
|
||||
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 163) Then
|
||||
Dim QRDescarga As String = ""
|
||||
Dim cfdi As New RVCFDI33.GeneraCFDI()
|
||||
Dim b As Byte() = cfdi.ConvertirQrCode($"http://econollantas.adssistemas.mx/Ashx/E141.ashx?P={Encripta($"File={Vta.SerieFolio}.pdf")}")
|
||||
Dim Parametros As String = Encripta($"CveVenta={Vta.CveVenta}&CveEmpresa={Vta.CveEmpresa}")
|
||||
Dim b As Byte() = cfdi.ConvertirQrCode($"http://econollantas.adssistemas.mx/Ashx/E141.ashx?PV={Parametros}")
|
||||
QRDescarga = Convert.ToBase64String(b)
|
||||
params.Add(New ReportParameter("QRDescarga", QRDescarga))
|
||||
End If
|
||||
|
||||
@@ -3324,27 +3324,12 @@ Namespace Modelos
|
||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||
End If
|
||||
|
||||
''código fijo en base el porcentaje iva, que se afecten las clasificaciones
|
||||
'For i = 0 To TmpDTDetalle.Rows.Count - 1
|
||||
|
||||
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
|
||||
' If Not TmpDTDetalle(i)("CveClasificacion").ToString.Contiene("19958", "19933") Then
|
||||
|
||||
' 'reclasifica la clasificación del producto, por la del ingreso correspondiente a su iva
|
||||
' If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows.Count > 0 Then
|
||||
' TmpDTDetalle(i)("CveClasificacion") = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString.ToDecimal).Rows(0)("CveClasificacion").ToString
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
'Next
|
||||
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal) * ValorMultiplicador)
|
||||
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} AND CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString.ToDecimal) * ValorMultiplicador)
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString.ToEntero > 0, ClsPaginas.GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}"), "")} - {If(Row2("CveSubProyecto").ToString.ToEntero > 0, ClsPaginas.GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString}"), "Sin SubProyecto Asignado")}"
|
||||
@@ -3388,37 +3373,12 @@ Namespace Modelos
|
||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||
End If
|
||||
|
||||
'If UsuarioActual.CveEmpresa = 119 Then
|
||||
|
||||
' 'código fijo en base el porcentaje iva, que se afecten las clasificaciones
|
||||
' For i = 0 To TmpDTDetalle.Rows.Count - 1
|
||||
|
||||
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
|
||||
' If Not TmpDTDetalle(i)("CveClasificacion").ToString.Contiene("19958", "19933", "20242") Then
|
||||
|
||||
' If ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows.Count > 0 Then
|
||||
' TmpDTDetalle(i)("CveClasificacion") = ClsPaginas.GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows(0)("CveClasificacion").ToString
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
'End If
|
||||
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString.ToDecimal) * ValorMultiplicador)
|
||||
|
||||
'If ObjFactura.TipoDocto = "Egs" Then
|
||||
' importeMovimiento += (TmpDTDetalle.SUM("ImporteIVA", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
||||
' importeMovimiento += (TmpDTDetalle.SUM("ImporteIEPS", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
||||
' importeMovimiento -= (TmpDTDetalle.SUM("ImporteRetIVA", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
||||
' importeMovimiento -= (TmpDTDetalle.SUM("ImporteRetISR", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
||||
'End If
|
||||
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} AND CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString.ToDecimal) * ValorMultiplicador)
|
||||
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
|
||||
@@ -865,7 +865,7 @@ Public Class Timbrado
|
||||
<usuario xmlns="""">{UsuarioServicio}</usuario>
|
||||
<passwd xmlns="""">{PassServicio}</passwd>
|
||||
<rfcEmisor xmlns="""">{rfcEmisor}</rfcEmisor>
|
||||
<arregloUUID xmlns="""">{arregloUUID}|{rfcReceptor}|{rfcEmisor}|{Total}|{MotivoCancelacion}|{FolioSustitucion}</arregloUUID>
|
||||
<arregloUUID xmlns="""">{arregloUUID}|{rfcReceptor.ToEscapeXML()}|{rfcEmisor.ToEscapeXML()}|{Total}|{MotivoCancelacion}|{FolioSustitucion}</arregloUUID>
|
||||
<cert xmlns="""">{certBase64}</cert>
|
||||
<key xmlns="""">{keyBase64}</key>
|
||||
<keyPass xmlns="""">{keyPass}</keyPass>
|
||||
|
||||
@@ -3960,6 +3960,19 @@ Namespace Extensiones
|
||||
|
||||
Return text
|
||||
End Function
|
||||
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Function ToEscapeXML(ByVal str As String) As String
|
||||
Dim text As String = ""
|
||||
|
||||
text = str.Replace("'", "'")
|
||||
text = str.Replace("<", "<")
|
||||
text = str.Replace(">", ">")
|
||||
text = str.Replace("&", "&")
|
||||
|
||||
Return text
|
||||
End Function
|
||||
End Module
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -7498,6 +7498,8 @@ Partial Class Compras_Compras
|
||||
'5, 305, 306, 311
|
||||
If importeMovimiento <> 0 Or (CveConceptoOriginal = 5 AndAlso DdlTipoComprobante.SelectedValue.Contiene("Fac", "Ant")) Or (ConceptoContable.Contiene(18) AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso Not GuardoConcepto18) Then
|
||||
'Conta ContPAQ
|
||||
|
||||
|
||||
If IdCtaContable = 0 Then
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||
idCuentaContabilizacion = 0
|
||||
@@ -8046,13 +8048,6 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 4) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Compras/Compras-Guardar | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorPrepolizaDescuadre = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'ACTUALIZA CVEFACTURA
|
||||
If Request("CveFactura") IsNot Nothing Then
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -50,10 +50,27 @@
|
||||
<div class="col-md-1" runat="server" id="LiEjercicioDdl2" visible="True">
|
||||
<asp:DropDownList ID="DdlEjercicio2" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100%" AutoPostBack="true" OnSelectedIndexChanged="DdlEjercicio2_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl" >Periodo: </label>
|
||||
<div class="col-md-2 " runat="server" id="LiPeriodoDdl">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="150px" CssClass="select2me">
|
||||
<asp:ListItem Text="Enero" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||
<asp:ListItem Text="Diciembre" Value="12" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2">
|
||||
<asp:Label runat="server" ID="LblSubProyecto" CssClass="col-md-1" Visible="false">SubProyecto:</asp:Label>
|
||||
<div class="col-md-2" runat="server" visible="false">
|
||||
<asp:DropDownList ID="DdlSubproyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="95%" AutoPostBack="True">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
@@ -77,13 +94,158 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpGeneral" UpdateMode="Always">
|
||||
<ContentTemplate>
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" OnActiveTabChanged="Tab_ActiveTabChanged" >
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%" >
|
||||
|
||||
<ajax:TabPanel ID="TabBalanceGeneral" runat="server" HeaderText="Balance General">
|
||||
<ajax:TabPanel ID="TabBalanceGeneral" runat="server" HeaderText="Balance General" >
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" ID="UpBalanceGeneral" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
<asp:GridView ID="GvBalanceGeneral" runat="server" AutoGenerateColumns="false" DataKeyNames="Codigo,Tipo" OnRowDataBound="GvBalanceGeneral_RowDataBound" Width="60%"
|
||||
EmptyDataText="No se encontraron registros"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-sort="true"
|
||||
Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ControlStyle-Width="40px">
|
||||
<HeaderTemplate>Codigo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label CssClass="truncate" ID="LblCodigo" runat="server" Text='<%# Eval("Codigo") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ControlStyle-Width="300px">
|
||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label CssClass="truncate" ID="LblNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
|
||||
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
<asp:BoundField DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-CssClass="ceros" ItemStyle-Width="75px" />
|
||||
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
@@ -96,7 +258,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GVEstadoRsultados" runat="server" AutoGenerateColumns="false" DataKeyNames="Codigo,Tipo" OnRowDataBound="GVEstadoRsultados_RowDataBound" Width="60%"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Personal"
|
||||
EmptyDataText="No se encontraron registros"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-sort="true"
|
||||
Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
@@ -240,13 +402,13 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabRatios" runat="server" HeaderText="Ratios">
|
||||
<ajax:TabPanel ID="TabRatios" runat="server" HeaderText="Ratios" >
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" ID="UpRatios" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GVRatios" runat="server" AutoGenerateColumns="false" DataKeyNames="Ratio,Tipo,EsPorcentaje" OnRowDataBound="GVRatios_RowDataBound" Width="60%"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Personal"
|
||||
<asp:GridView ID="GVRatios" runat="server" AutoGenerateColumns="false" DataKeyNames="Ratio,Tipo,EsPorcentaje,Formula" OnRowDataBound="GVRatios_RowDataBound" Width="60%"
|
||||
EmptyDataText="No se encontraron registros"
|
||||
CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-sort="true"
|
||||
Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
@@ -35,6 +35,7 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
Tab.ActiveTabIndex = 0
|
||||
|
||||
CargaEjercicios()
|
||||
|
||||
@@ -50,25 +51,6 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
|
||||
|
||||
|
||||
Protected Sub Tab_ActiveTabChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If Tab.TabIndex = 0 Then 'Balance General
|
||||
|
||||
End If
|
||||
|
||||
If Tab.ActiveTabIndex = 1 Then 'Estado de Resultados
|
||||
|
||||
End If
|
||||
|
||||
If Tab.ActiveTabIndex = 2 Then 'Ratios
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
UpFiltros.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlEjercicio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -146,12 +128,102 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
|
||||
|
||||
|
||||
#Region "ESTADO RESULTADOS"
|
||||
#Region "ESTADO BALANCE GENERAL"
|
||||
|
||||
|
||||
|
||||
Private Sub CargaDatosBalanceGeneral()
|
||||
|
||||
LnkExportar.Visible = False
|
||||
GvBalanceGeneralOcultarColumnas(GvBalanceGeneral, 1)
|
||||
|
||||
Dim FechaI = New Date(DdlEjercicio.SelectedValue.ToEntero, 1, 1)
|
||||
Dim FechaF = New Date(DdlEjercicio2.SelectedValue.ToEntero, 1, 1)
|
||||
|
||||
|
||||
Dim CveSubProyecto = DdlSubproyecto.SelectedValue.ToEntero
|
||||
|
||||
|
||||
Dim objFinanzas As New ClsFinanzas
|
||||
Dim dtTemp As New DataTable
|
||||
|
||||
If objFinanzas.GetRazonesFinancierasBalanceGeneralRep(FechaI, FechaF, -1, CveSubProyecto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, 1, DdlPeriodo.SelectedValue.ToEntero) Then
|
||||
dtTemp = objFinanzas.DtResultados
|
||||
|
||||
GvBalanceGeneralMostrarColumnas(dtTemp, GvBalanceGeneral)
|
||||
GvBalanceGeneral.DataSource = dtTemp
|
||||
|
||||
If dtTemp.Rows.Count > 0 Then
|
||||
' LnkExportar.Visible = True
|
||||
End If
|
||||
|
||||
Else
|
||||
GvBalanceGeneral.DataSource = Nothing
|
||||
End If
|
||||
|
||||
objFinanzas.Dispose()
|
||||
GvBalanceGeneral.DataBind()
|
||||
|
||||
UpBalanceGeneral.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvBalanceGeneralOcultarColumnas(ByRef Gv As GridView, Optional index As Integer = 2)
|
||||
|
||||
For index = 2 To Gv.Columns.Count - 1
|
||||
CType(Gv.Columns(index), BoundField).DataField = Nothing
|
||||
Gv.Columns(index).Visible = False
|
||||
Next
|
||||
UpBalanceGeneral.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub GvBalanceGeneralMostrarColumnas(dt As DataTable, ByRef Gv As GridView)
|
||||
Dim index = 1
|
||||
|
||||
|
||||
For index = 1 To dt.Columns.Count - 5
|
||||
CType(Gv.Columns(index + 4), BoundField).DataField = dt.Columns(index + 4).ColumnName
|
||||
Gv.Columns(index + 4).Visible = True
|
||||
|
||||
CType(Gv.Columns(index + 4), BoundField).HeaderText = dt.Columns(index + 4).ColumnName
|
||||
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Protected Sub GvBalanceGeneral_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DataKey("Tipo").ToEntero = 1 Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(0).Text = ""
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Tipo").ToEntero = 3 Then
|
||||
e.Row.FCLabel("LblNombre").Text = $" {e.Row.FCLabel("LblNombre").Text}"
|
||||
e.Row.Attributes.Add("style", "border-top: 1px solid #000;")
|
||||
e.Row.Cells(0).Text = ""
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Tipo").ToEntero = 4 Then
|
||||
e.Row.Attributes.Add("style", "border-top: solid;border-bottom: solid")
|
||||
e.Row.Cells(0).Text = ""
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "ESTADO RESULTADOS"
|
||||
|
||||
|
||||
|
||||
Private Sub CargaDatosEstadoResultados()
|
||||
|
||||
|
||||
@@ -170,7 +242,7 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
Dim objFinanzas As New ClsFinanzas
|
||||
Dim dtTemp As New DataTable
|
||||
|
||||
If objFinanzas.GetRazonesFinancierasEstadoResultadosRep(FechaI, FechaF, -1, CveSubProyecto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, 1, 12) Then
|
||||
If objFinanzas.GetRazonesFinancierasEstadoResultadosRep(FechaI, FechaF, -1, CveSubProyecto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, 1, DdlPeriodo.SelectedValue.ToEntero) Then
|
||||
dtTemp = objFinanzas.DtResultados
|
||||
|
||||
GVEstadoRsultadosMostrarColumnas(dtTemp, GVEstadoRsultados)
|
||||
@@ -227,6 +299,7 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
|
||||
If e.Row.DataKey("Tipo").ToEntero = 3 Then
|
||||
e.Row.FCLabel("LblNombre").Text = $" {e.Row.FCLabel("LblNombre").Text}"
|
||||
e.Row.Cells(0).Text = ""
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Tipo").ToEntero = 4 Then
|
||||
@@ -266,7 +339,7 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
Dim objFinanzas As New ClsFinanzas
|
||||
|
||||
|
||||
If objFinanzas.GetRazonesFinancierasRatiosRep(FechaI, FechaF, -1, CveSubProyecto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, 1, 12) Then
|
||||
If objFinanzas.GetRazonesFinancierasRatiosRep(FechaI, FechaF, -1, CveSubProyecto, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, 1, DdlPeriodo.SelectedValue.ToEntero) Then
|
||||
DTRatios = objFinanzas.DtResultados
|
||||
|
||||
GVRatiosMostrarColumnas(DTRatios, GVRatios)
|
||||
@@ -297,26 +370,15 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
End Sub
|
||||
|
||||
Private Sub GVRatiosMostrarColumnas(dt As DataTable, ByRef Gv As GridView)
|
||||
Dim index = 3
|
||||
Dim index = 4
|
||||
|
||||
|
||||
For index = 3 To dt.Columns.Count - 2
|
||||
For index = 4 To dt.Columns.Count - 2
|
||||
CType(Gv.Columns(index + 1), BoundField).DataField = dt.Columns(index + 1).ColumnName
|
||||
'CType(Gv.Columns(index + 1), BoundField).DataFormatString = "{0:P2}"
|
||||
Gv.Columns(index + 1).Visible = True
|
||||
CType(Gv.Columns(index + 1), BoundField).HeaderText = dt.Columns(index + 1).ColumnName
|
||||
Next
|
||||
|
||||
'Dim Count As Integer = 1
|
||||
'For Each GvColumn As DataGridViewColumn In GVRatios.Columns
|
||||
|
||||
|
||||
' GvColumn.Width = If(Count = 1, 300, 75)
|
||||
|
||||
' Count = Count + 1
|
||||
'Next
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
@@ -342,20 +404,23 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
Dim EsPorcentaje = If(e.Row.DataKey("EsPorcentaje").ToEntero = 1, True, False)
|
||||
|
||||
For x = 1 To DTRatios.Columns.Count - 2
|
||||
|
||||
'If e.Row.Cells(x).Text.ToDecimal = 0 Then
|
||||
' e.Row.Cells(x).Text = ""
|
||||
'Else
|
||||
If EsPorcentaje Then
|
||||
e.Row.Cells(x).Text = $"{(e.Row.Cells(x).Text.ToDecimal * 100.0).ToString("###.00")}%"
|
||||
e.Row.Cells(x).Text = $"{(e.Row.Cells(x).Text.ToDecimal * 100.0).ToString("###,####,###.00")}%"
|
||||
Else
|
||||
e.Row.Cells(x).Text = $"{e.Row.Cells(x).Text.ToDecimal.ToString("###,###,###.00")}"
|
||||
End If
|
||||
'End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
If e.Row.DataKey("Formula").Trim().Length > 0 Then
|
||||
|
||||
'data-html="true" data-toggle="tooltip" data-placement="left" title="Agregar<br/>Familiares"
|
||||
e.Row.Attributes.Add("data-html", "true")
|
||||
e.Row.Attributes.Add("data-toggle", "tooltip")
|
||||
e.Row.Attributes.Add("data-placement", "top")
|
||||
e.Row.Attributes.Add("title", $"{e.Row.DataKey("Formula").Trim()}")
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
@@ -365,12 +430,6 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "DESCARGA EXCEL"
|
||||
|
||||
|
||||
@@ -426,5 +485,7 @@ Partial Class Finanzas_RepRazonesFinancieras2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
<asp:HyperLink ID="HypPDFSTimbrados" Visible="false" onclick="GETPDF(-1,0)" NavigateUrl="#" runat="server"><i class="fa fa-download" aria-hidden="true"></i>Recibos timbrados</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkOpenCancelarTimbre" OnClick="LnkOpenCancelarTimbre_Click" runat="server"><i class="fa fa-download"></i> CancelarTimbre</asp:LinkButton>
|
||||
<%--<asp:LinkButton ID="LnkOpenCancelarTimbre" OnClick="LnkOpenCancelarTimbre_Click" runat="server"><i class="fa fa-download"></i> CancelarTimbre</asp:LinkButton>--%>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -413,7 +413,7 @@
|
||||
DataTextField="TipoTrabajadorB" DataValueField="CveTipoTrabajador" ValidationGroup="GrpGuardar">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-md-1 compoonenlabel" style="line-height: 1; max-width: 65px;">Finiquito:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="ddlfiniquito" runat="server" Style="width: 100% !important;" CssClass="select2me">
|
||||
@@ -953,6 +953,45 @@
|
||||
</li>--%>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="btn-group ">
|
||||
<a class="btn yellow-gold btn-sm" href="javascript:;" data-toggle="dropdown" data-hover="dropdown" data-close-others="true" aria-expanded="true">Acciones
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li>
|
||||
|
||||
<asp:HyperLink ID="HypXmlSobreRecibo" ToolTip="Formato xml" Visible="false" CssClass="" NavigateUrl="#" runat="server"><i class="fa fa-file-o"></i>XML</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HyppdfSobreRecibo" ToolTip="Formato Timbre" CssClass="" Visible="false" NavigateUrl="#" runat="server"><i class="fa fa-file-pdf-o"></i>PDF</asp:HyperLink>
|
||||
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAutorizarSobreRecibo" OnClick="LnkAutorizarSobreRecibo_Click" Text="<i class='fa fa-thumbs-up'></i> Autorizar" runat="server"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkTimbrarSobreRecibo" OnClick="LnkTimbrarSobreRecibo_Click" Text="<i class='fa fa-bell'></i> Timbrar" runat="server"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkdesautorizarSobreRecibo" OnClick="LnkdesautorizarSobreRecibo_Click" Text="<i class='fa fa-ban'></i> DesAutorizar" runat="server"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDeleteSobreRecibo" OnClick="LnkDeleteSobreRecibo_Click" Text="<i class='icon-trash'></i> Eliminar" runat="server"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkReenviarCorreoSobreRecibo" OnClick="LnkReenviarCorreoSobreRecibo_Click" Text="<i class='fa fa-envelope-o'></i> Reenviar correo" runat="server"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCancelarSobreRecibo" OnClick="LnkCancelarSobreRecibo_Click" Text="<i class='fa fa-ban'></i> Cancelar Timbre" runat="server"></asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body " style="padding: 0px;">
|
||||
@@ -1818,12 +1857,20 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<%# Eval("DiasAutorizados")%>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<label class="btn btn-circle btn-sm btn-xs green mysmallbtn"><i class="fa fa-pencil"></i></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:LinkButton>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText=" " ControlStyle-Width="28" HeaderStyle-Width="28" ItemStyle-Width="28">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" OnClick="LnkPersonalIncapacidad_Click" data-toggle="tooltip" title="Editar" style="width:24px !important" CssClass="btn btn-circle btn-sm btn-xs green mysmallbtn"><i class="fa fa-pencil"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText=" " ControlStyle-Width="28" HeaderStyle-Width="28" ItemStyle-Width="28">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" OnClick="LnkPersonalIncapacidadRemove_Click" style="width:24px !important" CssClass="btn btn-circle btn-sm btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la Incapacidad?" data-btn-ok-label="si"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
@@ -2381,8 +2428,13 @@
|
||||
|
||||
|
||||
|
||||
<asp:GridView ID="GVNominaPendiente" runat="server" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas"
|
||||
Style="text-align: center;" GridLines="None" data-rows="2" data-heighterror="500" ShowHeaderWhenEmpty="true" ShowHeader="true" AutoGenerateColumns="false">
|
||||
<div style="text-align: right;">
|
||||
<input type="text" id="TxtBusquedaNPT" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaNPT','{0}')", GVNominaPendiente.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaNPT','{0}')", GVNominaPendiente.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm font-bold yellow-gold"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVNominaPendiente" runat="server" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas" DataKeyNames="CvePeriodo,CvePersonal,CveNomina"
|
||||
Style="text-align: center;" GridLines="None" data-rows="1" data-heighterror="500" ShowHeaderWhenEmpty="true" ShowHeader="true" AutoGenerateColumns="false"
|
||||
OnRowDataBound="GVNominaPendiente_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Código">
|
||||
<ItemTemplate>
|
||||
@@ -2404,6 +2456,14 @@
|
||||
<asp:Label runat="server" Text='<%# Eval("PeriodoTipe")%>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-CssClass="text-left">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HypXml" ToolTip="Formato xml" Visible="true" CssClass="btn btn-circle btn- btn-xs blue mysmallbtn" NavigateUrl="#" runat="server"><i class="fa fa-file-o"></i></asp:HyperLink>
|
||||
<%-- <asp:HyperLink ID="HypPDF" ToolTip="Formato Timbre" CssClass="btn btn-circle btn-sm btn-xs red mysmallbtn" Visible="false" NavigateUrl="#" runat="server"><i class="fa fa-file-pdf-o"></i></asp:HyperLink>--%>
|
||||
|
||||
<asp:LinkButton runat="server" ToolTip="Timbrar" ID="LnkTimbrarB" CssClass="btn btn-circle btn-sm btn-xs blue mysmallbtn" Text="<i class='fa fa-bell'></i>" OnClick="LnkTimbrarB_Click" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea Timbrar?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -3386,23 +3446,23 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkCargarNomina" OnClick="LnkCargarNomina_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkCargarNomina" OnClick="LnkCargarNomina_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkFormato" />
|
||||
<asp:PostBackTrigger ControlID="LnkFormato" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="DModalNominasUnConcepto" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpCargarNominaUnConcepto" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -3414,7 +3474,7 @@
|
||||
<h4 class="modal-title" runat="server" style="text-align: left">Cargar Nómina de excel</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
@@ -3441,17 +3501,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LinkButton4" OnClick="LnkCargarNomina_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LinkButton4" OnClick="LnkCargarNomina_Click" CssClass="btn btn-primary" runat="server">Procesar</asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkFormatoUnConcepto" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using AjaxControlToolkit.HtmlEditor.ToolbarButtons;
|
||||
using Extensiones;
|
||||
using iTextSharp.text.pdf;
|
||||
using Profact.TimbraCFDI40;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
@@ -308,7 +309,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
}
|
||||
DmodalCancelartimbre.Visible = (UsuarioActual.CveUsuario == 100);
|
||||
LnkOpenCancelarTimbre.Visible = (UsuarioActual.CveUsuario == 100);
|
||||
//LnkOpenCancelarTimbre.Visible = (UsuarioActual.CveUsuario == 100);
|
||||
LnkVerCalculoISR.Visible = (UsuarioActual.CveUsuario == 100 || UsuarioActual.CveEmpresa == 119);
|
||||
TxtPeriodo.Text = $"{DateTime.Now:yyyyMM}";
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyeccto);
|
||||
@@ -1093,6 +1094,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
GvNominas.DataSource = dt;
|
||||
GvNominas.DataBind();
|
||||
}
|
||||
|
||||
protected void GvNominas_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
@@ -1176,6 +1178,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
|
||||
}
|
||||
e.Row.FindControl("HypPDF").Visible = e.Row.FindControl("HypPDF").Visible || UsuarioActual.CveRol == 1;
|
||||
e.Row.FindControl("HypXml").Visible = e.Row.FindControl("HypXml").Visible || UsuarioActual.CveRol == 1;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1564,6 +1569,56 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
int CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero();
|
||||
int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
|
||||
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
|
||||
string Msg = "";
|
||||
Msg = TimprarPersonal(CvePeriodo, CvePersonal, CveNomina);
|
||||
if (Msg != null && Msg.Length > 0)
|
||||
{ }
|
||||
else
|
||||
{
|
||||
gvRow.FindControl("ImgDelete").Visible = false;
|
||||
gvRow.FindControl("Imgdesautorizar").Visible = false;
|
||||
|
||||
gvRow.FindControl("LnkCancelar").Visible = true;
|
||||
gvRow.FindControl("HypXml").Visible = true;
|
||||
gvRow.FindControl("HypPDF").Visible = true;
|
||||
|
||||
gvRow.FCHyperLink("HypPDF").Attributes.Add("onclick", string.Format("GETPDF({0},{1})", CvePersonal, CvePeriodo));
|
||||
gvRow.FCHyperLink("HypXml").Attributes.Add("onclick", string.Format("GETXML({0},{1})", CvePersonal, CvePeriodo));
|
||||
gvRow.ForeColor = Color.Green;
|
||||
lnk.Visible = false; UpDatos.Update();
|
||||
}
|
||||
}
|
||||
protected void LnkTimbrarB_Click(object sender, EventArgs e)
|
||||
{
|
||||
LinkButton lnk = (LinkButton)sender;
|
||||
GridViewRow gvRow = (GridViewRow)lnk.NamingContainer;
|
||||
int CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero();
|
||||
int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
|
||||
int CveNomina = gvRow.DataKey("CveNomina").ToEntero();
|
||||
string Msg = "";
|
||||
Msg = TimprarPersonal(CvePeriodo, CvePersonal, CveNomina);
|
||||
if (Msg != null && Msg.Length > 0)
|
||||
{ }
|
||||
else
|
||||
{
|
||||
//GVNominaPendiente.DeleteRow(gvRow.RowIndex);
|
||||
gvRow.FindControl("LnkTimbrarB").Visible = false;
|
||||
}
|
||||
}
|
||||
protected void GVNominaPendiente_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
int cvePersonal = e.Row.DataKey("CvePersonal").ToEntero();
|
||||
int CvePeriodo = e.Row.DataKey("CvePeriodo").ToEntero();
|
||||
e.Row.FCHyperLink("HypXml").Attributes.Add("onclick", string.Format("GETXML({0},{1})", cvePersonal, CvePeriodo));
|
||||
}
|
||||
|
||||
}
|
||||
public string TimprarPersonal(int CvePeriodo, int CvePersonal, int CveNomina)
|
||||
{
|
||||
|
||||
LogicNominas lognom = new LogicNominas();
|
||||
|
||||
|
||||
@@ -1582,23 +1637,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
Correo = drow["Correo"].ToString();
|
||||
NombreCompleto = drow["NombreCompleto"].ToString();
|
||||
}
|
||||
/*
|
||||
if (EsProduccion == false)
|
||||
{
|
||||
|
||||
//Usuario UsuarioActual = null;
|
||||
using (ClsSisUsuarios ObjUsuario = new ClsSisUsuarios())
|
||||
{
|
||||
UsuarioActual = ObjUsuario.ValidaUsuario("jcaudillo", Encripta("45makako45"), "-1", 1);
|
||||
}
|
||||
CreaObjetoEmpresa(ref UsuarioActual);
|
||||
UsuarioActual.CveEmpresa = this.UsuarioActual.CveEmpresa;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
UsuarioActual = this.UsuarioActual;
|
||||
}*/
|
||||
string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4));
|
||||
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3));
|
||||
|
||||
@@ -1653,15 +1691,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
}
|
||||
Alert("Se ha timbrado correctamente");
|
||||
gvRow.FindControl("ImgDelete").Visible = false;
|
||||
gvRow.FindControl("Imgdesautorizar").Visible = false;
|
||||
|
||||
gvRow.FindControl("LnkCancelar").Visible = true;
|
||||
gvRow.FindControl("HypXml").Visible = true;
|
||||
gvRow.FindControl("HypPDF").Visible = true;
|
||||
gvRow.ForeColor = Color.Green;
|
||||
lnk.Visible = false; UpDatos.Update();
|
||||
}
|
||||
return Msg;
|
||||
}
|
||||
|
||||
protected void Imgdesautorizar_Click(object sender, EventArgs e)
|
||||
@@ -1671,13 +1702,18 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
//GridViewRow gvRow = (GridViewRow)lnk.NamingContainer;
|
||||
//int CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero();
|
||||
//int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
|
||||
desAutorizarNomina(Cve);
|
||||
}
|
||||
|
||||
protected bool desAutorizarNomina(int CveNomina)
|
||||
{
|
||||
bool continuar = true;
|
||||
|
||||
using (ClsNominas Nom = new ClsNominas())
|
||||
{
|
||||
Nom.IniciaTransacSQL();
|
||||
//AutorizaNom_Nominas
|
||||
if (continuar && (continuar = Nom.RemoveNom_Nominas(Cve, false, UsuarioActual.CveUsuario)))
|
||||
if (continuar && (continuar = Nom.RemoveNom_Nominas(CveNomina, false, UsuarioActual.CveUsuario)))
|
||||
{
|
||||
|
||||
Nom.Commit();
|
||||
@@ -1689,6 +1725,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
cargaDatos();
|
||||
|
||||
}
|
||||
return continuar;
|
||||
}
|
||||
protected void ImgDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1697,13 +1734,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
//GridViewRow gvRow = (GridViewRow)lnk.NamingContainer;
|
||||
//int CvePeriodo = gvRow.DataKey("CvePeriodo").ToEntero();
|
||||
//int CvePersonal = gvRow.DataKey("CvePersonal").ToEntero();
|
||||
eliminarNomina(Cve);
|
||||
}
|
||||
protected bool eliminarNomina(int CveNomina)
|
||||
{
|
||||
bool continuar = true;
|
||||
|
||||
using (ClsNominas Nom = new ClsNominas())
|
||||
{
|
||||
Nom.IniciaTransacSQL();
|
||||
//AutorizaNom_Nominas
|
||||
if (continuar && (continuar = Nom.RemoveNom_Nominas(Cve, true, UsuarioActual.CveUsuario)))
|
||||
if (continuar && (continuar = Nom.RemoveNom_Nominas(CveNomina, true, UsuarioActual.CveUsuario)))
|
||||
{
|
||||
|
||||
Nom.Commit();
|
||||
@@ -1715,6 +1756,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
cargaDatos();
|
||||
|
||||
}
|
||||
return continuar;
|
||||
}
|
||||
|
||||
protected int CveNominaCancelar
|
||||
@@ -2339,7 +2381,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
objbase.ConceptosCveSistemaUp(ddlConceptocomisionNeto.SelectedValue.ToEntero(), -2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2558,7 +2600,75 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
|
||||
#region SobreRecibo
|
||||
protected void LnkAutorizarSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
autorizarNomina(SRCvePersonal);
|
||||
showhideaccionesSR(true);
|
||||
}
|
||||
protected void LnkTimbrarSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataRow dr = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
string Msg = TimprarPersonal(dr["CvePeriodo"].ToString().ToEntero(), SRCvePersonal, dr["CveNomina"].ToString().ToEntero());
|
||||
if (Msg != null && Msg.Length > 0)
|
||||
{ }
|
||||
else
|
||||
{
|
||||
showhideaccionesSR(true);
|
||||
}
|
||||
|
||||
}
|
||||
protected void LnkdesautorizarSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataRow dr = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
if (desAutorizarNomina(dr["CveNomina"].ToString().ToEntero()))
|
||||
{
|
||||
showhideaccionesSR(false);
|
||||
|
||||
}
|
||||
}//Imgdesautorizar
|
||||
protected void LnkDeleteSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataRow dr = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
if (eliminarNomina(dr["CveNomina"].ToString().ToEntero()))
|
||||
{
|
||||
showhideaccionesSR(false);
|
||||
|
||||
}
|
||||
}//ImgDelete
|
||||
protected void LnkReenviarCorreoSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
protected void LnkCancelarSobreRecibo_Click(object sender, EventArgs e)
|
||||
{
|
||||
showhideaccionesSR(true);
|
||||
}
|
||||
public void showhideaccionesSR(bool cargadatos = false)
|
||||
{
|
||||
if (cargadatos)
|
||||
{
|
||||
cargaDatos();
|
||||
|
||||
}
|
||||
DataRow dr = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
NomAutorizado = dr["NomAutorizado"].ToString().ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
|
||||
LnkCancelarSobreRecibo.Visible = dr["SeTimbro"].ToString().ToUpper().Contiene("TRUE", "1");
|
||||
LnkDeleteSobreRecibo.Visible = dr["CveNomina"].ToString().ToEntero() > 0 && !LnkCancelarSobreRecibo.Visible;
|
||||
|
||||
LnkAutorizarSobreRecibo.Visible = !dr["NomAutorizado"].ToString().ToUpper().Contiene("TRUE", "1");
|
||||
LnkdesautorizarSobreRecibo.Visible = dr["NomAutorizado"].ToString().ToUpper().Contiene("TRUE", "1") && !LnkCancelarSobreRecibo.Visible;
|
||||
|
||||
|
||||
|
||||
|
||||
LnkReenviarCorreoSobreRecibo.Visible = LnkCancelarSobreRecibo.Visible;
|
||||
HyppdfSobreRecibo.Visible = LnkCancelarSobreRecibo.Visible || UsuarioActual.CveRol == 1;
|
||||
HypXmlSobreRecibo.Visible = LnkCancelarSobreRecibo.Visible || UsuarioActual.CveRol == 1;
|
||||
|
||||
LnkTimbrarSobreRecibo.Visible = !LnkCancelarSobreRecibo.Visible && dr["NomAutorizado"].ToString().ToUpper().Contiene("TRUE", "1");
|
||||
|
||||
|
||||
}
|
||||
#region SobreRecibo propiedades
|
||||
|
||||
protected int CveFonacot
|
||||
@@ -2665,6 +2775,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
//int CveNomina = gvrow.DataKey("CveNomina").ToEntero();
|
||||
//NomAutorizado = gvrow.DataKey("NomAutorizado").ToUpper().Contiene(new string[] { "1", "TRUE" });
|
||||
SRCvePersonal = TxtCvePersonal.Text.ToEntero();
|
||||
showhideaccionesSR();
|
||||
HypXmlSobreRecibo.Attributes.Add("onclick", string.Format("GETPDF({0},{1})", SRCvePersonal, CvePeriodoSeleccionado));
|
||||
HyppdfSobreRecibo.Attributes.Add("onclick", string.Format("GETXML({0},{1})", SRCvePersonal, CvePeriodoSeleccionado));
|
||||
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
string Nombre = "";
|
||||
@@ -2887,9 +3000,17 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
TxtCCSysSalarioMinimo.Text = "";
|
||||
//TxtCCSysUMA.Text = "$96.22";
|
||||
if (drow != null)
|
||||
{
|
||||
decimal UMA = 0M;
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (onom.UMAFechaGet(UsuarioActual.CveEmpresa, $"{DateTime.Now:yyyy/MM/dd}") && onom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
UMA = onom.DtResultados.Rows[0]["UMA"].ToString().ToDecimal();
|
||||
}
|
||||
}
|
||||
TxtCCSysUMA.Text = $"{UMA:N2}";
|
||||
TxtCCSysSalarioMinimo.Text = string.Format("${0:N2}", drow["SalarioMinimo"]);
|
||||
|
||||
}
|
||||
@@ -2929,7 +3050,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
if (drow != null)
|
||||
{
|
||||
int Fechafin = string.Format("{0:yyyyMMdd}", drow["FechaFin"]).ToEntero();
|
||||
decimal UMA = 96.22M;
|
||||
decimal UMA = 0M;
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (onom.UMAFechaGet(UsuarioActual.CveEmpresa, $"{DateTime.Now:yyyy/MM/dd}") && onom.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
UMA = onom.DtResultados.Rows[0]["UMA"].ToString().ToDecimal();
|
||||
}
|
||||
}
|
||||
decimal SalarioDiarioIMSS = drow["SalarioDiarioIMSS"].ToString().ToDecimal();
|
||||
decimal DiasIMSS = drow["DiasIMSS"].ToString().ToDecimal();
|
||||
decimal importeparacuota = SalarioDiarioIMSS > (3 * UMA) ? SalarioDiarioIMSS - (3 * UMA) : 0M;
|
||||
@@ -2982,7 +3110,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DataRow drow = dtempleados.FiltroPrimero(string.Format("CvePersonal = {0}", SRCvePersonal));
|
||||
if (drow != null)
|
||||
{
|
||||
decimal UMA = 96.22M;
|
||||
decimal UMA = 0M;
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (onom.UMAFechaGet(UsuarioActual.CveEmpresa, $"{DateTime.Now:yyyy/MM/dd}") && onom.DtResultados.Rows.Count > 0)
|
||||
@@ -6864,6 +6992,21 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
protected void LnkCargaAsistenciaMasiva_Click(object sender, EventArgs e)
|
||||
{
|
||||
DdlEjerciciosCM.SelectedValueExist(DateTime.Now.Year);
|
||||
DdlEjerciciosCM_SelectedIndexChanged(DdlEjerciciosCM, null);
|
||||
if (DdlTipoPeriodo.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
DdlTipoPeriodoCM.SelectedValueExist(DdlTipoPeriodo.SelectedValue);
|
||||
|
||||
}
|
||||
DdlTipoPeriodoCM_SelectedIndexChanged(DdlTipoPeriodoCM, null);
|
||||
if (DdlPeriodo.SelectedValue.ToEntero() > 0)
|
||||
{
|
||||
DdlPeriodoCM.SelectedValueExist(DdlPeriodo.SelectedValue);
|
||||
|
||||
}
|
||||
|
||||
|
||||
RegistraScript("$('#DModalCargaASistenciaMasiva').modal();");
|
||||
}
|
||||
|
||||
@@ -7937,6 +8080,23 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
LnkActualizarIncapacidad.Visible = true;
|
||||
RegistraScript("$('#ModalSRIncapacidad').modal()");
|
||||
}
|
||||
|
||||
protected void LnkPersonalIncapacidadRemove_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
CcvePersonalIncapacidad = gvRow.DataKey("CvePersonalIncapacidad").ToEntero();
|
||||
bool Continuar;
|
||||
using (ClsNominas ObjPers = new ClsNominas())
|
||||
{
|
||||
Continuar = ObjPers.PersonalIncapacidadRemove(UsuarioActual.CveUsuario, CcvePersonalIncapacidad);
|
||||
}
|
||||
if (Continuar)
|
||||
{
|
||||
CargaPersonalIncapacidad();
|
||||
UpsrIncapacidadpersonal.Update();
|
||||
Alert("La incapacidad se ha eliminado.", TipoMensaje.ToastInformacion);
|
||||
}
|
||||
}
|
||||
protected void LnkshowaaddIncapacidad_Click(object sender, EventArgs e)
|
||||
{
|
||||
LimpiaPersonalIncapacidad();
|
||||
@@ -9613,4 +9773,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -7702,6 +7702,14 @@ Partial Class RH_Personal
|
||||
|
||||
End If
|
||||
|
||||
If Padre.Trim.Length = 0 Then
|
||||
Padre = TxtNombrePadre.Text.Trim
|
||||
End If
|
||||
|
||||
If Madre.Trim.Length = 0 Then
|
||||
Madre = TxtNombreMadre.Text.Trim
|
||||
End If
|
||||
|
||||
Dim TimpoMovimiento As String = ""
|
||||
|
||||
Select Case eTipoMovimientoRH
|
||||
@@ -7718,7 +7726,7 @@ Partial Class RH_Personal
|
||||
|
||||
objRH.Dispose()
|
||||
Cuerpo.AppendLine("<table border='0' style='width:100%'>")
|
||||
Cuerpo.AppendLine($"<tr><td style=' font-size:large;'>{ UsuarioActual.Empresa.Empresa }<br/></td><td style='width:20%'> </td><td style='text-align: right;'>{ Now.ToShortDateString } { Now.ToShortTimeString } <br/></td> </tr>")
|
||||
Cuerpo.AppendLine($"<tr><td style=' font-size:large;'>{ If(DdlEmpresaAsignada.SelectedValue.ToEntero > 0, DdlEmpresaAsignada.SelectedItem.Text, UsuarioActual.Empresa.Empresa) }<br/></td><td style='width:20%'> </td><td style='text-align: right;'>{ Now.ToShortDateString } { Now.ToShortTimeString } <br/></td> </tr>")
|
||||
|
||||
Cuerpo.AppendLine($"<tr><td style=' font-size:large; text-align: left;' colspan='3'>Notificacion por { TimpoMovimiento } de Nomina</td></tr>")
|
||||
Cuerpo.AppendLine("</table>")
|
||||
|
||||
@@ -437,10 +437,17 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
//ASIGNAMOS ESTATUS EMITIDA
|
||||
CveEstatus = 3;
|
||||
string Estatus = "Emitida";
|
||||
//SI ES REFACTURACION, DEBE QUEDAR COMO CANCELACION PENDIENTE PARA ENVIAR LA CANCELACION DE NUEVO
|
||||
if (EsRefacturacion)
|
||||
{
|
||||
CveEstatus = 23;
|
||||
Estatus = "Cancelación pendiente";
|
||||
}
|
||||
var ObjVentas = new ClsVentas();
|
||||
if (ObjVentas.UpdateEstatusVenta(CveVenta, CveEstatus, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
sb.Append("El estatus de la factura fue cambiado a 'Emitida'.");
|
||||
sb.Append($"El estatus de la factura fue cambiado a '{Estatus}'.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -452,10 +459,17 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
{
|
||||
//ASIGNAMOS ESTATUS EMITIDA
|
||||
CveEstatus = 3;
|
||||
string Estatus = "Emitida";
|
||||
//SI ES REFACTURACION, DEBE QUEDAR COMO CANCELACION PENDIENTE PARA ENVIAR LA CANCELACION DE NUEVO
|
||||
if (EsRefacturacion)
|
||||
{
|
||||
CveEstatus = 23;
|
||||
Estatus = "Cancelación pendiente";
|
||||
}
|
||||
var ObjVentas = new ClsVentas();
|
||||
if (ObjVentas.UpdateEstatusVenta(CveVenta, CveEstatus, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
sb.Append("El estatus de la factura fue cambiado a 'Emitida'.");
|
||||
sb.Append($"El estatus de la factura fue cambiado a '{Estatus}'.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -11239,8 +11239,15 @@ Partial Class Ventas
|
||||
|
||||
Dim tTipoAmortizacion As Integer = If(DdlTipoAmortizacionAnticipo.SelectedValue = "2", 1, 2)
|
||||
|
||||
Dim ForzarAjuste As Boolean = False
|
||||
|
||||
DtImpuestos = CargaDtImpuestosNC(gvrt.DataKey("CveVenta").ToString().ToEntero(), gvrt.FCTextBox(String.Format("TxtAnticipo{0}", gvrt.RowIndex)).Text.ToDecimal, AplicaImpuestosLocales:=True, NCDescuento:=False, NivelTotal:=tTipoAmortizacion)
|
||||
'EL IMPORTE DE NC NO PUEDE SER MAYOR AL DE LA FACTURA
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso (tTipoAmortizacion = 1) Then
|
||||
ForzarAjuste = True
|
||||
End If
|
||||
|
||||
'SI LA APLICACION DE ANTICIPO SE HACE A NIVEL TOTAL, FORZAR EL AJUSTE POR REDONDEO
|
||||
DtImpuestos = CargaDtImpuestosNC(gvrt.DataKey("CveVenta").ToString().ToEntero(), gvrt.FCTextBox(String.Format("TxtAnticipo{0}", gvrt.RowIndex)).Text.ToDecimal, AplicaImpuestosLocales:=True, NCDescuento:=False, NivelTotal:=tTipoAmortizacion, ForzarAjuste:=ForzarAjuste)
|
||||
|
||||
Dim query = From ddr In DtImpuestos
|
||||
Group By PorcentajeIVA = ddr("PorcentajeIVA").ToString().ToDecimal,
|
||||
@@ -11251,9 +11258,9 @@ Partial Class Ventas
|
||||
Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString().ToDecimal),
|
||||
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal),
|
||||
ImporteIVA = x.Sum(Function(s) (s("ImporteIVA").ToString().ToDecimal)).RoundSQL(2), ' Math.Round(s("ImporteIVA").ToString().ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
|
||||
ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
||||
ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
|
||||
ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString().ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
|
||||
ImporteRetIVA = x.Sum(Function(s) s("ImporteRetIVA").ToString().ToDecimal()).RoundSQL(2),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
||||
ImporteRetISR = x.Sum(Function(s) s("ImporteRetISR").ToString().ToDecimal()).RoundSQL(2),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
|
||||
ImporteIEPS = x.Sum(Function(s) s("ImporteIEPS").ToString().ToDecimal()).RoundSQL(2), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
|
||||
PorcentajeIVA = PorcentajeIVA,
|
||||
PorcentajeRetIVA = PorcentajeRetIVA,
|
||||
PorcentajeRetISR = PorcentajeRetISR,
|
||||
@@ -11303,13 +11310,13 @@ Partial Class Ventas
|
||||
'**** IMPUESTOS LOCALES
|
||||
|
||||
factura.DtDetalle = tmpcon
|
||||
Dim TotalSubTotal As Decimal = tmpcon.SUM("TotalImporte").ToDecimal
|
||||
Dim TotalDescuentos As Decimal = tmpcon.SUM("Descuento").ToDecimal
|
||||
Dim TotalSubTotal As Decimal = tmpcon.SUMD("TotalImporte").RoundSQL(2)
|
||||
Dim TotalDescuentos As Decimal = tmpcon.SUMD("Descuento")
|
||||
|
||||
Dim TotalIVA As Decimal = tmpcon.SUM("ImporteIVA").ToDecimal
|
||||
Dim TotalIEPS As Decimal = tmpcon.SUM("ImporteIEPS").ToDecimal
|
||||
Dim TotalRetIVA As Decimal = tmpcon.SUM("ImporteRetIVA").ToDecimal
|
||||
Dim TotalRetISR As Decimal = tmpcon.SUM("ImporteRetISR").ToDecimal
|
||||
Dim TotalIVA As Decimal = tmpcon.SUMD("ImporteIVA")
|
||||
Dim TotalIEPS As Decimal = tmpcon.SUMD("ImporteIEPS")
|
||||
Dim TotalRetIVA As Decimal = tmpcon.SUMD("ImporteRetIVA")
|
||||
Dim TotalRetISR As Decimal = tmpcon.SUMD("ImporteRetISR")
|
||||
Dim Total As Decimal = 0
|
||||
Dim TotalImpuestosLocales As Decimal = factura.TotalImpuestoLocal.ToString().ToDecimal
|
||||
Total = (TotalSubTotal - TotalDescuentos + TotalIVA + TotalIEPS - TotalRetIVA - TotalRetISR - TotalImpuestosLocales)
|
||||
@@ -11343,6 +11350,9 @@ Partial Class Ventas
|
||||
|
||||
Else
|
||||
ErrorList.Add("No se encontró un producto para generar la nota de crédito")
|
||||
If DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0 Then
|
||||
DtVentasNC.Rows.Clear()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -14778,49 +14788,12 @@ Partial Class Ventas
|
||||
CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||
End If
|
||||
|
||||
''Cuando se está amortizando con un anticipo y es la modalidad de NC
|
||||
'If ObjFactura.TipoDocto.Contiene("Ing") AndAlso CveAnticipo > 0 AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then
|
||||
' ConceptoContableAplicar = 11
|
||||
' CveVentaAplicar = CveAnticipo
|
||||
' CveVentaAmortizacionAplicar = ObjFactura.CveVenta
|
||||
'End If
|
||||
|
||||
' If UsuarioActual.CveEmpresa = 119 Then
|
||||
|
||||
'código fijo en base el porcentaje iva, que se afecten las clasificaciones
|
||||
'For i = 0 To TmpDTDetalle.Rows.Count - 1
|
||||
|
||||
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
|
||||
' If Not TmpDTDetalle(i)("CveClasificacion").ToString().Contiene("19958", "19933", "18097", "24479") Then
|
||||
|
||||
' 'If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal > 0 Then
|
||||
' ' If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal = 0.08 Then
|
||||
' ' TmpDTDetalle(i)("CveClasificacion") = 20242 'clasif: ventas tasa 8%
|
||||
' ' Else
|
||||
' ' TmpDTDetalle(i)("CveClasificacion") = 19929 'clasif: ventas tasa 16%
|
||||
' ' End If
|
||||
|
||||
' ' Else
|
||||
' ' TmpDTDetalle(i)("CveClasificacion") = 19930 'clasif: ventas tasa 0%
|
||||
' ' End If
|
||||
|
||||
' 'reclasifica la clasificación del producto, por la del ingreso correspondiente a su iva
|
||||
' If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal).Rows.Count > 0 Then
|
||||
' TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal).Rows(0)("CveClasificacion").ToString()
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
'Next
|
||||
|
||||
' End If
|
||||
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
||||
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString().ToDecimal()) * ValorMultiplicador
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
|
||||
@@ -14834,8 +14807,6 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
If IdCtaContable <= 0 Then
|
||||
@@ -14861,37 +14832,12 @@ Partial Class Ventas
|
||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
||||
Dim CveVentaAmortizacionAplicar = -1
|
||||
|
||||
'If UsuarioActual.CveEmpresa = 119 Then
|
||||
|
||||
' 'código fijo en base el porcentaje iva, que se afecten las clasificaciones
|
||||
' For i = 0 To TmpDTDetalle.Rows.Count - 1
|
||||
|
||||
' 'se excluyen las clasificaciones anteriores para que se asignen las de ingreso
|
||||
' If Not TmpDTDetalle(i)("CveClasificacion").ToString().Contiene("19958", "19933", "18097") Then
|
||||
|
||||
' If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows.Count > 0 Then
|
||||
' TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDouble).Rows(0)("CveClasificacion").ToString()
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
'End If
|
||||
|
||||
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||
|
||||
If DT.Rows.Count > 0 Then
|
||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||
For Each Row2 As DataRow In DT.Rows
|
||||
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
||||
|
||||
'If ObjFactura.TipoDocto = "Egs" Then
|
||||
' importeMovimiento += (TmpDTDetalle.SUM("ImporteIVA", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
||||
' importeMovimiento += (TmpDTDetalle.SUM("ImporteIEPS", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
||||
' importeMovimiento -= (TmpDTDetalle.SUM("ImporteRetIVA", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
||||
' importeMovimiento -= (TmpDTDetalle.SUM("ImporteRetISR", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
|
||||
'End If
|
||||
importeMovimiento = (TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} And CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString().ToDecimal) * ValorMultiplicador
|
||||
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
@@ -14907,10 +14853,6 @@ Partial Class Ventas
|
||||
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
If Row2("CveClasificacion").ToString() = "19930" Then IdCtaContable = 1141
|
||||
If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142
|
||||
End If
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
@@ -15324,8 +15266,12 @@ Partial Class Ventas
|
||||
|
||||
If (importeMovimiento <> 0 OrElse (importeMovimiento = 0 AndAlso ObjFactura.Total = 0 AndAlso ConceptoContable = 1)) And Not ErrorPrepoliza Then
|
||||
|
||||
|
||||
|
||||
If IdCtaContable <= 0 Then
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
If Not (UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) And ConceptoContable.Contiene(8, 13, 14, 15, 19, 22, 61, 185, 186, 327, 328)) Then
|
||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString())
|
||||
End If
|
||||
idCuentaContabilizacion = 0
|
||||
End If
|
||||
|
||||
@@ -23659,8 +23605,9 @@ Partial Class Ventas
|
||||
End If
|
||||
End Using
|
||||
|
||||
'SI TIENE UN ANTICIPO RELACIONADO O VIENE DE UNA REFACTURACION
|
||||
If RowVentas IsNot Nothing Then
|
||||
If RowVentas("TipoDocto").ToString().Contiene("Ing") AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
If RowVentas("TipoDocto").ToString().Contiene("Ing", "Ant") AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
CargaInventario(Me.CveVenta)
|
||||
End If
|
||||
End If
|
||||
@@ -29997,7 +29944,7 @@ Partial Class Ventas
|
||||
|
||||
Next
|
||||
End Sub
|
||||
Private Function CargaDtImpuestosNC(CveVentaNC As Integer, Importe As Decimal, Optional NCDescuento As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional NivelTotal As Integer = 1, Optional AplicaNCUsado As Boolean = False) As DataTable
|
||||
Private Function CargaDtImpuestosNC(CveVentaNC As Integer, Importe As Decimal, Optional NCDescuento As Boolean = False, Optional AplicaImpuestosLocales As Boolean = True, Optional NivelTotal As Integer = 1, Optional AplicaNCUsado As Boolean = False, Optional ForzarAjuste As Boolean = False) As DataTable
|
||||
Dim Total As Decimal = 0, SubTotal As Decimal = 0, Saldo As Decimal = 0
|
||||
|
||||
Dim TmpDT As DataTable = Nothing
|
||||
@@ -30115,6 +30062,24 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'SI LA DIFERENCIA ES MENOR O IGUAL A 1 CENTAVO, AJUSTAR EL TOTAL
|
||||
If ForzarAjuste Then
|
||||
'ASUSTO LA DIFERENCIA EN LOS IMPUESTOS
|
||||
Dim difTmp As Decimal = Importe - importeNC
|
||||
If Math.Abs(difTmp) > 0.00D AndAlso Math.Abs(difTmp) <= 0.01D Then
|
||||
'SI TIENE IVA, AJUSTAR AQUI
|
||||
If DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteIVA").ToString().ToDecimal() > 0 Then
|
||||
Dim ImporteIVAAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteIVA").ToString().ToDecimal + difTmp
|
||||
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteIVA") = ImporteIVAAjustado
|
||||
Else
|
||||
Dim ImporteAjustado As Decimal = DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal").ToString().ToDecimal + difTmp
|
||||
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImporteTotal") = ImporteAjustado
|
||||
DtImpuestosLocal.Rows(DtImpuestosLocal.Rows.Count - 1)("ImportePU") = ImporteAjustado
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not NCDescuento Then
|
||||
Me.TmpDT = TmpDT
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user