This commit is contained in:
2022-02-28 20:07:39 -07:00
31 changed files with 3259 additions and 175 deletions

View File

@@ -204,7 +204,7 @@
<Value>=Fields!ImporteAnterior.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00;(#,0.00)</Format>
<Format>#,0.00</Format>
<Color>=Iif(Fields!ImporteAnterior.Value&lt;0,"Red","Black")</Color>
<Language>es-MX</Language>
</Style>
@@ -576,7 +576,7 @@
<Value>=Fields!ImporteAnterior.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00;(#,0.00)</Format>
<Format>#,0.00</Format>
<Color>=Iif(Fields!ImporteAnterior.Value&lt;0,"Red","Black")</Color>
<Language>es-Mx</Language>
</Style>
@@ -857,7 +857,7 @@
<Width>20.24762cm</Width>
<Page>
<PageHeader>
<Height>1.66688cm</Height>
<Height>1.83445cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -920,11 +920,32 @@
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Centro de Costos: </Value>
<Style>
<FontSize>11pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!SubProyecto.Value</Value>
<Style>
<FontSize>11pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Top>0.71396cm</Top>
<Left>2.94324cm</Left>
<Height>0.6cm</Height>
<Height>1.12049cm</Height>
<Width>13.85838cm</Width>
<ZIndex>1</ZIndex>
<Style>
@@ -946,7 +967,7 @@
<TextRun>
<Value>=Parameters!pEmp.Value</Value>
<Style>
<FontSize>13pt</FontSize>
<FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
@@ -1292,6 +1313,12 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="SubProyecto">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>163d4464-e41c-42b9-8827-487ff815b059</rd:ReportID>

View File

@@ -0,0 +1,165 @@
<%@ Page Title="Rep. Pólizas Virtuales" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPolizasVirtuales.aspx.vb" Inherits="Acumuladores_RepPolizasVirtuales" EnableEventValidation="false" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
#DivAgregarUnidad > div.modal-dialog > div label input {
padding: 0px !important;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Rep. Pólizas Virtuales
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="LnkExportarExcel" OnClick="LnkExportarExcel_Click" data-toggle="tooltip" data-placement="left" title="Exportar Excel" Text="<i class='fa fa-file-excel-o' aria-hidden='true'></i> Exportar Excel" Visible="false" ></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExportarExcel" />
</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="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnBuscar" runat="server" Text="Consultar" ValidationGroup="GrpBuscar" class="btn btn-primary" OnClick="BtnBuscar_Click" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption ">
<div class="row">
<asp:Label runat="server" id="LblSubProyecto" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div runat="server" class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me Widthall" runat="server" Width="100%" ></asp:DropDownList>
</div>
<div class="col-md-1 truncate">
Fecha Inicio:
</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate">
Fecha Fin:
</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<label class="col-md-1 truncate" style="text-align: right;">Opción:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlOpcion" runat="server" CssClass="form-control input-sm select2me" Width="150px">
<asp:ListItem Value="1">Enviadas</asp:ListItem>
<asp:ListItem Value="0">No Enviadas</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
<div class="portlet-body" style="display: none;">
<label class="col-md-1 truncate">Descripción:</label>
<div class="col-md-2">
<asp:Label ID="lbDescripcion" runat="server"></asp:Label>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePolizaVirtual,AnioVehiculo,SerieFolio,CveVenta,Descuento,Enviada,FechaEnvioPoliza,FechaIng,PU,TieneUsado,TipoPoliza,TipoServicio,Total,FechaUsado,Serie,Codigo2,IdProductoPolizaVirtual,RespuestaEnvio,IdBCI,BCI,IdModeloAuto,ModeloAuto,IdMarcaAuto,MarcaAuto,IdMarcaUsado,MarcaUsado"
EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
<Columns>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" HeaderText="Serie-Folio" ItemStyle-Width="100px" Target="_blank" ControlStyle-CssClass="Texto" />
<asp:BoundField HeaderText="AnioVehiculo" DataField="AnioVehiculo" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Descuento" DataField="Descuento" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField HeaderText="Enviada" DataField="Enviada" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="FechaEnvioPoliza" DataField="FechaEnvioPoliza" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" />
<asp:BoundField HeaderText="FechaIng" DataField="FechaIng" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" />
<asp:BoundField HeaderText="PU" DataField="PU" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField HeaderText="TieneUsado" DataField="TieneUsado" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="TipoPoliza" DataField="TipoPoliza" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="TipoServicio" DataField="TipoServicio" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField HeaderText="FechaUsado" DataField="FechaUsado" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:dd/MM/yyyy}" />
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Codigo2" DataField="Codigo2" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="IdProductoPolizaVirtual" DataField="IdProductoPolizaVirtual" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="RespuestaEnvio" DataField="RespuestaEnvio" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="IdBCI" DataField="IdBCI" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="BCI" DataField="BCI" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="IdModeloAuto" DataField="IdModeloAuto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="ModeloAuto" DataField="ModeloAuto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="IdMarcaAuto" DataField="IdMarcaAuto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="MarcaAuto" DataField="MarcaAuto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="IdMarcaUsado" DataField="IdMarcaUsado" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="MarcaUsado" DataField="MarcaUsado" ItemStyle-HorizontalAlign="Left" />
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,60 @@
Imports System.Data
Imports Extensiones
Partial Class Acumuladores_RepPolizasVirtuales
Inherits ClsPaginas
Private Sub Acumuladores_RepPolizasVirtuales_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaCombos()
End If
End Sub
Private Sub CargaCombos()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto:=LblSubProyecto)
End Sub
Public Sub CargaDatos()
LnkExportarExcel.Visible = False
Dim ObjAcum As New ClsAcumuladores
Dim FI As Date = If(txtFechaI.Text.Length > 0, txtFechaI.Text.ToDate, MinFecha)
Dim FF As Date = If(txtFechaF.Text.Length > 0, txtFechaF.Text.ToDate, MaxFecha)
If ObjAcum.GetPolizaVirtualRep(FI, FF, DdlOpcion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.Toentero, UsuarioActual.CveUsuario) Then
GvDatos.DataSource = ObjAcum.DtResultados
If ObjAcum.DtResultados.Rows.Count > 0 Then
LnkExportarExcel.Visible = True
End If
Else
GvDatos.DataSource = Nothing
End If
ObjAcum.Dispose()
GvDatos.DataBind()
UpDatos.Update()
UpAcciones.Update()
End Sub
Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
Protected Sub LnkExportarExcel_Click(sender As Object, e As EventArgs)
GvDatos.ExportToExcel2($"RepPolizasVirtuales.xlsx")
End Sub
End Class

View File

@@ -1281,6 +1281,32 @@ Public Class ClsAcumuladores
End Function
Public Function GetPolizaVirtualRep(FechaInicio As Date, FechaFin As Date, Opcion As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_Vta_PolizaVirtualRepGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un error al las polizas virtuales. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region " IDisposable Support "
' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)

View File

@@ -2457,6 +2457,33 @@ Public Class ClsCompras
End Function
Public Function GetComplementoTrasladoRep(CveEmpresa As Integer, CveProveedor As Integer, CveTipoProveedor As Integer, FechaI As Date, FechaF As Date, CveUsuario As Integer, CveUsuarioRegistro As Integer, CveSubProyecto As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ComplementoTrasladoRepGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveUsuarioRegistro", SqlDbType.Int).Value = CveUsuarioRegistro
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error obtener las vinculaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function AddVincularPago(CveFactura As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_VincularPagoAdd")

View File

@@ -3608,40 +3608,8 @@ Public Class ClsGenerales
#End Region
#Region "IDisposable Support"
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)
If Not Me.disposedValue Then
If disposing Then
' TODO: dispose managed state (managed objects).
If Not Data Is Nothing Then Data.Dispose() : Data = Nothing
If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing
If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing
If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing
If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close()
If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing
End If
' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below.
' TODO: set large fields to null.
End If
Me.disposedValue = True
End Sub
' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
ConexionClose()
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
#End Region
#Region " P O L I Z A V I R T U A L "
@@ -4140,6 +4108,63 @@ Public Class ClsGenerales
End Function
Public Function GetFolioFechaCancelacion(CveEmpresa As Integer, Tipo As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_FolioFechaCancelacionGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Tipo", SqlDbType.Int).Value = Tipo
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError($"Ocurrió un error al obtener los datos de fechas de cancelación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#Region "IDisposable Support"
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)
If Not Me.disposedValue Then
If disposing Then
' TODO: dispose managed state (managed objects).
If Not Data Is Nothing Then Data.Dispose() : Data = Nothing
If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing
If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing
If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing
If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close()
If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing
End If
' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below.
' TODO: set large fields to null.
End If
Me.disposedValue = True
End Sub
' This code added by Visual Basic to correctly implement the disposable pattern.
Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
ConexionClose()
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
#End Region
End Class

View File

@@ -2429,7 +2429,7 @@ Public Class ClsNominas
retorno = RunQuery("Ocurrió un error al obtener el PA_Nom_CalculoISRAnual.")
Return retorno
End Function
Public Function GetNominaAcumulado(Ejercicio As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodoI As Integer, CvePeriodoF As Integer, CveEmpresa As Integer, Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1) As Boolean
Public Function GetNominaAcumulado(Ejercicio As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodoI As Integer, CvePeriodoF As Integer, CveEmpresa As Integer, Optional RegimenContratacion As Integer = 1, Optional CvePersonal As Integer = -1, Optional CveTipoPeriodo As Integer = -1) As Boolean
Dim retorno As Boolean = False
Try
@@ -2445,6 +2445,7 @@ Public Class ClsNominas
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@RegimenContratacion", SqlDbType.Int).Value = RegimenContratacion
.Add("@CvePersonal", SqlDbType.Decimal).Value = CvePersonal
.Add("@CveTipoPeriodo", SqlDbType.Decimal).Value = CveTipoPeriodo
End With
SqlAdapter.Fill(DTSet)
retorno = True

View File

@@ -4344,6 +4344,11 @@ Public Class ClsPaginas
PaginaDict.Add("/General/JAMComparativos.aspx".ToUpper(), 643)
PaginaDict.Add("/General/CatMotivoRechazoGuias.aspx".ToUpper(), 729)
PaginaDict.Add("/General/FolioFechaCancelacion.aspx".ToUpper(), -1)
'-------------------------------------------Q U I T A R----------------------------------
#Region "Q U I T A R"
@@ -4755,6 +4760,11 @@ Public Class ClsPaginas
PaginaDict.Add("/OI/CircularDetalleB.aspx".ToUpper(), 757)
PaginaDict.Add("/Compras/CatTipoGasto.aspx".ToUpper(), 759)
PaginaDict.Add("/Compras/RepCartaPorteTraslados.aspx".ToUpper(), 1323)
#End Region
'CONTABILIDAD
@@ -5645,6 +5655,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Acumuladores/RepIndicadorDiarioDetalle.aspx".ToUpper(), 730)
PaginaDict.Add("/Acumuladores/RepEntradasUsadosClientes.aspx".ToUpper(), 543)
PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)
PaginaDict.Add("/Acumuladores/RepPolizasVirtuales.aspx".ToUpper(), 1322)

View File

@@ -1564,8 +1564,8 @@ Namespace Modelos
End If
If DtPolizasVirtuales IsNot Nothing Then
If DtPolizasVirtuales.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
Dim RowPoliza As DataRow = DtPolizasVirtuales.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0)
If DtPolizasVirtuales.Select($"Consec = {Row("Consec").ToString()} AND CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then
Dim RowPoliza As DataRow = DtPolizasVirtuales.Select($"Consec = {Row("Consec").ToString()} AND CvePS={Row("CvePS").ToString.ToEntero}")(0)
RowPoliza("CveVentaDetalle") = ObjVentas.CveVentaDetalle
End If
End If
@@ -1625,7 +1625,7 @@ Namespace Modelos
'POLIZA VIRTUAL
If factura.DtPolizasVirtuales IsNot Nothing AndAlso factura.DtPolizasVirtuales.Rows.Count > 0 Then
If Not GuardarPolizasVirtuales(ObjVentas.IniciaTransacSQL(), ObjFactura:=factura) Then
If Not GuardarPolizasVirtuales(ObjAcum, ObjFactura:=factura) Then
ErrorList.Add("Ocurrió un error al actualizar el distribuidor.")
End If
End If
@@ -2225,13 +2225,11 @@ Namespace Modelos
Return CveMovimiento
End Function
Private Function GuardarPolizasVirtuales(SqlTransaccion As SqlClient.SqlTransaction, ObjFactura As Modelos.Factura) As Boolean
Private Function GuardarPolizasVirtuales(ByRef ObjAcum As ClsAcumuladores, ObjFactura As Modelos.Factura) As Boolean
Dim Resultado As Boolean = True
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero > 0 AndAlso ObjFactura.TipoDocto.Contiene("Rem") Then
Dim ObjAcum As New ClsAcumuladores(SqlTransaccion)
For Each drow As DataRow In ObjFactura.DtPolizasVirtuales.Rows
If ObjAcum.AddPolizaVirtual(ObjFactura.CveVenta, drow("CveVentaDetalle").ToString().ToEntero(), drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("Descuento").ToString.ToDecimal,
drow("Total").ToString.ToDecimal, drow("TipoServicio").ToString.ToEntero, drow("TipoPoliza").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero, drow("AnioVehiculo").ToString.ToEntero, CBool(drow("TieneUsado").ToString),

File diff suppressed because it is too large Load Diff

View File

@@ -962,11 +962,21 @@ Namespace Extensiones
(Mid(entero, 8, 1) = "0" And Mid(entero, 7, 1) = "0" And Mid(entero, 6, 1) = "0" And Mid(entero, 5, 1) = "0" And Mid(entero, 4, 1) = "0" And Len(entero) < 8) Or
(Mid(entero, 3, 1) <> "0" And Len(entero) = 7) Or
(Mid(entero, 3, 1) <> "0" And Len(entero) = 8) Or
(Mid(entero, 8, 1) = "0" And Mid(entero, 8, 1) = "0" And Mid(entero, 7, 1) = "0" And Mid(entero, 6, 1) = "0" And Mid(entero, 5, 1) = "0" And Mid(entero, 4, 1) = "0" And Len(entero) = 9) Then
palabras.Append("mil ")
'Else
' palabras.Append("mil ")
(Mid(entero, 8, 1) = "0" And Mid(entero, 8, 1) = "0" And Mid(entero, 7, 1) = "0" And Mid(entero, 6, 1) = "0" And Mid(entero, 5, 1) = "0" And Mid(entero, 4, 1) = "0" And Len(entero) = 9) Then
Dim tmp As String = Mid(entero, 2, 6)
If entero.ToString.Length >= 7 And tmp = "000000" Then
If entero.ToString.Length = 7 And tmp = "000000" Then
palabras.Append("de ")
End If
Else
palabras.Append("mil ")
End If
'Else
' palabras.Append("mil ")
End If
End If

View File

@@ -1189,6 +1189,11 @@ Partial Class Bancos_IE
If ObjIE.FechaIngCancelacion.ToShortDateString = "01/01/0001" Then TrFechaIngCancelacion.Visible = False
End If
If ObjIE.CveIECancelacion > 0 Then
CveIECancelacion = ObjIE.CveIECancelacion
End If
UpCancelacion.Update()
'OTROS DATOS - DATOS COMPLEMENTO SUSTITUCION
@@ -4805,7 +4810,7 @@ Partial Class Bancos_IE
End Sub
Protected Sub LnkEliminar_Click(sender As Object, e As EventArgs) Handles LnkEliminar.Click
If CveIECancelado > 0 Then
If CveIECancelado > 0 Or CveIECancelacion > 0 Then
Alert("El Movimiento no se puede eliminar porque tiene una cancelación relacionada, se tiene que eliminar primero la cancelación", TipoMensaje.MsgAdvertencia)
Else
RegistraScript(String.Format("$('#{0}').modal('show');", "divDescripcion"))

View File

@@ -656,7 +656,7 @@ Partial Class Bancos_PagoElectronicoGrupos
Dim NombreDelArchivo As String = GvRow.DataKey("Archivo")
Dim ObjBancos As New ClsBancos
If ObjBancos.GetLayoutPagos(DdlCuentaEnviados.SelectedValue.ToEntero, CveBLE, "-1", PorGrupos:=True) Then
If ObjBancos.GetLayoutPagos(DdlCuentaEnviados.SelectedValue.ToEntero, CveBLE, DdlTipoGeneracionEnviados.SelectedValue, PorGrupos:=True) Then
DtRegenerar = ObjBancos.DtResultados
Else
DtRegenerar = Nothing

View File

@@ -118,7 +118,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf")
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = ".xml", "application/xml", "application/pdf")
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(Path)
@@ -134,7 +134,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf")
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = ".xml", "application/xml", "application/pdf")
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(Path)
@@ -174,7 +174,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "txt", "text/plain", "application/pdf")
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = ".txt", "text/plain", "application/pdf")
HttpContext.Current.Response.AppendHeader("Content-disposition", "attachment; filename=" & Archivo.Name)
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(Path)
@@ -739,7 +739,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf")
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = ".xml", "application/xml", "application/pdf")
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(Path)
@@ -868,7 +868,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf")
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = ".xml", "application/xml", "application/pdf")
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(Path)
@@ -1585,7 +1585,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "application/xml", "application/pdf")
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = ".xml", "application/xml", "application/pdf")
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(Path)
@@ -1626,7 +1626,7 @@ Partial Class PopUpVerFactura
Private Sub DescargarArchivoPDFTraslado(Archivo As System.IO.FileInfo, path As String)
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = "xml", "text/xml", "application/pdf")
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name) = ".xml", "text/xml", "application/pdf")
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(path)
@@ -1856,7 +1856,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name).ToLower = "xml", "application/xml", "application/pdf")
HttpContext.Current.Response.ContentType = If(IO.Path.GetExtension(Archivo.Name).ToLower = ".xml", "application/xml", "application/pdf")
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(Path)

View File

@@ -0,0 +1,142 @@
<%@ Page Title="Rep. Carta Porte Traslados" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCartaPorteTraslados.aspx.vb" Inherits="Compras_RepCartaPorteTraslados" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.dataTables_scrollHead {
background-color: #95A5A6;
color: white;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Rep. Carta Porte Traslados
</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>
<asp:UpdatePanel runat="server" ID="UpdatePanel1" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server" Visible="false"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExcel" />
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</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="UpFiltros" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultarFiltros" OnClick="BtnConsultarFiltros_Click" runat="server" Text="Consultar" ValidationGroup="GrpFiltros" class="btn btn-primary" />
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1" style="max-width: 120px">Proveedor:</div>
<div class="col-md-2">
<ADS:Dropdownlost ID="DdlProveedores" CssClassDdl="form-control input-sm select2me" Style="min-width: 160px;" CssStyle="width:100%" DataTextField="RazonSocial" DataValueField="CveProveedor" AppendDataBoundItems="true" runat="server"></ADS:Dropdownlost>
</div>
<div class="col-md-1" style="max-width: 90px">Fecha Inicio:</div>
<div class="col-md-2" style="max-width: 130px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<asp:TextBox ID="TxtFiltrosFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LBCalendarFiltrosFechaInicio" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFiltrosFechaInicio" runat="server" TargetControlID="TxtFiltrosFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFiltrosFechaInicio" TargetControlID="TxtFiltrosFechaInicio" PopupButtonID="LBCalendarFiltrosFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFiltrosFechaInicio" runat="server" ControlToValidate="TxtFiltrosFechaInicio" 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="GrpFiltros"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFiltrosFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFiltrosFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1" style="max-width: 75px">Fecha Fin:</div>
<div class="col-md-2" style="max-width: 130px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<asp:TextBox ID="TxtFiltrosFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LBCalendarFiltrosFechaFin" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFiltrosFechaFin" runat="server" TargetControlID="TxtFiltrosFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFiltrosFechaFin" TargetControlID="TxtFiltrosFechaFin" PopupButtonID="LBCalendarFiltrosFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFiltrosFechaFin" runat="server" ControlToValidate="TxtFiltrosFechaFin" 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="GrpFiltros"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFiltrosFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFiltrosFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="120px" runat="server" DataValueField="CveSubProyecto" DataTextField="SubProyecto">
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<label class="col-md-1 truncate">Tipo Proveedor:</label>
<div class="col-md-3">
<asp:DropDownList ID="DdlTipoProveedor" CssClass="form-control input-sm select2me" Width="260px" runat="server">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Proveedor" Value="1"></asp:ListItem>
<asp:ListItem Text="Acreedor" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Usuario Registró:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlUsuarioRegistra" CssClass="form-control input-sm select2me" Width="120px" runat="server" DataValueField="CveUsuario" DataTextField="Nombre">
</asp:DropDownList>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<table class="table Widthall ">
<tr>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 60%; border-right: 3px solid white;">Compra</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 40%; border-right: 3px solid white;">Traslado</td>
</tr>
</table>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD"
DataKeyNames="CveComplementoTraslado,FechaIng,CveCompra,SerieFolioCompra,FechaCompra,FechaFactura,UUID,SerieFolioFactura,CveProveedor,RazonSocial,CveUsuario,Usuario"
GridLines="None" data-sort="true">
<Columns>
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="RazonSocial" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" Target="_blank" ItemStyle-Width="40%" />
<asp:HyperLinkField HeaderText="SerieFolio" DataTextField="SerieFolioCompra" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" Target="_blank" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha" DataField="FechaCompra" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Folio" DataField="SerieFolioFactura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Folio Fiscal" DataField="UUID" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Fecha" DataField="FechaFactura" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,117 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Compras_RepCartaPorteTraslados
Inherits ClsPaginas
'Private Property DTComplemntos As DataTable
' Get
' If ViewState("DTComplemntos") Is Nothing Then
' Return New DataTable
' Else
' Return DirectCast(ViewState("DTComplemntos"), DataTable)
' End If
' End Get
' Set(value As DataTable)
' ViewState("DTComplemntos") = value
' End Set
'End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
InicializaValores()
End If
End Sub
#Region " INICIALIZA VALORES "
Private Sub InicializaValores()
TxtFiltrosFechaInicio.Text = Now.FirstDayOfMonth.ToShortDateString
TxtFiltrosFechaFin.Text = Now.ToShortDateString
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
'DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
'DdlProveedores.DataBind()
'DdlProveedores.Items.Insert(0, New ListItem("Todos", "-1"))
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
'DdlSubProyecto.DataBind()
'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto:=LblSubProyecto)
DdlUsuarioRegistra.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
DdlUsuarioRegistra.DataBind()
DdlUsuarioRegistra.Items.Insert(0, New ListItem("Todos", "-1"))
UpFiltros.Update()
End Sub
#End Region
#Region " CARGA DATOS "
Protected Sub BtnConsultarFiltros_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
Private Sub CargaDatos()
LnkExcel.Visible = False
Dim CveProveedor As Integer = If(DdlProveedores.SelectedValue.ToEntero = 0, -1, DdlProveedores.SelectedValue.ToEntero)
Dim CveTipoProveedor = DdlTipoProveedor.SelectedValue.ToEntero
Dim FechaInicio = If(IsDate(TxtFiltrosFechaInicio.Text), TxtFiltrosFechaInicio.Text.ToDate, MinFecha)
Dim FechaFin = If(IsDate(TxtFiltrosFechaFin.Text), TxtFiltrosFechaFin.Text.ToDate, MaxFecha)
Dim Count As Integer = 0
Dim ObjCompras As New ClsCompras
If ObjCompras.GetComplementoTrasladoRep(UsuarioActual.CveEmpresa, CveProveedor, CveTipoProveedor, FechaInicio, FechaFin, UsuarioActual.CveUsuario, DdlUsuarioRegistra.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjCompras.DtResultados
If ObjCompras.DtResultados.Rows.Count > 0 Then
LnkExcel.Visible = True
End If
Else
GvDatos.DataSource = Nothing
End If
ObjCompras.Dispose()
GvDatos.DataBind()
UpAcciones.Update()
UpDatos.Update()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
End If
End Sub
#End Region
#Region "IMPRESION"
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs)
GeneraImpresion("Excel")
End Sub
Private Sub GeneraImpresion(Optional Formato As String = "PDF")
GvDatos.ExportToExcel2("RepCartaPorteTraslados.xlsx")
End Sub
#End Region
End Class

View File

@@ -937,7 +937,7 @@ Partial Class RegPoliza
Dim dr As DataRow = DT.Rows(0)
HLImprimir.PostBackUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta($"OP=POL&CvePoliza={dr("IdPoliza").ToString.ToEntero}"))
HLImprimir.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta($"OP=POL&CvePoliza={dr("IdPoliza").ToString.ToEntero}"))
HLImprimir.Visible = True
TxtFechaPoliza.Text = dr("FechaPol").ToString.ToDate.ToShortDateString

View File

@@ -319,10 +319,25 @@ Partial Class AC_RepEstadoActividades
params.Add(New ReportParameter("lbTotalActual", LbTotalActual.Text))
params.Add(New ReportParameter("lbTotalAnterior", LbTotalAnterior.Text))
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
' params.Add(New ReportParameter("pImg", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
Dim LogoRuta As String = ""
LogoRuta = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)
If IO.File.Exists(LogoRuta) Then
params.Add(New ReportParameter("pImg", $"file://{LogoRuta}"))
Else
params.Add(New ReportParameter("pImg", ""))
End If
params.Add(New ReportParameter("pFirma1", ""))
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)
End Sub

View File

@@ -0,0 +1,114 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="FolioFechaCancelacion.aspx.vb" Inherits="Generales_FolioFechaCancelacion" EnableEventValidation="false" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
#DivAgregarUnidad > div.modal-dialog > div label input {
padding: 0px !important;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Folio Fecha Cancelación
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="LnkExportarExcel" OnClick="LnkExportarExcel_Click" data-toggle="tooltip" data-placement="left" title="Exportar Excel" Text="Exportar Excel" Visible="false"></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExportarExcel" />
</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="UpFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnBuscar" runat="server" Text="Consultar" ValidationGroup="GrpBuscar" class="btn btn-primary" OnClick="BtnBuscar_Click" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption ">
<div class="row">
<label class="col-md-1 truncate" style="text-align: right;">Empresa:</label>
<div class="col-md-3">
<asp:DropDownList ID="DdlEmpresa" runat="server" DataValueField="CveEmpresa" DataTextField="Empresa" CssClass="form-control input-sm select2me" Width="150px" ></asp:DropDownList>
</div>
<label class="col-md-1 truncate" style="text-align: right;">Tipo:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlTipo" runat="server" CssClass="form-control input-sm select2me" Width="150px">
<asp:ListItem Value="1">Tipo 1</asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
<div class="portlet-body" style="display: none;">
<label class="col-md-1 truncate">Descripción:</label>
<div class="col-md-2">
<asp:Label ID="lbDescripcion" runat="server"></asp:Label>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-12">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveEmpresa,CvePrePoliza,Fecha,CveVenta,ImporteMN,CveConceptoContable,TipoDocto,CveEstatusFactura,FechaVenta,CveSubProyecto,CveCliente,CveVendedor,CveUsuario,Origen,FolioFiscal,CvePACCancelacion,FechaCancelacion"
EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover mysmallbtn " data-sort="true" Style="width: 100%" GridLines="None">
<Columns>
<asp:BoundField HeaderText="CveEmpresa" DataField="CveEmpresa" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="CvePrePoliza" DataField="CvePrePoliza" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="CveVenta" DataField="CveVenta" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="ImporteMN" DataField="ImporteMN" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="CveConceptoContable" DataField="CveConceptoContable" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="CveEstatusFactura" DataField="CveEstatusFactura" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="FechaVenta" DataField="FechaVenta" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="CveSubProyecto" DataField="CveSubProyecto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="CveCliente" DataField="CveCliente" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="CveVendedor" DataField="CveVendedor" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="CveUsuario" DataField="CveUsuario" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Origen" DataField="Origen" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="FolioFiscal" DataField="FolioFiscal" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="RFCEmisor" DataField="RFCEmisor" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="RFCReceptor" DataField="RFCReceptor" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="CvePACCancelacion" DataField="CvePACCancelacion" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="FechaCancelacion" DataField="FechaCancelacion" ItemStyle-HorizontalAlign="Left" />
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -0,0 +1,151 @@
Imports System.Data
Imports Extensiones
Partial Class Generales_FolioFechaCancelacion
Inherits ClsPaginas
Private Property CveCamion As Integer
Get
If ViewState("CveCamion") Is Nothing Then
Return -1
Else
Return ViewState("CveCamion").ToString().ToEntero()
End If
End Get
Set(ByVal value As Integer)
ViewState("CveCamion") = value
End Set
End Property
Private Sub Generales_FolioFechaCancelacion_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaCombos()
'CargaDatos()
End If
End Sub
Public Sub CargaDatos()
LnkExportarExcel.Visible = False
Dim DT_Temp As New DataTable
Dim ObjGeenrales As New ClsGenerales
If ObjGeenrales.GetFolioFechaCancelacion(DdlEmpresa.SelectedValue.ToEntero, DdlTipo.SelectedValue.ToEntero) Then
DT_Temp = ObjGeenrales.DtResultados
If DT_Temp.Rows.Count > 0 Then
LnkExportarExcel.Visible = True
End If
Else
DT_Temp = Nothing
End If
ObjGeenrales.Dispose()
If DT_Temp IsNot Nothing Then
DT_Temp.Columns.Add("FechaCancelacion", GetType(Date))
'DT_Temp = DT_Temp.FiltraParametros("CvePACCancelacion = 4")
DT_Temp.AcceptChanges()
For Each DRow As DataRow In DT_Temp.Rows
Dim CancelacionAcuse As String = ""
Dim CancelacionState As Integer = 0
Dim CancelacionFecha As Date = Now
Dim Consula As Boolean = False
Dim solicitud As New WSGF.Service1SoapClient
Dim resp As New WSGF.StructXml()
Try
resp = solicitud.GetAcuse(DRow("RFCEmisor").ToString, "rene.molina@adsistemas.mx", "rene2018", DRow("FolioFiscal"))
If (resp.Estado = 0) Then
Dim xmlDoc As New System.Xml.XmlDocument()
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.CfdiB64)))
Dim xpath As String = "Acuse/Folios"
Dim nodes = xmlDoc.SelectNodes(xpath)
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
xpath = "Acuse/Signature"
nodes = xmlDoc.SelectNodes(xpath)
CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
DRow("FechaCancelacion") = CancelacionFecha
Consula = True
Else
CancelacionAcuse = resp.Descripcion
Consula = False
End If
Catch ex As Exception
End Try
solicitud = Nothing
Next
DT_Temp.AcceptChanges()
Else
GvDatos.DataSource = Nothing
End If
If DT_Temp IsNot Nothing Then
GvDatos.DataSource = DT_Temp
End If
GvDatos.DataBind()
UpDatos.Update()
UpAcciones.Update()
'ObtenerAcuse
End Sub
Private Sub CargaCombos()
DdlEmpresa.DataSource = GlobalDTEmpresas
DdlEmpresa.DataBind()
DdlEmpresa.Items.Insert(0, New ListItem("Todas", "-1"))
End Sub
Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
Protected Sub LnkExportarExcel_Click(sender As Object, e As EventArgs)
GvDatos.ExportToExcel2("ReporteCancelaciones.xlsx")
End Sub
End Class

View File

@@ -829,6 +829,12 @@
<asp:TextBox runat="server" ID="TxtSerie" Width="300px" ClientIDMode="Static" />
<asp:RequiredFieldValidator ID="RFVSerie" runat="server" ControlToValidate="TxtSerie" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSerie"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCESerie" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerie" Width="300px"></ajax:ValidatorCalloutExtender>
<asp:CustomValidator id="ReVTxtSerie" runat="server" ControlToValidate="TxtSerie" Display="None" ClientValidationFunction="TamanioSerie"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> debe tener un minimo de 6 caracteres." ValidationGroup="GrpAgregaSerie" />
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="ReVTxtSerie" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td><asp:Button Text="Agregar" CssClass="btn btn-primary" ID="BtnAgregarPS" OnClick="BtnAgregarPS_Click" ValidationGroup="GrpAgregaSerie" runat="server" /></td>
</tr>
@@ -1284,5 +1290,16 @@
}
}
function TamanioSerie(source, arguments) {
if (arguments.Value.trim().length >= 6) {
arguments.IsValid = true;
} else {
arguments.IsValid = false; }
}
</script>
</asp:Content>

View File

@@ -762,6 +762,10 @@ Partial Class Inventarios_RecepcionUsados
ObjRemisionNC = Nothing
End If
If TmpDTAjustes IsNot Nothing Then
TmpDTAjustes.Rows.Clear()
End If
CveRemisionRecibida = -1
EsDistribuidor = False
DdlClientes.SelectedValueExist("-1")

View File

@@ -163,7 +163,7 @@
<Columns>
<asp:TemplateField HeaderText="Almacén">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink>
<asp:HyperLink ID="HyperLink1" Target="_blank" NavigateUrl='<%# String.Format("/Inventarios/RepEntradasSalidas.aspx?CveAlmacen={0}&FechaInicio={1:d}&FechaCorte={2:d}&Tipo=-1", Eval("CveAlmacen").ToString, Eval("FechaInicio"), Eval("FechaFin"))%>' runat="server"><%# Eval("Almacen") %></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Almacén">

View File

@@ -54,6 +54,9 @@ Partial Class Inventarios_ReporteEntradasSalidas
Return (UsuarioActual.CveEmpresa.Contiene(72, 80))
End Get
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -82,6 +85,10 @@ Partial Class Inventarios_ReporteEntradasSalidas
TxtFechaI.Text = Request("FechaInicio")
End If
If Not IsNothing(Request("Tipo")) Then
DdlMovs.SelectedValueExist(Request("Tipo").ToEntero)
End If
btConsultar_Click(Nothing, Nothing)
End If
CargaPermisos()

View File

@@ -181,7 +181,7 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas
using (ClsNominas objnom = new ClsNominas())
{
if (objnom.GetNominaAcumulado(Ejercicio, FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodoI, FiltCvePeriodoF, CveEmpresa, DdlRegimenContratacion.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 1)
if (objnom.GetNominaAcumulado(Ejercicio, FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodoI, FiltCvePeriodoF, CveEmpresa, DdlRegimenContratacion.SelectedValue.ToEntero(), CveTipoPeriodo: DdlTipoPeriodo.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 1)
{
dtempleados = objnom.DTSetResultados.Tables[1];
dtConceptos = objnom.DTSetResultados.Tables[0];

View File

@@ -1449,26 +1449,26 @@ Partial Class Clientes
' CargaGridRetenciones()
' CargaDocs()
CargaCombos()
CargaDocumentacionCliente()
'CargaMetodosPago33()
'CargaFormaPago33()
'CargaComboCFDI()
'CargarPagosNoBancarios()
CargaDocumentacionCliente()
'CargaMetodosPago33()
'CargaFormaPago33()
'CargaComboCFDI()
'CargarPagosNoBancarios()
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
LnkPorcentajeMarcas.Visible = True
LnkPorcentajePrecios.Visible = True
If UsuarioActual.TienePermisoProceso(279) Then
TrPreciosPP.Visible = True
TrAgregarPMarca.Visible = True
BtnGuardarPorcentajesMarca.Visible = True
BtnGuardarPorcentajes.Visible = True
End If
LnkPorcentajePrecios.Visible = True
If UsuarioActual.TienePermisoProceso(279) Then
TrPreciosPP.Visible = True
TrAgregarPMarca.Visible = True
BtnGuardarPorcentajesMarca.Visible = True
BtnGuardarPorcentajes.Visible = True
End If
End If
@@ -8972,27 +8972,27 @@ Partial Class Clientes
CargaDTPorcentajePrecios(DTPorcentajePrecios.FiltraParametros("Estatus <> 'D' "))
End Sub
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If UsuarioActual.TienePermisoProceso(279) Then
e.Row.FCLinkButton("imgE").Visible = True
e.Row.FCLinkButton("lnkRemove").Visible = True
End If
End If
End Sub
Protected Sub GvP_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvP.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If UsuarioActual.TienePermisoProceso(279) Then
e.Row.FCLinkButton("imgE").Visible = True
e.Row.FCLinkButton("lnkRemove").Visible = True
End If
End If
End Sub
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow AndAlso Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
If UsuarioActual.TienePermisoProceso(279) Then
e.Row.FCLinkButton("imgE").Visible = True
e.Row.FCLinkButton("lnkRemove").Visible = True
End If
End If
End Sub
Protected Sub GvP_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvP.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow AndAlso Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
If UsuarioActual.TienePermisoProceso(279) Then
e.Row.FCLinkButton("imgE").Visible = True
e.Row.FCLinkButton("lnkRemove").Visible = True
End If
End If
End Sub
Protected Sub GvM_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvM.RowEditing
GvM.EditIndex = e.NewEditIndex
@@ -10466,7 +10466,7 @@ Partial Class Clientes
Alert("Los cambios se guardaron satisfactoriamente.")
End Using
End Sub
End Sub
End Class

View File

@@ -2872,7 +2872,7 @@
<label>Año:</label>
<br />
<asp:TextBox ID="TxtAnioVehiculo" type="number" runat="server" Height="100%" Width="100%" CssClass="form-control" ></asp:TextBox>
<asp:CustomValidator ID="CVAnio" runat="server" ClientValidationFunction="ValidaAnioVehiculo" ValidateEmptyText="true" ControlToValidate="TxtAnioVehiculo" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Año''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:CustomValidator>
<asp:CustomValidator ID="CVAnio" runat="server" ClientValidationFunction="ValidaAnioVehiculo" ValidateEmptyText="true" ControlToValidate="TxtAnioVehiculo" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Año''</b> esta vacío o no tiene el formato correcto, por favor ingréselo." ValidationGroup="GrpAddVenta"></asp:CustomValidator>
</div>
</div>
<div class="row">
@@ -3281,7 +3281,19 @@
//VALIDA SOLO SI SE SELECCIONO UN USADO
var cveUsado = ToDouble($get("C_DdlRecepcionUsados").value);
if (cveUsado > 0) {
args.IsValid = (ToDouble(args.Value) > 0);
var anio = ToDouble(args.Value);
if (anio > 0) {
var valido = true;
if (anio < 1900) {
valido = false;
}
if (anio.toString().length != 4) {
valido = false;
}
args.IsValid = valido;
} else {
args.IsValid = false;
}
} else {
args.IsValid = true;
}

View File

@@ -3430,27 +3430,27 @@ Partial Class PV
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
If ObjFactura.TipoDocto = "Rem" Then
If ObjAcum.GetPolizasVirtuales(Retorno.CveVenta) Then
Dim DtPoliza As DataTable = ObjAcum.DtResultados.Copy()
'If ObjFactura.TipoDocto = "Rem" Then
' If ObjAcum.GetPolizasVirtuales(Retorno.CveVenta) Then
' Dim DtPoliza As DataTable = ObjAcum.DtResultados.Copy()
For Each Row As DataRow In ObjFactura.DtPolizasVirtuales.Rows
Dim CvePolizaVirtual As Integer = DtPoliza.FiltroPrimeroValor("CvePolizaVirtual", $"CveVentaDetalle={Row("CveVentaDetalle")}").ToEntero()
' For Each Row As DataRow In ObjFactura.DtPolizasVirtuales.Rows
' Dim CvePolizaVirtual As Integer = DtPoliza.FiltroPrimeroValor("CvePolizaVirtual", $"CveVentaDetalle={Row("CveVentaDetalle")}").ToEntero()
If Not ObjAcum.UpdatePolizaVirtual(CvePolizaVirtual, Row("CveMarcaUsado").ToString().ToEntero(), Row("FechaUsado").ToString().ToDateTime()) Then
SbAlert.Append("Error al guardar la póliza virtual")
TieneError = True
Exit For
End If
Next
' If Not ObjAcum.UpdatePolizaVirtual(CvePolizaVirtual, Row("CveMarcaUsado").ToString().ToEntero(), Row("FechaUsado").ToString().ToDateTime()) Then
' SbAlert.Append("Error al guardar la póliza virtual")
' TieneError = True
' Exit For
' End If
' Next
DtPoliza.Dispose()
Else
SbAlert.Append("Error al obtener la póliza virtual")
TieneError = True
End If
' DtPoliza.Dispose()
' Else
' SbAlert.Append("Error al obtener la póliza virtual")
' TieneError = True
' End If
End If
'End If
If ObjAcum.GetGarantiasDetalle(Retorno.CveVenta) Then
Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("")
@@ -4790,6 +4790,9 @@ Partial Class PV
DdlRecepcionUsados.SelectedValueExist("-1")
DivRecepcionUsados.Visible = False
DdlMarca.SelectedValueExist("-1")
TxtFechaVigencia.Text = Now.ToString("dd/MM/yyyy")
LimpiaAjuste()
UPPDescuento.Update()
@@ -5295,7 +5298,7 @@ Partial Class PV
divagregrarotrops.Visible = False
Ajuste()
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
'AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
'BUSCA EN TMPDT LOS DATOS DE USADOS
If TmpDT.Rows.Count > 0 AndAlso TmpDTRecepcionUsados IsNot Nothing AndAlso TmpDTRecepcionUsados.Rows.Count > 0 Then
@@ -5334,11 +5337,29 @@ Partial Class PV
Exit Sub
End If
If String.IsNullOrEmpty(TxtAnioVehiculo.Text.Trim()) Then
Alert("El campo año esta vacío.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If TxtAnioVehiculo.Text.ToDecimal() < 1900 Then
Alert("El campo año debe ser mayor a 1900.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Else
If Not String.IsNullOrEmpty(TxtAnioVehiculo.Text.Trim()) Then
If TxtAnioVehiculo.Text.ToDecimal() < 1900 Then
Alert("El año del vehiculo del vehículo no tiene el formato correcto.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
End If
If AgregarPS() Then
If ChkAjuste.Checked Then GuardaAjuste()
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero())
CalculaTotalesVenta()
If ChkAgregar.Checked = True And Modalidad = "A" Then
@@ -5404,17 +5425,19 @@ Partial Class PV
CveProyecto, Proyecto, DdlSubProyectoDatos.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedItem.Text,
Serie:="", TiempoEntrega:="", CuentaPredial:="", RegeneraIEPS:=ClienteDesglosaIEPS, CveVentaDetalle:=CveVentaDetalle, EsCargo:=EsCargo)
Dim ListaPSCargo As List(Of MConceptoUsado) = Nothing
If CveVentaDetalle <= 0 AndAlso Not EsCargo Then
Dim ListaPSCargo = CalculaUsados(Consec)
If ListaPSCargo.Count > 0 Then
CalculaRecepcionUsados(CvePS, ListaPSCargo, Cantidad, Consec)
End If
ListaPSCargo = CalculaUsados(Consec)
ElseIf CveVentaDetalle > 0 AndAlso Not EsCargo Then
EliminarUsados()
Dim ListaPSCargo = CalculaUsados(Consec, LimpiarUsados:=False)
If ListaPSCargo.Count > 0 Then
CalculaRecepcionUsados(CvePS, ListaPSCargo, Cantidad, Consec)
End If
ListaPSCargo = CalculaUsados(Consec, LimpiarUsados:=False)
End If
If ListaPSCargo IsNot Nothing AndAlso ListaPSCargo.Count > 0 Then
CalculaRecepcionUsados(CvePS, ListaPSCargo, Cantidad, Consec)
For Each Usado As MConceptoUsado In ListaPSCargo
AddPolizaVirtual(DdlPS.SelectedValue.ToEntero(), Usado.Consecutivo)
Next
End If
Return True
@@ -7386,6 +7409,7 @@ Partial Class PV
#Region "P O L I Z A - V I R T U A L"
Private Sub CreaDTmpDTPolizaVirtual()
TmpDTPolizaVirtual = New DataTable
TmpDTPolizaVirtual.Columns.Add("Consec", GetType(Integer))
TmpDTPolizaVirtual.Columns.Add("CvePS", GetType(Integer))
TmpDTPolizaVirtual.Columns.Add("Cantidad", GetType(Decimal))
TmpDTPolizaVirtual.Columns.Add("PU", GetType(Decimal))
@@ -7402,14 +7426,14 @@ Partial Class PV
TmpDTPolizaVirtual.Columns.Add("CveBCIUsado", GetType(Integer))
TmpDTPolizaVirtual.Columns.Add("CveMarcaUsado", GetType(Integer))
End Sub
Private Function AddPolizaVirtual(CvePS As Integer) As Boolean
Private Function AddPolizaVirtual(CvePS As Integer, Consec As Integer) As Boolean
Dim Retorno As Boolean = True
If Modalidad = "U" Then
If TmpDTPolizaVirtual.Rows.Count > 0 Then
Dim Elimino As Boolean = False
For Each RowPoliza As DataRow In TmpDTPolizaVirtual.Rows
If RowPoliza("CvePS").ToString().ToEntero() = CvePS Then
If RowPoliza("Consec").ToString().ToEntero() = Consec AndAlso RowPoliza("CvePS").ToString().ToEntero() = CvePS Then
RowPoliza.Delete()
Elimino = True
Exit For
@@ -7475,6 +7499,8 @@ Partial Class PV
End If
Dim Row As DataRow = TmpDTPolizaVirtual.NewRow()
Row("Consec") = Consec
Row("CvePS") = CvePS
Row("Cantidad") = Cantidad
Row("PU") = PU
@@ -7524,7 +7550,7 @@ Partial Class PV
EmitirImprimirNew()
End Sub
Private Sub CalculaRecepcionUsados(CvePS As Integer, ListaPSCargo As List(Of Integer), CantidadUsado As Decimal, ConsecPSPadre As Integer)
Private Sub CalculaRecepcionUsados(CvePS As Integer, ListaPSCargo As List(Of MConceptoUsado), CantidadUsado As Decimal, ConsecPSPadre As Integer)
If Modalidad = "U" Then
If TmpDTRecepcionUsados.Rows.Count > 0 Then
@@ -7600,8 +7626,8 @@ Partial Class PV
End If
Dim StrCargos As New StringBuilder
For Each CvePSCargo As Integer In ListaPSCargo
StrCargos.AppendFormat(" {0},", CvePSCargo)
For Each Usado As MConceptoUsado In ListaPSCargo
StrCargos.AppendFormat(" {0},", Usado.CvePS)
Next
StrCargos.Remove(StrCargos.Length - 1, 1)
@@ -7718,12 +7744,16 @@ Partial Class PV
CalculaTotalesVenta()
End Sub
Private Function CalculaUsados(Consec As Integer, Optional LimpiarUsados As Boolean = True) As List(Of Integer)
Public Class MConceptoUsado
Public Property Consecutivo As Integer
Public Property CvePS As Integer
End Class
Private Function CalculaUsados(Consec As Integer, Optional LimpiarUsados As Boolean = True) As List(Of MConceptoUsado)
If Modalidad = "U" AndAlso LimpiarUsados Then
EliminarUsados(Consec)
End If
Dim ListaPScargo As New List(Of Integer)
Dim ListaPScargo As New List(Of MConceptoUsado)
Dim DTTamanios As DataTable = GlobalDTAcumTamaños()
Dim DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
@@ -7828,7 +7858,7 @@ Partial Class PV
drowPsTamaños("PS").ToString, "", drowPsTamaños("PU").ToString.ToDecimal, 0, -1, "", drowPsTamaños("CveSubProyecto").ToString.ToEntero,
drowPsTamaños("SubProyecto").ToString, EsCargo:=True, ConsecPSPadre:=drowPsTamaños("ConsecPSPadre").ToString.ToEntero, EliminarDB:=CBool(drowPsTamaños("EliminarDB").ToString()))
If Consec > 0 Then
ListaPScargo.Add(drowPsTamaños("CvePS").ToString.ToEntero)
ListaPScargo.Add(New MConceptoUsado() With {.Consecutivo = Consec, .CvePS = drowPsTamaños("CvePS").ToString.ToEntero})
End If
End If
Next

View File

@@ -4985,6 +4985,11 @@ Partial Class Ventas
End If
End If
'NO DEBE IMPRIMIR PDF DE COTIZACION
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DbRowVenta("TipoDocto").ToString() = "Cot" Then
HplDownPDF.Visible = False
End If
If DbRowVenta("SeTimbro").ToString() = "Si" Then
TrEmitir.Visible = False
End If
@@ -7504,6 +7509,13 @@ Partial Class Ventas
e.Row.FCLinkButton("imgE").Visible = False
e.Row.FCLinkButton("imgD").Visible = False
End If
'EN BDH NO DEBE PODER EDITAR LOS PS
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
e.Row.FCLinkButton("imgE").Visible = False
e.Row.FCLinkButton("imgD").Visible = False
End If
End If
'CANTIDAD FACTURADA
@@ -8164,6 +8176,12 @@ Partial Class Ventas
Exit Sub
End If
'VENDEDOR OBLIGATORIO
If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'SI TIENE ANTICIPOS Y ESTA AMORTIZADO AL 100% EL DOCUMENTO (SALDO = 0) | NO VALIDA PU DEL CONCEPTO
If Not (LblAmortizacion.Text.ToDouble > 0 And TxtTotal.Text.ToDouble <= 0) Then
If Not DdlTipoComprobante.SelectedValue.Contiene("Ped", "Ant", "DPe") Then
@@ -8543,6 +8561,11 @@ Partial Class Ventas
HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))
End If
'NO DEBE IMPRIMIR PDF DE COTIZACION
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
HplDownPDF.Visible = False
End If
UpnTools.Update()
End Sub
@@ -9272,17 +9295,21 @@ Partial Class Ventas
If DdlTipoComprobante.SelectedValue = "Cot" Then
If Not CveEmpresaCRM > 0 Then
If CveVenta > 0 Then MensajeAlert = New StringBuilder
Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
If Opcion = "Cot" And UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
MensajeAlert.AppendFormat("<b><a class='Texto' href=""Ventas.aspx?CveVenta={0}"">Facturar</a></b><br/><br/>", CveVenta)
End If
'EN EMPRESA DE ACUMULADORES NO DESCARGAR EL PDF
If UsuarioActual.Empresa.Funcionalidad(531) <> "1" Then
If CveVenta > 0 Then MensajeAlert = New StringBuilder
Dim ArchivoCotizacion As New System.IO.FileInfo(String.Format("{0}Formatos/Cotizacion.rdlc", UsuarioActual.Empresa.Ruta))
If ArchivoCotizacion.Exists Then
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta)))
Else
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
If Opcion = "Cot" And UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
MensajeAlert.AppendFormat("<b><a class='Texto' href=""Ventas.aspx?CveVenta={0}"">Facturar</a></b><br/><br/>", CveVenta)
End If
If ArchivoCotizacion.Exists Then
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=0", CveVenta)))
Else
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
End If
End If
GeneraPDFCotizacion(ChkEnviarFactura.Checked) ' MANDA CORREO
@@ -17235,7 +17262,7 @@ Partial Class Ventas
DdlVendedorSucursal.SelectedValue = Nothing
If UsuarioActual.Empresa.Funcionalidad(302) = "1" AndAlso DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("(CveSubProyecto IS NULL OR CveSubProyecto = {0})", DdlSubProyectoDatos.SelectedValue)).FiltraParametros("VendedorTipo = 1")
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros(String.Format("VendedorTipo IN (1,4) AND (CveSubProyecto IS NULL OR CveSubProyecto = {0})", DdlSubProyectoDatos.SelectedValue))
Else
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros("VendedorTipo = 1")
End If
@@ -17281,11 +17308,11 @@ Partial Class Ventas
End If
If CveVendedorActual > 0 Then
Dim VendedorActual As String = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Vendedor", $"CveVendedor = {CveVendedorActual}")
Dim VendedorActual As String = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltroPrimeroValor("Vendedor", $"CveVendedor = {CveVendedorActual}")
'SI NO ENCUENTRA BUSCA EN LOS VENDEDORES DEL PV
If String.IsNullOrEmpty(VendedorActual) Then
VendedorActual = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=4).FiltroPrimeroValor("Vendedor", String.Format("CveVendedor = {0}", CveVendedorActual))
End If
'If String.IsNullOrEmpty(VendedorActual) Then
' VendedorActual = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=4).FiltroPrimeroValor("Vendedor", String.Format("CveVendedor = {0}", CveVendedorActual))
'End If
If String.IsNullOrEmpty(VendedorActual) Then
DdlVendedor.SelectedValueExist(CveVendedorActual)
@@ -17294,17 +17321,10 @@ Partial Class Ventas
End If
End If
If UsuarioActual.CveEmpresa = 140 Then
If Not UsuarioActual.TienePermisoProceso(161) Then
DdlVendedor.Enabled = False
End If
Else
If DdlVendedor.SelectedValue.ToEntero() > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
DdlVendedor.Enabled = False
End If
If DdlVendedor.SelectedValue.ToEntero() > 0 AndAlso Not UsuarioActual.TienePermisoProceso(161) Then
DdlVendedor.Enabled = False
End If
'multiples vendedores visible
If UsuarioActual.TienePermisoProceso(153) Then
DdlVendedor.Enabled = True

View File

@@ -134,7 +134,12 @@ Public Class WSGPSApp
Clientes.Add(New WsClientePortalGPS With {.CveCliente = Row("CveCliente").ToString.ToEntero, .Cliente = Row("Cliente").ToString})
Next
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
If UsuarioRetorno.CveCliente > 0 Then
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) Then
UsuarioRetorno.RastreoSoloInicio = True
End If
End If
End If
End If
End If
@@ -196,7 +201,15 @@ Public Class WSGPSApp
Clientes.Add(New WsClientePortalGPS With {.CveCliente = Row("CveCliente").ToString.ToEntero, .Cliente = Row("Cliente").ToString})
Next
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
If UsuarioRetorno.CveCliente > 0 Then
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) Then
UsuarioRetorno.RastreoSoloInicio = True
End If
End If
End If
End If
End If
End If
@@ -1126,7 +1139,8 @@ Namespace ADGPSModels
Public Property Contrasenia As String
Public Property TienePermisoOC As Boolean
Public Property TienePermisoPS As Boolean
Public Property TienePermisoPS As Boolean
Public Property RastreoSoloInicio As Boolean = False
End Class
<Serializable>

View File

@@ -422,6 +422,8 @@