Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
1836
AC/Reportes/RepEstadoActividadesConta2.rdlc
Normal file
1836
AC/Reportes/RepEstadoActividadesConta2.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -90,9 +90,9 @@
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Inactivo" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Activo" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Enviado" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Cerrado" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">SubProyecto:</label>
|
||||
@@ -172,6 +172,11 @@
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField HeaderText="Mov. Salida" DataTextField="FolioAlmacen" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" Target="_blank" ControlStyle-CssClass="Texto"/>
|
||||
|
||||
<asp:TemplateField HeaderText="Notas" ItemStyle-Width ="120px" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LblSerieFolioNotas" runat="server" Text='<%# Eval("SerieFolioNotas") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="120px">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="ImgVer" OnClick="ImgVer_Click" runat="server" AlternateText="Editar" CausesValidation="False"
|
||||
|
||||
@@ -3295,6 +3295,32 @@ Public Class ClsCompras
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetRepSATSolicitudesRecibidas(CveEmpresa As Integer, FechaInicio As Date, FechaFin As DateTime, Opcion As Integer, Vista As Integer) As Boolean
|
||||
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
DataAdapter("PA_SAT_SolicitudesRecibidasRepGet", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
.Add("@Vista", SqlDbType.Int).Value = Vista
|
||||
End With
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
retorno = True
|
||||
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al consultar el reporte de CFDI contra compras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return retorno
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -3571,6 +3571,22 @@ Public Class ClsNominas
|
||||
retorno = RunQuery("Ocurrió un error al eliminar las Solicitudes de nómina.")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function SolicitudesCancelar(CveSolicitud As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Gral_SAT_SolicitudesCancelar", CommandType.StoredProcedure)
|
||||
addParameters("@CveSolicitud", SqlDbType.Int, CveSolicitud)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, CveEmpresa)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, CveUsuario)
|
||||
|
||||
retorno = RunQuery("Ocurrió un error al cancelar la Solicitude.")
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
#End Region
|
||||
|
||||
@@ -3633,6 +3649,24 @@ Public Class ClsNominas
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function GetRepPersonalDIM(Ejercicio As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_PersonalDIM", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el reporte Personal DIM.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
#Region "IDisposable Support"
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
@@ -3656,6 +3690,8 @@ Public Class ClsNominas
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
@@ -8545,6 +8545,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/OI/CircularDetalle.aspx".ToUpper(), 756)
|
||||
PaginaDict.Add("/OI/CircularDetalleB.aspx".ToUpper(), 756)
|
||||
PaginaDict.Add("/Compras/CatTipoGasto.aspx".ToUpper(), 759)
|
||||
PaginaDict.Add("/SAT/SolicitudesRecibidasSAT.aspx".ToUpper(), 1339)
|
||||
#End Region
|
||||
#Region "Contabilidad"
|
||||
PaginaDict.Add("/Contabilidad/ContabilidadElectronica.aspx".ToUpper(), 566)
|
||||
@@ -8911,6 +8912,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Nomina/CatSatTipoIncapacidad.aspx".ToUpper(), 258)
|
||||
PaginaDict.Add("/Nomina/CatSatRiesgoPuesto.aspx".ToUpper(), 259)
|
||||
PaginaDict.Add("/Nomina/ReportePTU.aspx".ToUpper(), 870)
|
||||
PaginaDict.Add("/Nomina/RepPersonalDIM.aspx".ToUpper(), 1340)
|
||||
#End Region
|
||||
#Region "Ordenes de Servicios"
|
||||
PaginaDict.Add("/OS/PopUpBuscarOS.aspx".ToUpper(), 80)
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField DataTextField="Folio" DataNavigateUrlFields="CveIE" Target="_blank" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-HorizontalAlign="Left" HeaderText="Folio" />
|
||||
<asp:BoundField DataField="FechaDocumento" ItemStyle-Width="15%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="FechaDocumento" ItemStyle-Width="85px" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="Observaciones" ItemStyle-HorizontalAlign="Left" HeaderText="Observaciones" />
|
||||
<asp:BoundField DataField="Cargo" ItemStyle-HorizontalAlign="Right" HeaderText="Cargo" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Abono" ItemStyle-HorizontalAlign="Right" HeaderText="Abono" DataFormatString="{0:N2}" />
|
||||
|
||||
@@ -102,6 +102,10 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
ObjBancos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
CeFechaAplicado.StartDate = txtFechaI.Text.ToDate
|
||||
CeFechaAplicado.EndDate = txtFechaF.Text.ToDate
|
||||
CeFechaDesconciliado.StartDate = txtFechaI.Text.ToDate
|
||||
CeFechaDesconciliado.EndDate = txtFechaF.Text.ToDate
|
||||
If GvDatos.Rows.Count > 0 Then RegistraScript("CalculaSeleccionados();", "1")
|
||||
End Sub
|
||||
|
||||
@@ -178,8 +182,9 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
If Not CBool(Dr("FueConciliado").ToString) And Dr("CveIE").ToString.ToEntero > 0 Then
|
||||
For Each DrE As DataRow In DtDatosEdoCuenta.Rows
|
||||
If ((Dr("FechaDocumento").ToString.ToDate = DrE("FechaDocumento").ToString.ToDate And Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 1) Or (Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 2)) And Not CBool(DrE("Seleccionado").ToString) And Not CBool(DrE("FueConciliado").ToString) And Not CBool(Dr("Seleccionado").ToString) Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate), -1, 1, 1, UsuarioActual.CveUsuario) Or
|
||||
Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate), DrE("CveIEEstadoCuenta").ToString.ToEntero, 1, 2, UsuarioActual.CveUsuario) Then
|
||||
Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate)
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, FechaConciliado, -1, 1, 1, UsuarioActual.CveUsuario) Or
|
||||
Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, FechaConciliado, DrE("CveIEEstadoCuenta").ToString.ToEntero, 1, 2, UsuarioActual.CveUsuario) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Dr("CveIE").ToString.ToEntero) Then
|
||||
@@ -283,7 +288,8 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
Dim CveIE As Integer = 0
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate), -1, 1, 1, UsuarioActual.CveUsuario) Then
|
||||
Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, FechaConciliado, -1, 1, 1, UsuarioActual.CveUsuario) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
|
||||
@@ -296,8 +302,10 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
Next
|
||||
For Each Gvr As GridViewRow In GvEdoConciliacion.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
If Not ObjBancos.UpdateIEEstadoCuenta(Gvr.DataKey("CveIEEstadoCuenta").ToEntero, Gvr.DataKey("Importe").ToDouble, True, CveIE, Gvr.DataKey("Referencia").ToString,
|
||||
Gvr.DataKey("Tipo").ToString, Gvr.DataKey("FechaDocumento").ToDate, Gvr.DataKey("CveCuenta").ToEntero) Then
|
||||
Dim FechaConciliado As Date = TxtFechaAplicado.Text.ToDate 'If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(CveIE, FechaConciliado, Gvr.DataKey("CveIEEstadoCuenta").ToEntero, 1, 2, UsuarioActual.CveUsuario) Then
|
||||
'If Not ObjBancos.UpdateIEEstadoCuenta(Gvr.DataKey("CveIEEstadoCuenta").ToEntero, Gvr.DataKey("Importe").ToDouble, True, CveIE, Gvr.DataKey("Referencia").ToString,
|
||||
' Gvr.DataKey("Tipo").ToString, Gvr.DataKey("FechaDocumento").ToDate, Gvr.DataKey("CveCuenta").ToEntero) Then
|
||||
ErrorTrans = True
|
||||
End If
|
||||
End If
|
||||
@@ -382,7 +390,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
Protected Sub LnkDesconciliar_Click(sender As Object, e As EventArgs)
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
ModalidadDesconciliar = "D"
|
||||
TxtFechaDesconciliado.Text = Now.ToShortDateString
|
||||
TxtFechaDesconciliado.Text = txtFechaF.Text
|
||||
CveIEDesconciliar = gvRow.DataKey("CveIE").ToEntero
|
||||
UpDesconciliar.Update()
|
||||
RegistraScript("$('#DModalDesconciliar').modal()")
|
||||
|
||||
@@ -464,7 +464,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
If Not ErrorRegistrar Then
|
||||
Conta.Commit()
|
||||
BtnGeneraCompras.Visible = False
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Conta.RollBack()
|
||||
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||
@@ -547,7 +547,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
If Not ErrorRegistrar Then
|
||||
Conta.Commit()
|
||||
BtnGeneraComprasAnt.Visible = False
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Conta.RollBack()
|
||||
Alert("Error al generar la fluctuación", TipoMensaje.MsgError)
|
||||
@@ -648,7 +648,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
If Not ErrorRegistrar Then
|
||||
Conta.Commit()
|
||||
BtnGeneraVentas.Visible = False
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
|
||||
Else
|
||||
Conta.RollBack()
|
||||
@@ -745,7 +745,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
||||
If Not ErrorRegistrar Then
|
||||
Conta.Commit()
|
||||
BtnClientesAnticipos.Visible = False
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||
|
||||
Else
|
||||
Conta.RollBack()
|
||||
|
||||
@@ -3,7 +3,14 @@
|
||||
<%@ Import Namespace="Extensiones" %>
|
||||
|
||||
<asp:Content ID="CSS" ContentPlaceHolderID="CSS" runat="Server">
|
||||
<style>
|
||||
<style>
|
||||
.truncate {
|
||||
width: 100px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#Gv tr {
|
||||
}
|
||||
/*#Gv > tbody > tr > td a,*/ #Gv > tbody > tr > th a {
|
||||
@@ -446,7 +453,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<div>
|
||||
<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_SubProyecto" runat="server" CausesValidation="false" Text="Proyecto" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,SubProyecto"></asp:LinkButton> <asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_TipoPago" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,SubProyecto" />
|
||||
@@ -457,17 +464,19 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-CssClass="truncate">
|
||||
<HeaderTemplate>
|
||||
<div>
|
||||
<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_UsuarioRegistro" runat="server" CausesValidation="false" Text="Usuario Registró" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,UsuarioRegistro"></asp:LinkButton> <asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_UsuarioRegistro" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,UsuarioRegistro" />
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuarioRegistro" runat="server" Text='<%# Eval("UsuarioRegistro")%>'></asp:Literal>
|
||||
<div class="truncate" style="width: 100px;">
|
||||
<asp:Literal ID="LtlUsuarioRegistro" runat="server" Text='<%# Eval("UsuarioRegistro")%>' ></asp:Literal>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<div>
|
||||
<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_Fecha" runat="server" CausesValidation="false" Text="Fecha F." OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,Fecha"></asp:LinkButton> <asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_Fecha" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,Fecha" />
|
||||
@@ -477,7 +486,7 @@
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<div>
|
||||
<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_FechaVencimiento" runat="server" CausesValidation="false" Text="Vencimiento" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,FechaVencimiento"></asp:LinkButton> <asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_FechaVencimiento" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,FechaVencimiento" />
|
||||
@@ -487,7 +496,7 @@
|
||||
<asp:Literal ID="LtlFV" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<asp:TemplateField Visible="false" HeaderStyle-Width="40px">
|
||||
<%-- <HeaderTemplate>
|
||||
<div>
|
||||
<asp:Literal ID="LtlAlm" runat="server" Text="Almacen"></asp:Literal>
|
||||
@@ -497,7 +506,7 @@
|
||||
<asp:Label data-toggle="tooltip" data-html="true" Text='' ID="LbEstatusInv" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<asp:TemplateField HeaderStyle-Width="125px">
|
||||
<HeaderTemplate>
|
||||
<div>
|
||||
<asp:LinkButton ID="LbMoneda_OrdenMonedaProveedor_Original" runat="server" CausesValidation="false" Text="Original" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,Original"></asp:LinkButton> <asp:ImageButton ID="ImgMoneda_OrdenMonedaProveedor_Original" runat="server" CausesValidation="false" ImageUrl="/Imagenes/FlechasAbajo.gif" OnClick="LbOrden_Click" CommandArgument="Moneda,OrdenMonedaProveedor,Original" />
|
||||
@@ -518,7 +527,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAbo" runat="server" Text='<%# Eval("Abonado", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
@@ -527,7 +536,7 @@
|
||||
</div>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtS" Style="text-align: right" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>' CssClass="TextBoxAsLabel" Width="85px" ClientIDMode="Predictable"></asp:TextBox><asp:HiddenField ID="HdnSaldo" runat="server" Value='<%# Eval("Saldo")%>'></asp:HiddenField>
|
||||
<asp:TextBox ID="TxtS" Style="text-align: right" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>' CssClass="TextBoxAsLabel" Width="95px" ClientIDMode="Predictable"></asp:TextBox><asp:HiddenField ID="HdnSaldo" runat="server" Value='<%# Eval("Saldo")%>'></asp:HiddenField>
|
||||
<asp:HiddenField ID="HdnTC" runat="server" Value='<%# Eval("TipoCambio")%>' ClientIDMode="Predictable"></asp:HiddenField>
|
||||
</ItemTemplate>
|
||||
|
||||
|
||||
@@ -854,7 +854,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6" style="min-height:200px">
|
||||
<asp:UpdatePanel ID="UPPAnticiposSel" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -915,6 +915,12 @@
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div style=" vertical-align: bottom; display: table-cell;">
|
||||
<asp:Button runat="server" ID="btnProrateo" Visible="false" Text="Prorratear" CommandArgument="Compras" CssClass="btn btn-success" />
|
||||
<asp:Button runat="server" ID="btnProrateo2" Visible="false" Text="Prorratear Nomina" CommandArgument="Nomina" CssClass="btn btn-success" />
|
||||
<asp:Button runat="server" ID="BtnProrateoDeducible" Visible="false" Text="Prorratear 8.5%" CommandArgument="Prorratear Deducible" CssClass="btn btn-success" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 ">
|
||||
@@ -976,13 +982,7 @@
|
||||
</td>
|
||||
<td align="right"> 
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:HyperLink ID="HLAplicaNCFact" NavigateUrl="#" Visible="false" data-toggle="modal" data-target="#FacturaNC" runat="server"><i title="Aplicar Notas de Credito" data-toggle="tooltip" class='fa fa-money font-green'></i></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1117,12 +1117,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 ">
|
||||
<asp:Button runat="server" ID="btnProrateo" Visible="false" Text="Prorratear" CommandArgument="Compras" CssClass="btn btn-success" />
|
||||
<asp:Button runat="server" ID="btnProrateo2" Visible="false" Text="Prorratear Nomina" CommandArgument="Nomina" CssClass="btn btn-success" />
|
||||
<asp:Button runat="server" ID="BtnProrateoDeducible" Visible="false" Text="Prorratear 8.5%" CommandArgument="Prorratear Deducible" CssClass="btn btn-success" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
@@ -4886,11 +4881,10 @@
|
||||
<div class="col-md-6 h4 text-right">
|
||||
Saldo: $<asp:Label Text="0.00" ID="LbNCInvSaldoAlmacen" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GVNCInvAlmacen" runat="server" EmptyDataText="Aun no hay registros." Width="100%" AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" DataKeyNames="CveCompraDetalle,CveCompra,TipoCambio,PU,IVA,IEPSPS" CssClass="table table-striped table-hover Widthall ScrollAD" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<asp:GridView ID="GVNCInvAlmacen" runat="server" EmptyDataText="Aun no hay registros." Width="650px" AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" DataKeyNames="CveCompraDetalle,CveCompra,TipoCambio,PU,IVA,IEPSPS,CveOrdenCompraDetalle" CssClass="table table-striped table-hover Widthall ScrollAD" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
@@ -4915,6 +4909,11 @@
|
||||
<asp:Label ID="LbTotal" Text='<%# (CDbl(Eval("PU").ToString) * CDbl(Eval("CantidadF").ToString)).ToString("N2") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="OC" ItemStyle-Width="2%">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblOC" Text='<%# Eval("FolioOC") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -1418,11 +1418,6 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(360) Then
|
||||
BtnProrateoDeducible.Visible = True
|
||||
End If
|
||||
|
||||
ElseIf Request("CveCompra") IsNot Nothing AndAlso IsNumeric(Request("CveCompra")) AndAlso Request("CveCompra").ToEntero > 0 Then
|
||||
|
||||
ViewState("CveCompra") = Request("CveCompra")
|
||||
@@ -1462,9 +1457,9 @@ Partial Class Compras_Compras
|
||||
UpLnkPaqueteriaGuias.Update()
|
||||
End If
|
||||
|
||||
If Not CveCompra > 0 Then
|
||||
LIContratos.Visible = True
|
||||
End If
|
||||
If UsuarioActual.TienePermisoProceso(360) Then BtnProrateoDeducible.Visible = True
|
||||
|
||||
If Not CveCompra > 0 Then LIContratos.Visible = True
|
||||
|
||||
'SI ES UNA COMPRA NUEVA SE PONE EL TOTAL, SI NO EL SALDO
|
||||
LblSaldoFactura.Text = If(CveCompra > 0, CompraSaldo.FormatoNumero, TxtTotal.Text.FormatoNumero)
|
||||
@@ -3048,8 +3043,10 @@ Partial Class Compras_Compras
|
||||
|
||||
'ELIMINAR A FUERZAS
|
||||
If UsuarioActual.TienePermisoProceso(77) Then
|
||||
If Not (IdPoliza > 0) Then
|
||||
BtnEliminarCompra.Visible = True
|
||||
BtnEliminarCompra.Visible = True
|
||||
If CompraSaldo <> TxtTotal.Text.ToDouble AndAlso dr("TipoDocto").ToString = "Fac" Then
|
||||
BtnEliminarCompra.Enabled = False
|
||||
BtnEliminarCompra.ToolTip = "La compra tiene pagos asociados, elimine los pagos primero."
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -3061,7 +3058,7 @@ Partial Class Compras_Compras
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
BtnEliminarCompra.Attributes.Add("data-original-title", String.Format("¿Está seguro que desea eliminar la Compra, {0} y la <b>Poliza Asociada</b>?", StrInventario))
|
||||
Else
|
||||
ElseIf BtnEliminarCompra.Enabled Then
|
||||
BtnEliminarCompra.Attributes.Add("data-original-title", String.Format("¿Está seguro que desea eliminar la Compra y {0}?", StrInventario))
|
||||
End If
|
||||
End If
|
||||
@@ -6600,7 +6597,7 @@ Partial Class Compras_Compras
|
||||
|
||||
'no es necesario, ya se está interpretandoe l usado como producto
|
||||
Dim ConceptoContabilizacionNC = 225
|
||||
Dim tCveClasif As Integer = -1
|
||||
Dim tCveClasif As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion > 0 ").ToEntero
|
||||
Dim tCveSubProyecto As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", "CveSubProyecto > 0 ").ToEntero
|
||||
Dim CveMovimientoDevolucion As Integer = -1
|
||||
|
||||
@@ -6612,11 +6609,14 @@ Partial Class Compras_Compras
|
||||
'cuando es garantía.
|
||||
If DdlTipoCompra.SelectedValue = "12" Then
|
||||
ConceptoContabilizacionNC = 259
|
||||
tCveClasif = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion > 0 ").ToEntero
|
||||
End If
|
||||
|
||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||
|
||||
If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2, UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If importeMovimiento > 0 Or TxtTotal.Text.ToDecimal = 0 Then
|
||||
RegistroCuentaPuente = True
|
||||
Dim ImporteTransito As Decimal = 0
|
||||
@@ -10166,7 +10166,7 @@ Partial Class Compras_Compras
|
||||
CargaGvInv()
|
||||
CargaGVsAF()
|
||||
CargaGvPersonal()
|
||||
Alert("El Concepto ha sido eliminado correctamente", TipoMensaje.MsgInformacion)
|
||||
Alert("El Concepto ha sido eliminado correctamente", TipoMensaje.ToastInformacion)
|
||||
End Sub
|
||||
Private Sub GvDeudores_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDeudores.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -16205,7 +16205,7 @@ Partial Class Compras_Compras
|
||||
'HACEMOS CALCULOS
|
||||
SubTotalIVA = TmpDT.SUM("IVA")
|
||||
SubTotalIEPSIVA = TmpDT.SUM("IEPSPSIVA")
|
||||
SubTotal = (TmpDT.SUM("Total") + TmpDT.SUM("Descuento")).RoundSQL(6)
|
||||
SubTotal = (TmpDT.SUM("Total") + TmpDT.SUM("Descuento")).RoundSQL(8)
|
||||
RetIVA = TmpDT.SUM("RetIVA")
|
||||
RetISR = TmpDT.SUM("RetISR")
|
||||
IEPSPS = TmpDT.SUM("IEPSPS")
|
||||
@@ -16674,7 +16674,7 @@ Partial Class Compras_Compras
|
||||
ViewState("RetIVA") = GvRow.DataKey("RetIVAPorcentaje").ToDouble
|
||||
ViewState("RetISR") = GvRow.DataKey("RetISRPorcentaje").ToDouble
|
||||
|
||||
TxtPrecio.Text = GvRow.DataKey("PU").ToDecimal.ToString("#,##0.00####")
|
||||
TxtPrecio.Text = GvRow.DataKey("PU").ToDecimal.ToString("#,##0.00########")
|
||||
TxtDescuentoModal.Text = GvRow.DataKey("Descuento").ToDecimal.ToString("#,##0.00####")
|
||||
LblTotalPS.Text = GvRow.DataKey("Total").FormatoNumero
|
||||
|
||||
@@ -18271,7 +18271,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
Else
|
||||
If ChkNCInvNC.Checked Then
|
||||
Alert("Niguna de las facturas seleccionadas cuenta con productos pendientes de darles entrada.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Ninguna de las facturas seleccionadas cuenta con productos pendientes de darles entrada.", TipoMensaje.MsgAdvertencia)
|
||||
ChkNCInvNC.Checked = False
|
||||
UpChkNCInvNC.Update()
|
||||
Exit Sub
|
||||
@@ -18360,15 +18360,18 @@ Partial Class Compras_Compras
|
||||
'Dim ObjCompras As New ClsCompras
|
||||
'Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL)
|
||||
'Dim TieneError = False
|
||||
|
||||
'For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
|
||||
' If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
|
||||
' If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
' End If
|
||||
' End If
|
||||
'Next
|
||||
Dim i As Integer = 0
|
||||
For Each Gvr As GridViewRow In GVNCInvAlmacen.Rows
|
||||
If Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble > 0 Then
|
||||
If i < TmpDT.Rows.Count Then
|
||||
TmpDT.Rows(i)("CveOrdenCompraDetalle") = Gvr.DataKey("CveOrdenCompraDetalle")
|
||||
End If
|
||||
'If Not ObjCompras.ComprasDetalleDevolucionesAdd(Gvr.DataKey("CveCompraDetalle").ToEntero, Gvr.DataKey("CveCompra").ToEntero, Gvr.FCTextBox("TxtCantidadNCInv").Text.ToDouble, UsuarioActual.CveEmpresa) Then
|
||||
' TieneError = True
|
||||
' Exit For
|
||||
'End If
|
||||
End If
|
||||
Next
|
||||
|
||||
'If Not TieneError Then
|
||||
' Alert("Se guardo la devolución correctamente", TipoMensaje.MsgInformacion)
|
||||
@@ -20492,6 +20495,10 @@ Partial Class Compras_Compras
|
||||
dRow8_5("Descuento") = dRow8_5("Descuento").ToString.ToDecimal * Mul85
|
||||
dRow8_5("Total") = dRow8_5("Total").ToString.ToDecimal * Mul85
|
||||
dRow8_5("NoDeducible") = 0
|
||||
If DdlAsignaSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
dRow8_5("CveSubProyecto") = DdlAsignaSubProyecto.SelectedValue.ToEntero
|
||||
dRow8_5("SubProyecto") = DdlAsignaSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
psCvePs = 700563
|
||||
rowPS = GlobalDTPS(UsuarioActual.CveEmpresa, psCvePs).Rows(0)
|
||||
@@ -20518,6 +20525,11 @@ Partial Class Compras_Compras
|
||||
dRow91_5("Descuento") = dRow91_5("Descuento").ToString.ToDecimal * Mul91_5
|
||||
dRow91_5("Total") = dRow91_5("Total").ToString.ToDecimal * Mul91_5
|
||||
dRow91_5("NoDeducible") = 1
|
||||
If DdlAsignaSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
dRow91_5("CveSubProyecto") = DdlAsignaSubProyecto.SelectedValue.ToEntero
|
||||
dRow91_5("SubProyecto") = DdlAsignaSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
DTProtateo.Rows.Add(dRow8_5)
|
||||
DTProtateo.Rows.Add(dRow91_5)
|
||||
Consec = Consec + 2
|
||||
|
||||
@@ -1107,6 +1107,19 @@
|
||||
<asp:Label runat="server" Text='<%# Eval("UsuarioIng")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkRemoveSolicitud" runat="server" OnClick="LnkRemoveSolicitud_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-minus'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar la solicitud?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -781,6 +781,11 @@ Partial Class Compras_eFacturas
|
||||
CargaGvBitacora()
|
||||
CargaDatos()
|
||||
MostrarSolcitudesSAT()
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
GVSolicitudesPendientes.Columns(8).Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
removeasincevent()
|
||||
End Sub
|
||||
@@ -2790,6 +2795,8 @@ Partial Class Compras_eFacturas
|
||||
Protected Sub LnkverificarSolicitudes_Click(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Try
|
||||
Dim sbResultado As StringBuilder = New StringBuilder()
|
||||
Dim TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion
|
||||
|
||||
|
||||
For Each GvRow As GridViewRow In GVSolicitudesPendientes.Rows
|
||||
Dim CveSolicitudActual As Integer = GvRow.DataKey("CveSolicitud").ToEntero()
|
||||
@@ -2800,17 +2807,33 @@ Partial Class Compras_eFacturas
|
||||
Dim resultVerificacion As List(Of String) = New List(Of String)()
|
||||
Dim ResultadoVerificaionOK = False
|
||||
Dim SeVerifico = False
|
||||
Dim TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion
|
||||
|
||||
Dim ResultadoSolicitudOK = False
|
||||
Dim api = New GeneralesAPIeFacturas()
|
||||
|
||||
Dim Verificar As Boolean = True
|
||||
|
||||
If idSolicitud.Length = 0 Then
|
||||
Dim ObjApiSolicitud As JToken = CType(api.GeneraSolicitud(UsuarioActual.CveEmpresa, CveTipoSolicitud, CveSolicitudActual), JToken)
|
||||
|
||||
If Not (ObjApiSolicitud Is Nothing) Then
|
||||
resultSolicitud = ObjApiSolicitud.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList()
|
||||
ResultadoSolicitudOK = Boolean.Parse(resultSolicitud(0))
|
||||
sbResultado.Append($"Solicitud {Folio} solicitada a SAT.<br>")
|
||||
|
||||
Try
|
||||
sbResultado.Append($"Solicitud {Folio} { resultSolicitud(1)}.<br>")
|
||||
|
||||
If resultSolicitud(1).Contains("No se Generaron solicitudes al SAT") Then
|
||||
Verificar = False
|
||||
Else
|
||||
Verificar = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
sbResultado.Append($"Solicitud {Folio} solicitada a SAT.<br>")
|
||||
Verificar = False
|
||||
End Try
|
||||
|
||||
|
||||
Else
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
@@ -2821,13 +2844,24 @@ Partial Class Compras_eFacturas
|
||||
resultSolicitud.Add("")
|
||||
resultSolicitud.Add("")
|
||||
ResultadoSolicitudOK = True
|
||||
Verificar = True
|
||||
End If
|
||||
|
||||
If ResultadoSolicitudOK Then
|
||||
If ResultadoSolicitudOK And Verificar Then
|
||||
Dim ObjApiVerificacion As JToken = CType(api.VerificaSolicitudesNominas(UsuarioActual.CveEmpresa, CveTipoSolicitud, CveSolicitudActual), JToken)
|
||||
|
||||
If Not (ObjApiVerificacion Is Nothing) Then
|
||||
resultVerificacion = ObjApiVerificacion.[Select](Function(token) token.Values().Aggregate(Function(i, j) $"{i}|{j}").Value(Of String)()).ToList()
|
||||
|
||||
'If UsuarioActual.CveRol = 1 Then
|
||||
' Dim respesta = New StringBuilder
|
||||
' For Each s As String In resultVerificacion
|
||||
' respesta.AppendLine($"{s} - ")
|
||||
' Next
|
||||
|
||||
' Alert(respesta.ToString)
|
||||
'End If
|
||||
|
||||
ResultadoVerificaionOK = Boolean.Parse(resultVerificacion(0))
|
||||
SeVerifico = True
|
||||
Else
|
||||
@@ -2835,7 +2869,7 @@ Partial Class Compras_eFacturas
|
||||
End If
|
||||
Else
|
||||
|
||||
If resultSolicitud.Count = 4 Then
|
||||
If resultSolicitud.Count >= 4 Then
|
||||
sbResultado.Append($"({resultSolicitud(1)})<br> Folio:{Folio} <br> ")
|
||||
Else
|
||||
sbResultado.Append($"Solicitud pendiente de verificar en SAT <br> Folio:{Folio} <br>")
|
||||
@@ -2844,22 +2878,30 @@ Partial Class Compras_eFacturas
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
|
||||
If SeVerifico AndAlso resultVerificacion.Count = 4 Then
|
||||
|
||||
If ResultadoVerificaionOK Then
|
||||
sbResultado.Append($"Solicitud procesada.<br> Folio: {Folio} <br> {resultVerificacion(1)}")
|
||||
'If UsuarioActual.CveRol = 1 Then
|
||||
' Alert($"SeVerifico {SeVerifico.ToString} resultVerificacion.Count {resultVerificacion.Count }")
|
||||
'End If
|
||||
If Verificar Then
|
||||
If SeVerifico AndAlso resultVerificacion.Count >= 4 Then
|
||||
|
||||
If ResultadoVerificaionOK Then
|
||||
sbResultado.Append($"Solicitud procesadaFolio: {Folio} <br> {resultVerificacion(1)}")
|
||||
Else
|
||||
sbResultado.Append($"Solicitud no verificada <br> Folio: {Folio}{resultVerificacion(1)}.<br>")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
Else
|
||||
sbResultado.Append($"Solicitud no verificada <br> Folio: {Folio}{resultVerificacion(1)}.<br>")
|
||||
sbResultado.Append($"Se presento un error al verificar la solicitud Folio: {Folio}. <br>")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
Else
|
||||
sbResultado.Append($"Se presento un error al verificar la solicitud <br> Folio: {Folio}.")
|
||||
TipoMensaje = ModExtensiones.TipoMensaje.MsgAdvertencia
|
||||
End If
|
||||
|
||||
Alert(sbResultado.ToString(), TipoMensaje)
|
||||
|
||||
|
||||
Next
|
||||
|
||||
Alert(sbResultado.ToString(), TipoMensaje)
|
||||
cargasolicitudes()
|
||||
Catch ex As Exception
|
||||
Alert(ex.StackTrace)
|
||||
@@ -4996,6 +5038,26 @@ Partial Class Compras_eFacturas
|
||||
RegistraScript("$('#DvmodalPersonalizar').modal('show');")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkRemoveSolicitud_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim ProcesoOk As Boolean = False
|
||||
|
||||
Dim CveSolicitud = gvRow.DataKey("CveSolicitud").ToEntero
|
||||
Dim Folio = gvRow.DataKey("Folio").ToEntero
|
||||
|
||||
Using nom As ClsNominas = New ClsNominas()
|
||||
ProcesoOk = nom.SolicitudesCancelar(CveSolicitud, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)
|
||||
End Using
|
||||
|
||||
If ProcesoOk Then
|
||||
Alert($"Solicitud {Folio} cancelada correctamente.")
|
||||
cargasolicitudes()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
@@ -5015,6 +5077,12 @@ Public Class GeneralesAPIeFacturas
|
||||
Public Function VerificaSolicitudesNominas(CveEmpresa As Integer, CveTipoSolicitud As Integer, CveSolicitud As Integer) As Object
|
||||
Return getData(Of Object)($"VerificaSolicitudesNominas/{CveEmpresa}/{CveTipoSolicitud}/{CveSolicitud}", Nothing, ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.requestMethod.[GET], False)
|
||||
End Function
|
||||
|
||||
Public Function CancelarSolicitud(CveEmpresa As Integer, CveSolicitud As Integer, CveUsuario As Integer) As Object
|
||||
Return getData(Of Object)($"CancelarSolicitud/{CveEmpresa}/{CveSolicitud}/{CveUsuario}", Nothing, ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.requestMethod.[GET], False)
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:LinkButton ID="LnkSimplificar" runat="server" OnClick="LnkSimplificarCompra_Click" ToolTip="Simplificar Póliza"><i class='fa fa-exchange'></i></asp:LinkButton>
|
||||
</td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<td style="width: 95px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" CssClass="Texto" Text="Ver Poliza" ></asp:HyperLink>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -144,6 +144,7 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
|
||||
if (UsuarioActual.Empresa.TipoContabilidad == 1) // conta SIG
|
||||
{
|
||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("FolioPoliza").ToEntero() > 0;
|
||||
e.Row.FCHyperLink("HLPoliza").Text = $"Póliza: {e.Row.DBCampo("FolioPoliza")}";
|
||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}";
|
||||
}
|
||||
else
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<asp:LinkButton ID="LnkSimplificar" runat="server" OnClick="LnkSimplificarCompra_Click" ToolTip="Simplificar Póliza"><i class='fa fa-exchange'></i></asp:LinkButton>
|
||||
</td>
|
||||
<td style="width: 70px; text-align: left;">
|
||||
<td style="width: 95px; text-align: left;">
|
||||
<asp:HyperLink ID="HLPoliza" runat="server" Target="_blank" Visible="false" CssClass="Texto" Text="Ver Poliza" NavigateUrl='<%# Eval("IdPoliza", "/Contabilidad/RegPoliza.aspx?IdPoliza={0}")%>'></asp:HyperLink>
|
||||
</td>
|
||||
|
||||
|
||||
@@ -129,7 +129,16 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
|
||||
e.Row.FCHyperLink("HplEdicion").Visible = true;
|
||||
}
|
||||
|
||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("IdPoliza").ToEntero() > 0;
|
||||
if (UsuarioActual.Empresa.TipoContabilidad == 1)
|
||||
{
|
||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("FolioPoliza").ToEntero() > 0;
|
||||
e.Row.FCHyperLink("HLPoliza").Text = $"Póliza: {e.Row.DBCampo("FolioPoliza")}" ;
|
||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}";
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("IdPoliza").ToEntero() > 0;
|
||||
}
|
||||
|
||||
contP.Dispose();
|
||||
GvD.DataBind();
|
||||
@@ -409,20 +418,29 @@ public partial class Contabilidad_ContabilizacionVentas : ClsPaginas
|
||||
int index = Convert.ToInt32(row.RowIndex);
|
||||
|
||||
int CvePrePoliza = GvV.DataKeys[row.RowIndex]["CvePrePoliza"].ToString().ToEntero();
|
||||
|
||||
ObjMov.IniciaTransacSQL();
|
||||
bool HuboError = false;
|
||||
if (ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
if (ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 5))// por default manda la opcion 5, para ajustar a fluctuacion
|
||||
var usuario = UsuarioActual;
|
||||
if (ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref usuario, Opcion:5,AutoConta:false))// por default manda la opcion 5, para ajustar a fluctuacion
|
||||
{
|
||||
|
||||
Alert("Se ha simplificado la poliza correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
}
|
||||
Alert("Se ha simplificado la poliza correctamente", ModExtensiones.TipoMensaje.MsgInformacion);
|
||||
else
|
||||
{ HuboError = true; }
|
||||
}
|
||||
else
|
||||
{
|
||||
HuboError = true;
|
||||
Alert("Ocurrió un error al simplificar la póliza", ModExtensiones.TipoMensaje.MsgError);
|
||||
}
|
||||
|
||||
if (!HuboError)
|
||||
{ ObjMov.Commit(); }
|
||||
else
|
||||
{ ObjMov.RollBack(); }
|
||||
|
||||
ObjMov.Dispose();
|
||||
cargaPolizas();
|
||||
}
|
||||
|
||||
@@ -548,6 +548,7 @@
|
||||
<tr>
|
||||
<td style="width: 100%; text-align: center;">
|
||||
<asp:HiddenField runat="server" ID="HdnGuardar" ClientIDMode="Static" />
|
||||
<asp:HyperLink ID="HplCvePrep" runat="server" Visible="false" Target="_blank">Prep </asp:HyperLink>
|
||||
<%--<asp:Button ID="BtnGuardar" runat="server" Text="Guardar" CausesValidation="true" ValidationGroup="GrpGuardar" Width="80px" UseSubmitBehavior="False" class="btn btn-primary"/>--%>
|
||||
<asp:LinkButton ID="BtnGuardar" runat="server" Text="<i class='fa fa-check'></i> Guardar" CausesValidation="true" ValidationGroup="GrpGuardar" UseSubmitBehavior="False" class="btn btn-primary"></asp:LinkButton>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Drawing
|
||||
Imports Extensiones
|
||||
'Imports System.Activities.Statements
|
||||
'Imports msExcel = Microsoft.Office.Interop.Excel
|
||||
@@ -11,8 +12,7 @@ Imports Extensiones
|
||||
Partial Class RegPoliza
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Shared missing As Object = System.Reflection.Missing.Value
|
||||
'Dim RemoveMovimientos As New ArrayList()
|
||||
|
||||
#Region "P R O P E R T Y"
|
||||
Private Property NumRow As Integer
|
||||
Private Property IDPoliza As Integer
|
||||
@@ -213,6 +213,8 @@ Partial Class RegPoliza
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
|
||||
Else
|
||||
Alert("Este módulo requiere el uso de Contabilidad.", TipoMensaje.MsgAdvertencia)
|
||||
BtnConsultar.Enabled = False
|
||||
@@ -624,110 +626,6 @@ Partial Class RegPoliza
|
||||
|
||||
End Sub
|
||||
|
||||
'#Region "E X C E L"
|
||||
' Private Function GetMacro() As String
|
||||
' Dim SB As New StringBuilder
|
||||
' SB.Append(" Sub AddRow(Row As String) " & vbLf)
|
||||
' SB.Append(" Rows(Row & "":"" & Row).Select " & vbLf)
|
||||
' SB.Append(" Selection.Copy " & vbLf)
|
||||
' SB.Append(" Selection.Insert Shift:=xlDown " & vbLf)
|
||||
' SB.Append(" Rows(Row+1 & "":"" & Row+1).Select " & vbLf)
|
||||
' SB.Append(" Selection.ClearContents " & vbLf)
|
||||
' SB.Append(" End Sub " & vbLf)
|
||||
' Return SB.ToString
|
||||
' End Function
|
||||
|
||||
' Private Sub GeneraPDF()
|
||||
' Dim Msg As New StringBuilder
|
||||
' Dim Excel As msExcel.Application = New msExcel.Application()
|
||||
' Dim VB_Module As VBComponent = Nothing
|
||||
' Excel.Visible = True
|
||||
' Excel.ScreenUpdating = True
|
||||
' Excel.DisplayAlerts = True
|
||||
' Dim ArchivoBase As New System.IO.FileInfo(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza.xlsm")
|
||||
' 'ArchivoBase.CopyTo(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & LtlNumeroPoliza.Text.ToString() & ".xlsm", True)
|
||||
' ArchivoBase.CopyTo(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & TxtNumeroPoliza.Text.ToString() & ".xlsm", True)
|
||||
' 'Dim ArchivoTemp As New System.IO.FileInfo(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & LtlNumeroPoliza.Text.ToString() & ".xlsm")
|
||||
' Dim ArchivoTemp As New System.IO.FileInfo(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & TxtNumeroPoliza.Text.ToString() & ".xlsm")
|
||||
|
||||
' Dim Libro As msExcel.Workbook = Excel.Workbooks.Open(ArchivoTemp.FullName, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing)
|
||||
' Libro.Activate()
|
||||
|
||||
' Dim Hoja As msExcel.Worksheet = CType(Libro.Worksheets(1), Microsoft.Office.Interop.Excel.Worksheet)
|
||||
' Hoja.Visible = Microsoft.Office.Interop.Excel.XlSheetVisibility.xlSheetVisible
|
||||
' Hoja.Activate()
|
||||
' VB_Module = CType(Libro.VBProject.VBComponents.Add(Microsoft.Vbe.Interop.vbext_ComponentType.vbext_ct_StdModule), VBComponent)
|
||||
' VB_Module.CodeModule.AddFromString(GetMacro)
|
||||
|
||||
' 'Encabezado
|
||||
' Hoja.Range("A1:A1").Value = UsuarioActual.Empresa.Empresa.ToString.Trim
|
||||
' Hoja.Range("F2:F2").Value = "Impresión de póliza del " + TxtFechaPoliza.Text.Trim.ToDate.ToShortDateString + " al " + TxtFechaPoliza.Text.Trim.ToDate.ToShortDateString
|
||||
' Hoja.Range("K2:K2").Value = TxtFechaPoliza.Text.Trim.ToDate.ToShortDateString
|
||||
|
||||
' 'Linea 1 datos de la poliza
|
||||
' Dim CeldaI As Integer = 9
|
||||
' Dim CeldaF As Integer = 9
|
||||
' Hoja.Range("A" & CeldaF & ":A" & CeldaF).Value = TxtFechaPoliza.Text.Trim.ToDate.ToShortDateString
|
||||
' Hoja.Range("C" & CeldaF & ":C" & CeldaF).Value = DdlTipoPoliza.SelectedItem.ToString.Trim
|
||||
' 'Hoja.Range("E" & CeldaF & ":E" & CeldaF).Value = LtlNumeroPoliza.Text.Trim
|
||||
' Hoja.Range("E" & CeldaF & ":E" & CeldaF).Value = TxtNumeroPoliza.Text.Trim
|
||||
' Hoja.Range("F" & CeldaF & ":F" & CeldaF).Value = TxtConcepto.Text.Trim
|
||||
|
||||
' CeldaF = CeldaF + 1
|
||||
' 'Movimientos de la poliza Debe de haceptar 36 renglones de excel
|
||||
' For Each Row As DataRow In TmpDT.Rows
|
||||
' Libro.Application.Run("AddRow", (CeldaF - 1).ToString, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing,
|
||||
' missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing)
|
||||
' Hoja.Range("A" & CeldaF & ":A" & CeldaF).Value = Row("NumMovto").ToString.Trim
|
||||
' Hoja.Range("B" & CeldaF & ":B" & CeldaF).Value = Row("Referencia").ToString.Trim
|
||||
' Hoja.Range("D" & CeldaF & ":D" & CeldaF).Value = Row("CuentaFormato").ToString.Trim
|
||||
' Hoja.Range("F" & CeldaF & ":F" & CeldaF).Value = Row("Cuenta").ToString.Trim
|
||||
' If Row("Cargo").ToString.ToDouble <> 0 Then
|
||||
' Hoja.Range("J" & CeldaF & ":J" & CeldaF).Value = Row("Cargo").ToString.FormatoNumero
|
||||
' End If
|
||||
' If Row("Abono").ToString.ToDouble <> 0 Then
|
||||
' Hoja.Range("K" & CeldaF & ":K" & CeldaF).Value = Row("Abono").ToString.FormatoNumero
|
||||
' End If
|
||||
' CeldaF = CeldaF + 1
|
||||
' Libro.Application.Run("AddRow", (CeldaF - 1).ToString, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing,
|
||||
' missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing)
|
||||
' Hoja.Range("F" & CeldaF & ":F" & CeldaF).Value = Row("Concepto").ToString.Trim
|
||||
' CeldaF = CeldaF + 1
|
||||
' Next
|
||||
' Hoja.Range("J" & CeldaF & ":J" & CeldaF).Value = TmpDT.SUM("Cargo").FormatoNumero
|
||||
' Hoja.Range("K" & CeldaF & ":K" & CeldaF).Value = TmpDT.SUM("Abono").FormatoNumero
|
||||
|
||||
' 'Exportar PDF
|
||||
' 'Dim pdfFileOut As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & LtlNumeroPoliza.Text.ToString() & ".pdf"
|
||||
' Dim pdfFileOut As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\Formatos\Poliza_" & TxtNumeroPoliza.Text.ToString() & ".pdf"
|
||||
' Dim outputFileName As Object = pdfFileOut
|
||||
' Dim fileFormat As msExcel.XlFixedFormatType = msExcel.XlFixedFormatType.xlTypePDF
|
||||
' Libro.ExportAsFixedFormat(fileFormat, outputFileName, missing, missing, missing, missing, missing, missing, missing)
|
||||
' System.Runtime.InteropServices.Marshal.ReleaseComObject(Hoja)
|
||||
' Hoja = Nothing
|
||||
' Dim saveChanges As Object = msExcel.XlSaveAction.xlDoNotSaveChanges
|
||||
' CType(Libro, msExcel._Workbook).Close(saveChanges, missing, missing)
|
||||
' System.Runtime.InteropServices.Marshal.ReleaseComObject(Libro)
|
||||
' Libro = Nothing
|
||||
' Excel.Quit()
|
||||
' System.Runtime.InteropServices.Marshal.ReleaseComObject(Excel)
|
||||
' Excel = Nothing
|
||||
' GC.Collect()
|
||||
' GC.WaitForPendingFinalizers()
|
||||
' ArchivoTemp.Delete()
|
||||
|
||||
' Dim Descargas As New StringBuilder()
|
||||
' 'Descargas.AppendFormat("<li><a class=""Texto"" href=""/Empresas/{0}/Formatos/Poliza_{1}.pdf"" target=""_blank"">PDF</a></li>", UsuarioActual.CveEmpresa, LtlNumeroPoliza.Text)
|
||||
' Descargas.AppendFormat("<li><a class=""Texto"" href=""/Empresas/{0}/Formatos/Poliza_{1}.pdf"" target=""_blank"">PDF</a></li>", UsuarioActual.CveEmpresa, TxtNumeroPoliza.Text)
|
||||
|
||||
' Alert("<br />La impresión se generó correctamente.<br /><br /><br />Descargas:<ul>" & Descargas.ToString & "</ul>", TipoMensaje.MsgInformacion)
|
||||
' 'RegistraScript("AbrirVentana('/Ventas/PopUpImprimir.aspx?CveVenta=" & If(EsVistaPrevia, UsuarioActual.CveUsuario.ToString, VentaFolio) & "&Ext=PDF', 700, 400, 'N', 'ImpVenta')")
|
||||
|
||||
|
||||
' End Sub
|
||||
|
||||
'#End Region
|
||||
|
||||
|
||||
#Region " P O L I Z A S - C O M P L E M E N T A R I A S "
|
||||
Private Sub CargaPolizaComplementaria(tIDPoliza As Integer)
|
||||
@@ -982,17 +880,26 @@ Partial Class RegPoliza
|
||||
If ObjConta.GetPrePoliza(-1, UsuarioActual.CveEmpresa, IDPoliza) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
CvePrePoliza = ObjConta.DtResultados.Rows(0)("CvePrePoliza").ToString.ToEntero
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
BtnNuevo.BackColor = Color.Yellow
|
||||
BtnNuevo.ToolTip = CvePrePoliza.ToString
|
||||
HplCvePrep.Visible = True
|
||||
HplCvePrep.NavigateUrl = "/Contabilidad/RegPrePolizas.aspx?CvePrePoliza=" & CvePrePoliza
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(145) Then
|
||||
BtnEliminar.Visible = True
|
||||
End If
|
||||
' CargaDevoluciones()
|
||||
BtnEliminar.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
' CargaDevoluciones()
|
||||
End If
|
||||
If Request("Regenera") IsNot Nothing AndAlso Request("Regenera").ToString = "1" Then
|
||||
GeneraPrePoliza(tIDPoliza, DT, CvePrePoliza)
|
||||
End If
|
||||
|
||||
End If
|
||||
ObjPoliza.Dispose()
|
||||
ObjConta.Dispose()
|
||||
|
||||
@@ -1244,6 +1151,82 @@ Partial Class RegPoliza
|
||||
ObjContabilidad.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub GeneraPrePoliza(tIdPoliza As Integer, dtt As DataTable, tCvePrePoliza As Integer)
|
||||
Dim ObjConta As New ClsContabilidad()
|
||||
ObjConta.IniciaTransacSQL()
|
||||
Dim ObjContaq As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaq.IniciaTransacSQL()
|
||||
Dim ErrorRegistro As Boolean = False
|
||||
Dim dr As DataRow = dtt.FiltroPrimero("")
|
||||
Dim tCvePrePolizaOriginal As Integer = tCvePrePoliza
|
||||
|
||||
If tCvePrePoliza <= 0 Then
|
||||
tCvePrePoliza = ObjConta.AddPrePolizas("RegPreP/Man", 53, 0, 0, 1, dr("FechaPol").ToString.ToDate, If(dr("ConceptoPoliza").ToString = "", ".", dr("ConceptoPoliza").ToString), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
FolioFijo:=dr("Folio").ToString.ToEntero)
|
||||
Else
|
||||
'ocultar los que ya están registrados en la prepóliza
|
||||
If ObjConta.GetPrePolizasDetalle(tCvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||
For Each drtt As DataRow In ObjConta.DtResultados.FiltraParametros("Contabilizable = 1").Rows
|
||||
ObjConta.UpdateContabilizable(drtt("CvePrePolizaDetalle").ToString.ToEntero, False)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
If tCvePrePoliza > 0 Then
|
||||
Dim dtc As DataTable = Nothing
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
dtc = ObjConta.DtResultados
|
||||
End If
|
||||
|
||||
For Each drt As DataRow In dtt.Rows
|
||||
'PrePólizaDetalle
|
||||
Dim tCveCuenta As Integer = dtc.FiltroPrimeroValor("CveCuenta", $"IdCompaq={drt("IdCuenta")}").ToEntero
|
||||
Dim tCveSub As Integer = If(drt("IdSegNeg").ToString <> "", GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"SubProyecto ='{drt("SegNeg")}'").ToEntero, -1)
|
||||
'If tCveSub <= 0 AndAlso drt("IdSegNeg").ToString.ToEntero = 0 Then 'toma el primero
|
||||
' tCveSub = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
'End If
|
||||
If ObjConta.AddPrePolizasDetalle(tCvePrePoliza, drt("TipoMovto").ToString = "True",
|
||||
drt("Importe").ToString.ToDecimal,
|
||||
drt("Concepto").ToString, 299,
|
||||
drt("Concepto").ToString, Now,
|
||||
drt("IdCuenta").ToString.ToEntero, 0,
|
||||
CveSubProyecto:=tCveSub,
|
||||
ImporteMX:=drt("Importe").ToString.ToDecimal, CveCuenta:=tCveCuenta) Then
|
||||
'registro
|
||||
If Not ObjContaq.UpdateMovimientoPrePolizaDetalle(drt("IdPoliza").ToString.ToEntero,
|
||||
drt("Id").ToString.ToEntero,
|
||||
ObjConta.CvePrePolizaDetalle) Then
|
||||
ErrorRegistro = True
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
ErrorRegistro = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorRegistro AndAlso tCvePrePolizaOriginal <= 0 AndAlso Not ObjConta.UpdatePrePoliza(dr("FechaPol").ToString.ToDate, dr("Folio").ToString.ToEntero, -1, tIdPoliza, tCvePrePoliza, UsuarioActual.CveEmpresa, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorRegistro = True
|
||||
End If
|
||||
Else
|
||||
ErrorRegistro = True
|
||||
End If
|
||||
|
||||
If Not ErrorRegistro Then
|
||||
Alert($"<a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={tCvePrePoliza}"">Ver Póliza</a> ")
|
||||
ObjConta.Commit()
|
||||
ObjContaq.Commit()
|
||||
Else
|
||||
ObjConta.RollBack()
|
||||
ObjContaq.RollBack()
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
ObjContaq.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Historial de Modificacion"
|
||||
@@ -1259,53 +1242,6 @@ Partial Class RegPoliza
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
'Protected Sub TxtNumeroPoliza_TextChanged(sender As Object, e As EventArgs) Handles TxtNumeroPoliza.TextChanged
|
||||
' If HdnFolioPoliza.Value.ToEntero <> TxtNumeroPoliza.Text.Trim.ToEntero Then
|
||||
' BtnGuardar.OnClientClick = "return confirm('Intenta cambiar el número de la póliza?')"
|
||||
' Else
|
||||
' BtnGuardar.OnClientClick = ""
|
||||
' End If
|
||||
' upDatos.Update()
|
||||
'End Sub
|
||||
|
||||
'Protected Sub TxtFechaPoliza_TextChanged(sender As Object, e As EventArgs) Handles TxtFechaPoliza.TextChanged
|
||||
' If HdnFechaPoliza.Value.ToDate.ToShortDateString <> TxtFechaPoliza.Text.ToDate.ToShortDateString Then
|
||||
' BtnGuardar.OnClientClick = "return confirm('Intenta cambiar la fecha de la póliza?')"
|
||||
' Else
|
||||
' BtnGuardar.OnClientClick = ""
|
||||
' End If
|
||||
' upDatos.Update()
|
||||
' upTitulos.Update()
|
||||
'End Sub
|
||||
|
||||
'Protected Sub DdlTipoPoliza_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoPoliza.SelectedIndexChanged
|
||||
' If HdnTipoPoliza.Value <> DdlTipoPoliza.SelectedValue Then
|
||||
' BtnGuardar.OnClientClick = "return confirm('Intenta Cambiar el tipo de póliza?')"
|
||||
' Else
|
||||
' BtnGuardar.OnClientClick = ""
|
||||
' End If
|
||||
' upDatos.Update()
|
||||
' upTitulos.Update()
|
||||
'End Sub
|
||||
|
||||
'TmpDT = Nothing
|
||||
'GvDatos.DataBind()
|
||||
'TxtFechaPoliza.Text = ""
|
||||
'TxtFecha.Text = ""
|
||||
'DdlTipoPoliza.SelectedIndex = 0
|
||||
'TxtNumero.Text = ""
|
||||
''LtlNumeroPoliza.Text = "-"
|
||||
'TxtNumeroPoliza.Text = "-"
|
||||
'HdnIdPoliza.Value = ""
|
||||
'TxtConcepto.Text = ""
|
||||
'TxtReferencia.Text = ""
|
||||
'DdlCuenta.SelectedIndex = 0
|
||||
'DdlSegNeg.SelectedIndex = 0
|
||||
'TxtNombreConcepto.Text = ""
|
||||
'TxtCargo.Text = ""
|
||||
'TxtAbono.Text = ""
|
||||
'LblCargo.Text = "0.00"
|
||||
'LblAbono.Text = "0.00"
|
||||
|
||||
Private Sub limpia()
|
||||
HdnCveCuenta.Value = ""
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling: auto;">
|
||||
|
||||
<div class="portlet light xspadding bordered " id="pnldl2">
|
||||
<div class="portlet light xspadding bordered " id="pnldl2" runat="server">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-green"></i>
|
||||
@@ -416,12 +416,12 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpPrePoliza" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div style="width: 100%; min-height: 200px;overflow-scrolling:auto;">
|
||||
<div style="width: 100%; min-height: 200px; overflow-scrolling:auto;" runat="server" id="divPrePolizas">
|
||||
<div class="portlet light xspadding bordered " id="pnldl">
|
||||
<div class="portlet-title">
|
||||
<div class="caption ">
|
||||
<i class="fa fa-bookmark font-green"></i>
|
||||
<span class="caption-subject font-green bold uppercase">Movimientos2</span>
|
||||
<span class="caption-subject font-green bold uppercase">Movimientos.</span>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
@@ -551,14 +551,14 @@
|
||||
<th style="width: 90px;">
|
||||
<asp:UpdatePanel ID="UpTotalCargo" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtTotalCargos" runat="server" Style="text-align: right" Enabled="false" Width="90px" Text="0.00"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtTotalCargos" runat="server" Style="text-align: right" Width="90px" Text="0.00"></asp:TextBox>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</th>
|
||||
<th style="width: 90px;">
|
||||
<asp:UpdatePanel ID="UpTotalAbono" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:TextBox ID="TxtTotalAbonos" runat="server" Style="text-align: right" Enabled="false" Width="90px" Text="0.00"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtTotalAbonos" runat="server" Style="text-align: right" Width="90px" Text="0.00"></asp:TextBox>
|
||||
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -614,7 +614,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Movimiento:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="156px" ValidationGroup="GrpContado"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" Width="200px" DataValueField="CveTipoTransaccion" ValidationGroup="GrpContado"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
@@ -622,7 +622,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Cuenta:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="200px" ValidationGroup="GrpContado"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="200px" ValidationGroup="GrpContado"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpContado"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
@@ -657,11 +657,7 @@
|
||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="500" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</asp:Panel>
|
||||
</div>
|
||||
</div>
|
||||
@@ -893,7 +889,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Movimiento:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlModalConceptoTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="156px" ValidationGroup="GrpMocalConceptoGuardar"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlModalConceptoTipoTransaccion" CssClass="form-control input-sm " runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="200px" ValidationGroup="GrpMocalConceptoGuardar"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalConceptoTipoTransaccion" runat="server" ControlToValidate="DdlModalConceptoTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalConceptoTipoTransaccion" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalConceptoTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
@@ -901,7 +897,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-2">Cuenta:</label>
|
||||
<div class="col-md-6">
|
||||
<asp:DropDownList ID="DdlModalConceptoCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="200px" ValidationGroup="GrpMocalConceptoGuardar"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlModalConceptoCuenta" runat="server" CssClass="form-control input-sm select2me " AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="200px" ValidationGroup="GrpMocalConceptoGuardar"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlModalConceptoCuenta" runat="server" ControlToValidate="DdlModalConceptoCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpMocalConceptoGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceDdlModalConceptoCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModalConceptoCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Net.NetworkInformation
|
||||
Imports ADSNetLibrary.SIGAPI.Models.OC.Response
|
||||
'Imports DocumentFormat.OpenXml
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.JScript
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class ContabilidadC_RegPrePolizaS
|
||||
Inherits ClsPaginas
|
||||
@@ -260,6 +256,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
'End If
|
||||
|
||||
Tick = DateTime.Now.Ticks.ToString
|
||||
TxtTotalCargos.Attributes.Add("readonly", "readonly")
|
||||
TxtTotalAbonos.Attributes.Add("readonly", "readonly")
|
||||
|
||||
CveMoneda = 1
|
||||
ViewState("CvePrePoliza") = 0
|
||||
@@ -778,6 +776,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
CargaSubProyectos()
|
||||
CargaCuentasContables()
|
||||
End If
|
||||
divPrePolizas.Visible = True
|
||||
GvPrePoliza.Visible = True
|
||||
DivAgregarConceptos.Visible = False
|
||||
divMovtos.Visible = False
|
||||
@@ -786,6 +785,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Else
|
||||
DivAgregarConceptos.Visible = False
|
||||
divMovtos.Visible = True
|
||||
divPrePolizas.Visible = False
|
||||
UPMovs.Update()
|
||||
End If
|
||||
|
||||
@@ -936,12 +936,15 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
'validaciones
|
||||
If Not (TotalCargos = TotalAbonos AndAlso (GvPrePoliza.Rows.Count > 0 Or GvMov.Rows.Count > 0)) AndAlso UsuarioActual.CveRol <> 1 Then
|
||||
If ((GvPrePoliza.Visible AndAlso GvPrePoliza.Rows.Count = 0) OrElse ((GvMov.Visible AndAlso GvMov.Rows.Count = 0))) Then
|
||||
Alert(" No se han especificado partidas", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
If (TotalCargos <> TotalAbonos) Then
|
||||
Alert($"La suma de los movimientos no son iguales ({TotalCargos}-{TotalAbonos})", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If Not CvePrePoliza > 0 Then
|
||||
|
||||
For Each Gvr As GridViewRow In GvMov.Rows
|
||||
@@ -1119,10 +1122,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CveIE > 0 AndAlso gvr.DataKey("CveConceptoContable").ToEntero = 30 Then
|
||||
MensajeAlert.AppendFormat("<br/><br/>Folio Bancario: <b><a href = ""/Bancos/IE.aspx?CveIE={0}"" class=""Texto"" target=""_blank"" >{1}</a></b>", CveIE, FolioIE)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaInsertada, 1) Then
|
||||
If MsgError = "" AndAlso Not ObjMov.ValidacionesPrePoliza(CvePrePolizaInsertada, UsuarioActual) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Contabilidad/RegPrePolizas | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePolizaInsertada}", "LogPrePolizas")
|
||||
MsgError = ObjMov.MensajePolizaDescuadre
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpFiltros">
|
||||
<ContentTemplate>
|
||||
<asp:Panel runat="server" DefaultButton="BtnCargaAsignados">
|
||||
@@ -48,73 +47,71 @@
|
||||
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnCargaAsignados" runat="server" Text="Consultar" class="btn btn-default" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a><%--class="expand"--%>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
<li>
|
||||
<label style="width:55px">Ejercicio:</label>
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</li>
|
||||
<li>
|
||||
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="200px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label class="col-md-2" style="width: 80px;" runat="server" id="LiPeriodoLbl">Periodo: </label>
|
||||
|
||||
<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"></asp:ListItem>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cuenta
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me" Enabled="true" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
<li>Cuenta:
|
||||
</li>
|
||||
<li>
|
||||
<asp:DropDownList ID="DdlCuentas" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="CveCuenta" CssClass="form-control input-sm select2me"
|
||||
Enabled="true" Width="250px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
<asp:RequiredFieldValidator ID="RFVDdlCuentas" runat="server" InitialValue="-1" ControlToValidate="DdlCuentas" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpConsulta"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="CERFVDdlCuentas" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlCuentas" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Ejercicio:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 105px">
|
||||
<asp:DropDownList ID="DdlEjercicio" runat="server" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" Style="width: 80px !important;" ValidationGroup="GrpCargaAsignados"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Periodo:
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 105px">
|
||||
<asp:DropDownList ID="DdlPeriodo" runat="server" Width="100px" 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"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:Label ID="LblSubProyecto" runat="server" Text="Label"></asp:Label>
|
||||
</div>
|
||||
<div class="col-md-1" style="min-width: 115px">
|
||||
<asp:DropDownList ID="DdlSubProyecto" Width="200px" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
|
||||
|
||||
<ul class="list-inline" style="font-size: 12px;">
|
||||
|
||||
<li> <label style="width:55px">Divisor:</label>
|
||||
|
||||
<asp:DropDownList ID="DdlDivisor" Width="80px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="1" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Divisor:
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlDivisor" Width="80px" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="1" Value="1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000" Value="1000"></asp:ListItem>
|
||||
<asp:ListItem Text="1,000,000" Value="1000000"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</asp:Panel>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -290,8 +287,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
@@ -84,13 +84,7 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
listacolores.Add("#DDDDDD")
|
||||
listacolores.Add("#999999")
|
||||
listacolores.Add("#000000")
|
||||
listacolores.Add("#FF0F00")
|
||||
'Dim EjercicioParametro, SubProyectoParametro, DivisorParametro As Integer
|
||||
'CveCuenta = IfNull(Request("C"), "-1").ToString.ToEntero
|
||||
'EjercicioParametro = IfNull(Request("E"), "-1").ToString.ToEntero
|
||||
'SubProyectoParametro = IfNull(Request("S"), "-1").ToString.ToEntero
|
||||
'DivisorParametro = IfNull(Request("D"), "-1").ToString.ToEntero
|
||||
|
||||
listacolores.Add("#FF0F00")
|
||||
|
||||
Dim EjercicioParametro, SubProyectoParametro, DivisorParametro, Periodo As Integer
|
||||
CveCuenta = IfNull(Request("CveCuenta"), "-1").ToString.ToEntero
|
||||
@@ -202,7 +196,6 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
GvCC.Columns(Index).HeaderText = Dr("SubProyecto").ToString()
|
||||
listaCampos.Add(New String() {String.Format("SubProyecto{0}", Dr("SubProyecto")), Dr("SubProyecto").ToString()})
|
||||
|
||||
|
||||
'GvCC.Columns(Index + 1).Visible = True
|
||||
'CType(GvCC.Columns(Index + 1), BoundField).DataField = String.Format("SubProyecto{0}Porcentaje", Dr("SubProyecto"))
|
||||
'GvCC.Columns(Index + 1).HeaderText = "%"
|
||||
@@ -312,18 +305,11 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
|
||||
Dim SubProyecto As String = ""
|
||||
|
||||
If DdlSubProyecto.SelectedValue.ToEntero > 0 Then
|
||||
SubProyecto = DdlSubProyecto.SelectedItem.Text
|
||||
End If
|
||||
|
||||
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
|
||||
SbFiltros.AppendFormat("Estado de Resultados Horizontal por : {0}|", SubProyecto)
|
||||
SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
SbFiltros.AppendFormat("Periodo : {0}|", DdlPeriodo.SelectedItem.Text)
|
||||
'SbFiltros.AppendFormat("Fecha Inicio: {0} Fecha Fin: {1}|", $"01/01/{DdlEjercicio.SelectedValue}", $"31/12/{DdlEjercicio.SelectedValue}")
|
||||
SbFiltros.AppendFormat("SubProyecto : {0}|", DdlSubProyecto.SelectedItem.Text)
|
||||
If DdlDivisor.SelectedValue <> "1" Then SbFiltros.AppendFormat("Divisor : {0}|", DdlDivisor.SelectedItem.Text)
|
||||
SbFiltros.AppendFormat("Ejercicio : {0} Periodo : {1}|", DdlEjercicio.SelectedItem.Text, DdlPeriodo.SelectedItem.Text)
|
||||
|
||||
|
||||
GvCC.ExportToExcelGembox("AnexoCatálogoMensual", UsuarioActual, $"Estado de Resultados Horizontal por {LblSubProyecto.Text}", DatoTituloExtra:="", DatosFiltros:=SbFiltros.ToString())
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Exporta Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-file-excel-o"></i> Exporta Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
@@ -66,7 +66,25 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1" runat="server" id="DVConsolidado1" visible="false">Consolidado: </label>
|
||||
|
||||
|
||||
<label class="col-md-1" runat="server" >Ver con Sub Totales: </label>
|
||||
<div class="col-md-1" >
|
||||
<asp:DropDownList ID="DdlVerConSubTotales" runat="server" CssClass="select2me" >
|
||||
<asp:ListItem Text="Si" Value="1" ></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
|
||||
<label class="col-md-1" runat="server" id="DVConsolidado1" visible="false">Consolidado: </label>
|
||||
<div class="col-md-1" runat="server" id="DVConsolidado2" visible="false">
|
||||
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Value ="1">Normal</asp:ListItem>
|
||||
@@ -74,7 +92,6 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-md-1" runat="server" id="DivTipo1" visible="false" >Tipo: </label>
|
||||
<div class="col-md-1" runat="server" id="DivTipo2" visible="false" >
|
||||
<asp:DropDownList ID="DdlTipoReporte" runat="server" Width="150px">
|
||||
@@ -84,10 +101,9 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -96,17 +112,18 @@
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<table style="width: 100%;" class="table table-striped table-advance table-hover">
|
||||
<table style="width: 100%;" class="">
|
||||
<tr>
|
||||
<td width="100%" padding="0">
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvIngresos_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||
CssClass=" Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LbNombre" runat="server" Text='<%# Eval("Nombre")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LbTitulo" runat="server" Style="padding-left: 20px;" Font-Size="14px" Text="INGRESOS Y OTROS BENEFICIOS"></asp:Label>
|
||||
@@ -136,7 +153,8 @@
|
||||
</asp:GridView>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvGastos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastos_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvGastos" runat="server" AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvGastos_RowDataBound" ShowHeaderWhenEmpty="true"
|
||||
CssClass=" Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -177,7 +195,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPPTotal" runat="server">
|
||||
<ContentTemplate>
|
||||
<table class="table table-striped table-hover Widthall">
|
||||
<table class="table table-striped Widthall">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h4>Resultados del Ejercicio:</h4>
|
||||
|
||||
@@ -215,6 +215,104 @@ Partial Class AC_RepEstadoActividades
|
||||
DtGastos.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
|
||||
|
||||
If DdlVerConSubTotales.SelectedValue.ToEntero = 1 Then
|
||||
|
||||
Dim idxUtilidadBruta As Integer = 0
|
||||
Dim idxUtilidadOperacion As Integer = 0
|
||||
Dim idxUtilidadAntesImpuestos As Integer = 0
|
||||
|
||||
Dim IndexActual As Integer = 0
|
||||
For Each dRow As DataRow In DtGastos.Rows
|
||||
|
||||
If dRow("Codigo").ToString.Contains("6000000") Then 'Utilidad Bruta indice que se tomara
|
||||
idxUtilidadBruta = IndexActual
|
||||
IndexActual = IndexActual + 2 'Son mas dos por que se esta conciderando el row en blanco
|
||||
End If
|
||||
|
||||
If dRow("Codigo").ToString.Contains("7000000") Then 'Utilidad de Operación
|
||||
idxUtilidadOperacion = IndexActual
|
||||
IndexActual = IndexActual + 2 'Son mas dos por que se esta conciderando el row en blanco
|
||||
End If
|
||||
|
||||
If dRow("Nombre").ToString.Contains("TOTAL GASTOS") Then 'Utilidad antes de impuestos
|
||||
idxUtilidadAntesImpuestos = IndexActual
|
||||
End If
|
||||
|
||||
IndexActual = IndexActual + 1
|
||||
Next
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
|
||||
'DtIngresos
|
||||
|
||||
Dim UtilidadBrutaActual, UtilidadBrutaAcumulada As Decimal
|
||||
Dim UtilidadOperacionActual, UtilidadOperacionAcumulada As Decimal
|
||||
Dim UtilidadAntesImpuestosActual, UtilidadAntesImpuestosAcumulada As Decimal
|
||||
|
||||
UtilidadBrutaActual = DtIngresos.SUMD("ImporteActual", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '5%' AND CtaMayor = 1 ")
|
||||
UtilidadBrutaAcumulada = DtIngresos.SUMD("ImporteAcumulado", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '5%' AND CtaMayor = 1")
|
||||
|
||||
UtilidadOperacionActual = DtIngresos.SUMD("ImporteActual", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '5%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '6%' AND CtaMayor = 1 ")
|
||||
UtilidadOperacionAcumulada = DtIngresos.SUMD("ImporteAcumulado", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '5%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '6%' AND CtaMayor = 1 ")
|
||||
|
||||
UtilidadAntesImpuestosActual = DtIngresos.SUMD("ImporteActual", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '5%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '6%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteActual", " Codigo LIKE '7%' AND CtaMayor = 1 ")
|
||||
UtilidadAntesImpuestosAcumulada = DtIngresos.SUMD("ImporteAcumulado", " CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '5%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '6%' AND CtaMayor = 1 ") - DtGastos.SUMD("ImporteAcumulado", " Codigo LIKE '7%' AND CtaMayor = 1 ")
|
||||
|
||||
Dim dRowUtilidadBruta As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadBrutaVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
Dim dRowUtilidadOperacion As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadOperacionVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
Dim dRowUtilidadAntesImpuestos As DataRow = DtGastos.NewRow
|
||||
Dim dRowUtilidadAntesImpuestosVacio As DataRow = DtGastos.NewRow
|
||||
|
||||
|
||||
|
||||
dRowUtilidadBruta("Nombre") = "Utilidad Bruta"
|
||||
dRowUtilidadBruta("ImporteActual") = UtilidadBrutaActual
|
||||
dRowUtilidadBruta("ImporteAcumulado") = UtilidadBrutaAcumulada
|
||||
dRowUtilidadBruta("CtaMayor") = -1
|
||||
dRowUtilidadBruta("Orden") = "600"
|
||||
dRowUtilidadBrutaVacio("CtaMayor") = -1
|
||||
dRowUtilidadBrutaVacio("Orden") = "600"
|
||||
|
||||
dRowUtilidadOperacion("Nombre") = "Utilidad de Operación"
|
||||
dRowUtilidadOperacion("ImporteActual") = UtilidadOperacionActual
|
||||
dRowUtilidadOperacion("ImporteAcumulado") = UtilidadOperacionAcumulada
|
||||
dRowUtilidadOperacion("CtaMayor") = -1
|
||||
dRowUtilidadOperacion("Orden") = "700"
|
||||
dRowUtilidadOperacionVacio("CtaMayor") = -1
|
||||
dRowUtilidadOperacionVacio("Orden") = "700"
|
||||
|
||||
dRowUtilidadAntesImpuestos("Nombre") = "Utilidad antes de impuestos"
|
||||
dRowUtilidadAntesImpuestos("ImporteActual") = UtilidadAntesImpuestosActual
|
||||
dRowUtilidadAntesImpuestos("ImporteAcumulado") = UtilidadAntesImpuestosAcumulada
|
||||
dRowUtilidadAntesImpuestos("CtaMayor") = -1
|
||||
dRowUtilidadAntesImpuestos("Orden") = "790"
|
||||
dRowUtilidadAntesImpuestosVacio("CtaMayor") = -1
|
||||
dRowUtilidadAntesImpuestosVacio("Orden") = "790"
|
||||
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadBruta, idxUtilidadBruta)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadBrutaVacio, idxUtilidadBruta + 1)
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadOperacion, idxUtilidadOperacion)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadOperacionVacio, idxUtilidadOperacion + 1)
|
||||
|
||||
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadAntesImpuestos, idxUtilidadAntesImpuestos)
|
||||
DtGastos.Rows.InsertAt(dRowUtilidadAntesImpuestosVacio, idxUtilidadAntesImpuestos + 1)
|
||||
|
||||
'ImporteActual
|
||||
'ImporteAcumulado
|
||||
|
||||
DtGastos.AcceptChanges()
|
||||
End If
|
||||
|
||||
|
||||
GvIngresos.DataSource = DtIngresos
|
||||
GvIngresos.DataBind()
|
||||
@@ -278,6 +376,11 @@ Partial Class AC_RepEstadoActividades
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToEntero = -1 And e.Row.DBCampo("Nombre").ToString.Length > 0 Then
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin; border-top-color: #000;")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -305,6 +408,12 @@ Partial Class AC_RepEstadoActividades
|
||||
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DBCampo("CtaMayor").ToEntero = -1 And e.Row.DBCampo("Nombre").ToString.Length > 0 Then
|
||||
e.Row.Attributes.Add("style", "border-top: thick solid; border-top-width: thin; border-top-color: #000;")
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -337,12 +446,10 @@ Partial Class AC_RepEstadoActividades
|
||||
params.Add(New ReportParameter("pFirma2", ""))
|
||||
params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem.Text, DdlEjercicio.SelectedItem.Text)))
|
||||
params.Add(New ReportParameter("SubProyecto", DdlSubproyecto.SelectedItem.Text))
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepEstadoActividades.rdlc", lrds, params, "EstadoActividades", Formato)
|
||||
|
||||
|
||||
ImprimirPDF("AC/Reportes/RepEstadoActividadesConta2.rdlc", lrds, params, "EstadoActividades", Formato)
|
||||
' UsuarioActual.Empresa.GrupoEmpresa
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -547,7 +547,7 @@
|
||||
<h4>Total del Activo:</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoActual"></asp:Label>
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoActual" Font-Size="12pt"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalActivoAnterior" width="25%" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalActivoAnterior"></asp:Label>
|
||||
@@ -571,7 +571,7 @@
|
||||
</h4>
|
||||
</td>
|
||||
<td width="25%" align="right">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioActual"></asp:Label>
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioActual" Font-Size="12pt"></asp:Label>
|
||||
</td>
|
||||
<td runat="server" id="TdTotalPasivoAnterior" width="25%" align="right" visible="false">
|
||||
<asp:Label Font-Bold="true" runat="server" ID="LbTotalPasivoPatrimonioAnterior"></asp:Label>
|
||||
|
||||
@@ -333,9 +333,9 @@ Partial Class AC2_SituacionFinanciera
|
||||
|
||||
'PATRIMONIO
|
||||
Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (5,6,8,7)")
|
||||
Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (6,8)")
|
||||
Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=7")
|
||||
Dim DtUtilidad = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=5")
|
||||
'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (6,8)")
|
||||
'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=7")
|
||||
'Dim DtUtilidad = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=5")
|
||||
|
||||
'Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00031%' ")
|
||||
'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND Orden LIKE '%/00032%' ")
|
||||
|
||||
@@ -2078,7 +2078,7 @@
|
||||
<rd:DefaultName>Textbox45</rd:DefaultName>
|
||||
<Top>6.53528cm</Top>
|
||||
<Left>18.55801cm</Left>
|
||||
<Height>0.6cm</Height>
|
||||
<Height>0.63528cm</Height>
|
||||
<Width>1.91058cm</Width>
|
||||
<ZIndex>15</ZIndex>
|
||||
<Visibility>
|
||||
@@ -3043,7 +3043,7 @@
|
||||
<Value>=Sum( iif(Fields!Sup.Value = "ACTIVO NO CIRCULANTE" OR Fields!Sup.Value="ACTIVO CIRCULANTE" OR Cint(Fields!TipoCuenta.value) = 9 , Fields!ImporteAnterior.Value, 0), "DataSet1")</Value>
|
||||
</Variable>
|
||||
<Variable Name="TotalPasivoActual">
|
||||
<Value>=Sum( iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" OR Fields!Sup.Value = "Pasivo a corto plazo",
|
||||
<Value>=Sum( iif(Fields!Sup.Value = "PASIVO CIRCULANTE" OR Fields!Sup.Value = "PASIVO NO CIRCULANTE" OR Fields!Sup.Value = "Pasivo a corto plazo" OR Fields!Sup.Value = "Pasivo a largo plazo",
|
||||
Fields!ImporteActual.Value, 0), "DataSet1")</Value>
|
||||
</Variable>
|
||||
<Variable Name="TotalPasivoAnterior">
|
||||
@@ -3063,6 +3063,7 @@ Fields!ImporteActual.Value, 0),"DataSet1")</Value>
|
||||
</Variable>
|
||||
<Variable Name="TotalPatrimonioCAnterior">
|
||||
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteAnterior.Value, 0),"DataSet1")</Value>
|
||||
<Writable>true</Writable>
|
||||
</Variable>
|
||||
<Variable Name="TotalPatrimonioHAnterior">
|
||||
<Value>=Sum(Microsoft.VisualBasic.Interaction.iif(Fields!Sup.Value = "CAPITAL" OR Fields!Sup.Value = "CAPITAL CONTABLE" , Fields!ImporteActual.Value, 0),"DataSet1")</Value>
|
||||
|
||||
3080
Contabilidad2/Reportes/_RepSituacionFinanciera.rdlc
Normal file
3080
Contabilidad2/Reportes/_RepSituacionFinanciera.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -685,11 +685,39 @@
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Moneda:</Value>
|
||||
<Style>
|
||||
<FontSize>9.16pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value xml:space="preserve"> </Value>
|
||||
<Style>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>=Parameters!MonedaAbreviatura.Value</Value>
|
||||
<Style>
|
||||
<FontSize>9.64pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox4</rd:DefaultName>
|
||||
<Top>0.04117in</Top>
|
||||
<Left>5.62784in</Left>
|
||||
<Height>0.99993in</Height>
|
||||
<Height>1.12493in</Height>
|
||||
<Width>2.66068in</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
@@ -1689,7 +1717,7 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>2.99824cm</Width>
|
||||
<Width>2.29709cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -1749,7 +1777,7 @@
|
||||
</GroupExpressions>
|
||||
</Group>
|
||||
<TablixHeader>
|
||||
<Size>2.93858cm</Size>
|
||||
<Size>2.19723cm</Size>
|
||||
<CellContents>
|
||||
<Textbox Name="ImpuestoLocal">
|
||||
<CanGrow>true</CanGrow>
|
||||
@@ -1787,9 +1815,9 @@
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>DataSet1</DataSetName>
|
||||
<Top>8.17047cm</Top>
|
||||
<Left>15.04546cm</Left>
|
||||
<Left>16.64246cm</Left>
|
||||
<Height>0.48004cm</Height>
|
||||
<Width>5.93682cm</Width>
|
||||
<Width>4.49432cm</Width>
|
||||
<ZIndex>10</ZIndex>
|
||||
<Visibility>
|
||||
<Hidden>=Parameters!MostrarImportes.Value = false</Hidden>
|
||||
|
||||
@@ -3,6 +3,7 @@ Option Explicit On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
@@ -2299,36 +2300,41 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
'VERIFICA EXISTENCIAS
|
||||
If TipoMovimiento > 1 Then
|
||||
Dim MensajeExistencias As New StringBuilder
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
For Each gvr As GridViewRow In GvInv.Rows
|
||||
Dim ExistenciaActual = DtInv.SUM("CantidadSurtidaPantalla", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero} ")
|
||||
Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimeroValor("CveTipoAlmacen", "").ToEntero
|
||||
Dim ValidaExistencia As Boolean = True
|
||||
If CveTipoAlmacen.Contiene(6, 21) AndAlso UsuarioActual.CveEmpresa = 140 Then ValidaExistencia = False ' si es garantia no valida existencia
|
||||
If ValidaExistencia Then
|
||||
Dim MensajeExistencias As New StringBuilder
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
For Each gvr As GridViewRow In GvInv.Rows
|
||||
Dim ExistenciaActual = DtInv.SUM("CantidadSurtidaPantalla", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero} ")
|
||||
|
||||
If TipoMovimiento = 2 Then
|
||||
'If gvr.DataKey("CantidadC").ToString.ToDecimal <> ExistenciaActual Then
|
||||
' Alert("La devolución debe de ser completa.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
If TipoMovimiento = 2 Then
|
||||
'If gvr.DataKey("CantidadC").ToString.ToDecimal <> ExistenciaActual Then
|
||||
' Alert("La devolución debe de ser completa.", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
If DtExistencias.SUM("Existencia", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero}") < ExistenciaActual Then
|
||||
If DtExistencias.SUM("Existencia", $"CvePS = {gvr.DataKey("CvePS").ToEntero} AND CveUM = {gvr.DataKey("CveUM").ToEntero}") < ExistenciaActual Then
|
||||
MensajeExistencias.Append($"Producto: <b>{GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}</b>.</br>")
|
||||
Continue For
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=(TxtFecha.Text & " " & Now.ToShortTimeString).ToDateTime.ToString("yyyy/MM/dd HH:mm"))
|
||||
If Existencia < ExistenciaActual Then
|
||||
MensajeExistencias.Append($"Producto: <b>{GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}</b>.</br>")
|
||||
Continue For
|
||||
End If
|
||||
Next
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If MensajeExistencias.ToString <> "" Then
|
||||
Alert($"Los siguientes productos no cuentan con la existencia suficiente para hacer la devolución. </br></br> {MensajeExistencias.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:= (TxtFecha.Text & " " & Now.ToShortTimeString).ToDateTime.ToString("yyyy/MM/dd HH:mm"))
|
||||
If Existencia < ExistenciaActual Then
|
||||
MensajeExistencias.Append($"Producto: <b>{GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}</b>.</br>")
|
||||
Continue For
|
||||
End If
|
||||
Next
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If MensajeExistencias.ToString <> "" Then
|
||||
Alert($"Los siguientes productos no cuentan con la existencia suficiente para hacer la devolución. </br></br> {MensajeExistencias.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Return True
|
||||
@@ -3926,7 +3932,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim ObjCompras As New ClsCompras(ObjInventario.IniciaTransacSQL())
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||
Dim ObjOC As New ClsOC(ObjInventario.IniciaTransacSQL())
|
||||
Dim ObjContaAC As ClsContPAQi = Nothing
|
||||
|
||||
'ENTRADA ALMACÉN
|
||||
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 2, 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveImportacionCompra, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=-1, Remision:=TxtRemision.Text, Modulo:="RA/G6")
|
||||
@@ -4075,9 +4080,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ImporteAbono = SubTotalPartida
|
||||
ImporteAbonoME = (SubTotalPartida * dr("TipoCambio").ToString.ToDecimal) - SubTotalPartida
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAbono, ConceptoPartida, CveConceptoCostoIndirecto, ConceptoPartida, FechaMovto, IdCtaContableCostoInd, -1, CveCompra:=CveComp, CveProveedor:=dr("CveProveedor").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ImporteAbono, CveSubProyecto:=CveSubProyecto) Then
|
||||
' si tiene valor es que hay complementaria
|
||||
If ImporteAbonoME > 0 Then
|
||||
@@ -4092,7 +4094,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
'DOCUMENTOS RELACIONADOS AL MOVIMIENTO
|
||||
If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(594) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(314) Then
|
||||
If Not ErrorMovInv AndAlso Not GuardaDocumentoBitacora(ObjBitacora, CveMovimiento) Then
|
||||
@@ -4100,8 +4101,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Alert("Ocurrió un error al guardar los datos adjuntos de la bitácora", TipoMensaje.MsgError)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
@@ -4114,16 +4113,16 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjContaAC.IniciaTransacSQL()
|
||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
|
||||
MensajeError = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
MensajeError = "Error al contabilizar los conceptos contables"
|
||||
End If
|
||||
End If
|
||||
'If Not ErrorMovInv AndAlso UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||
' ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' ObjContaAC.IniciaTransacSQL()
|
||||
' If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaAC) Then
|
||||
' MensajeError = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
|
||||
' Else
|
||||
' ErrorMovInv = True
|
||||
' MensajeError = "Error al contabilizar los conceptos contables"
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
If Not ErrorMovInv AndAlso CveImportacionSeleccionada > 0 Then
|
||||
@@ -4145,7 +4144,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'FINAL
|
||||
If Not ErrorMovInv Then
|
||||
ObjInventario.Commit() ' aplica los movimientos insertados
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.Commit()
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
|
||||
Dim Msg As New StringBuilder
|
||||
@@ -4158,14 +4157,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Limpia()
|
||||
Else
|
||||
ObjInventario.RollBack()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
GuardaLog(MensajeError)
|
||||
Alert("Error al guardar el movimiento de almacen. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjInventario.Dispose()
|
||||
If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||
End Sub
|
||||
Private Sub Limpia()
|
||||
CveCompraSurtir = -1
|
||||
|
||||
@@ -2249,19 +2249,19 @@
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>% Pago</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtPorPago" TabIndex="1" runat="server" MaxLength="3" Text="100" Width="44px"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control input-sm" ID="TxtPorPago" TabIndex="1" runat="server" MaxLength="3" Text="100" Width="44px"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Hrs Dob.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtHorasDobles" TabIndex="1" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control input-sm" ID="TxtHorasDobles" TabIndex="1" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Hrs Trip.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtHorasTriples" TabIndex="1" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control input-sm" ID="TxtHorasTriples" TabIndex="1" runat="server" MaxLength="3" Text="0" Width="50px"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
@@ -2275,7 +2275,7 @@
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Obs.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox CssClass="form-control" ID="TxtObservaciones" TabIndex="3" runat="server" Width="84px" MaxLength="150"></asp:TextBox>
|
||||
<asp:TextBox CssClass="form-control input-sm" ID="TxtObservaciones" TabIndex="3" runat="server" Width="84px" MaxLength="150"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" Visible="false">
|
||||
|
||||
1378
Nomina/RepPersonalDIM.aspx
Normal file
1378
Nomina/RepPersonalDIM.aspx
Normal file
File diff suppressed because it is too large
Load Diff
500
Nomina/RepPersonalDIM.aspx.vb
Normal file
500
Nomina/RepPersonalDIM.aspx.vb
Normal file
@@ -0,0 +1,500 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Drawing
|
||||
Imports System.IO
|
||||
Imports CrystalDecisions.CrystalReports.Engine
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class Nomina_RepPersonalDIM
|
||||
Inherits ClsPaginas
|
||||
|
||||
Public Property Dt_Datos As DataTable
|
||||
Get
|
||||
If ViewState("Dt_Datos") Is Nothing Then
|
||||
ViewState("Dt_Datos") = New DataTable
|
||||
End If
|
||||
Return DirectCast(ViewState("Dt_Datos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("Dt_Datos") = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
|
||||
Protected Sub Nomina_RepPersonalDIM(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
CargaEjercicios()
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaEjercicios()
|
||||
'Dim ClsConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ClsConta As New ClsContabilidad
|
||||
If ClsConta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ClsConta.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
End If
|
||||
ClsConta.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
|
||||
DdlEjercicio.SelectedValueExist(UsuarioActual.Empresa.EjercicioActual.ToString)
|
||||
|
||||
If DdlEjercicio.Items.Count = 0 Then
|
||||
DdlEjercicio.Items.Add(New ListItem(Now.Year.ToString, Now.Year.ToString))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dt_Datos = New DataTable
|
||||
LnkDescargaArchivo.Visible = False
|
||||
LnkExportar.Visible = False
|
||||
|
||||
Dim ObjNom As New ClsNominas
|
||||
|
||||
|
||||
If ObjNom.GetRepPersonalDIM(Ejercicio:=DdlEjercicio.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjNom.DtResultados
|
||||
Dt_Datos = ObjNom.DtResultados
|
||||
|
||||
If Dt_Datos.Rows.Count > 0 Then
|
||||
LnkDescargaArchivo.Visible = True
|
||||
LnkExportar.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjNom.Dispose()
|
||||
|
||||
GvDatos.DataBind()
|
||||
|
||||
UpAcciones.Update()
|
||||
UpGvCargaDatos.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "DESCARGA EXCEL"
|
||||
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
Imprimir("Excel")
|
||||
End Sub
|
||||
|
||||
Private Sub Imprimir(Optional reporte As String = "PDF")
|
||||
|
||||
|
||||
Dim row As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal)
|
||||
Dim cell As New TableHeaderCell()
|
||||
cell.Text = "ANEXO 1 INFORMACION DEL EMPLEADO ->"
|
||||
cell.ColumnSpan = 28
|
||||
cell.HorizontalAlign = HorizontalAlign.Left
|
||||
row.Controls.Add(cell)
|
||||
|
||||
cell = New TableHeaderCell()
|
||||
cell.ColumnSpan = 18
|
||||
cell.Text = "ANEXO 1 PAGOS POR SEPARACION ->"
|
||||
cell.HorizontalAlign = HorizontalAlign.Left
|
||||
row.Controls.Add(cell)
|
||||
|
||||
|
||||
cell = New TableHeaderCell()
|
||||
cell.ColumnSpan = 2
|
||||
cell.Text = " ANEXO 1 ASIM SAL-> "
|
||||
cell.HorizontalAlign = HorizontalAlign.Left
|
||||
row.Controls.Add(cell)
|
||||
|
||||
|
||||
cell = New TableHeaderCell()
|
||||
cell.ColumnSpan = 58
|
||||
cell.Text = "ANEXO 1 PAGOS DEL PATRÓN EFECTUADOS A SUS TRABAJADORES ->"
|
||||
cell.HorizontalAlign = HorizontalAlign.Left
|
||||
row.Controls.Add(cell)
|
||||
|
||||
cell = New TableHeaderCell()
|
||||
cell.ColumnSpan = 19
|
||||
cell.Text = "ANEXO 1 IMPUESTO SOBRE LA RENTA (RESUMEN) ->"
|
||||
cell.HorizontalAlign = HorizontalAlign.Left
|
||||
row.Controls.Add(cell)
|
||||
|
||||
'row.BackColor = ColorTranslator.FromHtml("#3AC0F2")
|
||||
GvDatos.HeaderRow.Parent.Controls.AddAt(0, row)
|
||||
|
||||
ExportToExcelGembox(GvDatos, "RepPersonalDIM", UsuarioActual, "Reporte Personal DIM", "", DatosFiltros:=$"Ejercicio {DdlEjercicio.SelectedItem.Text}")
|
||||
End Sub
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkDescargaArchivo_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LnkDescargaArchivo.Click
|
||||
|
||||
|
||||
Dim contenidoBytes As Byte() = Encoding.UTF8.GetBytes(ConvertirGVATexto())
|
||||
|
||||
Using memoryStream As New MemoryStream(contenidoBytes)
|
||||
Response.Clear()
|
||||
Response.ContentType = "text/plain"
|
||||
Response.AddHeader("Content-Disposition", $"attachment; filename=RepPersonalDIM{DdlEjercicio.SelectedItem.Text}.txt")
|
||||
memoryStream.WriteTo(Response.OutputStream)
|
||||
End Using
|
||||
|
||||
Response.End()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function ConvertirGVATexto() As String
|
||||
|
||||
Dim sb As New StringBuilder
|
||||
|
||||
Dim countRows As Integer = 1
|
||||
For Each GvRow As GridViewRow In GvDatos.Rows
|
||||
|
||||
If Not countRows = 1 Then
|
||||
For Each cell As TableCell In GvRow.Cells
|
||||
For Each control As Control In cell.Controls
|
||||
If TypeOf control Is Label Then
|
||||
Dim label As Label = DirectCast(control, Label)
|
||||
sb.Append($"{label.Text.Trim.Replace("True", "1").Replace("False", "0")}|")
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
sb.AppendLine()
|
||||
End If
|
||||
countRows = countRows + 1
|
||||
Next
|
||||
Return sb.ToString
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub GvDatos_DataBound(sender As Object, e As EventArgs)
|
||||
|
||||
Dim row As New GridViewRow(0, 0, DataControlRowType.Header, DataControlRowState.Normal)
|
||||
Dim cell As New TableHeaderCell()
|
||||
cell.Text = "ANEXO 1 INFORMACION DEL EMPLEADO ->"
|
||||
cell.ColumnSpan = 28
|
||||
cell.HorizontalAlign = HorizontalAlign.Left
|
||||
row.Controls.Add(cell)
|
||||
|
||||
|
||||
|
||||
cell = New TableHeaderCell()
|
||||
cell.ColumnSpan = 18
|
||||
cell.Text = "ANEXO 1 PAGOS POR SEPARACION ->"
|
||||
cell.HorizontalAlign = HorizontalAlign.Left
|
||||
row.Controls.Add(cell)
|
||||
|
||||
|
||||
cell = New TableHeaderCell()
|
||||
cell.ColumnSpan = 2
|
||||
cell.Text = " ANEXO 1 ASIM SAL-> "
|
||||
cell.HorizontalAlign = HorizontalAlign.Left
|
||||
row.Controls.Add(cell)
|
||||
|
||||
|
||||
cell = New TableHeaderCell()
|
||||
cell.ColumnSpan = 58
|
||||
cell.Text = "ANEXO 1 PAGOS DEL PATRÓN EFECTUADOS A SUS TRABAJADORES ->"
|
||||
cell.HorizontalAlign = HorizontalAlign.Left
|
||||
row.Controls.Add(cell)
|
||||
|
||||
cell = New TableHeaderCell()
|
||||
cell.ColumnSpan = 19
|
||||
cell.Text = "ANEXO 1 IMPUESTO SOBRE LA RENTA (RESUMEN) ->"
|
||||
cell.HorizontalAlign = HorizontalAlign.Left
|
||||
row.Controls.Add(cell)
|
||||
|
||||
'row.BackColor = ColorTranslator.FromHtml("#3AC0F2")
|
||||
GvDatos.HeaderRow.Parent.Controls.AddAt(0, row)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub ExportToExcelGembox(GridView As GridView, NombreArchivoXLSx As String, Usuario As Usuario, Titulo As String, Optional DatoTituloExtra As String = "", Optional DatosFiltros As String = "", Optional AnchoImagen As Integer = 100, Optional AlturaImagen As Integer = 100, Optional DTExtra As DataTable = Nothing)
|
||||
|
||||
Dim sw1 As New StringWriter()
|
||||
Dim htw1 As New HtmlTextWriter(sw1)
|
||||
GridView.RenderControl(htw1)
|
||||
|
||||
Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault
|
||||
|
||||
Dim htmlStream1 = New MemoryStream(options.Encoding.GetBytes(sw1.ToString()))
|
||||
|
||||
htmlStream1.Position = 0
|
||||
Dim sr1 As New StreamReader(htmlStream1)
|
||||
Dim myStr1 = sr1.ReadToEnd()
|
||||
sr1.Dispose()
|
||||
htmlStream1.Dispose()
|
||||
sw1.Dispose()
|
||||
|
||||
Dim HtmlCompleto As String = myStr1
|
||||
|
||||
HtmlCompleto = Regex.Replace(HtmlCompleto, "\<[\/]*a[^\>]*\>", "")
|
||||
|
||||
Dim htmlStream5 = New MemoryStream(options.Encoding.GetBytes(HtmlCompleto))
|
||||
|
||||
GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet)
|
||||
|
||||
Dim excel As GemBox.Spreadsheet.ExcelFile
|
||||
|
||||
excel = GemBox.Spreadsheet.ExcelFile.Load(htmlStream5, options)
|
||||
|
||||
If Usuario IsNot Nothing Then
|
||||
|
||||
Dim TotalRowHeader As Integer = 6
|
||||
Dim TotalRowFooter As Integer = 2
|
||||
|
||||
|
||||
Dim worksheet = excel.Worksheets(0)
|
||||
worksheet.Rows.InsertEmpty(0, TotalRowHeader)
|
||||
Dim celdasConTexto = worksheet.GetUsedCellRange(True)
|
||||
If celdasConTexto Is Nothing Then Exit Sub 'No se recuperaron datos, salir de sin guardar porque soltará error
|
||||
celdasConTexto.Style.Font.Name = "Calibri Light"
|
||||
|
||||
Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex)
|
||||
RangoNombreEmpresa.Merged = True
|
||||
RangoNombreEmpresa.Value = Usuario.Empresa.Empresa
|
||||
RangoNombreEmpresa.Style.Font.Size = 18 * 20
|
||||
RangoNombreEmpresa.Style.Font.Name = "Calibri Light"
|
||||
RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
|
||||
Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex)
|
||||
RangoTitulo.Merged = True
|
||||
RangoTitulo.Value = Titulo
|
||||
RangoTitulo.Style.Font.Size = 20 * 20
|
||||
RangoTitulo.Style.Font.Name = "Calibri Light"
|
||||
RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center
|
||||
RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
If DatoTituloExtra.Length > 0 Then
|
||||
Dim RangoDatoTituloExtra = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex)
|
||||
RangoDatoTituloExtra.Merged = True
|
||||
RangoDatoTituloExtra.Value = DatoTituloExtra
|
||||
RangoDatoTituloExtra.Style.Font.Size = 20 * 20
|
||||
RangoDatoTituloExtra.Style.Font.Name = "Calibri Light"
|
||||
RangoDatoTituloExtra.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
|
||||
RangoDatoTituloExtra.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
|
||||
End If
|
||||
|
||||
If DatosFiltros.Length > 0 Then
|
||||
|
||||
Dim Arreglo As String() = DatosFiltros.Split("|"c)
|
||||
worksheet.Rows.InsertEmpty(TotalRowHeader, Arreglo.Count)
|
||||
For Each TextoFiltro As String In Arreglo
|
||||
Dim RangoDatoTituloExtra = worksheet.Cells.GetSubrangeAbsolute(TotalRowHeader, celdasConTexto.FirstColumnIndex, TotalRowHeader, celdasConTexto.LastColumnIndex)
|
||||
RangoDatoTituloExtra.Merged = True
|
||||
RangoDatoTituloExtra.Value = TextoFiltro
|
||||
RangoDatoTituloExtra.Style.Font.Size = 12 * 20
|
||||
RangoDatoTituloExtra.Style.Font.Name = "Calibri Light"
|
||||
RangoDatoTituloExtra.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
|
||||
RangoDatoTituloExtra.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center
|
||||
TotalRowHeader += 1
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
' TotalRowHeader += 2
|
||||
|
||||
|
||||
'worksheet.Rows(TotalRowHeader).Cells.GetSubrange("A8:AB9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(61, 74, 26), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
'worksheet.Rows(TotalRowHeader).Cells.GetSubrange("AC8:AT9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(216, 191, 216), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
'worksheet.Rows(TotalRowHeader).Cells.GetSubrange("AU8:AV9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(59, 131, 189), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
'worksheet.Rows(TotalRowHeader).Cells.GetSubrange("AW8:DB9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(216, 191, 216), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
'worksheet.Rows(TotalRowHeader).Cells.GetSubrange("DC8:DS9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 140, 64), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
|
||||
worksheet.Cells.GetSubrange("A8:AB9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(218, 247, 166), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
worksheet.Cells.GetSubrange("AC8:AT9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(216, 191, 216), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
worksheet.Cells.GetSubrange("AU8:AV9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(59, 131, 189), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
worksheet.Cells.GetSubrange("AW8:DB9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(216, 191, 216), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
worksheet.Cells.GetSubrange("DC8:DU9").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 140, 64), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
worksheet.Cells("DC8").Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 140, 64), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
|
||||
For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||
|
||||
worksheet.Rows(TotalRowHeader).Cells(i).Style.Font.Size = 12 * 20
|
||||
worksheet.Rows(TotalRowHeader).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
|
||||
worksheet.Rows(TotalRowHeader).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Bottom
|
||||
|
||||
'worksheet.Rows(TotalRowHeader).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(TotalRowHeader).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(0, 0, 0)
|
||||
|
||||
|
||||
worksheet.Rows(TotalRowHeader + 1).Cells(i).Style.Font.Size = 12 * 20
|
||||
worksheet.Rows(TotalRowHeader + 1).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left
|
||||
worksheet.Rows(TotalRowHeader + 1).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Bottom
|
||||
|
||||
' worksheet.Rows(TotalRowHeader + 1).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(TotalRowHeader + 1).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(0, 0, 0)
|
||||
|
||||
If i > 0 Then
|
||||
Try
|
||||
worksheet.Columns(i).AutoFit(1)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Dim IndexEndTable As Integer = GridView.Rows.Count + TotalRowHeader + TotalRowFooter
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(1).Value = "Usuario Imprimió"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(1).Value = Usuario.Nombre
|
||||
|
||||
worksheet.Rows(IndexEndTable).Cells(3).Value = "Fecha Impresión"
|
||||
worksheet.Rows(IndexEndTable + 1).Cells(3).Value = DateTime.Now.ToString("dd/MM/yyyy")
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta))
|
||||
|
||||
If Imagen.Exists Then
|
||||
Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)
|
||||
Using sr As New StreamReader(Ruta)
|
||||
Dim ms As New MemoryStream()
|
||||
sr.BaseStream.CopyTo(ms)
|
||||
worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel)
|
||||
End Using
|
||||
End If
|
||||
|
||||
|
||||
worksheet.Columns(0).Width = 4000
|
||||
worksheet.Columns(1).Width = 4000
|
||||
worksheet.Columns(2).Width = 5500
|
||||
worksheet.Columns(3).Width = 10000
|
||||
worksheet.Columns(4).Width = 5000
|
||||
worksheet.Columns(5).Width = 5000
|
||||
worksheet.Columns(6).Width = 10000
|
||||
worksheet.Columns(7).Width = 5000
|
||||
|
||||
For I = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex
|
||||
If I > 7 Then
|
||||
worksheet.Columns(I).Width = 4500
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
If DTExtra IsNot Nothing Then
|
||||
|
||||
Dim NombreTabla As String = ""
|
||||
|
||||
If DTExtra.TableName IsNot Nothing Then
|
||||
NombreTabla = DTExtra.TableName
|
||||
End If
|
||||
|
||||
If NombreTabla.Trim = "" Then
|
||||
NombreTabla = "hoja2"
|
||||
End If
|
||||
|
||||
'excel.Worksheets.Add(NombreTabla)
|
||||
|
||||
Dim workbookDTExtra = New ExcelFile
|
||||
Dim worksheetDTExtra = workbookDTExtra.Worksheets.Add(NombreTabla)
|
||||
|
||||
|
||||
worksheetDTExtra.InsertDataTable(DTExtra,
|
||||
New InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
.StartRow = 0
|
||||
})
|
||||
|
||||
|
||||
|
||||
Dim columnCount = worksheetDTExtra.CalculateMaxUsedColumns()
|
||||
For i As Integer = 0 To columnCount - 1
|
||||
worksheetDTExtra.Columns(i).AutoFit(1, worksheetDTExtra.Rows(1), worksheetDTExtra.Rows(worksheetDTExtra.Rows.Count - 1))
|
||||
worksheetDTExtra.Cells(0, i).Style.FillPattern.SetSolid(Drawing.ColorTranslator.FromHtml("#4b77be"))
|
||||
worksheetDTExtra.Cells(0, i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
|
||||
Next
|
||||
|
||||
|
||||
excel.Worksheets.AddCopy(NombreTabla, worksheetDTExtra)
|
||||
excel.Worksheets(0).Name = Titulo
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim indexRow As Integer = 8
|
||||
Dim indexRowGV As Integer = 0
|
||||
Dim cssClassRow As String = ""
|
||||
|
||||
Dim CountRowFiltros As Integer = -1
|
||||
If DatosFiltros.Trim.Length > 0 Then
|
||||
CountRowFiltros = 0
|
||||
End If
|
||||
|
||||
For indexRow = 8 To worksheet.Rows.Count - 4
|
||||
|
||||
Try
|
||||
cssClassRow = GridView.Rows(indexRowGV).CssClass.Trim()
|
||||
|
||||
Select Case cssClassRow
|
||||
|
||||
Case "Totales"
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.FillPattern.SetSolid(System.Drawing.ColorTranslator.FromHtml("#67809f"))
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Weight = 1000
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Color = System.Drawing.ColorTranslator.FromHtml("#ddd")
|
||||
Exit Select
|
||||
Case "SubTotales2"
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.FillPattern.SetSolid(System.Drawing.ColorTranslator.FromHtml("#c0c0c0"))
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Weight = 1000
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Color = System.Drawing.ColorTranslator.FromHtml("#000077")
|
||||
Exit Select
|
||||
Case "SubTotales"
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.FillPattern.SetSolid(System.Drawing.ColorTranslator.FromHtml("#dddddd"))
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Weight = 1000
|
||||
worksheet.Cells.GetSubrangeRelative(indexRow + CountRowFiltros, 0, celdasConTexto.LastColumnIndex + 1, 1).Style.Font.Color = System.Drawing.ColorTranslator.FromHtml("#67809F")
|
||||
Exit Select
|
||||
Case Else
|
||||
Exit Select
|
||||
End Select
|
||||
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
indexRowGV += 1
|
||||
Next
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx")
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkDeshabilitaAutorizaciones" runat="server" CssClass="form-control" Checked="false" />
|
||||
<label for="<%= ChkDeshabilitaAutorizaciones.ClientID.ToString()%>">Deshabilita autorizaciones para público general</label>
|
||||
<label for="<%= ChkDeshabilitaAutorizaciones.ClientID.ToString()%>">Activar remisión para público general hasta $5000</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
519
SAT/SolicitudesRecibidasSAT.aspx
Normal file
519
SAT/SolicitudesRecibidasSAT.aspx
Normal file
@@ -0,0 +1,519 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="SolicitudesRecibidasSAT.aspx.vb" Inherits="SAT_SolicitudesRecibidasSAT" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dashboard-stat .visual > i {
|
||||
font-size: 90px;
|
||||
}
|
||||
|
||||
.dashboard-stat .visual > i {
|
||||
opacity: 0.1;
|
||||
filter: alpha(opacity=10);
|
||||
}
|
||||
|
||||
.dashboard-stat.SigData {
|
||||
color: #FFFFFF;
|
||||
background-color: #3598dc;
|
||||
}
|
||||
|
||||
.dashboard-stat.XMLData {
|
||||
color: #FFFFFF;
|
||||
background-color: #900;
|
||||
}
|
||||
|
||||
.dashboard-stat.SigData .more,
|
||||
.dashboard-stat.XMLData .more {
|
||||
color: #FFFFFF;
|
||||
background-color: rgb(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) {
|
||||
color: #333333;
|
||||
background-color: #DDD;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
|
||||
text-align: right !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(2)
|
||||
/*,.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) */ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(3),
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(4),
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(5) /*,
|
||||
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3),
|
||||
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(4),
|
||||
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(5)*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
|
||||
text-align: right !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
|
||||
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(7)) /*,
|
||||
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(7))*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(4),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(8),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(9),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+13):not(:nth-child(n+19)),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(24),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+28):not(:nth-child(n+33)) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(2),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+20) /*,
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2),
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+20)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(1),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+20)) /*,
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(1),
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(n+20))*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
|
||||
text-align: right !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
|
||||
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) /*,
|
||||
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3)*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
|
||||
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(3) /*,
|
||||
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3)*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n+4),
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4):not(:nth-child(n+7)) {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+7):not(:nth-child(n+10)) {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3),
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr td:nth-child(n+6),
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+9):not(:nth-child(n+12)) {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(1),
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(4) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(2),
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(3),
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(n+40) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
|
||||
/* .ajax_tab_xp .ajax_tab_body {
|
||||
font-size: 9px !important;
|
||||
}
|
||||
*/
|
||||
.ajax__tab_xp .ajax__tab_body {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Comparativo compras
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDownloadExcel" OnClick="LnkDownloadExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i>Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDownloadExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="upDatosChec" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1">Agrupador: </label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlReporte" runat="server" Style="width: 100% !important;" CssClass="select2me" DataValueField="CveUsuario" DataTextField="Nombre">
|
||||
<asp:ListItem Value="1" Text="Mes Acumulado Pesos"></asp:ListItem>
|
||||
<asp:ListItem Value="2" Text="Por Comprobante"></asp:ListItem>
|
||||
<asp:ListItem Value="3" Text="Mes Moneda"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 mediocol">Fecha inicio:</label>
|
||||
<div class="col-md-1" style="min-width: 120px">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtRpdFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkRpdFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtRpdFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtRpdFechaInicio" PopupButtonID="LnkRpdFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvRpdFechaInicio" runat="server" ControlToValidate="TxtRpdFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 mediocol">Fecha fin:</label>
|
||||
<div class="col-md-1" style="min-width: 120px">
|
||||
<%--<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>--%>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="TxtRpdFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender4" TargetControlID="TxtRpdFechaFin" PopupButtonID="LnkFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvRpdFechaFin" runat="server" ControlToValidate="TxtRpdFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" Visible="true" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DVResumen1" visible="false">
|
||||
<div class="col-md-12" style="text-align: right">
|
||||
<input type="text" id="TxtBusquedaResumen" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaResumen','{0}')", GvResumen.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaResumen','{0}')", GvResumen.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="DVResumen2" visible="false">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvResumen" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" OnRowDataBound="GvResumen_RowDataBound"
|
||||
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
|
||||
DataKeyNames="Fecha">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Mes">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblMes" runat="server" Text='<%# Eval("Mes")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CIEPS", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CRetIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret ISR" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CRetISR", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TOTAL SIG" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblVTotal" runat="server" Text='<%# Eval("CTotal", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FIEPS", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FRetIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret ISR" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("FRetISR", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="TOTAL SAT" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCBTTotal" runat="server" Text='<%# Eval("FTotal", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Diferencia" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblDif" runat="server" Text='<%# Eval("Dif", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="DvDatos1" visible="false">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12" style="text-align: right">
|
||||
<input type="text" id="TxtBusquedaDatos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaDatos','{0}')", GvDatos.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaDatos','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="DvDatos2" visible="false">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="false" OnRowDataBound="GvDatos_RowDataBound"
|
||||
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
|
||||
DataKeyNames="UUID,CountRegistros,VTotal,CBTTotal,CountRegistrosSIG,CountRegistrosSAT,DifImporte,Abreviatura,CBTMoneda,CFDIData,CveSolicitudDetalle,CveCompra,VSerieFolio,Sistema">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblUUID" Text='<%# Eval("UUID")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:HyperLinkField HeaderText="Sistema" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataTextField="Sistema" ControlStyle-CssClass='Texto' Target='_blank'></asp:HyperLinkField>
|
||||
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="SIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblEnSistema" Text='<%# Eval("Sistema")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="SAT" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton runat="server" ID="LnkCFDIData" Text='<%# Eval("CFDIData")%>'></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:HyperLinkField HeaderText="Serie Folio" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataTextField="VSerieFolio" ControlStyle-CssClass='Texto' Target='_blank'></asp:HyperLinkField>
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Serie Folio" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVSerieFolio" Text='<%# Eval("VSerieFolio")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>--%>
|
||||
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVTotal" Text='<%# Eval("VTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVSubTotal" Text='<%# Eval("VSubTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVIVA" Text='<%# Eval("VIVA","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVIEPS" Text='<%# Eval("VIEPS","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Ret. IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVRetIVA" Text='<%# Eval("VRetIVA","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Ret. ISR" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblVRetISR" Text='<%# Eval("VRetISR","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Moneda" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblAbreviatura" Text='<%# Eval("Abreviatura")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblCBTTotal" Text='<%# Eval("CBTTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Sub Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblCBTSubTotal" Text='<%# Eval("CBTSubTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblImpIVA" Text='<%# Eval("ImpIVA","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblImpIEPS" Text='<%# Eval("ImpIEPS","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Ret. ISR" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblImpRetISR" Text='<%# Eval("ImpRetISR","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Ret. IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblImpRetIVA" Text='<%# Eval("ImpRetIVA","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Moneda" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" ID="LblCBTMoneda" Text='<%# Eval("CBTMoneda")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
276
SAT/SolicitudesRecibidasSAT.aspx.vb
Normal file
276
SAT/SolicitudesRecibidasSAT.aspx.vb
Normal file
@@ -0,0 +1,276 @@
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class SAT_SolicitudesRecibidasSAT
|
||||
Inherits ClsPaginas
|
||||
|
||||
Public Property clasegrid As String
|
||||
Get
|
||||
|
||||
If ViewState("clasegrid") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return ViewState("clasegrid").ToString()
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
ViewState("clasegrid") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property fechaInicio As String
|
||||
Get
|
||||
|
||||
If ViewState("fechaInicio") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return ViewState("fechaInicio").ToString()
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
ViewState("fechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property fechaFin As String
|
||||
Get
|
||||
|
||||
If ViewState("fechaFin") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return ViewState("fechaFin").ToString()
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
ViewState("fechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property TipoDescarga As Integer
|
||||
Get
|
||||
|
||||
If ViewState("TipoDescarga") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("TipoDescarga").ToString().ToEntero()
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Integer)
|
||||
ViewState("TipoDescarga") = CInt(value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
TxtRpdFechaInicio.Text = String.Format("01/{0:MM/yyyy}", DateTime.Now.AddMonths(-1))
|
||||
TxtRpdFechaFin.Text = String.Format("{0:dd/MM/yyyy}", DateTime.Now.AddMonths(-1).LastDayOfMonth())
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkDownloadExcel_Click(sender As Object, e As EventArgs)
|
||||
If TipoDescarga = 1 Then
|
||||
GvResumen.ExportToExcel2($"Resumen{DateTime.Now.ToString("yyyyMMddhhmmss")}")
|
||||
End If
|
||||
|
||||
If TipoDescarga = 2 Then
|
||||
GvDatos.ExportToExcel2($"PorComprobante{DateTime.Now.ToString("yyyyMMddhhmmss")}")
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvResumen_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DataKey("Fecha") = "" Then
|
||||
e.Row.Attributes.Add("class", "Totales")
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then
|
||||
e.Row.Cells(2).Visible = False
|
||||
End If
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then
|
||||
e.Row.Cells(7).Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.Cells(1).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
e.Row.Cells(2).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
e.Row.Cells(3).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then
|
||||
e.Row.Cells(2).Visible = False
|
||||
End If
|
||||
e.Row.Cells(4).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
e.Row.Cells(5).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
|
||||
e.Row.Cells(6).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
e.Row.Cells(7).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
e.Row.Cells(8).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then
|
||||
e.Row.Cells(7).Visible = False
|
||||
End If
|
||||
e.Row.Cells(9).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
e.Row.Cells(10).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
|
||||
|
||||
e.Row.Cells(1).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(2).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(3).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(4).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(5).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(6).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(7).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(8).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(9).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(10).ForeColor = System.Drawing.Color.FromName("white")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DataKey("UUID") = "Totales" Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(1).Text = e.Row.DataKey("CountRegistrosSIG")
|
||||
e.Row.Cells(2).Text = e.Row.DataKey("CountRegistrosSAT")
|
||||
e.Row.Attributes.Add("class", "Totales")
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("UUID").ToUpper() <> "TOTALES" Then
|
||||
Dim SBMsgToolTip As StringBuilder = New StringBuilder()
|
||||
|
||||
If e.Row.DataKey("DifImporte").ToDecimal() <> 0 OrElse (e.Row.DataKey("Abreviatura").ToUpper().Trim() <> e.Row.DataKey("CBTMoneda").ToUpper().Trim()) Then
|
||||
e.Row.CssClass = "bg-yellow-casablanca bg-font-yellow-casablanca"
|
||||
End If
|
||||
|
||||
e.Row.Attributes.Add("data-html", "true")
|
||||
e.Row.Attributes.Add("data-toggle", "tooltip")
|
||||
e.Row.Attributes.Add("data-placement", "top")
|
||||
|
||||
If e.Row.DataKey("Sistema").ToUpper() = "NO" OrElse e.Row.DataKey("CFDIData").ToUpper() = "NO" Then
|
||||
|
||||
If e.Row.DataKey("Sistema").ToUpper() = "NO" Then
|
||||
SBMsgToolTip.AppendLine("Comprobante no se encuentra en SIG.<br>")
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("CFDIData").ToUpper() = "NO" Then
|
||||
SBMsgToolTip.AppendLine("Comprobante no encontrado.<br>")
|
||||
End If
|
||||
Else
|
||||
|
||||
If e.Row.DataKey("DifImporte").ToDecimal() <> 0 Then
|
||||
SBMsgToolTip.AppendLine($" Diferencia importes {e.Row.DataKey("DifImporte").ToDecimal().ToString("###,###,###.00")}")
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("Abreviatura").ToUpper().Trim() <> e.Row.DataKey("CBTMoneda").ToUpper().Trim() Then
|
||||
SBMsgToolTip.AppendLine($"Diferencia en monedas.")
|
||||
End If
|
||||
End If
|
||||
|
||||
If SBMsgToolTip.ToString().Length > 0 Then
|
||||
e.Row.Attributes.Add("title", SBMsgToolTip.ToString())
|
||||
End If
|
||||
|
||||
Dim LnkCFDIData As LinkButton = e.Row.FCLinkButton("LnkCFDIData")
|
||||
|
||||
If (e.Row.DataKey("CFDIData").ToUpper() = "SI") Then
|
||||
ScriptManager.GetCurrent(Me).RegisterPostBackControl(LnkCFDIData)
|
||||
LnkCFDIData.CssClass = "Texto"
|
||||
Else
|
||||
LnkCFDIData.PostBackUrl = "#"
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then
|
||||
e.Row.Cells(7).Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then
|
||||
e.Row.Cells(14).Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
e.Row.Cells(1).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
e.Row.Cells(2).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
e.Row.Cells(3).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
e.Row.Cells(4).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
e.Row.Cells(5).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
e.Row.Cells(6).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then
|
||||
e.Row.Cells(7).Visible = false
|
||||
End If
|
||||
e.Row.Cells(7).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
e.Row.Cells(8).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
e.Row.Cells(9).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
e.Row.Cells(10).BackColor = System.Drawing.Color.FromName("#3598dc")
|
||||
e.Row.Cells(11).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
e.Row.Cells(12).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
e.Row.Cells(13).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) <> "1" Then
|
||||
e.Row.Cells(14).Visible = False
|
||||
End If
|
||||
e.Row.Cells(14).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
e.Row.Cells(15).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
e.Row.Cells(16).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
e.Row.Cells(17).BackColor = System.Drawing.Color.FromName("#C46B06")
|
||||
e.Row.Cells(1).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(2).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(3).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(4).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(5).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(6).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(7).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(8).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(9).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(10).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(11).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(12).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(13).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(14).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(15).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(16).ForeColor = System.Drawing.Color.FromName("white")
|
||||
e.Row.Cells(17).ForeColor = System.Drawing.Color.FromName("white")
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
DvDatos1.Visible = False
|
||||
DvDatos2.Visible = False
|
||||
DVResumen1.Visible = False
|
||||
DVResumen2.Visible = False
|
||||
|
||||
TipoDescarga = 0
|
||||
|
||||
LnkDownloadExcel.Visible = False
|
||||
|
||||
If (DdlReporte.SelectedValue.ToEntero() = 1 OrElse DdlReporte.SelectedValue.ToEntero() = 3) Then
|
||||
DVResumen1.Visible = True
|
||||
DVResumen2.Visible = True
|
||||
DvDatos1.Visible = False
|
||||
DvDatos2.Visible = False
|
||||
Else
|
||||
DVResumen1.Visible = False
|
||||
DVResumen2.Visible = False
|
||||
DvDatos1.Visible = True
|
||||
DvDatos2.Visible = True
|
||||
End If
|
||||
|
||||
Using ObjCompras As New ClsCompras
|
||||
If ObjCompras.GetRepSATSolicitudesRecibidas(UsuarioActual.CveEmpresa, TxtRpdFechaInicio.Text.ToDate(), TxtRpdFechaFin.Text.ToDate(), DdlReporte.SelectedValue.ToEntero(), -1) Then
|
||||
If DdlReporte.SelectedValue.ToEntero() = 1 OrElse DdlReporte.SelectedValue.ToEntero() = 3 Then
|
||||
GvResumen.DataSource = ObjCompras.DtResultados
|
||||
TipoDescarga = If(ObjCompras.DtResultados.Rows.Count > 0, 1, 0)
|
||||
LnkDownloadExcel.Visible = True
|
||||
|
||||
ElseIf DdlReporte.SelectedValue.ToEntero() = 2 Then
|
||||
GvDatos.DataSource = ObjCompras.DtResultados
|
||||
TipoDescarga = If(ObjCompras.DtResultados.Rows.Count > 0, 2, 0)
|
||||
LnkDownloadExcel.Visible = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
GvResumen.DataBind()
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
UpAcciones.Update()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -2332,7 +2332,7 @@ Partial Class Clientes
|
||||
' Else
|
||||
' Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError)
|
||||
' End If
|
||||
ElseIf HdnTipoDocto.Value = "Cot" Then
|
||||
ElseIf HdnTipoDocto.Value.Contiene("Cot", "Rem") Then
|
||||
If File.Exists($"{Ruta}PDF\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.pdf") Then
|
||||
Dim PDF As String = $"{Ruta}PDF\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.pdf"
|
||||
|
||||
|
||||
@@ -1010,7 +1010,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
End If
|
||||
tipoCambioPago = Pago.TCPago
|
||||
|
||||
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
|
||||
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal * Pago.TCPago
|
||||
|
||||
'If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then
|
||||
' EsAnticipoEspecial = True
|
||||
|
||||
@@ -379,7 +379,7 @@
|
||||
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="IEPS" Visible="false" ItemStyle-HorizontalAlign="Right" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlIEPS" runat="server" Text='<%# Eval("IEPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -580,20 +580,18 @@
|
||||
<asp:CheckBox ID="ChkFolio" runat="server" Text="Folio" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubTotal" runat="server" Text="SubTotal" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" Checked="true" /></td>
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChlMotivoDescuento" runat="server" Text="Motivo Descuento" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkAmortizacion" runat="server" Text="Amortización" Checked="true" /></td>
|
||||
<asp:CheckBox ID="ChkAmortizacion" runat="server" Text="Amortización" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIVA" runat="server" Text="IVA" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -605,8 +603,7 @@
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text="Total" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFecha" runat="server" Text="Fecha" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursal" runat="server" Text="Sucursal" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -618,8 +615,7 @@
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalCliente" runat="server" Text="Sucursal Cliente" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkVendedor" runat="server" Text="Vendedor" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -630,8 +626,7 @@
|
||||
<asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text="Motivo Cancelacion" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeTimbro" runat="server" Text="Se Timbró" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text="Se envió Mail" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -642,8 +637,7 @@
|
||||
<asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkObservaciones" runat="server" Text="Observaciones" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolioFiscal" runat="server" Text="Folio Fiscal (UUID)" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -654,8 +648,7 @@
|
||||
<asp:CheckBox ID="ChkEstatusFacturacion" runat="server" Text="Estatus Facturación" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolioFacturacion" runat="server" Text="Factura Cotización" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCliente" runat="server" Text="Cliente" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
@@ -665,23 +658,16 @@
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTotalImpuestos" runat="server" Text="Impuestos Locales" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMoneda" runat="server" Text="Moneda" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSaldo" runat="server" Text="Saldo" Checked="false" /></td>
|
||||
</td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal" onclick="$('#BtnPersonalizar').click();">Personalizar</button>
|
||||
|
||||
@@ -56,7 +56,6 @@ Partial Class RepVentaDetalle
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property TipoCliente As Integer
|
||||
Get
|
||||
If ViewState("TipoCliente") Is Nothing Then
|
||||
@@ -64,16 +63,12 @@ Partial Class RepVentaDetalle
|
||||
Else
|
||||
Return ViewState("TipoCliente").ToString.ToEntero
|
||||
End If
|
||||
|
||||
End Get
|
||||
|
||||
Set(value As Integer)
|
||||
ViewState("TipoCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property TCEspecifico As Decimal
|
||||
Get
|
||||
Return ViewState("TCEspecifico").ToString.ToDecimal
|
||||
@@ -110,6 +105,7 @@ Partial Class RepVentaDetalle
|
||||
Personalizo = 0
|
||||
CargaCombos()
|
||||
InicializaValores()
|
||||
ConfiguraEmpresa()
|
||||
CargaDatos()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
@@ -118,8 +114,6 @@ Partial Class RepVentaDetalle
|
||||
DVServicioDomicilio.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -370,7 +364,6 @@ Partial Class RepVentaDetalle
|
||||
#Region "CONSULTAR"
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
ConfiguraEmpresa()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
@@ -423,6 +416,7 @@ Partial Class RepVentaDetalle
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DtVentas.SUMD("Descuento") <= 0 Then GvDatos.Columns(5).Visible = False ' se oculta descuentos, si está vac+io
|
||||
Agrupador = DdlGrupo.SelectedItem.Text
|
||||
|
||||
GvDatos.DataBind()
|
||||
@@ -451,12 +445,13 @@ Partial Class RepVentaDetalle
|
||||
End Function
|
||||
|
||||
Private Sub ConfiguraEmpresa()
|
||||
'Dim ObjEmpresa As New ClsEmpresas()
|
||||
'If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
|
||||
If Not UsuarioActual.Empresa.MostrarRetIVA Then GvDatos.Columns(10).Visible = False
|
||||
If Not UsuarioActual.Empresa.MostrarRetISR Then GvDatos.Columns(11).Visible = False
|
||||
'End If
|
||||
'ObjEmpresa.Dispose()
|
||||
|
||||
ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS
|
||||
GvDatos.Columns(9).Visible = ChkIEPS.Checked
|
||||
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -486,24 +481,6 @@ Partial Class RepVentaDetalle
|
||||
e.Row.FCLiteral("LtlFacturaCotizacion").Text = "<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta=" & e.Row.DBCampo("CveVentaPadre") & """>" & e.Row.DBCampo("FolioVenta") & "</a>"
|
||||
End If
|
||||
|
||||
'e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
|
||||
'e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
|
||||
'e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
|
||||
'e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
||||
'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
|
||||
'e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Right
|
||||
'e.Row.Cells(9).HorizontalAlign = HorizontalAlign.Right
|
||||
'e.Row.Cells(10).HorizontalAlign = HorizontalAlign.Right
|
||||
'e.Row.Cells(11).HorizontalAlign = HorizontalAlign.Right
|
||||
'e.Row.Cells(12).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(13).HorizontalAlign = HorizontalAlign.Left
|
||||
'e.Row.Cells(14).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(15).HorizontalAlign = HorizontalAlign.Center
|
||||
'e.Row.Cells(20).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
|
||||
If e.Row.DBCampo("SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlSubTotal").Text = "-"
|
||||
If e.Row.DBCampo("Descuento").ToDouble = 0 Then e.Row.FCLiteral("LtlDescuento").Text = "-"
|
||||
@@ -554,178 +531,38 @@ Partial Class RepVentaDetalle
|
||||
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
|
||||
If ChkFolio.Checked Then
|
||||
GvDatos.Columns(1).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(1).Visible = False
|
||||
End If
|
||||
|
||||
If ChkFecha.Checked Then
|
||||
GvDatos.Columns(2).Visible = True
|
||||
|
||||
Else
|
||||
GvDatos.Columns(2).Visible = False
|
||||
End If
|
||||
|
||||
If ChkCliente.Checked Then
|
||||
GvDatos.Columns(3).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(3).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSubTotal.Checked Then
|
||||
GvDatos.Columns(4).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(4).Visible = False
|
||||
End If
|
||||
|
||||
If ChkDescuento.Checked Then
|
||||
GvDatos.Columns(5).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
If ChlMotivoDescuento.Checked Then
|
||||
GvDatos.Columns(6).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(6).Visible = False
|
||||
End If
|
||||
|
||||
If ChkAmortizacion.Checked Then
|
||||
GvDatos.Columns(7).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(7).Visible = False
|
||||
End If
|
||||
|
||||
If ChkIVA.Checked Then
|
||||
GvDatos.Columns(8).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(8).Visible = False
|
||||
End If
|
||||
|
||||
If ChkIEPS.Checked Then
|
||||
GvDatos.Columns(9).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(9).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRetIVA.Checked Then
|
||||
GvDatos.Columns(10).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(10).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRetISR.Checked Then
|
||||
GvDatos.Columns(11).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(11).Visible = False
|
||||
End If
|
||||
|
||||
If ChkTotalImpuestos.Checked Then
|
||||
GvDatos.Columns(12).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(12).Visible = False
|
||||
End If
|
||||
|
||||
If ChkTotal.Checked Then
|
||||
GvDatos.Columns(13).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(13).Visible = False
|
||||
End If
|
||||
GvDatos.Columns(1).Visible = ChkFolio.Checked
|
||||
GvDatos.Columns(2).Visible = ChkFecha.Checked
|
||||
GvDatos.Columns(3).Visible = ChkCliente.Checked
|
||||
GvDatos.Columns(4).Visible = ChkSubTotal.Checked
|
||||
GvDatos.Columns(5).Visible = ChkDescuento.Checked
|
||||
GvDatos.Columns(6).Visible = ChlMotivoDescuento.Checked
|
||||
GvDatos.Columns(7).Visible = ChkAmortizacion.Checked
|
||||
GvDatos.Columns(8).Visible = ChkIVA.Checked
|
||||
GvDatos.Columns(9).Visible = ChkIEPS.Checked
|
||||
GvDatos.Columns(10).Visible = ChkRetIVA.Checked
|
||||
GvDatos.Columns(11).Visible = ChkRetISR.Checked
|
||||
GvDatos.Columns(12).Visible = ChkTotalImpuestos.Checked
|
||||
GvDatos.Columns(13).Visible = ChkTotal.Checked
|
||||
GvDatos.Columns(14).Visible = ChkMoneda.Checked
|
||||
|
||||
If ChkSucursal.Checked Then
|
||||
GvDatos.Columns(15).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(15).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSucursalEjecucion.Checked Then
|
||||
GvDatos.Columns(16).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(16).Visible = False
|
||||
End If
|
||||
|
||||
If ChkCodigo.Checked Then
|
||||
GvDatos.Columns(17).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(17).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSucursalCliente.Checked Then
|
||||
GvDatos.Columns(18).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(18).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSucursalCobranza.Checked Then
|
||||
GvDatos.Columns(19).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(19).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSucursalEjecucion.Checked Then
|
||||
GvDatos.Columns(20).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(20).Visible = False
|
||||
End If
|
||||
|
||||
If ChkVendedor.Checked Then
|
||||
GvDatos.Columns(21).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(21).Visible = False
|
||||
End If
|
||||
|
||||
If ChkEstatusFactura.Checked Then
|
||||
GvDatos.Columns(22).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(22).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMotivoCancelacion.Checked Then
|
||||
GvDatos.Columns(23).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(23).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSeTimbro.Checked Then
|
||||
GvDatos.Columns(24).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(24).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSeEnvioMail.Checked Then
|
||||
GvDatos.Columns(25).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(25).Visible = False
|
||||
End If
|
||||
|
||||
If ChkCuentaContable.Checked Then
|
||||
GvDatos.Columns(26).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(26).Visible = False
|
||||
End If
|
||||
|
||||
If ChkUsuario.Checked Then
|
||||
GvDatos.Columns(27).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(27).Visible = False
|
||||
End If
|
||||
|
||||
If ChkObservaciones.Checked Then
|
||||
GvDatos.Columns(28).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(28).Visible = False
|
||||
End If
|
||||
|
||||
GvDatos.Columns(15).Visible = ChkSucursal.Checked
|
||||
GvDatos.Columns(16).Visible = ChkSucursalEjecucion.Checked
|
||||
GvDatos.Columns(17).Visible = ChkCodigo.Checked
|
||||
GvDatos.Columns(18).Visible = ChkSucursalCliente.Checked
|
||||
GvDatos.Columns(19).Visible = ChkSucursalCobranza.Checked
|
||||
GvDatos.Columns(20).Visible = ChkSucursalEjecucion.Checked
|
||||
GvDatos.Columns(21).Visible = ChkVendedor.Checked
|
||||
GvDatos.Columns(22).Visible = ChkEstatusFactura.Checked
|
||||
GvDatos.Columns(23).Visible = ChkMotivoCancelacion.Checked
|
||||
GvDatos.Columns(24).Visible = ChkSeTimbro.Checked
|
||||
GvDatos.Columns(25).Visible = ChkSeEnvioMail.Checked
|
||||
GvDatos.Columns(26).Visible = ChkCuentaContable.Checked
|
||||
GvDatos.Columns(27).Visible = ChkUsuario.Checked
|
||||
GvDatos.Columns(28).Visible = ChkObservaciones.Checked
|
||||
GvDatos.Columns(29).Visible = ChkFolioFiscal.Checked
|
||||
|
||||
GvDatos.Columns(30).Visible = ChkMailCliente.Checked
|
||||
|
||||
GvDatos.Columns(31).Visible = True = ChkEstatusFacturacion.Checked
|
||||
|
||||
GvDatos.Columns(31).Visible = ChkEstatusFacturacion.Checked
|
||||
GvDatos.Columns(32).Visible = ChkFolioFacturacion.Checked
|
||||
|
||||
GvDatos.Columns(33).Visible = ChkSaldo.Checked
|
||||
|
||||
Personalizo = 1
|
||||
@@ -970,124 +807,6 @@ Partial Class RepVentaDetalle
|
||||
Private Function GenerarFacturaVentaDEV(CveVenta As Integer, CveUsuario As Integer) As Byte()
|
||||
|
||||
Return DescargarFactura(CveVenta, UsuarioActual.CveEmpresa, CveUsuario)
|
||||
'Dim ObjVentas As New ClsVentas
|
||||
'Dim Vta As Modelos.Factura = Nothing
|
||||
|
||||
'Dim TmpDTImpuestos = New DataTable
|
||||
'TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
||||
'TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
||||
'TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
|
||||
|
||||
'If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
' Dim dtVentas As DataTable = ObjVentas.DtResultados
|
||||
|
||||
' ' se rellenan los campos de la factura
|
||||
' Vta = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, Server.MapPath("/"))
|
||||
|
||||
' Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
|
||||
' 'se rellena la sucursal
|
||||
' Vta.Cliente.Sucursal = New Modelos.ClienteModel(dtVentas(0)("CveCliente").ToString.ToEntero, UsuarioActual.CveEmpresa)
|
||||
' Vta.Cliente = New Modelos.ClienteModel
|
||||
' Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString
|
||||
' Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString
|
||||
' Vta.Cliente.Direccion = dtVentas(0)("ClienteDireccion").ToString
|
||||
' Vta.Cliente.CP = dtVentas(0)("CPCliente").ToString
|
||||
' Vta.Cliente.Ciudad = dtVentas(0)("ClienteCiudad").ToString
|
||||
' Vta.Cliente.Localidad = dtVentas(0)("ClienteLocalidad").ToString
|
||||
' Vta.Cliente.Estado = dtVentas(0)("ClienteEstado").ToString
|
||||
' Vta.Cliente.Pais = dtVentas(0)("ClientePais").ToString
|
||||
' Vta.Cliente.RFC = dtVentas(0)("ClienteRFC").ToString
|
||||
' Vta.Cliente.Colonia = dtVentas(0)("ColoniaCliente").ToString
|
||||
' Vta.AtencionA = dtVentas(0)("AtencionA").ToString
|
||||
' Vta.Cliente.NoExt = dtVentas(0)("ClienteNoExt").ToString
|
||||
' Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString
|
||||
' Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString
|
||||
' Vta.Cliente.Mail = dtVentas(0)("Mail").ToString
|
||||
' Vta.RefDocto = dtVentas(0)("Ref").ToString
|
||||
' Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero
|
||||
|
||||
|
||||
' Vta.ClienteSucursal = New Modelos.SucursalModel
|
||||
' Vta.ClienteSucursal.Direccion = dtVentas(0)("SucClienteDireccion").ToString
|
||||
' Vta.ClienteSucursal.NoExt = dtVentas(0)("SucClienteNoExt").ToString
|
||||
' Vta.ClienteSucursal.NoInt = dtVentas(0)("SucClienteNoInt").ToString
|
||||
' Vta.ClienteSucursal.Colonia = dtVentas(0)("SucClienteColonia").ToString
|
||||
' Vta.ClienteSucursal.CP = dtVentas(0)("SucClienteCP").ToString
|
||||
' Vta.ClienteSucursal.Municipio = dtVentas(0)("SucClienteCiudad").ToString
|
||||
' Vta.ClienteSucursal.Estado = dtVentas(0)("SucClienteEstado").ToString
|
||||
' Vta.ClienteSucursal.Pais = dtVentas(0)("SucClientePais").ToString
|
||||
' Vta.ClienteSucursal.Localidad = dtVentas(0)("SucClienteLocalidad").ToString
|
||||
' Vta.ClienteSucursal.CorreoSucursal = dtVentas(0)("SucClienteCorreo").ToString
|
||||
' Vta.ClienteSucursal.TelefonoSucursal = dtVentas(0)("SucClienteTelefono").ToString
|
||||
' Vta.ClienteSucursal.Sucursal = dtVentas(0)("SucursalCliente").ToString
|
||||
|
||||
' Vta.EnviarA = New Modelos.EnviarAModel
|
||||
' Vta.EnviarA.CveDireccionEnvio = dtVentas(0)("CveDireccionEnvio").ToString.ToEntero
|
||||
' Vta.EnviarA.EnvioDireccion = dtVentas(0)("EnvioDireccion").ToString
|
||||
' Vta.EnviarA.EnvioColonia = dtVentas(0)("EnvioColonia").ToString
|
||||
' Vta.EnviarA.EnvioCiudad = dtVentas(0)("EnvioCiudad").ToString
|
||||
' Vta.EnviarA.EnvioEstado = dtVentas(0)("EnvioEstado").ToString
|
||||
' Vta.EnviarA.EnvioCP = dtVentas(0)("EnvioCP").ToString
|
||||
|
||||
' Dim DR As DataRow = TmpDTImpuestos.NewRow()
|
||||
' If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
|
||||
' If dtVentas(0)("SubTotal").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Subtotal" : DR("Importe") = dtVentas(0)("SubTotal").ToString.ToDouble : DR("Orden") = 10 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("Descuento").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Descuentos" : DR("Importe") = dtVentas(0)("Descuento").ToString.ToDouble : DR("Orden") = 20 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("Amortizacion").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Amort.Ant" : DR("Importe") = dtVentas(0)("Amortizacion").ToString.ToDouble : DR("Orden") = 30 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("SubTotal").ToString.ToDouble <> (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) Then DR("ImpuestoLocal") = "SubTotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) : DR("Orden") = 40 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("IVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "IVA" : DR("Importe") = dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 50 : TmpDTImpuestos.Rows.Add(DR)
|
||||
|
||||
' 'solo para eclipse, que muesre un subtotal debajo de IVA
|
||||
' If UsuarioActual.CveEmpresa = 15 Then DR = TmpDTImpuestos.NewRow() : DR("ImpuestoLocal") = "Subtotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) + dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 51 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("RetIVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.IVA" : DR("Importe") = dtVentas(0)("RetIVA").ToString.ToDouble : DR("Orden") = 60 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("RetISR").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.ISR" : DR("Importe") = dtVentas(0)("RetISR").ToString.ToDouble : DR("Orden") = 70 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' If dtVentas(0)("Total").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Total" : DR("Importe") = dtVentas(0)("Total").ToString.ToDouble : DR("Orden") = 1000 : TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' End If
|
||||
|
||||
' If ObjVentas.GetVentaDetalle(CveVenta) Then 'Obtenemos el Detalle de la Oorden de Compra
|
||||
' Vta.DtDetalle = ObjVentas.DtResultados
|
||||
' End If
|
||||
|
||||
' If ObjVentas.GetVentaImpuestosLocales(CveVenta) Then
|
||||
' If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
|
||||
' Dim dtImpuesto As DataTable = ObjVentas.DtResultados
|
||||
' If dtImpuesto.Rows.Count > 0 Then
|
||||
' For Each Row As DataRow In dtImpuesto.Rows
|
||||
' Dim Orden = 80
|
||||
' If Row("Importe").ToString.ToDouble <> 0 Then
|
||||
' DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
|
||||
' DR("Importe") = Row("Importe").ToString.ToDouble
|
||||
' DR("Orden") = Orden
|
||||
' TmpDTImpuestos.Rows.Add(DR)
|
||||
' DR = TmpDTImpuestos.NewRow()
|
||||
' Orden = Orden + 1
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
' Vta.DtDeduccion = TmpDTImpuestos.FiltraParametros("", Orderby:="Orden ASC")
|
||||
' Else
|
||||
' Vta.DtDeduccion = ObjVentas.DtResultados
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If ObjVentas.GetVentasFirmas(CveVenta) Then
|
||||
' Vta.DtFirmas = ObjVentas.DtResultados
|
||||
' End If
|
||||
'End If
|
||||
'ObjVentas.Dispose()
|
||||
|
||||
'If Not IsNothing(Vta) Then
|
||||
' PdfFactura(Vta)
|
||||
' Vta = Nothing
|
||||
'End If
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
@@ -356,12 +356,12 @@
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Descuento" DataField="Descuento" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Amortización" DataField="Amortizacion" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Amortización" DataField="Amortizacion" Visible="false" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="Sub Total 2" DataField="SubTotal2" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Ret. ISR" DataField="RetISR" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Imp. Locales" DataField="TotalImpuestos" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
@@ -78,8 +78,9 @@ Partial Class Ventas_RepVentas
|
||||
TipoCambio = 1
|
||||
TCEspecifico = -1
|
||||
CargaCombos()
|
||||
|
||||
'MODALIDADES
|
||||
ConfiguraEmpresa()
|
||||
|
||||
'MODALIDADES
|
||||
If Request("Op") IsNot Nothing AndAlso Request("Op").ToString <> "" Then
|
||||
Opcion = Request("Op").ToString
|
||||
Else
|
||||
@@ -155,6 +156,7 @@ Partial Class Ventas_RepVentas
|
||||
Private Sub ConfiguraEmpresa()
|
||||
' If Not UsuarioActual.Empresa.MostrarRetIVA Then GvDatos.Columns(8).Visible = False
|
||||
If Not UsuarioActual.Empresa.MostrarRetISR Then GvDatos.Columns(9).Visible = False
|
||||
ChkIEPS.Checked = UsuarioActual.Empresa.Funcionalidad(713) = "1" 'empresa deduce IEPS
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
@@ -210,9 +212,9 @@ Partial Class Ventas_RepVentas
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
ConfiguraEmpresa()
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
CargaDatos()
|
||||
Personaliza()
|
||||
UPDatos.Update()
|
||||
'XmlConf(UsuarioActual.CveUsuario, 9)
|
||||
@@ -252,6 +254,8 @@ Partial Class Ventas_RepVentas
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
If DtVentas.SUMD("Descuento") <= 0 Then GvDatos.Columns(3).Visible = False ' se oculta descuentos, si está vac+io
|
||||
|
||||
Agrupador = DdlGrupo.SelectedItem.Text
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
||||
ObjVentas.Dispose()
|
||||
@@ -474,82 +478,22 @@ Partial Class Ventas_RepVentas
|
||||
Personaliza()
|
||||
End Sub
|
||||
|
||||
Private Sub Personaliza()
|
||||
|
||||
If ChkSubTotal2.Checked Then
|
||||
GvDatos.Columns(5).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
If ChkIEPS.Checked Then
|
||||
GvDatos.Columns(7).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(7).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRetIVA.Checked Then
|
||||
GvDatos.Columns(8).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(8).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRetISR.Checked Then
|
||||
GvDatos.Columns(9).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(9).Visible = False
|
||||
End If
|
||||
|
||||
If ChkImpLoc.Checked Then
|
||||
GvDatos.Columns(10).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(10).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMinSub.Checked Then
|
||||
GvDatos.Columns(12).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(12).Visible = False
|
||||
End If
|
||||
|
||||
If ChkAVGSub.Checked Then
|
||||
GvDatos.Columns(13).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(13).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMaxSub.Checked Then
|
||||
GvDatos.Columns(14).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(14).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMinTot.Checked Then
|
||||
GvDatos.Columns(17).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(17).Visible = False
|
||||
End If
|
||||
|
||||
If ChkAvgTot.Checked Then
|
||||
GvDatos.Columns(16).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(16).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMaxTot.Checked Then
|
||||
GvDatos.Columns(15).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(15).Visible = False
|
||||
End If
|
||||
|
||||
If CheckRefacturado.Checked Then
|
||||
GvDatos.Columns(18).Visible = True
|
||||
Else
|
||||
GvDatos.Columns(18).Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Private Sub Personaliza()
|
||||
|
||||
GvDatos.Columns(5).Visible = ChkSubTotal2.Checked
|
||||
GvDatos.Columns(7).Visible = ChkIEPS.Checked
|
||||
GvDatos.Columns(8).Visible = ChkRetIVA.Checked
|
||||
GvDatos.Columns(9).Visible = ChkRetISR.Checked
|
||||
GvDatos.Columns(10).Visible = ChkImpLoc.Checked
|
||||
GvDatos.Columns(12).Visible = ChkMinSub.Checked
|
||||
GvDatos.Columns(13).Visible = ChkAVGSub.Checked
|
||||
GvDatos.Columns(14).Visible = ChkMaxSub.Checked
|
||||
GvDatos.Columns(15).Visible = ChkMaxTot.Checked
|
||||
GvDatos.Columns(16).Visible = ChkAvgTot.Checked
|
||||
GvDatos.Columns(17).Visible = ChkMinTot.Checked
|
||||
GvDatos.Columns(18).Visible = CheckRefacturado.Checked
|
||||
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -2326,6 +2326,15 @@ Partial Class Ventas
|
||||
ViewState("HabilitaRemisionPublicoGeneral") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property TieneBloqueoPorAutorizacion As Integer
|
||||
Get
|
||||
Return IfNull(ViewState("TieneBloqueoPorAutorizacion"), "0", ViewState("TieneBloqueoPorAutorizacion")).ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TieneBloqueoPorAutorizacion") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
'#Region "AuxiliarConta"
|
||||
@@ -6320,7 +6329,7 @@ Partial Class Ventas
|
||||
|
||||
UpINV.Update()
|
||||
End Sub
|
||||
Private Sub CargaSubProyecto(Optional CveSubProyecto As Integer = -1)
|
||||
Private Sub CargaSubProyecto(Optional CveSubProyecto As Integer = -1, Optional FiltraPorProyecto As Boolean = False)
|
||||
'DdlSubProyecto.Items.Clear()
|
||||
'DdlSubProyecto.SelectedValue = Nothing
|
||||
'If DdlProyecto.SelectedValue.ToEntero() > 0 Then
|
||||
@@ -6329,6 +6338,20 @@ Partial Class Ventas
|
||||
'End If
|
||||
'DdlSubProyecto.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
|
||||
|
||||
If FiltraPorProyecto Then
|
||||
DdlSubProyecto.Items.Clear()
|
||||
|
||||
Using ObjSubP As New ClsSubProyectos
|
||||
If ObjSubP.GetSubProyectos(UsuarioActual.CveEmpresa) Then
|
||||
DdlSubProyecto.DataSource = ObjSubP.DtResultados.FiltraParametros(String.Format("CveProyecto = {0}", DdlProyecto.SelectedValue))
|
||||
End If
|
||||
End Using
|
||||
|
||||
DdlSubProyecto.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Sin SubProyecto Asignado", "-1"))
|
||||
End If
|
||||
|
||||
If CveSubProyecto > 0 Then DdlSubProyecto.SelectedValueExist(CveSubProyecto)
|
||||
End Sub
|
||||
|
||||
@@ -6963,6 +6986,11 @@ Partial Class Ventas
|
||||
HabilitaRemisionPublicoGeneral = 1
|
||||
End If
|
||||
|
||||
'SI TUVO HABILITADO EL BLOQUEO POR AUTORIZACION PERO DESPUES SE CAMBIO MANUAL A REMISION
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem") AndAlso TieneBloqueoPorAutorizacion = 1 Then
|
||||
HabilitaRemisionPublicoGeneral = 1
|
||||
End If
|
||||
|
||||
'SI TIENE LA HABILITACION DE REMISION ACTIVA Y LA SUCURSAL NO LO PERMITE
|
||||
If Not DeshabilitarAutorizacion AndAlso HabilitaRemisionPublicoGeneral = 1 Then
|
||||
HabilitaRemisionPublicoGeneral = 0
|
||||
@@ -6983,7 +7011,7 @@ Partial Class Ventas
|
||||
Private Function ValidaImportePublicoGeneral() As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "Rem" AndAlso HabilitaRemisionPublicoGeneral = 1 Then
|
||||
If DdlTipoComprobante.SelectedValue = "Rem" AndAlso HabilitaRemisionPublicoGeneral = 1 AndAlso UsuarioActual.Empresa.Funcionalidad(381).Trim() = CveCliente.ToString() Then
|
||||
Dim Total As Decimal = TxtTotal.Text.ToDecimal()
|
||||
|
||||
If DdlMoneda.SelectedValue = "1" Then
|
||||
@@ -7195,6 +7223,8 @@ Partial Class Ventas
|
||||
Else
|
||||
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||
DdlTipoComprobante.SelectedValue = "PA"
|
||||
|
||||
TieneBloqueoPorAutorizacion = 1
|
||||
End If
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
@@ -7257,6 +7287,8 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then
|
||||
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||
DdlTipoComprobante.SelectedValue = "PA"
|
||||
|
||||
TieneBloqueoPorAutorizacion = 1
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -7384,6 +7416,8 @@ Partial Class Ventas
|
||||
UPCondicionesPago.Update()
|
||||
DdlTipoComprobante.SelectedValueExistInsert("PA", "Autorización")
|
||||
DdlTipoComprobante.SelectedValue = "PA"
|
||||
TieneBloqueoPorAutorizacion = 1
|
||||
|
||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||
'si llegó por la opción de cotización no debe de restringuir
|
||||
If IfNull(Request("Op"), "").ToString() = "Cot" OrElse (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then DdlTipoComprobante.SelectedValue = "Cot"
|
||||
@@ -7536,7 +7570,7 @@ Partial Class Ventas
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
|
||||
End If
|
||||
End If
|
||||
HabilitaRemisionPublicoGeneral = 0
|
||||
|
||||
HabilitarRemisionesPublicoGeneral()
|
||||
End If
|
||||
|
||||
@@ -14253,6 +14287,7 @@ Partial Class Ventas
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "2" Then
|
||||
Dim DescuentosAnticipos As Decimal = row2.DataKey("Descuentos").ToDecimal
|
||||
ImporteAnticipo = row2.FCTextBox("TxtAnticipo" & row2.RowIndex).Text.ToDecimal / (row2.DataKey("TotalAnticipo").ToDecimal - DescuentosAnticipos) * row2.DataKey("SubTotalAnticipo").ToDecimal
|
||||
ImporteAnticipo = ImporteAnticipo.RoundSQL(2)
|
||||
End If
|
||||
|
||||
Dim Importe11MX As Decimal = ImporteAnticipo
|
||||
@@ -15415,9 +15450,10 @@ Partial Class Ventas
|
||||
' Dim DtTest = ObjConta.DtResultados
|
||||
'End If
|
||||
End If
|
||||
Else
|
||||
ErrorPrepoliza = True
|
||||
End If
|
||||
|
||||
|
||||
Return ErrorPrepoliza
|
||||
Catch ex As Exception
|
||||
GuardaLog("GuardaPreP." & ex.ToString())
|
||||
@@ -15640,7 +15676,7 @@ Partial Class Ventas
|
||||
If DebeGenerarMovimiento Then
|
||||
|
||||
Dim CveAlmacenSalida As Integer = ddlAlmacen.SelectedValue.ToEntero()
|
||||
Dim CveAlmacenExA As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=10).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={DdlSubProyecto.SelectedValue}").ToEntero()
|
||||
Dim CveAlmacenExA As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=10).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={DdlSubProyectoDatos.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveRemision As Integer = factura.CveVenta
|
||||
Dim CveMoneda As Integer = DdlMoneda.SelectedValue.ToEntero()
|
||||
@@ -18089,7 +18125,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargaSubProyecto()
|
||||
CargaSubProyecto(FiltraPorProyecto:=True)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -30131,10 +30167,11 @@ Partial Class Ventas
|
||||
For Each Dr As DataRow In DtImpuestosLocal.Rows
|
||||
FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("CveSubProyecto"))
|
||||
Dim importePuTemp As Decimal = 0
|
||||
importePuTemp = (Porcentaje * (TmpDT.SUMD("TotalImporte", FiltroStr) - TmpDT.SUMD("Descuento", FiltroStr)))
|
||||
|
||||
Dim DescuentoAplicado As Decimal = 0
|
||||
If AplicaDescuentos Then
|
||||
importePuTemp = (Porcentaje * (TmpDT.SUMD("TotalImporte", FiltroStr)))
|
||||
Else
|
||||
importePuTemp = (Porcentaje * (TmpDT.SUMD("TotalImporte", FiltroStr) - TmpDT.SUMD("Descuento", FiltroStr)))
|
||||
DescuentoAplicado = Porcentaje * TmpDT.SUMD("Descuento", FiltroStr)
|
||||
End If
|
||||
|
||||
If Not AplicaImpuestosLocales Then
|
||||
@@ -30154,10 +30191,13 @@ Partial Class Ventas
|
||||
|
||||
Dr("ImporteRetIVA") = (importePuTemp * Dr("PorcentajeRetIVA").ToString().ToDecimal())
|
||||
Dr("ImporteRetISR") = (importePuTemp * Dr("PorcentajeRetISR").ToString().ToDecimal())
|
||||
Dr("ImportePU") = importePuTemp
|
||||
|
||||
If AplicaDescuentos Then
|
||||
Dr("Descuento") = Porcentaje * TmpDT.SUMD("Descuento", FiltroStr)
|
||||
Dr("ImportePU") = importePuTemp + DescuentoAplicado
|
||||
Dr("Descuento") = DescuentoAplicado
|
||||
Dr("ImporteTotal") = Dr("ImportePU").ToString().ToDecimal().RoundSQL(2)
|
||||
Else
|
||||
Dr("ImportePU") = importePuTemp
|
||||
End If
|
||||
|
||||
If AplicaRedondeo Then
|
||||
@@ -30172,11 +30212,14 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
Dim importeNC = (DtImpuestosLocal.SUMD("ImporteTotal") + DtImpuestosLocal.SUMD("ImporteIVA") + DtImpuestosLocal.SUMD("ImporteIEPS") - DtImpuestosLocal.SUMD("ImporteRetIVA") - DtImpuestosLocal.SUMD("ImporteRetISR"))
|
||||
|
||||
If AplicaDescuentos Then
|
||||
importeNC -= DtImpuestosLocal.SUMD("Descuento")
|
||||
End If
|
||||
|
||||
If AplicaImpuestosLocales Then
|
||||
Importe = Importe + TotalImpuestosLocalesRecalculado
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user