This commit is contained in:
Jorge Luis caudillo esparza
2025-07-04 19:39:11 -07:00
39 changed files with 6150 additions and 2391 deletions

View File

@@ -84,15 +84,16 @@
<asp:ListItem Value="general">general</asp:ListItem>
<asp:ListItem Value="optima">optima</asp:ListItem>
<asp:ListItem Value="motobateria">motobateria</asp:ListItem>
<asp:ListItem Value="auxiliar">Auxiliar</asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Estatus:</label>
<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="Activo" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Enviado" Value="2"></asp:ListItem>
<asp:ListItem Text="Cerrado" Value="0"></asp:ListItem>
<asp:ListItem Text="Cerrado" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">SubProyecto:</label>
@@ -122,7 +123,7 @@
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveFolioGarantia,FolioGarantia,CveEstatus,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto,tipoFolio,Limite,CveMovimiento,Area"
EmptyDataText="No se encontraron registros"
EmptyDataText="No se encontraron registros"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
data-sort="true"
data-freezerows="1"
@@ -143,19 +144,19 @@
&nbsp;<asp:Literal ID="LblLimite" runat="server" Text='<%# Eval("Limite") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SubProyecto" >
<asp:TemplateField HeaderText="SubProyecto">
<ItemTemplate>
&nbsp;<asp:Literal ID="LblSubProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus" >
<asp:TemplateField HeaderText="Estatus">
<ItemTemplate>
&nbsp;<asp:Literal ID="LblPuntos" runat="server" Text='<%# Eval("Estatus")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="AreaTexto" HeaderText="Área" />
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" >
<asp:BoundField DataField="AreaTexto" HeaderText="Área" />
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
&nbsp;<asp:Literal ID="lblFecha" runat="server" Text='<%# Eval("FechaIng", "{0:d}")%>'></asp:Literal>
</ItemTemplate>
@@ -170,9 +171,9 @@
<asp:Literal ID="lblUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField HeaderText="Mov. Salida" DataTextField="FolioAlmacen" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" Target="_blank" ControlStyle-CssClass="Texto"/>
<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" >
<asp:TemplateField HeaderText="Notas" ItemStyle-Width="120px">
<ItemTemplate>
<asp:Literal ID="LblSerieFolioNotas" runat="server" Text='<%# Eval("SerieFolioNotas") %>'></asp:Literal>
</ItemTemplate>
@@ -181,10 +182,10 @@
<ItemTemplate>
<asp:LinkButton ID="ImgVer" OnClick="ImgVer_Click" runat="server" AlternateText="Editar" CausesValidation="False"
CssClass="btn btn-primary btn-circle btn-sm" Text="<i class='fa fa-bars'></i>" />
<asp:LinkButton ID="ImgE" OnClick="Edit_ClickFolioGarantia" runat="server" AlternateText="Editar" CausesValidation="False"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
<asp:LinkButton ID="imgD" OnClick="Remove_ClickFolioGarantia" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
</ItemTemplate>
</asp:TemplateField>
@@ -258,10 +259,10 @@
<asp:TextBox ID="TxtFolioGarantia" CssClass="form-control" runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtFolioGarantia" runat="server" ControlToValidate="TxtFolioGarantia" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="REVFolioGarantia"
ControlToValidate="TxtFolioGarantia" runat="server" CssClass="help-block errorimput"
ErrorMessage="solo números" ValidationGroup="GrpFolioGarantia"
ValidationExpression="\d+">
</asp:RegularExpressionValidator>
ControlToValidate="TxtFolioGarantia" runat="server" CssClass="help-block errorimput"
ErrorMessage="solo números" ValidationGroup="GrpFolioGarantia"
ValidationExpression="\d+">
</asp:RegularExpressionValidator>
<ajax:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" Enabled="True" TargetControlID="TxtFolioGarantia" FilterType="Numbers" FilterMode="ValidChars"></ajax:FilteredTextBoxExtender>
<label for="<%= TxtFolioGarantia.ClientID.ToString()%>">Folio:</label>
<i></i>
@@ -269,8 +270,9 @@
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" style="padding-top:0px!important">
<div class="form-group form-md-line-input input-iconright" style="padding-top: 0px!important">
<asp:Label runat="server" ID="lblSubProyecto" for="<%= DdlSubProyectos.ClientID.ToString()%>">SubProyecto:</asp:Label></br>
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="100%" AutoPostBack="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
@@ -286,10 +288,12 @@
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblTipoFolio" for="<%= DdlTipoFolioModal.ClientID.ToString()%>">Tipo Folio:</asp:Label></br>
<asp:DropDownList ID="DdlTipoFolioModal" runat="server" CssClass="form-control input-sm select2me" Width="50%" ValidationGroup="GrpGuardar">
<asp:ListItem Value="general" Selected="True">General</asp:ListItem>
<asp:ListItem Value="optima">Optima</asp:ListItem>
<asp:ListItem Value="motobateria">Motobateria</asp:ListItem>
<asp:ListItem Value="auxiliar">Auxiliar</asp:ListItem>
</asp:DropDownList>
<i></i>
</div>
@@ -297,6 +301,7 @@
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:Label runat="server" ID="LblArea" for="<%= DdlArea.ClientID.ToString()%>">Área:</asp:Label></br>
<asp:DropDownList ID="DdlArea" runat="server" CssClass="form-control input-sm select2me" Width="50%" ValidationGroup="GrpGuardar">
<asp:ListItem Value="1" Selected="True">Piso</asp:ListItem>
<asp:ListItem Value="2">Almacén</asp:ListItem>
@@ -308,7 +313,7 @@
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<label for="<%= DdlEstatusEditar.ClientID.ToString()%>" style="margin-bottom:0px">Estatus:</label></br>
<label for="<%= DdlEstatusEditar.ClientID.ToString()%>" style="margin-bottom: 0px">Estatus:</label></br>
<asp:DropDownList ID="DdlEstatusEditar" runat="server" CssClass="select2me" Width="100px" ValidationGroup="GrpGuardar">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
<asp:ListItem Text="Activo" Value="1"></asp:ListItem>

View File

@@ -295,7 +295,8 @@ Public Class ClsBancos
Return Retorno
End Function
Public Function AddBancos(Banco As String, Ejecutivo As String, Telefono As String, CveUsuario As Integer, CveEmpresa As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1") As Boolean
Public Function AddBancos(Banco As String, Ejecutivo As String, Telefono As String, CveUsuario As Integer, CveEmpresa As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1",
Optional CveSATBanco As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Banc_BancosAdd ")
@@ -308,6 +309,7 @@ Public Class ClsBancos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@IdContPaq", SqlDbType.Int).Value = IdContPaq
.Add("@RFC", SqlDbType.VarChar).Value = RFC
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
End With
Try
@@ -326,7 +328,8 @@ Public Class ClsBancos
Return Retorno
End Function
Public Function UpdateBancos(Banco As String, Ejecutivo As String, Telefono As String, Estatus As Boolean, CveBanco As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1") As Boolean
Public Function UpdateBancos(Banco As String, Ejecutivo As String, Telefono As String, Estatus As Boolean, CveBanco As Integer, Optional IdContPaq As Integer = -1, Optional RFC As String = "-1",
Optional CveSATBanco As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Banc_BancosUpdate")
@@ -339,6 +342,7 @@ Public Class ClsBancos
.Add("@CveBanco", SqlDbType.Int).Value = CveBanco
.Add("@IdContPaq", SqlDbType.Int).Value = IdContPaq
.Add("@RFC", SqlDbType.VarChar).Value = RFC
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
End With
Try

View File

@@ -0,0 +1,452 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports System.Data.SqlClient
Imports Extensiones
Imports Modelos
Imports Profact.TimbraCFDI.Complementos.ComercioExterior10
Public Class ClsExportaciones
Implements IDisposable
#Region "Campos"
Private SqlConexion As SqlConnection
Private SqlAdapter As SqlDataAdapter
Private SqlTransacc As SqlTransaction
Private SqlCommand As SqlCommand
Private StrSQL As StringBuilder
Private Data As DataTable
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
'REGISTRAR CONEXIÓN
Private CveConexion As Integer = 0
Private EsTransaccionCompartida As Boolean = False
#End Region
#Region "Propiedades"
Public ReadOnly Property DtResultados() As DataTable
Get
DtResultados = Data
End Get
End Property
Public Property CveExportacion As Integer
Public Property CveExportacionDetalle As Integer
#End Region
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing)
If TransaccionCompartida Is Nothing Then
SqlConexion = New SqlConnection
SqlConexion.ConnectionString = ClsPaginas.UsuarioActualRutaDB
Try
SqlConexion.Open()
Catch ex As Exception
OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex)
End Try
Else
SqlConexion = TransaccionCompartida.Connection
SqlTransacc = TransaccionCompartida
EsTransaccionCompartida = True
End If
SqlCommand = New SqlCommand("", SqlConexion)
SqlAdapter = New SqlDataAdapter("", SqlConexion)
StrSQL = New StringBuilder
ConexionAdd()
End Sub
Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
With SqlAdapter.SelectCommand
.Parameters.Clear()
.CommandText = StrSQL
.CommandType = TipoComando
End With
If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
Data = New DataTable
End Sub
#Region "Conexiones"
Private Sub ConexionAdd()
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try
DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
.Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
End If
End Sub
Private Sub ConexionClose()
If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text)
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
CveConexion = 0
End If
End Sub
#End Region
Public Function IniciaTransacSQL() As SqlTransaction
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
Return SqlTransacc
End Function
Public Sub RollBack()
If SqlTransacc IsNot Nothing Then SqlTransacc.Rollback()
SqlTransacc = Nothing
End Sub
Public Sub Commit()
If SqlTransacc IsNot Nothing Then SqlTransacc.Commit()
SqlTransacc = Nothing
End Sub
#Region "EXPORTACIONES"
Public Function GetExportacion(Optional CveExportacion As Integer = -1, Optional CveEmpresa As Integer = -1, Optional EsExportacion As Boolean = True, Optional FechaInicio As Date = MinFecha, Optional FechaFin As Date = MaxFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_ExportacionesRep")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveExportacion", SqlDbType.Int).Value = CveExportacion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@EsExportacion", SqlDbType.Bit).Value = EsExportacion
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las Exportaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function AddExportacion(NumeroPedimento As String, FechaPedimento As Date, CveVenta As Integer, TipoCambio As Decimal, TipoExportacion As Integer, CveExportacionEstatus As Integer,
CveClienteExportador As Integer, CveClienteImportador As Integer, CveClienteConsignatario As Integer, CveAgente As Integer, ClaveAduana As Integer,
CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer, Sello1 As String, Sello2 As String, Sello3 As String, SCAC As String,
CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer, CveDirExportador As Integer, CveDirConsignatario As Integer,
CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer, ITN As String, Vinculacion As Boolean, EsExportacion As Boolean) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_Exp_ExportacionesAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@NumeroPedimento", SqlDbType.VarChar).Value = NumeroPedimento
.Add("@FechaPedimento", SqlDbType.Date).Value = FechaPedimento
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@TipoCambio", SqlDbType.Decimal).Value = TipoCambio
.Add("@TipoExportacion", SqlDbType.Int).Value = TipoExportacion
.Add("@CveExportacionEstatus", SqlDbType.Int).Value = CveExportacionEstatus
.Add("@CveClienteExportador", SqlDbType.Int).Value = CveClienteExportador
.Add("@CveClienteImportador", SqlDbType.Int).Value = CveClienteImportador
.Add("@CveClienteConsignatario", SqlDbType.Int).Value = CveClienteConsignatario
.Add("@CveAgente", SqlDbType.Int).Value = CveAgente
.Add("@ClaveAduana", SqlDbType.Int).Value = ClaveAduana
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@MedioTransporte", SqlDbType.Int).Value = MedioTransporte
.Add("@TipoContenedor", SqlDbType.Int).Value = TipoContenedor
.Add("@Sello1", SqlDbType.VarChar).Value = Sello1
.Add("@Sello2", SqlDbType.VarChar).Value = Sello2
.Add("@Sello3", SqlDbType.VarChar).Value = Sello3
.Add("@SCAC", SqlDbType.VarChar).Value = SCAC
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT
.Add("@ContenedorPlaca", SqlDbType.VarChar).Value = ContenedorPlaca
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveDirExportador", SqlDbType.Int).Value = CveDirExportador
.Add("@CveDirConsignatario", SqlDbType.Int).Value = CveDirConsignatario
.Add("@CveIncoterm", SqlDbType.Int).Value = CveIncoterm
.Add("@Notas", SqlDbType.VarChar).Value = Notas
.Add("@CvePedimento", SqlDbType.Int).Value = CvePedimento
.Add("@CveAgenteExtranjero", SqlDbType.Int).Value = CveAgenteExtranjero
.Add("@ITN", SqlDbType.VarChar).Value = ITN
.Add("@Vinculacion", SqlDbType.Bit).Value = Vinculacion
.Add("@EsExportacion", SqlDbType.Bit).Value = EsExportacion
.Add("@CveExportacion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
CveExportacion = SqlAdapter.SelectCommand.Parameters("@CveExportacion").Value.ToString.ToEntero
Retorno = CveExportacion
Catch ex As Exception
OnError("Ocurrió un error al guardar la Exportación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateExportacion(CveExportacion As Integer, NumeroPedimento As String, FechaPedimento As Date, CveVenta As Integer, TipoCambio As Decimal, TipoExportacion As Integer, CveExportacionEstatus As Integer,
CveClienteExportador As Integer, CveClienteImportador As Integer, CveClienteConsignatario As Integer, CveAgente As Integer, ClaveAduana As Integer,
CveProveedor As Integer, MedioTransporte As Integer, TipoContenedor As Integer, Sello1 As String, Sello2 As String, Sello3 As String, SCAC As String,
CAAT As String, ContenedorPlaca As String, CveEmpresa As Integer, CveUsuario As Integer, CveDirExportador As Integer, CveDirConsignatario As Integer,
CveIncoterm As Integer, Notas As String, CvePedimento As Integer, CveAgenteExtranjero As Integer, ITN As String, Vinculacion As Boolean) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_ExportacionesUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveExportacion", SqlDbType.Int).Value = CveExportacion
.Add("@NumeroPedimento", SqlDbType.VarChar).Value = NumeroPedimento
.Add("@FechaPedimento", SqlDbType.Date).Value = FechaPedimento
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@TipoCambio", SqlDbType.Decimal).Value = TipoCambio
.Add("@TipoExportacion", SqlDbType.Int).Value = TipoExportacion
.Add("@CveExportacionEstatus", SqlDbType.Int).Value = CveExportacionEstatus
.Add("@CveClienteExportador", SqlDbType.Int).Value = CveClienteExportador
.Add("@CveClienteImportador", SqlDbType.Int).Value = CveClienteImportador
.Add("@CveClienteConsignatario", SqlDbType.Int).Value = CveClienteConsignatario
.Add("@CveAgente", SqlDbType.Int).Value = CveAgente
.Add("@ClaveAduana", SqlDbType.Int).Value = ClaveAduana
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@MedioTransporte", SqlDbType.Int).Value = MedioTransporte
.Add("@TipoContenedor", SqlDbType.Int).Value = TipoContenedor
.Add("@Sello1", SqlDbType.VarChar).Value = Sello1
.Add("@Sello2", SqlDbType.VarChar).Value = Sello2
.Add("@Sello3", SqlDbType.VarChar).Value = Sello3
.Add("@SCAC", SqlDbType.VarChar).Value = SCAC
.Add("@CAAT", SqlDbType.VarChar).Value = CAAT
.Add("@ContenedorPlaca", SqlDbType.VarChar).Value = ContenedorPlaca
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveDirExportador", SqlDbType.Int).Value = CveDirExportador
.Add("@CveDirConsignatario", SqlDbType.Int).Value = CveDirConsignatario
.Add("@CveIncoterm", SqlDbType.Int).Value = CveIncoterm
.Add("@Notas", SqlDbType.VarChar).Value = Notas
.Add("@CvePedimento", SqlDbType.Int).Value = CvePedimento
.Add("@CveAgenteExtranjero", SqlDbType.Int).Value = CveAgenteExtranjero
.Add("@ITN", SqlDbType.VarChar).Value = ITN
.Add("@Vinculacion", SqlDbType.Bit).Value = Vinculacion
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar la Exportación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function RemoveExportacion(CveExportacion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_ExportacionesRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveExportacion", SqlDbType.Int).Value = CveExportacion
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar la Exportación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetGastos(CveExportacion As Integer, Optional CveTG As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_Exportaciones_TranspGastosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveExportacion", SqlDbType.Int).Value = CveExportacion
.Add("@CveTG", SqlDbType.Int).Value = CveTG
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los Gastos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function AddGastos(IncFletes As Decimal, IncSeguro As Decimal, IncEmbalajes As Decimal, IncEmbalaje As Decimal, IncConexos As Decimal,
DecFlete As Decimal, DecSeguro As Decimal, DecCarga As Decimal, DecDescarga As Decimal, DecOtros As Decimal, CveExportacion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_Exportaciones_TranspGastosAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@IncFletes", SqlDbType.Decimal).Value = IncFletes
.Add("@IncSeguro", SqlDbType.Decimal).Value = IncSeguro
.Add("@IncEmbalajes", SqlDbType.Decimal).Value = IncEmbalajes
.Add("@IncEmbalaje", SqlDbType.Decimal).Value = IncEmbalaje
.Add("@IncConexos", SqlDbType.Decimal).Value = IncConexos
.Add("@DecFlete", SqlDbType.Decimal).Value = DecFlete
.Add("@DecSeguro", SqlDbType.Decimal).Value = DecSeguro
.Add("@DecCarga", SqlDbType.Decimal).Value = DecCarga
.Add("@DecDescarga", SqlDbType.Decimal).Value = DecDescarga
.Add("@DecOtros", SqlDbType.Decimal).Value = DecOtros
.Add("@CveExportacion", SqlDbType.Int).Value = CveExportacion
.Add("@CveTG", SqlDbType.Int).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al guardar los Gastos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateGastos(IncFletes As Decimal, IncSeguro As Decimal, IncEmbalajes As Decimal, IncEmbalaje As Decimal, IncConexos As Decimal,
DecFlete As Decimal, DecSeguro As Decimal, DecCarga As Decimal, DecDescarga As Decimal, DecOtros As Decimal, CveExportacion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_Exportaciones_TranspGastosUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@IncFletes", SqlDbType.Decimal).Value = IncFletes
.Add("@IncSeguro", SqlDbType.Decimal).Value = IncSeguro
.Add("@IncEmbalajes", SqlDbType.Decimal).Value = IncEmbalajes
.Add("@IncEmbalaje", SqlDbType.Decimal).Value = IncEmbalaje
.Add("@IncConexos", SqlDbType.Decimal).Value = IncConexos
.Add("@DecFlete", SqlDbType.Decimal).Value = DecFlete
.Add("@DecSeguro", SqlDbType.Decimal).Value = DecSeguro
.Add("@DecCarga", SqlDbType.Decimal).Value = DecCarga
.Add("@DecDescarga", SqlDbType.Decimal).Value = DecDescarga
.Add("@DecOtros", SqlDbType.Decimal).Value = DecOtros
.Add("@CveExportacion", SqlDbType.Int).Value = CveExportacion
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar los Gastos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
#Region "PARTIDAS"
Public Function GetPartidas(Optional CveEmpresa As Integer = -1, Optional CveExportacion As Integer = -1, Optional CveExportacionDetalle As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_ExportacionesDetalleGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveExportacion", SqlDbType.Int).Value = CveExportacion
.Add("@CveExportacionDetalle", SqlDbType.Int).Value = CveExportacionDetalle
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las Partidas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function AddPartida(CvePS As Integer, CveUnidadMedida As Integer, Precio As Decimal, CveEmpresa As Integer, CveUsuario As Integer, CveExportacion As Integer, Cantidad As Decimal,
PesoUnitario As Decimal, CvePais As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_ExportacionesDetalleAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
.Add("@Precio", SqlDbType.Decimal).Value = Precio
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveExportacion", SqlDbType.Int).Value = CveExportacion
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
.Add("@PesoUnitario", SqlDbType.Decimal).Value = PesoUnitario
.Add("@CvePais", SqlDbType.Int).Value = CvePais
.Add("@CveExportacionDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
CveExportacionDetalle = SqlAdapter.SelectCommand.Parameters("@CveExportacionDetalle").Value.ToString.ToEntero
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al guardar la Partida.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdatePartida(CveExportacionDetalle As Integer, CvePS As Integer, CveUnidadMedida As Integer, Precio As Decimal, CveUsuario As Integer, Cantidad As Decimal,
PesoUnitario As Decimal, CvePais As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_ExportacionesDetalleUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveExportacionDetalle", SqlDbType.Int).Value = CveExportacionDetalle
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
.Add("@Precio", SqlDbType.Decimal).Value = Precio
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Cantidad", SqlDbType.Decimal).Value = Cantidad
.Add("@PesoUnitario", SqlDbType.Decimal).Value = PesoUnitario
.Add("@CvePais", SqlDbType.Int).Value = CvePais
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar la Partida.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function RemovePartida(CveExportacionDetalle As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_ExportacionesDetalleRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveExportacionDetalle", SqlDbType.Int).Value = CveExportacionDetalle
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar la Partida.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#End Region
#Region "AGENTES"
Public Function GetAgentes(Optional CveAgente As Integer = -1, Optional CveEmpresa As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Exp_AgentesGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveAgente", SqlDbType.Int).Value = CveAgente
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los Agentes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
#Region "IDisposable Support"
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)
If Not Me.disposedValue Then
If disposing Then
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
End If
Me.disposedValue = True
End Sub
Public Sub Dispose() Implements IDisposable.Dispose
ConexionClose()
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
#End Region
End Class

View File

@@ -3017,6 +3017,45 @@ Public Class ClsGenerales
OnError("Ocurrió un error al obtener los motivos de traslado del SAT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetSATContenedores() As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_SAT_ContenedoresGet")
With SqlAdapter.SelectCommand.Parameters
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los contenedores del SAT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetSATMediosTransporte() As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_SAT_MediosTransporteGet")
With SqlAdapter.SelectCommand.Parameters
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los medios de transporte del SAT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetSATAduanasSeccion() As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_SAT_AduanasSeccionGet")
With SqlAdapter.SelectCommand.Parameters
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las secciones de aduanas del SAT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetSATTipoOperacion() As Boolean

View File

@@ -545,6 +545,51 @@ Public Class ClsPaginas
Application(AppNombre) = value
End Set
End Property
Property GlobalDTSATContenedores() As DataTable
Get
Dim AppNombre As String = "GlobalDTSATContenedores"
If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATContenedores() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTSATContenedores = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = "GlobalDTSATContenedores"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTSATMediosTransporte() As DataTable
Get
Dim AppNombre As String = "GlobalDTSATMediosTransporte"
If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATMediosTransporte() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTSATMediosTransporte = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = "GlobalDTSATMediosTransporte"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTSATAduanasSeccion() As DataTable
Get
Dim AppNombre As String = "GlobalDTSATAduanasSeccion"
If Application(AppNombre) Is Nothing Then
Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATAduanasSeccion() Then Application(AppNombre) = ObjGrales.DtResultados
ObjGrales.Dispose()
End If
GlobalDTSATAduanasSeccion = DirectCast(Application(AppNombre), DataTable)
End Get
Set(value As DataTable)
Dim AppNombre As String = "GlobalDTSATAduanasSeccion"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTUnidadAduana() As DataTable
Get
Dim AppNombre As String = "GlobalDTUnidadAduana"
@@ -3210,6 +3255,27 @@ Public Class ClsPaginas
End Property
#End Region
#Region "***********************************************************************DT GENERALES**************************************************************************************"
Property GlobalDTGralAgentes(CveAgente As Integer, CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = $"GlobalDTGralAgentes-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then
Dim A As New ClsExportaciones
If A.GetAgentes(-1, CveEmpresa) Then Application(AppNombre) = A.DtResultados
A.Dispose()
End If
If CveAgente <> -1 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveAgente = {0}", CveAgente), "", DataViewRowState.CurrentRows)
GlobalDTGralAgentes = Dv.ToTable
Dv.Dispose()
Else
GlobalDTGralAgentes = DirectCast(Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTGralAgentes-{CveEmpresa}"
Application(AppNombre) = value
End Set
End Property
Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = $"GlobalDTGralCategorias-{CveEmpresa}"
@@ -8125,12 +8191,12 @@ Public Class ClsPaginas
'If Not Archivo.Exists Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197) Then
Dim ObjProveedor As New ClsCompProveedores
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ObjOC.CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, EmpresaActual.CveEmpresa) Then
If ObjProveedor.DtResultados.Rows.Count > 0 Then
params.Add(New ReportParameter("PlazoPago", ObjProveedor.PlazoPago.ToString))
End If
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ObjOC.CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, EmpresaActual.CveEmpresa) Then
If ObjProveedor.DtResultados.Rows.Count > 0 Then
params.Add(New ReportParameter("PlazoPago", ObjProveedor.PlazoPago.ToString))
End If
ObjProveedor.Dispose()
End If
ObjProveedor.Dispose()
'End If
@@ -10524,6 +10590,10 @@ Public Class ClsPaginas
PaginaDict.Add("/CxC/GestionCobranza.aspx".ToUpper(), 490)
PaginaDict.Add("/CxC/RepCxCPeriodo.aspx".ToUpper(), 887)
#End Region
#Region "Exportaciones"
'PaginaDict.Add("/Export/RepExportaciones.aspx".ToUpper(), 77)
PaginaDict.Add("/Export/ExpDetalle.aspx".ToUpper(), 77)
#End Region
#Region "Finanzas"
PaginaDict.Add("/Finanzas/RepRazonesFinancieras.aspx".ToUpper(), 592)
PaginaDict.Add("/Finanzas/FinanMetas.aspx".ToUpper(), 361)
@@ -11292,6 +11362,12 @@ Public Class ClsPaginas
Case Else : Retorno = 9
End Select
End If
If Pagina.ToUpper() = ("/Export/RepExportaciones.aspx").ToUpper() Then
Select Case Request("Opcion")
Case "I" : Retorno = 85
Case Else : Retorno = 77
End Select
End If
Return Retorno
End Function
#End Region

View File

@@ -4,6 +4,16 @@
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.select2 .select2-selection{
max-height:21.14px!important
}
.select2-selection__rendered{
margin-top:-4px!important
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
<li>
@@ -24,6 +34,12 @@
<table class="table table-striped table-advance table-hover">
<thead>
<tr class="Titulos">
<th width="150px">
<asp:LinkButton ID="LbBancoSAT" runat="server" CausesValidation="false" Text="" CommandArgument="BancoSAT" OnClick="LbOrden_Click">
Banco SAT
<asp:Literal ID="ImgBancoSAT" runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</asp:LinkButton>
</th>
<th width="150px">
<asp:LinkButton ID="LbBanco" runat="server" CausesValidation="false" Text="" CommandArgument="Banco" OnClick="LbOrden_Click">
Banco
@@ -64,6 +80,13 @@
</tr>
</thead>
<tr>
<td>
<asp:DropDownList CssClass="form-control select2me" Width="100%" ID="DdlSatBanco" runat="server" DataTextField="Banco" DataValueField="CveSATBanco">
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlSatBanco" runat="server" InitialValue="-1" ControlToValidate="DdlSatBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCRFVDdlSatBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSatBanco" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
<td>
<asp:TextBox ID="TxtBanco" runat="server" CausesValidation="true" MaxLength="50" ValidationGroup="GrpGuardar" Width="140px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVBanco" runat="server" ControlToValidate="TxtBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
@@ -90,8 +113,22 @@
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveBanco" EmptyDataText="No se encontraron Bancos Registrados" ToolTip="Listado de Bancos" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px;" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveBanco,CveSATBanco" EmptyDataText="No se encontraron Bancos Registrados" ToolTip="Listado de Bancos"
CssClass="table table-striped table-advance table-hover mysmallbtn" Style="margin-top: -10px;" GridLines="None">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlBancoSAT" runat="server" Text='<%# Eval("SATBanco", "{0}") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList CssClass="form-control select2me" Width="100%" ID="DdlSatBanco" runat="server" DataTextField="Banco" DataValueField="CveSATBanco" Height="21.14px">
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlSatBanco" runat="server" InitialValue="-1" ControlToValidate="DdlSatBanco" Display="None"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCRFVDdlSatBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSatBanco" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Literal ID="LtlBanco" runat="server" Text='<%# Eval("Banco", "{0}") %>'></asp:Literal>
@@ -142,10 +179,14 @@
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar">
<EditItemTemplate>
<center>
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
&nbsp;<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
</center>
<div class="row">
<div class="col-md-6" style="text-align:right!important">
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
</div>
<div class="col-md-6">
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
</div>
</div>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />

View File

@@ -19,13 +19,43 @@ Partial Class Bancos_CatBancos
End Set
End Property
Private Property DTBancosSAT As DataTable
Get
If ViewState("DTBancosSAT") Is Nothing Then
ViewState("DTBancosSAT") = New DataTable()
End If
Return DirectCast(ViewState("DTBancosSAT"), DataTable)
End Get
Set(ByVal value As DataTable)
ViewState("DTBancosSAT") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CargaBancosSAT()
ViewState("Orden") = ""
CargaDatos()
End If
End Sub
Private Sub CargaBancosSAT()
Dim ObjBancos As New ClsBancos
If ObjBancos.GetBancosSAT Then
DdlSatBanco.DataSource = ObjBancos.DtResultados
DTBancosSAT = ObjBancos.DtResultados
End If
ObjBancos.Dispose()
DdlSatBanco.DataBind()
DdlSatBanco.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
End Sub
Public Sub CargaDatos()
Dim ObjBancos As New ClsBancos
If ObjBancos.GetBancos() Then
@@ -47,7 +77,8 @@ Partial Class Bancos_CatBancos
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
Dim ObjBancos As New ClsBancos
If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
If ObjBancos.AddBancos(TxtBanco.Text.Trim, TxtEjecutivo.Text.Trim, TxtTelefono.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveSATBanco:=DdlSatBanco.SelectedValue.ToEntero) Then
DdlSatBanco.SelectedValueExist(-1)
TxtBanco.Text = ""
TxtEjecutivo.Text = ""
TxtTelefono.Text = ""
@@ -68,24 +99,42 @@ Partial Class Bancos_CatBancos
#Region "G V D A T O S"
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.RowIndex = 0 Then
e.Row.Cells(0).Width = Unit.Pixel(156) 'BANCO
e.Row.Cells(1).Width = Unit.Pixel(206) 'EJECUTIVO
e.Row.Cells(2).Width = Unit.Pixel(106) 'TELEFONO
e.Row.Cells(3).Width = Unit.Pixel(95) 'ESTATUS
e.Row.Cells(4).Width = Unit.Pixel(95) 'FECHA
e.Row.Cells(5).Width = Unit.Pixel(100) 'USUARIO
e.Row.Cells(6).Width = Unit.Pixel(100) 'EDITAR
e.Row.Cells(7).Width = Unit.Pixel(65) 'ELIMINAR
e.Row.Cells(0).Width = Unit.Pixel(156) 'BANCO SAT
e.Row.Cells(1).Width = Unit.Pixel(156) 'BANCO
e.Row.Cells(2).Width = Unit.Pixel(206) 'EJECUTIVO
e.Row.Cells(3).Width = Unit.Pixel(106) 'TELEFONO
e.Row.Cells(4).Width = Unit.Pixel(95) 'ESTATUS
e.Row.Cells(5).Width = Unit.Pixel(95) 'FECHA
e.Row.Cells(6).Width = Unit.Pixel(100) 'USUARIO
e.Row.Cells(7).Width = Unit.Pixel(65) 'EDITAR
e.Row.Cells(8).Width = Unit.Pixel(65) 'ELIMINAR
End If
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
'e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Center
End If
If (e.Row.RowState And DataControlRowState.Edit) = DataControlRowState.Edit Then
Dim DdlSatBanco As DropDownList = e.Row.FCDropDownList("DdlSatBanco")
DdlSatBanco.ClearSelection()
DdlSatBanco.SelectedValue = Nothing
DdlSatBanco.Items.Clear()
DdlSatBanco.DataSource = DTBancosSAT
DdlSatBanco.DataBind()
DdlSatBanco.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
DdlSatBanco.SelectedValueExist(e.Row.DataKey("CveSATBanco").ToString())
End If
End Sub
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
@@ -126,19 +175,16 @@ Partial Class Bancos_CatBancos
Dim Telefono As String = DirectCast(GvDatos.Rows(e.RowIndex).FindControl("TxtTelefono"), TextBox).Text.Trim
Dim Estatus As Boolean = GvDatos.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
Dim CveBanco As Integer = GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero
Dim CveSATBanco As Integer = GvDatos.Rows(e.RowIndex).FCDropDownList("DdlSatBanco").SelectedValue.ToEntero
Dim TieneError As Boolean = False
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco) Then
If ObjBancos.InhabilitarCuentasBancos(CveBanco, Estatus) Then
GvDatos.EditIndex = -1
ViewState("DTBancos") = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DtBan = ObjBancos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
GlobalDTBancos = ObjBancos.DtResultados
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
Else
If ObjBancos.UpdateBancos(Banco, Ejecutivo, Telefono, Estatus, CveBanco, CveSATBanco:=CveSATBanco) Then
If Not ObjBancos.InhabilitarCuentasBancos(CveBanco, Estatus) Then
TieneError = True
End If
Else
TieneError = True
End If
@@ -152,12 +198,24 @@ Partial Class Bancos_CatBancos
ObjBancos.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
If Not TieneError Then
GvDatos.EditIndex = -1
CargaDatos()
GlobalDTBancos = Nothing
Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion)
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
End If
End Sub
Protected Sub GvDatos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvDatos.RowEditing

View File

@@ -1284,6 +1284,7 @@ Partial Class Bancos_IE
ViewState("CveCliente") = "-1"
CargaProveedor(HdnCveProveedor.Value.ToEntero, "-1")
CargaCuentasDepositos()
End Sub
Private Sub CargaProveedor(ByVal CveProveedor As Integer, RFC As String)
@@ -1553,6 +1554,9 @@ Partial Class Bancos_IE
If trIEDevolucion.Visible And RBL.SelectedValue <> "C" Then
CargaIEDevoluciones()
End If
CargaCuentasDepositos()
End Sub
#End Region
@@ -4084,88 +4088,204 @@ Partial Class Bancos_IE
#Region " CUENTAS DEPOSITOS "
'Si la cuenta no esta activa, no la muestra.
Private Sub CargaCuentasDepositos()
DdlCuentaDeposito.Items.Clear()
'¿DdlCuentaDeposito.Items.Clear()
'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
DdlCuentaDeposito.ClearSelection()
DdlCuentaDeposito.SelectedValue = Nothing
DdlCuentaDeposito.Items.Clear()
trCuentaDeposito.Visible = False
Dim dtc As DataTable = Nothing
If CveProveedor > 0 Then
dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
Dim CveProveedorTemp As Integer = CveProveedor
If DdlProveedores.SelectedValue.ToEntero > 0 Then
CveProveedorTemp = DdlProveedores.SelectedValue.ToEntero
End If
If CveProveedorTemp > 0 Then
dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedorTemp)
ElseIf CveCliente > 0 Then
dtc = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
ElseIf cvepersonal > 0 Then
ElseIf CvePersonal > 0 Then
dtc = GlobalDTCuentasDepositosPersonales(UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal)
End If
' If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
If dtc IsNot Nothing Then
If DdlTipoTransaccion.SelectedValue = "9" And CveIE <= -1 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
End If
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
trCuentaDeposito.Visible = True
BtnGuardar.ToolTip = ""
Else
BtnGuardar.Enabled = False
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
End If
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
UpGuardar.Update()
Else
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
End If
Else
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then
BtnGuardar.Enabled = False
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Else
trCuentaDeposito.Visible = True
BtnGuardar.Enabled = True
End If
UpGuardar.Update()
Dim OpBanco As Integer = 1
Dim CuentaBanco As String = DdlCuenta.SelectedItem.Text.ToUpper
If CuentaBanco.Contains("BBVA") Or CuentaBanco.Contains("BANCOMER") Then
OpBanco = 1
'ElseIf CuentaBanco.Contains("BAJIO") Then
' OpBanco = 2
ElseIf CuentaBanco.Contains("SCOTIA") Then
OpBanco = 3
End If
If DdlCuenta.SelectedValue = "-1" Then
BtnGuardar.Enabled = False
trCuentaDeposito.Visible = False
DdlCuentaDeposito.Items.Clear()
'UpnCuentasPago.Update()
UpCuentaDeposito.Update()
Return
End If
'' If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
'If dtc IsNot Nothing Then
' If DdlTipoTransaccion.SelectedValue = "9" And CveIE <= -1 Then
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
' If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
' trCuentaDeposito.Visible = True
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' Else
' Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
' End If
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
' If dtc.Rows.Count > 0 Then
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
' trCuentaDeposito.Visible = True
' BtnGuardar.ToolTip = ""
' Else
' BtnGuardar.Enabled = False
' Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
' BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
' End If
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' UpGuardar.Update()
' Else
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
' If dtc.Rows.Count > 0 Then
' trCuentaDeposito.Visible = True
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' End If
' End If
'Else
' If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then
' BtnGuardar.Enabled = False
' Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
' BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
' Else
' trCuentaDeposito.Visible = True
' BtnGuardar.Enabled = True
' End If
' UpGuardar.Update()
'End If
'If DdlTipoTransaccion.SelectedValue = "9" AndAlso DdlCuentaDeposito.Items.Count = 0 Then
' BtnIEGuardar.Enabled = False
'End If
'GVCuentasPago.DataBind()
DdlCuentaDeposito.DataBind()
'DdlCuentaDeposito.DataBind()
'Else
' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear()
'End If
If dtc IsNot Nothing Then
If DdlTipoTransaccion.SelectedValue = "9" Then
If OpBanco = 1 Then
If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
DdlCuentaDeposito.DataBind()
End If
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
BtnGuardar.Enabled = False
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
End If
ElseIf OpBanco = 3 Then
If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus ='True'")
DdlCuentaDeposito.DataBind()
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
If dtc.FiltraParametros(" Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
'DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
BtnGuardar.Enabled = False
Alert("El Beneficiario no tiene una cuenta activa en Scotiabank, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
End If
End If
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
If OpBanco = 1 Then
If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'")
DdlCuentaDeposito.DataBind()
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
trCuentaDeposito.Visible = True
BtnGuardar.ToolTip = ""
Else
BtnGuardar.Enabled = False
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
End If
Else
BtnGuardar.Enabled = False
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito para layout grupos"
Alert("El proveedor no tiene cuentas deposito para layout grupos.", TipoMensaje.MsgAdvertencia)
End If
Else
'Respuesta = True
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
DdlCuentaDeposito.DataBind()
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
BtnGuardar.Enabled = True
End If
End If
If Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToString.Contiene("EGSSINFACT", "EGSCREDITO") Then
If DdlTipoTransaccion.SelectedValue.Contiene("9") AndAlso OpBanco = 3 Then
RBL.Items(1).Enabled = False
RBL.Items(2).Enabled = False
Else
RBL.Items(1).Enabled = True
RBL.Items(2).Enabled = True
End If
End If
UPPP.Update()
UpGuardar.Update()
UpCuentaDeposito.Update()
UpDatos.Update()
End Sub
@@ -4400,6 +4520,7 @@ Partial Class Bancos_IE
DdlProveedores_selectedindexchange(DdlProveedores, Nothing)
DdlProveedores.SelectedText = RazonSocial
' BuscaCargaProveedor()
End If
CveOCSolicitudAnticipo = DrOC("CveOC").ToString.ToEntero
Else

View File

@@ -60,7 +60,7 @@
<div class="col-md-6">
<asp:UpdatePanel runat="server" ID="UpComandosGeneracion" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet light smmallpadding bordered">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
@@ -79,7 +79,7 @@
<div class="row" style="margin-left: 0px; margin-right: 0px;">
<div class="col-md-6">
<div class="portlet light smmallpadding bordered">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
@@ -127,7 +127,7 @@
</div>
<div class="col-md-6">
<div class="portlet light smmallpadding bordered">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
@@ -178,7 +178,7 @@
<div class="col-md-6">
<div class="portlet light smmallpadding bordered">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>

View File

@@ -277,6 +277,8 @@ Partial Class Bancos_PagoElectronico
If DTPendientes IsNot Nothing AndAlso DTPendientes.Rows.Count > 0 Then
CargaDatosInformativos()
Else
VistaComandoGeneracion()
End If
End Sub
@@ -946,7 +948,7 @@ Partial Class Bancos_PagoElectronico
Dim correo As String = dr("Correo").ToString.Trim
If correo.Trim.Length = 0 Then
SBErrores.Append($"Email no definido en fila {idx + 1}. Debe ser un correo electrónico válido.<br>")
SBErrores.Append($" {nombreBen} Email no definido en fila {idx + 1}. Debe ser un correo electrónico válido.<br>")
ErrorLayout = True
End If
@@ -1044,35 +1046,35 @@ Partial Class Bancos_PagoElectronico
Dim NombreArchivo As String = $"pagos_{NowADS.ToString("ddMMyyyy")}_001.txt"
'"pagos_03062025_001.txt"
'If InsertaEnDB Then
If InsertaEnDB Then
' Dim ObjBancos As New ClsBancos
' ObjBancos.IniciaTransacSQL()
Dim ObjBancos As New ClsBancos
ObjBancos.IniciaTransacSQL()
' Dim CveLayoutEnvio As Integer = ObjBancos.AddLayoutEnvios(NombreArchivo, NowADS(), CveCuenta, PorGrupos:=True)
Dim CveLayoutEnvio As Integer = ObjBancos.AddLayoutEnvios(NombreArchivo, NowADS(), CveCuenta, PorGrupos:=True)
' If CveLayoutEnvio > 0 Then
' For Each dr As DataRow In DTPendientes.Rows
' If dr("CveProveedor").ToString <> "" Or dr("CvePersonal").ToString <> "" Then
' If Not ObjBancos.AddLayoutEnviosDetalle(CveLayoutEnvio, dr("CveIE").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero, 1, "Observaciones") Then
' ErrorLayout = True
' Exit For
' End If
' End If
' Next
' Else
' ErrorLayout = True
' End If
If CveLayoutEnvio > 0 Then
For Each dr As DataRow In DTPendientes.Rows
If dr("CveProveedor").ToString <> "" Or dr("CvePersonal").ToString <> "" Then
If Not ObjBancos.AddLayoutEnviosDetalle(CveLayoutEnvio, dr("CveIE").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero, 1, "Observaciones") Then
ErrorLayout = True
Exit For
End If
End If
Next
Else
ErrorLayout = True
End If
' If ErrorLayout Then
' ObjBancos.RollBack()
' ObjBancos.Dispose()
' Else
' ObjBancos.Commit()
' ObjBancos.Dispose()
' End If
If ErrorLayout Then
ObjBancos.RollBack()
ObjBancos.Dispose()
Else
ObjBancos.Commit()
ObjBancos.Dispose()
End If
'End If
End If
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
Dim pathDirectorio As String = String.Format("{0}Layout\", UsuarioActual.Empresa.Ruta)
@@ -1499,11 +1501,23 @@ Partial Class Bancos_PagoElectronico
End If
ObjBancos.Dispose()
If DtRegenerar IsNot Nothing Then
GeneraPago(DtRegenerar, CveBLE)
Else
Alert("Ocurrió un error al obtener los datos para generar el archivo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
If OpBancos = 1 Then
If DtRegenerar IsNot Nothing Then
GeneraPago(DtRegenerar, CveBLE)
Else
Alert("Ocurrió un error al obtener los datos para generar el archivo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If
End If
If OpBancos = 3 Then
If DtRegenerar IsNot Nothing Then
GeneraPagoScotiaBank(DtRegenerar, False)
Else
Alert("Ocurrió un error al obtener los datos para generar el archivo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If
End If
End Sub
#End Region
@@ -1900,8 +1914,9 @@ Partial Class Bancos_PagoElectronico
ElseIf OpBancos = 2 Then
ElseIf OpBancos = 3 Then
If DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'") IsNot Nothing Then
GeneraPagoScotiaBank(DTPendientes.FiltraParametros("EstatusPagoElectronico > 0 AND EstatusCtaDeposito > 0"), False)
If DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'") IsNot Nothing AndAlso
DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'").Rows.Count > 0 Then
GeneraPagoScotiaBank(DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'"), True)
Else
Alert("No hay registros para generar pagos en ScotiaBank", TipoMensaje.MsgAdvertencia)
End If
@@ -2370,6 +2385,8 @@ Partial Class Bancos_PagoElectronico
If OpBancos = 3 Then
TextoArreglo = File.ReadAllLines(path:=NombreArchivo) ' Texto.Split(CChar(vbCrLf))
Dim SBCuentasAltas As New StringBuilder
Dim SBErrores As New StringBuilder
Dim ErrorArchivoScotia As Boolean = False
@@ -2399,6 +2416,7 @@ Partial Class Bancos_PagoElectronico
End If
Dim ObjBancos As New ClsBancos
ObjBancos.IniciaTransacSQL()
For i As Integer = 1 To TextoArreglo.Length - 2 Step 1
@@ -2406,12 +2424,17 @@ Partial Class Bancos_PagoElectronico
If Linea.Length = 140 Then
Dim CodigoRespuesta As String = Linea.Substring(0, 3)
Dim CodigoRespuesta As String = Linea.Substring(109, 3)
Dim DTipoArchivo As String = Linea.Substring(0, 2)
Dim Cuenta As String = Linea.Substring(12, 20)
'Dim FechaEliminacion As Date = Linea.Substring(32, 8).ToDate
Dim FechaEliminacion As Date = Date.ParseExact(Linea.Substring(32, 8), "yyyyMMdd", Globalization.CultureInfo.InvariantCulture)
If DTipoArchivo <> "SP" Then
SBErrores.Append($"Error Linea {i} el tipo de archivo no es un archivo de respuesta (SP), inicia con codigo {DTipoArchivo}.</br>")
ErrorArchivoScotia = True
End If
If CodigoRespuesta = "000" Or CodigoRespuesta = " " Then
Dim CveCuentaDeposito As Integer = Linea.Substring(40, 50).Trim.ToEntero
@@ -2439,11 +2462,16 @@ Partial Class Bancos_PagoElectronico
Next
If ErrorArchivoScotia Then
Alert($"El archivo presento errores en su procesamiento({SBErrores.Length}). Se dieron de alta {SBCuentasAltas.Length} cuentas.</br>Altas:</br>{SBCuentasAltas.ToString}.<br> <br>Errores:<br> {SBErrores.ToString}", TipoMensaje.MsgAdvertencia)
ObjBancos.RollBack()
Alert($"El archivo presento errores en su procesamiento({SBErrores.Length}). Correctos {SBCuentasAltas.Length} cuentas.</br>Altas:</br>{SBCuentasAltas.ToString}.<br> <br>Errores:<br> {SBErrores.ToString}", TipoMensaje.MsgAdvertencia)
Else
ObjBancos.Commit()
Alert($"El archivo se analizo correctamente y se efectuaron todos los cambios en el sistema. cuentas procesadas: </BR>{SBCuentasAltas.ToString}", TipoMensaje.MsgInformacion)
End If
ObjBancos.Dispose()
End If
@@ -2944,6 +2972,8 @@ Partial Class Bancos_PagoElectronico
If OpBancos = 3 Then
TextoArreglo = File.ReadAllLines(NombreArchivo) 'Texto.Split(CChar(vbCrLf))
Dim CveIES As List(Of Integer) = New List(Of Integer)
Dim LienasCount As Integer = TextoArreglo.Length
Dim SBErrores As New StringBuilder
@@ -2956,8 +2986,9 @@ Partial Class Bancos_PagoElectronico
End If
Dim Header As String = TextoArreglo(0)
Dim HCodigo As String = TextoArreglo(0).Substring(0, 3).Trim
If HCodigo <> "SVH" Then
Dim HCodigo As String = TextoArreglo(0).Substring(35, 3).Trim
Dim HTipoArchivo As String = TextoArreglo(0).Substring(0, 3).Trim
If HTipoArchivo <> "SVH" Then
Alert("El archivo no es un archivo de respuesta, debe tener un encabezado con SVH.", TipoMensaje.MsgError)
Exit Sub
End If
@@ -3130,13 +3161,14 @@ Partial Class Bancos_PagoElectronico
End If
Next
Catch ex As Exception
Alert("Ocurrió un error al enviar los correos de notificación.", TipoMensaje.MsgError)
Alert("Ocurrió un error al enviar los correos de notificación.", TipoMensaje.MsgAdvertencia)
End Try
Alert(Respuesta.ToString, TipoMensaje.MsgInformacion)
Else
Alert("Ocurrió un error al procesar el archivo.", TipoMensaje.MsgAdvertencia)
objIE.RollBack()
End If

View File

@@ -442,7 +442,7 @@ Partial Class Bancos_PagoElectronicoGrupos
Case DdlCuenta.SelectedItem.Text.ToUpper.Contains("SCOTIA")
habilitada = (dr("EstatusPagoElectronicoGruposScotia").ToString = "True")
habilitada = (dr("EstatusPagoElectronicoScotia").ToString = "True")
Case Else
habilitada = False 'Otros bancos sin bandera propia
@@ -689,7 +689,7 @@ Partial Class Bancos_PagoElectronicoGrupos
CuentaDepositoSinAlta = True
End If
If DdlCuenta.SelectedItem.Text.ToUpper.Contains("SCOTIA") AndAlso e.Row.DBCampo("EstatusPagoElectronicoGruposScotia").ToString <> "True" Then
If DdlCuenta.SelectedItem.Text.ToUpper.Contains("SCOTIA") AndAlso e.Row.DBCampo("EstatusPagoElectronicoScotia").ToString <> "True" Then
CuentaDepositoSinAlta = True
End If
@@ -2037,15 +2037,15 @@ Partial Class Bancos_PagoElectronicoGrupos
'Motivo de pago
If drow("Observaciones").ToString.Trim.Length > 30 Then
RegistrosPago.Append(drow("Observaciones").ToString.Substring(0, 30))
RegistrosPago.Append(drow("Observaciones").ToString.Trim.Substring(0, 30))
Else
RegistrosPago.Append(drow("Observaciones").ToString.PadRight(30, EspacioRelleno))
RegistrosPago.Append(drow("Observaciones").ToString.Trim.PadRight(30, EspacioRelleno))
End If
If drow("Referencia").ToString.Trim.Length > 7 Then
RegistrosPago.Append(drow("Referencia").ToString.Substring(0, 7))
RegistrosPago.Append(drow("Referencia").ToString.Trim.Substring(0, 7))
Else
RegistrosPago.Append(drow("Referencia").ToString.PadRight(7, EspacioRelleno))
RegistrosPago.Append(drow("Referencia").ToString.Trim.PadRight(7, EspacioRelleno))
End If
RegistrosPago.Append("H")

View File

@@ -774,73 +774,178 @@ Partial Class Bancos_PopIECompras
End Sub
Private Sub CargaCuentasDepositos()
DdlCuentaDeposito.Items.Clear()
If DdlTipoTransaccion.SelectedValue.Contiene("2", "9", "17") Then ' transferencias y layout
trCuentaDeposito.Visible = False
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
'DdlCuentaDeposito.Items.Clear()
If dtc IsNot Nothing Then
'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9", "17") Then ' transferencias y layout
' trCuentaDeposito.Visible = False
If DdlTipoTransaccion.SelectedValue = "9" Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
BtnGuardar.Enabled = False
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
End If
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
' Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
' If dtc IsNot Nothing Then
' If DdlTipoTransaccion.SelectedValue = "9" Then
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
' If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
' trCuentaDeposito.Visible = True
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' Else
' BtnGuardar.Enabled = False
' Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
' End If
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
' If dtc.Rows.Count > 0 Then
' DdlCuentaDeposito.DataSource = dtc
' trCuentaDeposito.Visible = True
' BtnGuardar.ToolTip = ""
' Else
' BtnGuardar.Enabled = False
' BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
' End If
' UpGuardar.Update()
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' Else
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
' If dtc.Rows.Count > 0 Then
' trCuentaDeposito.Visible = True
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' End If
' End If
' Else
' If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
' BtnGuardar.Enabled = False
' BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
' Else
' trCuentaDeposito.Visible = True
' BtnGuardar.Enabled = True
' BtnGuardar.ToolTip = ""
' End If
' UpGuardar.Update()
' End If
' DdlCuentaDeposito.DataBind()
'Else
' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear()
' 'TrReferenciaCIE.Visible = False
'End If
'UpCuentaDeposito.Update()
DdlCuentaDeposito.ClearSelection()
DdlCuentaDeposito.SelectedValue = Nothing
DdlCuentaDeposito.Items.Clear()
trCuentaDeposito.Visible = False
Dim OpBanco As Integer = 1
Dim CuentaBanco As String = DdlCuenta.SelectedItem.Text.ToUpper
If CuentaBanco.Contains("BBVA") Or CuentaBanco.Contains("BANCOMER") Then
OpBanco = 1
'ElseIf CuentaBanco.Contains("BAJIO") Then
' OpBanco = 2
ElseIf CuentaBanco.Contains("SCOTIA") Then
OpBanco = 3
End If
If DdlCuenta.SelectedValue = "-1" Then
BtnGuardar.Enabled = False
trCuentaDeposito.Visible = False
DdlCuentaDeposito.Items.Clear()
'UpnCuentasPago.Update()
UpCuentaDeposito.Update()
Return
End If
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If dtc IsNot Nothing Then
If DdlTipoTransaccion.SelectedValue = "9" Then
If OpBanco = 1 Then
If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
DdlCuentaDeposito.DataBind()
End If
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
BtnGuardar.Enabled = False
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
End If
ElseIf OpBanco = 3 Then
If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'")
DdlCuentaDeposito.DataBind()
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
If dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
BtnGuardar.Enabled = False
Alert("El Beneficiario no tiene una cuenta activa en Scotiabank, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
End If
End If
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
If OpBanco = 1 Then
If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'")
DdlCuentaDeposito.DataBind()
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
trCuentaDeposito.Visible = True
BtnGuardar.ToolTip = ""
Else
BtnGuardar.Enabled = False
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
End If
UpGuardar.Update()
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
End If
Else
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
BtnGuardar.Enabled = False
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Else
trCuentaDeposito.Visible = True
BtnGuardar.Enabled = True
BtnGuardar.ToolTip = ""
BtnGuardar.Enabled = False
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito para layout grupos"
Alert("El proveedor no tiene cuentas deposito para layout grupos.", TipoMensaje.MsgAdvertencia)
End If
UpGuardar.Update()
End If
DdlCuentaDeposito.DataBind()
Else
trCuentaDeposito.Visible = False
DdlCuentaDeposito.Items.Clear()
'TrReferenciaCIE.Visible = False
Else
'Respuesta = True
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
DdlCuentaDeposito.DataBind()
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
BtnGuardar.Enabled = True
End If
End If
'UpnCuentasPago.Update()
UpGuardar.Update()
UpCuentaDeposito.Update()
End Sub
@@ -896,6 +1001,9 @@ Partial Class Bancos_PopIECompras
Banco.Dispose()
End If
CargaCuentasDepositos()
End Sub
'Private Sub DdlOtrosPagos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlOtrosPagos.SelectedIndexChanged

View File

@@ -1405,6 +1405,10 @@ Partial Class Bancos_ProveedoresAbonar
TxtFolio.Text = ""
End If
'ValidaCuentasDepositoLayouts()
CargaCuentasDepositos()
'Dim dr2 As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue)
'If dr2 IsNot Nothing Then
@@ -1416,6 +1420,106 @@ Partial Class Bancos_ProveedoresAbonar
'End If
End Sub
'Function ValidaCuentasDepositoLayouts() As Boolean
' Dim Respuesta As Boolean = False
' Dim OpBanco As Integer = 1
' Dim CuentaBanco As String = DdlCuenta.SelectedItem.Text.ToUpper
' If CuentaBanco.Contains("BBVA") Or CuentaBanco.Contains("BANCOMER") Then
' OpBanco = 1
' 'ElseIf CuentaBanco.Contains("BAJIO") Then
' ' OpBanco = 2
' ElseIf CuentaBanco.Contains("SCOTIA") Then
' OpBanco = 3
' End If
' Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
' If dtc IsNot Nothing Then
' If DdlTipoTransaccion.SelectedValue = "9" Then
' If OpBanco = 1 Then
' If dtc.Rows.Count > 0 Then
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' End If
' If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
' trCuentaDeposito.Visible = True
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' Else
' BtnIEGuardar.Enabled = False
' Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
' End If
' ElseIf OpBanco = 3 Then
' If dtc.Rows.Count > 0 Then
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'")
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' End If
' If dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'").Rows.Count > 0 Then
' trCuentaDeposito.Visible = True
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' Else
' BtnIEGuardar.Enabled = False
' Alert("El Beneficiario no tiene una cuenta activa en Scotiabank, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
' End If
' End If
' ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
' If OpBanco = 1 Then
' If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'").Rows.Count > 0 Then
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'")
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' trCuentaDeposito.Visible = True
' BtnIEGuardar.ToolTip = ""
' Else
' BtnIEGuardar.Enabled = False
' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
' Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
' End If
' 'ElseIf OpBanco = 3 Then
' ' If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'").Rows.Count > 0 Then
' ' DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'")
' ' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' ' trCuentaDeposito.Visible = True
' ' BtnIEGuardar.ToolTip = ""
' ' Else
' ' BtnIEGuardar.Enabled = False
' ' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
' ' Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
' ' End If
' Else
' BtnIEGuardar.Enabled = False
' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito para layout grupos"
' Alert("El proveedor no tiene cuentas deposito para layout grupos.", TipoMensaje.MsgAdvertencia)
' End If
' Else
' Respuesta = True
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
' If dtc.Rows.Count > 0 Then
' trCuentaDeposito.Visible = True
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' End If
' End If
' End If
' UpGuardar.Update()
' Return Respuesta
'End Function
'Private Sub CargaGridTarjetas()
@@ -1432,20 +1536,120 @@ Partial Class Bancos_ProveedoresAbonar
#Region " CUENTAS DEPOSITOS"
Private Sub CargaCuentasDepositos()
DdlCuentaDeposito.ClearSelection()
DdlCuentaDeposito.SelectedValue = Nothing
DdlCuentaDeposito.Items.Clear()
trCuentaDeposito.Visible = False
'Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
'If dtc IsNot Nothing Then
' If dtc.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
' If DdlTipoTransaccion.SelectedValue = "9" Then
' If dtc.Rows.Count > 0 Then
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' End If
' If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
' trCuentaDeposito.Visible = True
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' Else
' 'BtnIEGuardar.Enabled = False
' 'Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
' End If
' ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
' If dtc.Rows.Count > 0 Then
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus ='True'")
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' trCuentaDeposito.Visible = True
' BtnIEGuardar.ToolTip = ""
' Else
' 'BtnIEGuardar.Enabled = False
' 'BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
' 'Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
' End If
' UpGuardar.Update()
' Else
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
' If dtc.Rows.Count > 0 Then
' trCuentaDeposito.Visible = True
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' End If
' End If
' DdlCuentaDeposito.DataBind()
' Else
' If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
' 'BtnIEGuardar.Enabled = False
' 'BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
' 'Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
' Else
' trCuentaDeposito.Visible = True
' BtnIEGuardar.Enabled = True
' BtnIEGuardar.ToolTip = ""
' End If
' UpGuardar.Update()
' End If
'Else
' If DdlTipoTransaccion.SelectedValue = "17" Then
' BtnIEGuardar.Enabled = False
' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
' Else
' trCuentaDeposito.Visible = True
' BtnIEGuardar.Enabled = True
' BtnIEGuardar.ToolTip = ""
' End If
' UpGuardar.Update()
'End If
'Else
' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear()
'End If
'RecargaGlobalCuentasBancarias()
Dim OpBanco As Integer = 1
Dim CuentaBanco As String = DdlCuenta.SelectedItem.Text.ToUpper
If CuentaBanco.Contains("BBVA") Or CuentaBanco.Contains("BANCOMER") Then
OpBanco = 1
'ElseIf CuentaBanco.Contains("BAJIO") Then
' OpBanco = 2
ElseIf CuentaBanco.Contains("SCOTIA") Then
OpBanco = 3
End If
If DdlCuenta.SelectedValue = "-1" Then
BtnIEGuardar.Enabled = False
trCuentaDeposito.Visible = False
DdlCuentaDeposito.Items.Clear()
UpnCuentasPago.Update()
UpCuentaDeposito.Update()
Return
End If
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If dtc IsNot Nothing Then
If dtc.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
If DdlTipoTransaccion.SelectedValue = "9" Then
If DdlTipoTransaccion.SelectedValue = "9" Then
If OpBanco = 1 Then
If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
DdlCuentaDeposito.DataBind()
End If
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
@@ -1456,10 +1660,27 @@ Partial Class Bancos_ProveedoresAbonar
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
End If
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
ElseIf OpBanco = 3 Then
If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus ='True'")
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'")
DdlCuentaDeposito.DataBind()
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
If dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'").Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else
BtnIEGuardar.Enabled = False
Alert("El Beneficiario no tiene una cuenta activa en Scotiabank, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
End If
End If
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
If OpBanco = 1 Then
If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'")
DdlCuentaDeposito.DataBind()
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
trCuentaDeposito.Visible = True
BtnIEGuardar.ToolTip = ""
@@ -1468,47 +1689,39 @@ Partial Class Bancos_ProveedoresAbonar
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
End If
UpGuardar.Update()
'ElseIf OpBanco = 3 Then
' If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'").Rows.Count > 0 Then
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'")
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
' trCuentaDeposito.Visible = True
' BtnIEGuardar.ToolTip = ""
' Else
' BtnIEGuardar.Enabled = False
' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
' Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
' End If
Else
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
End If
DdlCuentaDeposito.DataBind()
Else
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
Else
trCuentaDeposito.Visible = True
BtnIEGuardar.Enabled = True
BtnIEGuardar.ToolTip = ""
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito para layout grupos"
Alert("El proveedor no tiene cuentas deposito para layout grupos.", TipoMensaje.MsgAdvertencia)
End If
UpGuardar.Update()
End If
Else
If DdlTipoTransaccion.SelectedValue = "17" Then
BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Else
trCuentaDeposito.Visible = True
BtnIEGuardar.Enabled = True
BtnIEGuardar.ToolTip = ""
End If
'Respuesta = True
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
DdlCuentaDeposito.DataBind()
UpGuardar.Update()
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If
BtnIEGuardar.Enabled = True
End If
End If
'Else
' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear()
'End If
'RecargaGlobalCuentasBancarias()
UpGuardar.Update()
UpnCuentasPago.Update()
UpCuentaDeposito.Update()
End Sub

View File

@@ -5042,7 +5042,7 @@
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
<asp:TemplateField HeaderText="P.U." ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%">
<ItemTemplate>
<asp:Textbox ID="TxtPU" Width="60px" Text='<%# Eval("PU", "{0:N2}") %>' CssClass="textaslabel" runat="server"></asp:Textbox>
<asp:Textbox ID="TxtPU" Width="60px" Text='<%# Eval("PU", "{0:N5}") %>' CssClass="textaslabel" runat="server"></asp:Textbox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%">

View File

@@ -15524,6 +15524,9 @@ Partial Class Compras_Compras
End If
End If
Dim ivaPorcentaje As Decimal = DTOCGV.MAX("IVAPorcentaje").ToDecimal
Dim IVAPorcentajeTmp As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
If DTOCGV.MAX("IVAPorcentaje").ToDecimal <> TmpDT.MAX("IVAPorcentaje").ToDecimal Then
Alert("La orden de compra(s) tiene diferentes tasa de IVA.", TipoMensaje.MsgAdvertencia)
End If

View File

@@ -5890,7 +5890,14 @@ Partial Class Compras_Proveedores
Private Sub CargaTipoTransaccion()
If GlobalDTDIOTTipoOperacion IsNot Nothing AndAlso GlobalDTDIOTTipoOperacion.Rows.Count = 0 Then
GlobalDTDIOTTipoOperacion = Nothing
End If
Dim Filtro As String = ""
Select Case DDlDIOTTipoTercero.SelectedValue
Case "1"
Filtro = "AplicaProvNacional = 1"
@@ -5900,8 +5907,11 @@ Partial Class Compras_Proveedores
Filtro = "AplicaProvGlobal = 1"
End Select
GlobalDTDIOTTipoOperacion.FiltraParametros(Filtro)
DdlDIOTTipoOperacion.DataSource = GlobalDTDIOTTipoOperacion.FiltraParametros(Filtro)
DdlDIOTTipoOperacion.DataBind()
End Sub

View File

@@ -695,6 +695,7 @@
<asp:HiddenField ID="HdnCompraIdPoliza" runat="server" Value='<%# Eval("CompraIdPoliza")%>' />
<asp:HiddenField ID="HdnIdSegNeg" runat="server" Value='<%# Eval("IdSegNeg")%>' />
<asp:HiddenField ID="HdnPorcentajeIVA" runat="server" Value='<%# Eval("PorcentajeIVA")%>' />
<asp:HiddenField ID="HdnCveMonedaCompra" runat="server" Value='<%# Eval("CveMonedaCompra")%>' />
<table width="100%" cellpadding="0" cellspacing="0" runat="server" id="TbCompra">
<tr class="SubTotales">

View File

@@ -481,7 +481,7 @@ Partial Class RepCxCDetalle
DdlContrato.DataBind()
End Sub
Private Function CargaDatos() As DataSet
Private Function CargaDatos(Optional Impresion As Boolean = True) As DataSet
Dim DSRespuesta As New DataSet
@@ -515,12 +515,12 @@ Partial Class RepCxCDetalle
CveContrato:=DdlContrato.SelectedValue.ToEntero, Aseguradora:=DdlAseguradora.SelectedValue.ToEntero, CveSubProyectoCobranza:=DdlSubProyectoCobranza.SelectedValue.ToEntero()) Then
Dim DTdatos As DataTable = ObjMovtos.DSResultados.Tables(0).Copy
DTGvSourcePersonalizaRangos(DTdatos)
DTGvSourcePersonalizaRangos(DTdatos, Impresion)
GvDatos.DataSource = DTdatos 'ObjMovtos.DSResultados.Tables(0)
'DTaDAtos = ObjMovtos.DSResultados.Tables(0)
'DTaDAtos.TableName = "DTaDAtos"
DSRespuesta.Tables.Add(ObjMovtos.DSResultados.Tables(0).Copy)
DSRespuesta.Tables.Add(DTdatos.Copy)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
GvCartera.DataSource = ObjMovtos.DSResultados.Tables(1)
@@ -824,7 +824,7 @@ Partial Class RepCxCDetalle
Dim lrds As New List(Of ReportDataSource)
Dim DSDatos As DataSet = CargaDatos()
Dim DSDatos As DataSet = CargaDatos(Impresion:=True)
Dim dtt1 As DataTable = Nothing
Dim dtt2 As DataTable = Nothing
@@ -1262,7 +1262,7 @@ Partial Class RepCxCDetalle
End Sub
Private Sub DTGvSourcePersonalizaRangos(ByRef DtDatos As DataTable)
Private Sub DTGvSourcePersonalizaRangos(ByRef DtDatos As DataTable, Optional Impresion As Boolean = False)
DtDatos.Columns.Add("R1", GetType(Decimal))
DtDatos.Columns.Add("R2", GetType(Decimal))
@@ -1290,7 +1290,10 @@ Partial Class RepCxCDetalle
Dim chk As CheckBox = TryCast(TPersonalizar.FindControl(ChkID), CheckBox)
If chk.Checked Then
Impresion = True
End If
If Impresion Then
For Each dRowDT As DataRow In DtDatos.Rows
Dim DiasVencidos As Integer = dRowDT("DiasVencidos").ToString.ToEntero
@@ -1319,9 +1322,9 @@ Partial Class RepCxCDetalle
Next
NumColActual = NumColActual + 1
End If
Next

File diff suppressed because it is too large Load Diff

845
Export/ExpDetalle.aspx Normal file
View File

@@ -0,0 +1,845 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ExpDetalle.aspx.cs" Inherits="Export_ExpDetalle" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
<asp:Label runat="server" ID="LblExp"></asp:Label>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<li id="liImprimir" runat="server">
<asp:LinkButton ID="LBImprimir" runat="server" OnClick="LBImprimir_Click"><i style="font-weight:bold" class="fa fa-file-pdf-o"></i> Exportar PDF</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<div class="whitoutcol" style="width: 100%;">
<div class="portlet light xspadding bordered" style="width: 100%; padding-left: 7px">
<asp:UpdatePanel ID="UpFactura" runat="server">
<ContentTemplate>
<div style="display: flex; align-items: center; gap: 10px; width: 100%;">
<div class="form-group form-md-line-input input-iconright" style="width: 200px;">
<asp:DropDownList ID="DdlVentas" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Folio" DataValueField="CveVenta" AutoPostBack="true" OnSelectedIndexChanged="DdlVentas_SelectedIndexChanged"></asp:DropDownList>
<label for="<%= DdlVentas.ClientID.ToString()%>">Número de Factura:</label>
</div>
<div class="form-group form-md-line-input input-iconright" style="width: 150px;">
<asp:TextBox ID="TxtFechaFact" CssClass="form-control" runat="server" MaxLength="50" ReadOnly="true" Enabled="false"></asp:TextBox>
<ajax:MaskedEditExtender ID="MEEFechaFact" runat="server" TargetControlID="TxtFechaFact" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<label for="<%= TxtFechaFact.ClientID.ToString()%>">Fecha de Factura:</label>
</div>
<div class="form-group form-md-line-input input-iconright" style="width: 180px;">
<asp:DropDownList ID="DdlTipoExp" runat="server" CssClass="select2me form-control">
<asp:ListItem Value="-1" Text="Seleccione" Selected="True" />
<asp:ListItem Value="1" Text="(IMP) Importación" />
<asp:ListItem Value="2" Text="(EXP) Exportación/retorno" />
<asp:ListItem Value="3" Text="(TRA) Tránsitos" />
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVTipoExp" runat="server" ControlToValidate="DdlTipoExp" Display="None" InitialValue="-1" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Exportación''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETipoExp" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoExp" Width="350px"></ajax:ValidatorCalloutExtender>
<label id="LblTipoExp" runat="server" for="<%= DdlTipoExp.ClientID.ToString()%>">Tipo Exportación:</label>
</div>
<div class="form-group form-md-line-input input-iconright" style="width: 180px; margin-bottom: 5px;">
<asp:DropDownList ID="DdlExpEstatus" runat="server" CssClass="select2me form-control">
<asp:ListItem Value="-1" Text="Seleccione" Selected="True" />
<asp:ListItem Value="1" Text="Tránsito" />
<asp:ListItem Value="2" Text="Completa" />
</asp:DropDownList>
<label for="<%= DdlExpEstatus.ClientID.ToString()%>">Estatus:</label>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DdlVentas" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
<div style="display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px;">
<div class="form-group form-md-line-input input-iconright" style="width: 200px;">
<asp:DropDownList ID="DdlClavePedimento" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATPedimentoDescripcion" DataValueField="CvePedimento"></asp:DropDownList>
<label for="<%= DdlClavePedimento.ClientID.ToString()%>">Clave pedimento:</label>
</div>
<div class="form-group form-md-line-input input-iconright" style="width: 150px;">
<asp:TextBox ID="TxtNumPed" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<ajaxToolkit:MaskedEditExtender ID="meeTxtPedimento" runat="server"
ClearMaskOnLostFocus="false"
TargetControlID="TxtNumPed"
Mask="99--99--9999--9999999"
MaskType="Number"
InputDirection="LeftToRight"
AcceptNegative="None"
ErrorTooltipEnabled="True" />
<label for="<%= TxtNumPed.ClientID.ToString()%>" style="margin: 0; white-space: nowrap;">Número de Pedimento:</label>
</div>
<table>
<tr>
<td align="Center" style="width: 100px">Fecha de Pedimento:</td>
<td align="left" style="width: 100px">
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:TextBox ID="TxtFechaPedim" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpGuardar" Width="100px" ClientIDMode="Static"></asp:TextBox>
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaPedim" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaPedim" TargetControlID="TxtFechaPedim" PopupButtonID="ImgFechaPedim" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaPedim" runat="server" ControlToValidate="TxtFechaPedim" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Pedimento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaPedim" runat="server" ControlToValidate="TxtFechaPedim" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha de Pedimento''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPedim" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPedim" Width="350px"></ajax:ValidatorCalloutExtender>
</ContentTemplate>
</asp:UpdatePanel>
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="ImgFechaPedim" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
</span>
</div>
</td>
</tr>
</table>
</div>
</div>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-top: 20px;">
<tr>
<td align="left">
<ajax:TabContainer ID="Tab" runat="server" Width="100%">
<ajax:TabPanel ID="TabFactura" runat="server" HeaderText="Factura">
<ContentTemplate>
<div class="portlet light xspadding bordered" style="width: 350px;">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Pedimento</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body" style="display: flex; align-items: center; gap: 10px; width: 100%;">
<div class="form-group form-md-line-input input-iconright" style="width: 150px;">
<asp:TextBox ID="TxtTipoCambio" CssClass="form-control" runat="server" MaxLength="50"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTETipoCambio" runat="server" TargetControlID="TxtTipoCambio" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtTipoCambio.ClientID.ToString()%>">Tipo de Cambio:</label>
</div>
<div class="form-group form-md-line-input input-iconright" style="width: 150px;">
<asp:DropDownList ID="DdlIncoterm" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATIncotermDescripcion" DataValueField="CveIncoterm"></asp:DropDownList>
<label for="<%= DdlIncoterm.ClientID.ToString()%>">Incoterm:</label>
</div>
</div>
</div>
<ajax:TabContainer runat="server" Width="100%">
<ajax:TabPanel ID="TabCliente" runat="server" HeaderText="Cliente">
<ContentTemplate>
<asp:UpdatePanel ID="UpCliente" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" style="margin-left: 0px; margin-right: 0px;">
<div class="whitoutcol" style="width: 49%;">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Cliente</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-left: 8px">
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" class="col-sm-4" Text="Nombre Exportador:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlExp" Width="100%" data-metodo="getproveedores" UsaWebService="true" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="Nombre Importador:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlImp" Width="100%" data-metodo="getproveedores" UsaWebService="true" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="Nombre Consignatario:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCon" Width="100%" data-metodo="getproveedores" UsaWebService="true" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="ITN:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize" style="width: 300px;">
<asp:TextBox ID="TxtITN" runat="server" CssClass="form-control input-sm" MaxLength="15" Width="100%" Text=""></asp:TextBox>
<label for="<%= TxtITN.ClientID.ToString()%>"></label>
</div>
</div>
</div>
</div>
</div>
<div class="whitoutcol" style="width: 49%;">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Dirección</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-left: 8px">
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="Clave Dir. Exportador:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<asp:DropDownList ID="DdlDirExp" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Direccion" DataValueField="CveProveedorSucursal"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDirExp" runat="server" ControlToValidate="DdlDirExp" Display="None" InitialValue="-1" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clave Dir. Exportador''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDirExp" runat="server" HighlightCssClass="vco" TargetControlID="RFVDirExp" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="Clave Dir. Consignatario:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<asp:DropDownList ID="DdlDirCon" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Direccion" DataValueField="CveProveedorSucursal"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDirCon" runat="server" ControlToValidate="DdlDirCon" Display="None" InitialValue="-1" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clave Dir. Consignatario''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDirCon" runat="server" HighlightCssClass="vco" TargetControlID="RFVDirCon" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="Vinculación:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize" style="width: 300px;">
<asp:CheckBox ID="CkbVinculacion" runat="server" />
<label for="<%= CkbVinculacion.ClientID.ToString()%>"></label>
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabAgentes" runat="server" HeaderText="Agentes">
<ContentTemplate>
<asp:UpdatePanel ID="UpAgentes" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" style="margin-left: 0px; margin-right: 0px;">
<div class="whitoutcol" style="width: 49%;">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Agentes Aduanales</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-left: 8px">
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="Agente A. Mexicano:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<asp:DropDownList ID="DdlAgenteMex" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Agente" DataValueField="CveAgente" AutoPostBack="true" OnSelectedIndexChanged="DdlAgenteMex_SelectedIndexChanged"></asp:DropDownList>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="Agente A. Extranjero:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<asp:DropDownList ID="DdlAgenteExt" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Agente" DataValueField="CveAgente" AutoPostBack="true" OnSelectedIndexChanged="DdlAgenteExt_SelectedIndexChanged"></asp:DropDownList>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="Clave Aduana:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<asp:DropDownList ID="DdlClaveAduana" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATAduanaSeccionDescripcion" DataValueField="CveSATAduanaSeccion"></asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
<div class="whitoutcol" style="width: 49%;">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Patentes</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-left: 8px">
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-2" Text="Patente:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<asp:TextBox ID="TxtPatente" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text="" ReadOnly="true" Enabled="false"></asp:TextBox>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-2" Text="Tax I.D.:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<asp:TextBox ID="TxtTaxId" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text="" ReadOnly="true" Enabled="false"></asp:TextBox>
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DdlAgenteMex" EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger ControlID="DdlAgenteExt" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabTransportista" runat="server" HeaderText="Transportista">
<ContentTemplate>
<asp:UpdatePanel ID="UpTransportista" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" style="margin-left: 0px; margin-right: 0px;">
<div class="whitoutcol" style="width: 49%;">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Vehículos</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-left: 8px">
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="Descripción Contenedor:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<asp:DropDownList ID="DdlDescContenedor" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="" DataValueField=""></asp:DropDownList>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="Compañía Transportista:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize" style="width: 300px;">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCompTransportista" Width="100%" data-metodo="getproveedores" UsaWebService="true" runat="server" DataTextField="RazonSocial" DataValueField="CveProveedor" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="Placa:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize" style="width: 300px;">
<asp:TextBox ID="TxtPlaca" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<label for="<%= TxtPlaca.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="SCAC:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize" style="width: 300px;">
<asp:TextBox ID="TxtSCAC" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<label for="<%= TxtSCAC.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-4" Text="CAAT:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize" style="width: 300px;">
<asp:TextBox ID="TxtCAAT" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<label for="<%= TxtCAAT.ClientID.ToString()%>"></label>
</div>
</div>
</div>
</div>
</div>
<div class="whitoutcol" style="width: 49%;">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Otros</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-left: 8px">
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-3" Text="Medio Transporte:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<asp:DropDownList ID="DdlMedioTran" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATMedioTransporteDescripcion" DataValueField="CveMedioTransporte"></asp:DropDownList>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-3" Text="Tipo Contenedor:"></asp:Label>
<div class="whitoutcol whitoutcol" style="width: 300px;">
<asp:DropDownList ID="DdlTipoContenedor" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="ClaveSATContenedorDescripcion" DataValueField="CveContenedorVehiculo"></asp:DropDownList>
</div>
</div>
<hr style="margin: 18px 8px 15px 0px">
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-3" Text="Sello 1:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize" style="width: 300px;">
<asp:TextBox ID="TxtSello1" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<label for="<%= TxtSello1.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-3" Text="Sello 2:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize" style="width: 300px;">
<asp:TextBox ID="TxtSello2" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<label for="<%= TxtSello2.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-3" Text="Sello 3:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize" style="width: 300px;">
<asp:TextBox ID="TxtSello3" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<label for="<%= TxtSello3.ClientID.ToString()%>"></label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" style="margin-left: 0px; margin-right: 0px;">
<div class="whitoutcol" style="width: 49%;">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Flete</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-left: 8px">
<div class="form-group row" style="width: 100%;">
<div class="col-md-6">
<div class="whitoutcol" style="width: 100%;">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Incrementables</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-left: 8px">
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Transp.:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize col-md-5">
<asp:TextBox ID="TxtIncFletes" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEIncFletes" runat="server" TargetControlID="TxtIncFletes" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtIncFletes.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Seguros:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize col-md-5">
<asp:TextBox ID="TxtIncSeguro" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEIncSeguro" runat="server" TargetControlID="TxtIncSeguro" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtIncSeguro.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Embalaje:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize col-md-5">
<asp:TextBox ID="TxtIncEmbalajes" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEIncEmbalajes" runat="server" TargetControlID="TxtIncEmbalajes" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtIncEmbalajes.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-6" Text="Costo Envases:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize col-md-5">
<asp:TextBox ID="TxtIncEmbalaje" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEIncEmbalaje" runat="server" TargetControlID="TxtIncEmbalaje" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtIncEmbalaje.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Conexos:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize col-md-5">
<asp:TextBox ID="TxtIncConexos" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEIncConexos" runat="server" TargetControlID="TxtIncConexos" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtIncConexos.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-5" Text="Total:"></asp:Label>
<div class="whitoutcol whitoutcol col-md-6">
<asp:TextBox ID="TxtTotalInc" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text="" ReadOnly="true" Enabled="false"></asp:TextBox>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="whitoutcol" style="width: 100%;">
<div class="portlet light xspadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Decrementables</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-left: 8px">
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Transp.:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize col-md-5">
<asp:TextBox ID="TxtDecFlete" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEDecFlete" runat="server" TargetControlID="TxtDecFlete" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtDecFlete.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Seguros:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize col-md-5">
<asp:TextBox ID="TxtDecSeguro" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEDecSeguro" runat="server" TargetControlID="TxtDecSeguro" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtDecSeguro.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Carga:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize col-md-5">
<asp:TextBox ID="TxtDecCarga" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEDecCarga" runat="server" TargetControlID="TxtDecCarga" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtDecCarga.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-6" Text="Gastos Descarga:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize col-md-5">
<asp:TextBox ID="TxtDecDescarga" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEDecDescarga" runat="server" TargetControlID="TxtDecDescarga" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtDecDescarga.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-6" Text="Otros Gastos:"></asp:Label>
<div class="form-group form-md-line-input linewhitsize col-md-5">
<asp:TextBox ID="TxtDecOtros" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text=""></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEDecOtros" runat="server" TargetControlID="TxtDecOtros" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtDecOtros.ClientID.ToString()%>"></label>
</div>
</div>
<div class="form-group row" style="width: 100%;">
<asp:Label runat="server" CssClass="col-sm-5" Text="Total:"></asp:Label>
<div class="whitoutcol whitoutcol col-md-6">
<asp:TextBox ID="TxtTotalDec" runat="server" CssClass="form-control input-sm" MaxLength="300" Width="100%" Text="" ReadOnly="true" Enabled="false"></asp:TextBox>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabNotas" runat="server" HeaderText="Notas">
<ContentTemplate>
<table border="0" width="100%">
<tr align="left">
<td>Notas: &nbsp;</td>
</tr>
<tr align="left">
<td>
<asp:TextBox ID="TxtNotas" runat="server" Rows="4" TextMode="MultiLine" Width="100%"></asp:TextBox></td>
</tr>
</table>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel ID="TabPartidas" runat="server" HeaderText="Partidas">
<ContentTemplate>
<asp:UpdatePanel ID="UpPartidas" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button runat="server" ID="BtnAgregarPartida" OnClick="BtnAgregarPartida_Click" Text="Agregar Partida" CssClass="btn btn-primary" Style="margin-top: 5px;" />
<br />
<br />
<asp:GridView ID="GVPartidas" runat="server" data-sort="true" AutoGenerateColumns="False" DataKeyNames="CveExportacionDetalle" OnRowCommand="GVPartidas_RowCommand" ShowFooter="true" OnRowDataBound="GVPartidas_RowDataBound" Width="100%" EmptyDataText="No se encontraron Partidas" ToolTip="Partidas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
<Columns>
<%--asp:TemplateField HeaderText="Id" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:LinkButton ID="LnkExpDetalle" runat="server" Text='<%# Eval("CveExportacionDetalle") %>' CommandName="EditarPartida" CommandArgument='<%# Eval("CveExportacionDetalle") %>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField--%>
<asp:TemplateField HeaderText="Producto / Servicio" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblPS" runat="server" Text='<%# Eval("PSCodigo")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="País de Origen" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblPaisOrigen" runat="server" Text='<%# Eval("ClaveSATPais")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Unidad de Medida" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblUM" runat="server" Text='<%# Eval("UnidadMedida")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor Total USD" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblPrecio" runat="server" Text='<%# Eval("Precio", "{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Valor Total MXP" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblValorTotalMXP" runat="server" Text='<%# Eval("ValorTotalMXP", "{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tasa IVA" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblTasaIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total de Empaque" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblTotalEmpaque" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.####}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fracción Arancelaria" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblFraccAran" runat="server" Text='<%# Eval("FraccionArancelaria")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Unidad Aduana" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblUnidadAduana" runat="server" Text='<%# Eval("UnidadAduana")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad Exportada" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.####}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Peso Unit. KG" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblPesoUnitario" runat="server" Text='<%# Eval("PesoUnitario", "{0:#,###.####}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Peso Bruto" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblPesoBruto" runat="server" Text='<%# Eval("PesoBruto", "{0:#,###.####}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Acciones" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="160px">
<ItemTemplate>
<asp:LinkButton
data-toggle="tooltip"
title="Editar"
ID="LnkEditarPartida"
CommandName="EditarPartida"
CommandArgument='<%# Eval("CveExportacionDetalle") %>'
CssClass="btn btn-circle btn-sm green"
runat="server"
Text="<i class='fa fa-pencil'></i>">
</asp:LinkButton>
&nbsp;
<asp:LinkButton
ID="LnkEliminarPartida"
runat="server"
CommandName="EliminarPartida"
CommandArgument='<%# Eval("CveExportacionDetalle") %>'
CssClass="btn btn-circle btn-sm red"
Text="<i class='icon-trash'></i>"
data-toggle="confirmation"
data-popout="true"
data-original-title="¿Está seguro que desea eliminar la Partida?"
data-btn-ok-label="Sí">
</asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</ContentTemplate>
</ajax:TabPanel>
</ajax:TabContainer>
<br />
<table width="100%">
<tr>
<td align="center">
<asp:Button runat="server" ID="BtnGuardar" OnClick="BtnExpGuardar_Click" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="GrpGuardar" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<div id="DModalPartida" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpPSS" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="H1" runat="server">Agregar Partida</h4>
</div>
<div id="DVBodyAddProducto" style="overflow: auto!important">
<div class="modal-body">
<asp:UpdatePanel ID="UpBodyAddProducto" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div class="row">
<div class="col-md-6">
<asp:UpdatePanel ID="UPPClasificacion" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPS" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlPS_SelectedIndexChanged" DataTextField="PSCodigo" DataValueField="CvePS" Width="100%" ValidationGroup="GprAgregaPS"></asp:DropDownList></td>
<label for="<%= DdlPS.ClientID.ToString()%>">Productos / Servicio:</label>
<asp:RequiredFieldValidator ID="RFVDdlPS" runat="server" ControlToValidate="DdlPS" Display="None" InitialValue="-1" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Productos / Servicio''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDdlPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlPS" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="DdlPS" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>
<br />
<div class="row">
<div class="col-md-6">
<asp:UpdatePanel ID="UPPUM" runat="server" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlUM" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="100"></asp:DropDownList></td>
<label for="<%= DdlUM.ClientID.ToString()%>">Unidad de Medida:</label>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<br />
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlPaisOrigen" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="ClaveSATPais" DataValueField="CvePais" Width="100"></asp:DropDownList></td>
<label for="<%= DdlPaisOrigen.ClientID.ToString()%>">País de Origen:</label>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPrecio" ClientIDMode="Static" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumerosTxtPrecio" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtPrecio.ClientID.ToString()%>">Valor Total USD:</label>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCantidad" ClientIDMode="Static" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTECantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad Exportada:</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPesoUnitario" ClientIDMode="Static" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEPesoUnitario" runat="server" TargetControlID="TxtPesoUnitario" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtPesoUnitario.ClientID.ToString()%>">Peso Unitario KG:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright" align="right" id="DivAgregarOtraPartida" runat="server">
<label>Continuar agregando:</label>
<asp:CheckBox ID="ChkSeguirAgregandoPartidas" runat="server" Checked="true" />
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel ID="UpAddProductoBotones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-12">
<asp:Button ID="BtnPartidaGuardar" OnClick="BtnPartidaGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="GprAgregaPS" />
<asp:Button ID="BtnPartidaActualizar" OnClick="BtnPartidaGuardar_Click" runat="server" Text="Actualizar" CssClass="btn btn-primary" ValidationGroup="GprAgregaPS" />
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

1167
Export/ExpDetalle.aspx.cs Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,144 @@
<%@ Page Title="Exportaciones" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepExportaciones.aspx.cs" Inherits="Export_RepExportaciones" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
<!--link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" /-->
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
<asp:Literal ID="LtlTitulo" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
<li>
<asp:HyperLink ID="HLAgregarExp" NavigateUrl="ExpDetalle.aspx?CveExportacion=-1" runat="server" > <i class="fa fa-plus"></i> Agregar Exportación</asp:HyperLink>
</li>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
<asp:UpdatePanel ID="upDatosExp" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet light portlet xspadding bordered " style="margin-bottom: 0px; padding: 8px;" id="form_wizard_1">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject font-green bold uppercase">Información
<asp:Literal ID="LtlPeriodoseleccionado" runat="server"></asp:Literal></span>
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
<%--<a href="javascript:;" class="fullscreen" data-original-title="" title=""></a>--%>
</div>
<div class="actions">
<div class="btn-group">
<div>
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVExportaciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVExportaciones.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</div>
</div>
<div class="portlet-body form">
<asp:GridView ID="GVExportaciones" runat="server" data-sort="true" AutoGenerateColumns="False" DataKeyNames="CveExportacion" Width="100%" EmptyDataText="No se encontraron Exportaciones" ToolTip="Exportaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None" OnRowDataBound="GVExportaciones_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="Exportación" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:HyperLink ID="HlExpDetalle" runat="server" Text='<%# Eval("CveExportacion") %>' NavigateUrl='<%# Eval("CveExportacion", "ExpDetalle.aspx?CveExportacion={0}") %>'>></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FechaIng" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px" HeaderText="Fecha de Ingreso" DataFormatString="{0:d}" />
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblUsuario" runat="server" Text='<%# Eval("Usuario")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Número de Factura" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblNumFact" runat="server" Text='<%# Eval("SerieFolio")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha de Factura" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblFechaFact" runat="server" Text='<%# Eval("FechaFact", "{0:d}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo de Cambio" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblTipoCambio" runat="server" Text='<%# Eval("TipoCambio")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Tipo Exportación" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblTipoExp" runat="server" Text='<%# Eval("TipoExportacion")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblEstatus" runat="server" Text='<%# Eval("CveExportacionEstatus")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Número de Pedimento" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblNumeroPedimento" runat="server" Text='<%# Eval("NumeroPedimento")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Pedimento" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblFechaPedimento" runat="server" Text='<%# Eval("FechaPedimento", "{0:d}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nombre Exportador" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblClienteExp" runat="server" Text='<%# Eval("ClienteExportador")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RFC Importador" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblRFCImp" runat="server" Text='<%# Eval("RFCImp")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nombre Importador" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblClienteImp" runat="server" Text='<%# Eval("ClienteImportador")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RFC Consignatario" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblRFCCon" runat="server" Text='<%# Eval("RFCCon")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Nombre Consignatario" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblClienteCon" runat="server" Text='<%# Eval("ClienteConsignatario")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Editar" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<ItemTemplate>
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="EditarExp_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100px">
<ItemTemplate>
<asp:LinkButton ID="LnkEliminar" runat="server" OnClick="EliminarExp_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la Exportación?" data-btn-ok-label="Sí" />
</ItemTemplate>
</asp:TemplateField>
</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,123 @@
using DocumentFormat.OpenXml.Wordprocessing;
using Extensiones;
using HigLabo.Core;
using StackExchange.Redis;
using System;
using System.Activities;
using System.Activities.Expressions;
using System.Activities.Statements;
using System.Collections.Generic;
using System.EnterpriseServices.Internal;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
using static Stimulsoft.Report.Export.DeflaterHuffman;
public partial class Export_RepExportaciones : ClsPaginas
{
#region Propiedades
private int CveExportacion
{
get { return (ViewState["CveExportacion"] == null) ? -1 : Convert.ToInt32(ViewState["CveExportacion"]); }
set { ViewState["CveExportacion"] = value; }
}
public string EmptyDataTextPersonalizado { get; set; }
public string ToolTipPersonalizado { get; set; }
private bool EsImportacion
{
get{ return (ViewState["EsImportacion"] == null) ? false : Boolean.Parse(ViewState["EsImportacion"].ToString()); }
set { ViewState["EsImportacion"] = value; }
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
// Primero, inicializa la bandera
EsImportacion = false;
if (Request["Opcion"] != null && Request["Opcion"] == "I")
{
EsImportacion = true;
}
Page.Title = EsImportacion ? "Importaciones" : "Exportaciones";
// Ahora sí, usa la bandera para los textos
if (EsImportacion)
{
LtlTitulo.Text = "Importaciones";
EmptyDataTextPersonalizado = "No se encontraron importaciones";
ToolTipPersonalizado = "Importaciones";
HLAgregarExp.Text = "<i class='fa fa-plus'></i> Agregar Importación";
HLAgregarExp.NavigateUrl = "ExpDetalle.aspx?CveExportacion=-1&Opcion=I";
}
else
{
LtlTitulo.Text = "Exportaciones";
EmptyDataTextPersonalizado = "No se encontraron exportaciones";
ToolTipPersonalizado = "Exportaciones";
HLAgregarExp.Text = "<i class='fa fa-plus'></i> Agregar Exportación";
HLAgregarExp.NavigateUrl = "ExpDetalle.aspx?CveExportacion=-1";
}
GVExportaciones.EmptyDataText = EmptyDataTextPersonalizado;
GVExportaciones.ToolTip = ToolTipPersonalizado;
CargaExportaciones();
}
}
protected void CargaExportaciones()
{
ClsExportaciones Exportaciones = new ClsExportaciones();
bool EsExportacion = !EsImportacion;
if (Exportaciones.GetExportacion(-1, UsuarioActual.CveEmpresa, EsExportacion))
{
GVExportaciones.DataSource = Exportaciones.DtResultados;
GVExportaciones.DataBind();
}
Exportaciones.Dispose();
upDatosExp.Update();
}
protected void EditarExp_Click(object sender, EventArgs e)
{
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
string cve = gvRow.DataKey("CveExportacion").ToString();
string url = EsImportacion
? $"/Export/ExpDetalle.aspx?CveExportacion={cve}&Opcion=I"
: $"/Export/ExpDetalle.aspx?CveExportacion={cve}";
Response.Redirect(url, true);
upDatosExp.Update();
}
protected void EliminarExp_Click(object sender, EventArgs e)
{
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
ClsExportaciones Exportaciones = new ClsExportaciones();
bool Continuar = Exportaciones.RemoveExportacion(gvRow.DataKey("CveExportacion").ToEntero());
Exportaciones.Dispose();
if (Continuar)
{
CargaExportaciones();
Alert("La Exportación se ha eliminado correctamente.");
}
}
protected void GVExportaciones_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
HyperLink hl = (HyperLink)e.Row.FindControl("HlExpDetalle");
if (hl != null)
{
string cve = DataBinder.Eval(e.Row.DataItem, "CveExportacion").ToString();
if (EsImportacion)
hl.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cve}&Opcion=I";
else
hl.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cve}";
}
}
}
}

View File

@@ -135,7 +135,7 @@
<asp:TemplateField ItemStyle-CssClass="margenbound" HeaderText="P. Promedio">
<ItemTemplate>
<%--TODO: Esto puede tronar si el valor es DBNull --%>
<%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToInt32(Eval("Cantidad"))).ToString("C")) %>
<%# If(Convert.ToDecimal(Eval("Cantidad")) = 0, 0.ToString("C"), (Convert.ToDecimal(Eval("SubTotal")) / Convert.ToDecimal(Eval("Cantidad"))).ToString("C")) %>
</ItemTemplate>
</asp:TemplateField>
</Columns>

View File

@@ -794,7 +794,7 @@ Partial Class General_SaldosIniciales
Dim DTCuentasContables As New DataTable
If UsuarioActual.Empresa.TipoContabilizacion = 1 Or UsuarioActual.CveEmpresa.Contiene(172, 174) Then
If UsuarioActual.Empresa.TipoContabilizacion = 1 Or UsuarioActual.CveEmpresa.Contiene(172, 174, 184) Then
Dim ObjConta As New ClsContabilidad
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
@@ -1445,7 +1445,7 @@ Partial Class General_SaldosIniciales
If CobranzaTelefono.Trim.Length > 10 Then CobranzaTelefono = ""
Dim FormaPago As String = If(dt.Columns.Contains("Forma Pago"), Row("Forma Pago").ToString(), "")
Dim FormaPago As String = If(dt.Columns.Contains("FormaPago"), Row("FormaPago").ToString(), "")
Dim CveFormaPago33 As Integer = 99
Select Case FormaPago

View File

@@ -1163,16 +1163,36 @@
}
function fncCantidad(checkbox, numeroMax, idTbCantidadF) {
function fncCantidad(checkbox, numeroMax, idTbCantidadF, rfv) {
var $textbox = $('#' + idTbCantidadF);
if ($(checkbox).is(':checked')) {
$textbox.val(numeroMax);
activarValidatorPorId(rfv);
} else {
$textbox.val(0);
desactivarValidatorPorId(rfv);
}
}
function desactivarValidatorPorId(idValidatorCliente) {
var validator = document.getElementById(idValidatorCliente);
if (validator) {
validator.enabled = false;
validator.style.display = "none";
}
}
function activarValidatorPorId(idValidatorCliente) {
var validator = document.getElementById(idValidatorCliente);
if (validator) {
validator.enabled = true;
validator.style.display = "inline";
}
}
</script>

View File

@@ -1278,7 +1278,7 @@ Partial Class Inventarios_EntregaAlmacen
If BloqueCantidad Then
e.Row.FCTextBox("TbCantidadF").Enabled = False
Else
e.Row.FCCheckBox("cbInv").Attributes.Add("onclick", $"fncCantidad(this,{e.Row.DBCampo("CantidadF")},'{e.Row.FCTextBox("TbCantidadF").ClientID}')")
e.Row.FCCheckBox("cbInv").Attributes.Add("onclick", $"fncCantidad(this,{e.Row.DBCampo("CantidadF")},'{e.Row.FCTextBox("TbCantidadF").ClientID}','{e.Row.FCRequiredFieldValidator("RFVCaducidad").ClientID}')")
End If
@@ -1997,6 +1997,7 @@ Partial Class Inventarios_EntregaAlmacen
#Region " GUARDAR "
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
Select Case TipoEntrega
Case 1
GuardaVenta()

View File

@@ -3070,6 +3070,9 @@ Partial Class Inventarios_RecepcionUsados
Case "MOTOBATERIA"
'20517 MOTOBATERIAS
ListaClasificacionesPermitidas.Add(20517) 'MOTOBATERIAS
Case "AUXILIAR"
'30043 AUXILIAR
ListaClasificacionesPermitidas.Add(30043) 'AUXILIAR
End Select
If ListaClasificacionesPermitidas.Contains(CveClasificacionPS) Then

View File

@@ -79,6 +79,8 @@ Partial Class Vta_CatCobranzaEstatus
Alert("Error al actualizar")
End If
End If
GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) = Nothing
End Sub
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
@@ -92,6 +94,8 @@ Partial Class Vta_CatCobranzaEstatus
Alert("Estatus de cobranza eliminado")
End If
ObjVentas.Dispose()
GlobalDTVtaCobranzaEstatus(UsuarioActual.CveEmpresa) = Nothing
End Sub
Private Sub CargaDatosTurno()

View File

@@ -33,13 +33,13 @@
</div>
<div class="titlefiltros caption">
<div class="row">
<label class="col-md-1 truncate">Sucursal:</label>
<div class="col-md-2">
<label class="col-md-1 truncate" id="DivLblSucursal" runat="server">Sucursal:</label>
<div class="col-md-2" id="DivSucursal" runat="server">
<asp:DropDownList ID="DdlSubProyecto" runat="server" Width="100%" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Mes/Año:</label>
<div class="col-md-1" style="min-width: 115px">
<label class="col-md-1 truncate" id="DivLblMes" runat="server">Mes/Año:</label>
<div class="col-md-1" style="min-width: 115px" id="DivMes" runat="server">
<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="txtMesAnio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
@@ -54,8 +54,8 @@
<asp:DropDownList ID="DdlVendedor" runat="server" Width="100%" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
<label title="Marca" data-toggle="tooltip" class="col-md-1 truncate">Marca:</label>
<div class="col-md-2">
<label title="Marca" data-toggle="tooltip" class="col-md-1 truncate" id="DivLblMarca" runat="server">Marca:</label>
<div class="col-md-2" id="DivMarca" runat="server">
<asp:DropDownList ID="DdlMarca" runat="server" Width="100%" DataTextField="Marca" DataValueField="CveMarca" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
@@ -70,7 +70,7 @@
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMeta,CveVendedor,CveMarca,CveClasificacion,CveClasificacionSup,Vendedor,MesAño,Marca,Clasificacion,MetaCantidad,MetaImporte" EmptyDataText="No se encontraron metas registradas" ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style=" width: 100%" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMeta,CveVendedor,CveMarca,CveClasificacion,CveClasificacionSup,Vendedor,MesAño,Marca,Clasificacion,MetaCantidad,MetaImporte" EmptyDataText="No se encontraron metas registradas" ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style="width: 100%" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
@@ -162,48 +162,54 @@
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Metas Vendedores</asp:Literal></h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<label for="DdlVendedores">Vendedor:</label>
<asp:DropDownList ID="DdlVendedores" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me"></asp:DropDownList>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<label for="MotivoTxt">Mes y Año:</label>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
<asp:TextBox Style="width: 110px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
<div class="col-md-2 truncate">Vendedor</div>
<div class="col-md-10">
<asp:DropDownList ID="DdlVendedores" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
</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="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div class="form-group form-md-line-input input-iconright">
<label for="DdlMarcas">Clasificacion Superior:</label>
<asp:DropDownList ID="DdlClasificacionSup" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me"></asp:DropDownList>
<i></i>
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;" id="Div3" runat="server" visible="false">
<div class="col-md-2 truncate">Marca</div>
<div class="col-md-4">
<asp:DropDownList ID="DdlMarcas" runat="server" DataTextField="Marca" DataValueField="CveMarca" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
</div>
<div class="col-md-2 truncate">Mes y Año</div>
<div class="col-md-4">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
<asp:TextBox Style="width: 110px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaI" 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="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<label for="DdlMarcas">Clasificacion:</label>
<asp:DropDownList ID="DdlClasificacion" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me"></asp:DropDownList>
<i></i>
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;" id="Div2" runat="server" visible="false">
<div class="col-md-2">Clasificación Superior</div>
<div class="col-md-10">
<asp:DropDownList ID="DdlClasificacionSup" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<label for="DdlMarcas">Marca:</label>
<asp:DropDownList ID="DdlMarcas" runat="server" DataTextField="Marca" DataValueField="CveMarca" CssClass="form-control input-sm select2me"></asp:DropDownList>
<i></i>
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;" id="Div1" runat="server" visible="false">
<label class="col-md-2 truncate">Clasificación</label>
<div class="col-md-10">
<asp:DropDownList ID="DdlClasificacion" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me" Width="100%"></asp:DropDownList>
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtMetaCantidad" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TxtMetaCantidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad meta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="MotivoTxt">Cantidad meta:</label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtMetaImporte" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtMetaImporte" runat="server" ControlToValidate="TxtMetaImporte" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe meta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
<label for="MotivoTxt">Importe meta:</label>
<i></i>
<div class="row" style="display: flex; align-items: center; margin-bottom: 10px;">
<div class="col-md-2">Cantidad meta</div>
<div class="col-md-4">
<asp:TextBox ID="TxtMetaCantidad" CssClass="form-control" runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:CompareValidator ID="CVCantidad" runat="server" ControlToValidate="TxtMetaCantidad" Display="None" ErrorMessage="El campo <b>''Cantidad meta''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpTiposD"></asp:CompareValidator>
<asp:RequiredFieldValidator ID="RFVTxtMetaCantidad" runat="server" ControlToValidate="TxtMetaCantidad" Display="None" ErrorMessage="El campo <b>''Cantidad meta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
</div>
<div class="col-md-2">Importe meta</div>
<div class="col-md-4">
<asp:TextBox ID="TxtMetaImporte" CssClass="form-control" runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
<asp:CompareValidator ID="CVImporte" runat="server" ControlToValidate="TxtMetaImporte" Display="None" ErrorMessage="El campo <b>''Cantidad meta''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Double" ValidationGroup="GrpTiposD"></asp:CompareValidator>
<asp:RequiredFieldValidator ID="RFVTxtMetaImporte" runat="server" ControlToValidate="TxtMetaImporte" Display="None" ErrorMessage="El campo <b>''Importe meta''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
</div>
</div>
</div>
<div class="modal-footer">

View File

@@ -33,16 +33,31 @@ Partial Class CatMetasVendedores
Private Sub CargaDatos()
Dim Mes As Integer = -1, Anio As Integer = -1
If Not String.IsNullOrEmpty(txtMesAnio.Text) Then
Dim FechaRef As DateTime = txtMesAnio.Text.ToDate()
Mes = FechaRef.Month
Anio = FechaRef.Year
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
If Not String.IsNullOrEmpty(txtMesAnio.Text) Then
Dim FechaRef As DateTime = txtMesAnio.Text.ToDate()
Mes = FechaRef.Month
Anio = FechaRef.Year
End If
Else
GvDatos.Columns(1).Visible = False
GvDatos.Columns(2).Visible = False
GvDatos.Columns(3).Visible = False
GvDatos.Columns(4).Visible = False
DivLblSucursal.Visible = False
DivSucursal.Visible = False
DivLblMes.Visible = False
DivMes.Visible = False
DivLblMarca.Visible = False
DivMarca.Visible = False
End If
Dim ObjVentas As New ClsVentas
If ObjVentas.GetMetasVendedores(UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveMarca:=DdlMarca.SelectedValue.ToEntero(), Mes:=Mes, Anio:=Anio) Then
GvDatos.DataSource = ObjVentas.DtResultados
DtDatos = ObjVentas.DtResultados
If ObjVentas.GetMetasVendedores(UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), CveMarca:=DdlMarca.SelectedValue.ToEntero(), Mes:=Mes, Anio:=Anio) Then
DtDatos = ObjVentas.DtResultados.Copy()
GvDatos.DataSource = DtDatos
End If
ObjVentas.Dispose()
GvDatos.DataBind()
@@ -64,7 +79,13 @@ Partial Class CatMetasVendedores
End Sub
Private Sub CargaDatosModal()
Private Sub CargaDatosModal()
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Div1.Visible = True
Div2.Visible = True
Div3.Visible = True
End If
DdlVendedores.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
DdlVendedores.DataBind()
DdlVendedores.Items.Insert(0, New ListItem("Seleccionar", "-1"))
@@ -93,29 +114,50 @@ Partial Class CatMetasVendedores
Protected Sub BtnAgregarMetaVendedor_Click(sender As Object, e As EventArgs) Handles BtnAgregarMetaVendedor.Click
If DdlVendedores.SelectedValue.ToEntero > 0 AndAlso TxtFechaI.Text <> "" AndAlso DdlMarcas.SelectedValue.ToEntero > 0 AndAlso DdlClasificacionSup.SelectedValue.ToEntero > 0 Then
Dim CveVendedor As Integer = DdlVendedores.SelectedValue.ToEntero()
Dim Fecha As Date = MinFecha
Dim CveMarca As Integer = -1
Dim CveClasificacionSuperior As Integer = -1
Dim CveClasificacion As Integer = -1
Dim ObjVentas As New ClsVentas
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
If Not (DdlVendedores.SelectedValue.ToEntero > 0 AndAlso TxtFechaI.Text <> "" AndAlso DdlMarcas.SelectedValue.ToEntero > 0 AndAlso DdlClasificacionSup.SelectedValue.ToEntero > 0) Then
Alert(String.Format("Falta Seleccionar {0}{1}{2}", If(DdlVendedores.SelectedValue.ToEntero > 0, "", "Vendedor, "), If(DdlMarcas.SelectedValue.ToEntero > 0, "", "Marca, "), If(TxtFechaI.Text <> "", "", "Fecha, ")))
Exit Sub
End If
Fecha = TxtFechaI.Text.ToDate()
CveClasificacionSuperior = DdlClasificacionSup.SelectedValue.ToEntero
CveClasificacion = DdlClasificacion.SelectedValue.ToEntero
CveMarca = DdlMarca.SelectedValue.ToEntero
Else
If Not (DdlVendedores.SelectedValue.ToEntero > 0) Then
Alert("Falta Seleccionar el vendedor")
Exit Sub
End If
End If
Using ObjVentas As New ClsVentas
If BtnAgregarMetaVendedor.Text = "Agregar" Then
If ObjVentas.AddMetasVendedores(DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text.ToDate, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero,
TxtMetaImporte.Text.ToDecimal, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacionSup.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
If ObjVentas.AddMetasVendedores(CveVendedor, Fecha, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero, TxtMetaImporte.Text.ToDecimal, CveClasificacion, CveClasificacionSuperior, UsuarioActual.CveEmpresa) Then
Alert("Se agregó la meta al vendedor")
Else
Alert("No se pudo agregar la meta al vendedor", TipoMensaje.MsgError)
End If
ElseIf BtnAgregarMetaVendedor.Text = "Actualizar" Then
If ObjVentas.UpdateMetasVendedores(CveMetaVendedor, DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text, DdlMarcas.SelectedValue.ToEntero,
TxtMetaCantidad.Text.ToEntero, TxtMetaImporte.Text.ToDecimal, DdlClasificacion.SelectedValue.ToEntero,
DdlClasificacionSup.SelectedValue.ToEntero) Then
If ObjVentas.UpdateMetasVendedores(CveMetaVendedor, CveVendedor, Fecha.ToString("dd/MM/yyyy"), CveMarca, TxtMetaCantidad.Text.ToEntero, TxtMetaImporte.Text.ToDecimal, CveClasificacion, CveClasificacionSuperior) Then
Alert("Se actualizó la información de la meta del vendedor")
Else
Alert("No se pudo actualizar la meta del vendedor", TipoMensaje.MsgError)
End If
End If
Else
Alert(String.Format("Falta Seleccionar {0}{1}{2}", If(DdlVendedores.SelectedValue.ToEntero > 0, "", "Vendedor, "), If(DdlMarcas.SelectedValue.ToEntero > 0, "", "Marca, "), If(TxtFechaI.Text <> "", "", "Fecha, ")))
End If
End If
End Using
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
ResetDatosSeleccionadosModal()
CargaDatos()
UpDatos.Update()
@@ -135,12 +177,17 @@ Partial Class CatMetasVendedores
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
CveMetaVendedor = GvRow.DataKey("CveMeta").ToEntero
DdlVendedores.SelectedValue = GvRow.DataKey("CveVendedor")
TxtFechaI.Text = GvRow.DataKey("MesAño")
DdlClasificacionSup.SelectedValueExist(GvRow.DataKey("CveClasificacionSup"))
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
TxtFechaI.Text = GvRow.DataKey("MesAño")
DdlClasificacionSup.SelectedValueExist(GvRow.DataKey("CveClasificacionSup"))
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
DdlMarcas.SelectedValue = GvRow.DataKey("CveMarca")
End If
DdlMarcas.SelectedValue = GvRow.DataKey("CveMarca")
TxtMetaCantidad.Text = GvRow.DataKey("MetaCantidad")
TxtMetaImporte.Text = GvRow.DataKey("MetaImporte")
UpModalTiposD.Update()

View File

@@ -2569,7 +2569,8 @@
<div class="portlet-body ">
<asp:UpdatePanel ID="UpCuentasBancos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvBancosCuentas" GridLines="None" BorderColor="#D3D3D3" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-sort="true" runat="server" DataKeyNames="CveCuentaDeposito,BancoNombre,Sucursal,Cuenta,CLABE,SWIFT,Plaza,CIE,Referencia,CveMoneda,Estatus,EstatusTexto" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias">
<asp:GridView ID="GvBancosCuentas" GridLines="None" BorderColor="#D3D3D3" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-sort="true" runat="server"
DataKeyNames="CveCuentaDeposito,BancoNombre,Sucursal,Cuenta,CLABE,SWIFT,Plaza,CIE,Referencia,CveMoneda,Estatus,EstatusTexto,CveSATBanco" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Cuentas Bancarias">
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Banco" ItemStyle-CssClass="Excede">
<ItemTemplate>
@@ -6028,53 +6029,103 @@
<h4 class="modal-title" id="H2" runat="server">Cuenta Bancaria</h4>
</div>
<div class="modal-body">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNombreBanco" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNombreBanco" runat="server" ControlToValidate="TxtNombreBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENombreBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombreBanco" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtNombreBanco.ClientID.ToString()%>">Nombre del Banco:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumeroSucursal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtNumeroSucursal.ClientID.ToString()%>">Numero de la Sucursal:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumeroCuenta2" runat="server" CssClass="form-control" CausesValidation="true" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtNumeroCuenta2" FilterType="Numbers" />
<label for="<%= TxtNumeroCuenta2.ClientID.ToString()%>">Numero de Cuenta:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCLABE" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="18" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtCLABE" FilterType="Numbers" />
<label for="<%= TxtCLABE.ClientID.ToString()%>">CLABE:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtSWIFT" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtSWIFT.ClientID.ToString()%>">SWIFT:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPlaza" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtPlaza.ClientID.ToString()%>">Plaza:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConvenioCIE2" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="8" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtConvenioCIE2.ClientID.ToString()%>">CIE:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtReferencia2" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros33" runat="server" TargetControlID="TxtReferencia2" FilterType="Numbers" />
<label for="<%= TxtReferencia2.ClientID.ToString()%>">Referencia:</label>
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVDdlSatBanco" visible="true">
<asp:DropDownList CssClass="form-control select2me" Width="50%" ID="DdlSatBanco" runat="server" DataTextField="Banco" DataValueField="CveSATBanco">
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVDdlSatBanco" runat="server" InitialValue="-1" ControlToValidate="DdlSatBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCRFVDdlSatBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSatBanco" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlSatBanco.ClientID.ToString()%>">Banco:</label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList CssClass="form-control select2me" Width="50%" ID="DdlMoneda" runat="server" DataTextField="Moneda" DataValueField="CveMoneda"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" InitialValue="-1" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco" TargetControlID="RFVMoneda" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlMoneda.ClientID.ToString()%>">Moneda:</label>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNombreBanco" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVNombreBanco" runat="server" ControlToValidate="TxtNombreBanco" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banco''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCENombreBanco" runat="server" HighlightCssClass="vco" TargetControlID="RFVNombreBanco" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtNombreBanco.ClientID.ToString()%>">Nombre del Banco:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumeroSucursal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtNumeroSucursal.ClientID.ToString()%>">Numero de la Sucursal:</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input input-iconright" id="divestatus" runat="server">
<asp:CheckBox ID="ChkEstatus2" runat="server"></asp:CheckBox>
<label for="<%= ChkEstatus2.ClientID.ToString()%>">Estatus:</label>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtNumeroCuenta2" runat="server" CssClass="form-control" CausesValidation="true" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtNumeroCuenta2" FilterType="Numbers" />
<label for="<%= TxtNumeroCuenta2.ClientID.ToString()%>">Numero de Cuenta:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCLABE" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="18" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtCLABE" FilterType="Numbers" />
<label for="<%= TxtCLABE.ClientID.ToString()%>">CLABE:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtSWIFT" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtSWIFT.ClientID.ToString()%>">SWIFT:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtPlaza" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="100" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtPlaza.ClientID.ToString()%>">Plaza:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtConvenioCIE2" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="8" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<label for="<%= TxtConvenioCIE2.ClientID.ToString()%>">CIE:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtReferencia2" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20" ValidationGroup="GrpAgregarBanco"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros33" runat="server" TargetControlID="TxtReferencia2" FilterType="Numbers" />
<label for="<%= TxtReferencia2.ClientID.ToString()%>">Referencia:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList CssClass="form-control select2me" Width="50%" ID="DdlMoneda" runat="server" DataTextField="Moneda" DataValueField="CveMoneda"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" InitialValue="-1" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco" TargetControlID="RFVMoneda" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlMoneda.ClientID.ToString()%>">Moneda:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" id="divestatus" runat="server">
<asp:CheckBox ID="ChkEstatus2" runat="server"></asp:CheckBox>
<label for="<%= ChkEstatus2.ClientID.ToString()%>">Estatus:</label>
</div>
</div>
</div>
</div>

View File

@@ -1268,8 +1268,6 @@ Partial Class Clientes
CargaMetodosPago()
CargaPrecioLista()
CargaVendedores()
'CargaCorporativo()
CargaMetodosPago33()
@@ -1278,12 +1276,30 @@ Partial Class Clientes
CargaClasificaciones()
DdlRegimenFiscal.DataSource = GlobalDTRegimenesFiscales
DdlRegimenFiscal.DataBind()
CargaCombosComercioExterior()
CargaBancosSAT()
CargaMonedas()
End Sub
Private Sub CargaBancosSAT()
Dim ObjBancos As New ClsBancos
If ObjBancos.GetBancosSAT Then
DdlSatBanco.DataSource = ObjBancos.DtResultados
End If
ObjBancos.Dispose()
DdlSatBanco.DataBind()
DdlSatBanco.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
End Sub
Private Sub CargaSubProyectos()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, Nothing, AplicaTodos:="Seleccione")
@@ -6790,14 +6806,16 @@ Partial Class Clientes
End If
ObjCuentasBancos.Dispose()
CargaPSGridCuentasBancos()
CargaMonedas()
CargaPSGridCuentasBancos()
End Sub
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
Dim EsBancomer As Boolean = False
If TxtNombreBanco.Text.ToUpper.Contains("BBVA") Or TxtNombreBanco.Text.ToUpper.Contains("BANCOMER") Or (TxtCLABE.Text.Length = 18 AndAlso TxtCLABE.Text.Substring(0, 3) = "012") Then
If TxtNombreBanco.Text.ToUpper.Contains("BBVA") Or TxtNombreBanco.Text.ToUpper.Contains("BANCOMER") Or
DdlSatBanco.SelectedItem.Text.ToUpper.Contains("BBVA") Or
DdlSatBanco.SelectedItem.Text.ToUpper.Contains("BANCOMER") Or (TxtCLABE.Text.Length = 18 AndAlso TxtCLABE.Text.Substring(0, 3) = "012") Then
EsBancomer = True
End If
@@ -6852,15 +6870,19 @@ Partial Class Clientes
Dim Estatus As Boolean
If ChkEstatus2.Checked = True Then Estatus = True Else Estatus = False
AgregarCuentaBanco(TxtNombreBanco.Text.Trim, TxtNumeroSucursal.Text.Trim, TxtCLABE.Text.Trim, TxtSWIFT.Text.Trim, TxtPlaza.Text.Trim, TxtNumeroCuenta2.Text.Trim, TxtConvenioCIE2.Text.Trim, TxtReferencia2.Text.Trim, "", DdlMoneda.SelectedValue.ToEntero(), DdlMoneda.SelectedItem.Text, Estatus)
AgregarCuentaBanco(TxtNombreBanco.Text.Trim, TxtNumeroSucursal.Text.Trim, TxtCLABE.Text.Trim, TxtSWIFT.Text.Trim, TxtPlaza.Text.Trim, TxtNumeroCuenta2.Text.Trim, TxtConvenioCIE2.Text.Trim, TxtReferencia2.Text.Trim, "",
DdlMoneda.SelectedValue.ToEntero(), DdlMoneda.SelectedItem.Text, Estatus, DdlSatBanco.SelectedValue.ToEntero)
End Sub
Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, RefCrediProveedor As String, CveMoneda As Integer, Moneda As String, Estatus As Boolean)
Private Sub AgregarCuentaBanco(NombreBanco As String, NumeroSucursal As String, CLABE As String, SWIFT As String, Plaza As String, NumeroCuenta As String, ConvenioCIE As String, Referencia As String, RefCrediProveedor As String,
CveMoneda As Integer, Moneda As String, Estatus As Boolean, CveSATBanco As Integer)
Dim ObjCuentasBancos As New ClsGenerales
If Modalidad = "A" Then
If CveCliente > 0 Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CveCliente:=CveCliente) Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CveCliente:=CveCliente, CveSATBanco:=CveSATBanco) Then
DTCuentasBancos.Clear()
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
@@ -6871,6 +6893,31 @@ Partial Class Clientes
Else
Dim Row As DataRow
If TempDTCuentasBancos Is Nothing Then
TempDTCuentasBancos = New DataTable
TempDTCuentasBancos.Columns.Add("CveCuentaDeposito", GetType(Integer))
TempDTCuentasBancos.Columns.Add("BancoNombre", GetType(String))
TempDTCuentasBancos.Columns.Add("Sucursal", GetType(String))
TempDTCuentasBancos.Columns.Add("CLABE", GetType(String))
TempDTCuentasBancos.Columns.Add("SWIFT", GetType(String))
TempDTCuentasBancos.Columns.Add("Plaza", GetType(String))
TempDTCuentasBancos.Columns.Add("Cuenta", GetType(String))
TempDTCuentasBancos.Columns.Add("CIE", GetType(String))
TempDTCuentasBancos.Columns.Add("Referencia", GetType(String))
TempDTCuentasBancos.Columns.Add("RefCrediProveedor", GetType(String))
TempDTCuentasBancos.Columns.Add("CveMoneda", GetType(Integer))
TempDTCuentasBancos.Columns.Add("Moneda", GetType(String))
TempDTCuentasBancos.Columns.Add("EstatusPagoElectronico", GetType(Integer))
TempDTCuentasBancos.Columns.Add("Estatus", GetType(String))
TempDTCuentasBancos.Columns.Add("CveSATBanco", GetType(Integer))
TempDTCuentasBancos.Columns.Add("EstatusTexto", GetType(String))
End If
Row = TempDTCuentasBancos.NewRow
Row("BancoNombre") = NombreBanco
@@ -6886,6 +6933,7 @@ Partial Class Clientes
Row("Moneda") = Moneda
Row("EstatusPagoElectronico") = 0
Row("Estatus") = "True"
Row("CveSATBanco") = CveSATBanco
TempDTCuentasBancos.Rows.Add(Row)
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
@@ -6896,7 +6944,8 @@ Partial Class Clientes
If CveCliente > 0 Then
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, Estatus, CveMoneda, UsuarioActual.CveEmpresa) Then
If ObjCuentasBancos.UpdateCuentasDepositos(GvBancosCuentas.DataKeys(CveCuentaBancaria)("CveCuentaDeposito").ToString().ToEntero(), NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", False, Estatus, CveMoneda, UsuarioActual.CveEmpresa,
CveSATBanco:=CveSATBanco) Then
DTCuentasBancos.Clear()
CargaCuentasBancarias()
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
@@ -6920,6 +6969,7 @@ Partial Class Clientes
Row("CveMoneda") = CveMoneda
Row("Moneda") = Moneda
Row("Estatus") = Estatus
Row("CveSATBanco") = CveSATBanco
TempDTCuentasBancos.AcceptChanges()
Alert("Cuenta actualizada con éxito.", TipoMensaje.MsgInformacion)
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAddCuentasBancarias"))
@@ -6932,6 +6982,7 @@ Partial Class Clientes
RecargaGlobalCuentasBancarias()
End Sub
Private Sub LimpiaCuentasBancarias()
DdlSatBanco.SelectedValueExist(-1)
TxtNombreBanco.Text = ""
TxtNumeroSucursal.Text = ""
TxtCLABE.Text = ""
@@ -7014,7 +7065,8 @@ Partial Class Clientes
End Sub
Private Sub LnkCuentasBancarias_Click(sender As Object, e As EventArgs) Handles LnkCuentasBancarias.Click
Modalidad = "A"
Modalidad = "A"
DdlSatBanco.SelectedValueExist(-1)
TxtNombreBanco.Text = ""
LbAgregarCuentaBanco.Text = "Agregar"
TxtNumeroSucursal.Text = ""
@@ -7033,6 +7085,9 @@ Partial Class Clientes
Public Sub Edit_Click2(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
DdlSatBanco.SelectedValueExist(GvRow.DataKey("CveSATBanco"))
TxtNombreBanco.Text = GvRow.DataKey("BancoNombre")
Modalidad = "U"
LbAgregarCuentaBanco.Text = "Actualizar"

View File

@@ -1330,13 +1330,15 @@ Partial Class Ventas_ClientesAbonar
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso TxtAnticipo.Text.ToDecimal > 0 AndAlso MsgError = "" Then '' si es empresa GDiaz
'generar un anticipo y registrarle el pago.
Dim tCveMoneda As Integer = 1
Dim tCveMoneda As Integer = Me.CveMoneda
Dim tCveFormaPago As Integer = GlobalDTTipoTransacciones().FiltroPrimeroValor("CveFormaPago", $"CveTipoTransaccion={DdlTipoTransaccion.SelectedValue}").ToEntero
Dim tCvePS As Integer
Dim tCveUM As Integer = 0
Dim tCveSub As Integer = DdlSubProyectos.SelectedValue.ToEntero
ObjFacturaAnt = Modelos.Factura.CrearVentaNueva(UsuarioActual, tCveSub, CveCliente, tCveMoneda, "Ant")
ObjFacturaAnt.CveMoneda = tCveMoneda
ObjFacturaAnt.TipoCambio = If(tCveMoneda = 1, 1, TxtTCDolares.Text.ToDecimal())
ObjFacturaAnt.TipoCambioDolares = If(tCveMoneda = 1, 1, TxtTCDolares.Text.ToDecimal())
ObjFacturaAnt.CveFormaPago = tCveFormaPago
ObjFacturaAnt.CveMetodoPago = 1
ObjFacturaAnt.ClaveMetodoPagoSAT = "PUE"
@@ -1355,7 +1357,7 @@ Partial Class Ventas_ClientesAbonar
RespAnt = ObjFacturaAnt.EmitirFactura(False, Transac:=ObjMov.IniciaTransacSQL(), Modulo:="Ventas/ClientesAbonarAnt", MostrarURL:=True)
RespAnt.Factura = ObjFacturaAnt
If RespAnt IsNot Nothing AndAlso RespAnt.Factura IsNot Nothing Then
If RespAnt IsNot Nothing AndAlso RespAnt.Factura IsNot Nothing AndAlso RespAnt.Factura.CveVenta > 0 Then
Dim VentaActual As New Venta(UsuarioActual)
VentaActual.CveVenta = RespAnt.Factura.CveVenta
@@ -1365,7 +1367,7 @@ Partial Class Ventas_ClientesAbonar
VentaActual.TipoDocto = "Ant"
VentaActual.SerieFolio = RespAnt.Factura.SerieFolio
VentaActual.ClienteNombre = NombreComercial
VentaActual.TC = 1
VentaActual.TC = If(tCveMoneda = 1, 1, TxtTCDolares.Text.ToDecimal())
VentaActual.Total = TxtAnticipo.Text.ToDecimal
VentaActual.IVA = (tPorIVA * tPU).RoundSQL(2)
@@ -1381,6 +1383,8 @@ Partial Class Ventas_ClientesAbonar
Pago.ImportePagoVenta = TxtAnticipo.Text.ToDecimal
Pago.Referencia = TxtFolio.Text
Pago.TipoPago = "XXX"
Pago.TCPago = If(tCveMoneda = 1, 1, TxtTCDolares.Text.ToDecimal())
'If RblTipoPago.SelectedValue = "3" Then
' Pago.TipoPago = "I"
' Pago.FechaDocumentoRelacionado = FechaIngreso
@@ -1390,6 +1394,8 @@ Partial Class Ventas_ClientesAbonar
If MsgError = "" AndAlso AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjMov) Then
MsgError = "No se pudo insertar la póliza"
End If
Else
MsgError = "Ocurrió un error al generar el anticipo"
End If
End If

View File

@@ -8482,6 +8482,9 @@ Partial Class PV
Case "MOTOBATERIA"
'20517 MOTOBATERIAS
ListaClasificacionesPermitidas.Add(20517) 'MOTOBATERIAS
Case "AUXILIAR"
'30043 AUXILIAR
ListaClasificacionesPermitidas.Add(30043) 'AUXILIAR
End Select
If ListaClasificacionesPermitidas.Contains(CveClasificacionPS) Then

View File

@@ -443,6 +443,8 @@
<asp:BoundField HeaderText="O.C Kg" DataField="OC_Kilogramos" ItemStyle-Width="5%" Visible="false" />
<%--22--%>
<asp:BoundField HeaderText="O.C Cantidad" DataField="OC_Cantidad" ItemStyle-Width="5%" Visible="false" />
<%--23--%>
<asp:BoundField HeaderText="Último Costo" DataField="UltimoCosto" ItemStyle-Width="5%" Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
</Columns>
<RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" />
@@ -467,43 +469,45 @@
<tbody>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkObs" runat="server" Text="Observaciones" /></td>
<asp:CheckBox ID="ChkObs" runat="server" Text="&nbsp; Observaciones" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkSucEjec" runat="server" Text="Sucursal Ejecución" /></td>
<asp:CheckBox ID="ChkSucEjec" runat="server" Text="&nbsp; Sucursal Ejecución" /></td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkSucCob" runat="server" Text="Sucursal Cobranza" /></td>
<asp:CheckBox ID="ChkSucCob" runat="server" Text="&nbsp; Sucursal Cobranza" /></td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkRFC" runat="server" Text="RFC" />
<asp:CheckBox ID="ChkRFC" runat="server" Text="&nbsp; RFC" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMetodoPago" runat="server" Text="Método de Pago" />
<asp:CheckBox ID="ChkMetodoPago" runat="server" Text="&nbsp; Método de Pago" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkFormaPago" runat="server" Text="Forma de Pago" />
<asp:CheckBox ID="ChkFormaPago" runat="server" Text="&nbsp; Forma de Pago" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkOC_noOrden" runat="server" Text="O.C." />
<asp:CheckBox ID="ChkOC_noOrden" runat="server" Text="&nbsp; O.C." />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkOC_Kilogramos" runat="server" Text="O.C. Kilogramos" />
<asp:CheckBox ID="ChkOC_Kilogramos" runat="server" Text="&nbsp; O.C. Kilogramos" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text="O.C. Cantidad" />
<asp:CheckBox ID="ChkOC_Cantidad" runat="server" Text="&nbsp; O.C. Cantidad" />
</td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkFechaHoraEmision" runat="server" Text="Fecha Hora de Emisión" />
<asp:CheckBox ID="ChkFechaHoraEmision" runat="server" Text="&nbsp; Fecha Hora de Emisión" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkNumTurnos" runat="server" Text="Número de turnos" Visible="false" />
<asp:CheckBox ID="ChkNumTurnos" runat="server" Text="&nbsp; Número de turnos" Visible="false" />
</td>
<td style="text-align: left;">
<asp:CheckBox ID="ChkUltimoCosto" runat="server" Visible="true" Text="&nbsp; Último Costo" /></td>
</td>
<td style="text-align: left;"></td>
</tr>
</tbody>
</table>

View File

@@ -558,7 +558,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
GvDatos.Columns(20).Visible = ChkOC_noOrden.Checked
GvDatos.Columns(21).Visible = ChkOC_Kilogramos.Checked
GvDatos.Columns(22).Visible = ChkOC_Cantidad.Checked
GvDatos.Columns(23).Visible = ChkUltimoCosto.Checked
CargaDatos()

View File

@@ -4330,20 +4330,20 @@
<td>
<div class="row">
<div class="col-md-2">
Kilometraje&nbsp;
Kilometraje&nbsp;
<asp:TextBox ID="TxtKilometraje" runat="server" Width="65px" CssClass="form-control input-sm" MaxLength="6" CausesValidation="true" Text="000000"></asp:TextBox>
<asp:RegularExpressionValidator ID="REVKilometraje" runat="server" ControlToValidate="TxtKilometraje" ValidationExpression="^\d{4,6}$" ErrorMessage="Debe tener entre 4 y 6 dígitos numéricos." Display="Dynamic" ForeColor="Red" />
<%--<ajax:MaskedEditExtender ID="MEEKilometraje" runat="server" TargetControlID="TxtKilometraje" ClearMaskOnLostFocus="false" MaskType="Number" Mask="999999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>--%>
<asp:RegularExpressionValidator ID="REVKilometraje" runat="server" ControlToValidate="TxtKilometraje" ValidationExpression="^\d{4,6}$" ErrorMessage="Debe tener entre 4 y 6 dígitos numéricos." Display="Dynamic" ForeColor="Red" />
<%--<ajax:MaskedEditExtender ID="MEEKilometraje" runat="server" TargetControlID="TxtKilometraje" ClearMaskOnLostFocus="false" MaskType="Number" Mask="999999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>--%>
</div>
<div class="col-md-5">
Próxima Rotación y Balanceo:<br />
<asp:Label runat="server" ID="LblRotacion" Text=""></asp:Label>
<asp:Label runat="server" ID="LblRotacion" Text=""></asp:Label>
</div>
<div class="col-md-5">
Próxima Alineación:<br />
<asp:Label runat="server" ID="LblAlineacion" Text=""></asp:Label>
<asp:Label runat="server" ID="LblAlineacion" Text=""></asp:Label>
</div>
</div>
</div>
</td>
</tr>
<tr align="left" id="trCorreoNotif1" runat="server" visible="false">
@@ -8226,7 +8226,7 @@
<label>Descripción:</label>
</div>
<div class="col-md-10">
<asp:TextBox ID="TxtMotivoCancelacion" runat="server" Height="100" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500" Rows="3"></asp:TextBox>
<asp:TextBox ID="TxtMotivoCancelacion" runat="server" Width="100%" TextMode="MultiLine" CausesValidation="true" MaxLength="500" Rows="3"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVDescripcionCancelacion" runat="server" CssClass="help-block errorimput" Display="Dynamic" ControlToValidate="TxtMotivoCancelacion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalCancelarDocumento"></asp:RequiredFieldValidator>
</div>
</div>
@@ -8254,6 +8254,11 @@
<asp:CheckBox ID="ChkDevAlm" AutoPostBack="true" runat="server" OnCheckedChanged="ChkDevAlm_CheckedChanged" /><asp:Label ID="LblDevAlm" Text="Devolución Almacen" runat="server"></asp:Label>
</h5>
</div>
<div id="DivCancelarEgs" runat="server" visible="false">
<h5>
<asp:CheckBox ID="ChkCancelarNC" runat="server" Checked="false"/><asp:Label ID="Label4" Text="Cancelar Nota de crédito" runat="server"></asp:Label>
</h5>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel ID="UpFooterCancelarRemision" runat="server" UpdateMode="Conditional">

View File

@@ -16245,8 +16245,16 @@ Partial Class Ventas
importeMovimiento = 0
Case 103 'Descuento
If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso
(DdlTipoAmortizacionAnticipo.SelectedValue = "-1" OrElse UsuarioActual.CveEmpresa.Contiene(140, 141, 190, 192)) Then
Dim AplicaDescuento As Boolean = ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso
(DdlTipoAmortizacionAnticipo.SelectedValue = "-1" OrElse UsuarioActual.CveEmpresa.Contiene(140, 141, 190, 192))
'SI SE AMORTIZO CON DESCUENTO, NO APLICAR EL CONCEPTO
If AplicaDescuento AndAlso ObjFactura.CveTipoAmortizacionAnticipo = 1 Then
AplicaDescuento = False
End If
If AplicaDescuento Then
importeMovimiento = ObjFactura.Descuento * Multiplicador * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador * ValorMultiplicador
@@ -17494,7 +17502,7 @@ Partial Class Ventas
End If
'AGREGAR LOS ANTICIPOS, DEV, IxC QUE ESTEN EN PUBLICO GENERAL
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing AndAlso UsuarioActual.CveEmpresa.Contiene(189, 190, 192, 195, 197) Then
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing AndAlso UsuarioActual.CveEmpresa.Contiene(190, 192, 195, 197) Then
Dim CveClientePublicoGeneral = UsuarioActual.Empresa.Funcionalidad(714).ToEntero()
If CveClientePublicoGeneral > 0 Then
If CveCliente <> CveClientePublicoGeneral Then
@@ -17509,14 +17517,14 @@ Partial Class Ventas
ObjMovtos.Dispose()
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 AND Tipo <> 'RNC' {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
DtMovtos = DtMovtos.FiltraParametros($"{If(CveVenta < 0, $"Tipo = 'Ant'{If(DdlTipoComprobante.SelectedValue = "Ing", $" AND CveMoneda ={DdlMoneda.SelectedValue.ToEntero()}", "")} ", "")}")
End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
DtMovtos = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('RNC','IxC','Ant') {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")} ", "")}")
DtMovtos = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('IxC','Ant') {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")} ", "")}")
End If
GVAnticipos.DataSource = DtMovtos
@@ -17755,7 +17763,7 @@ Partial Class Ventas
DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "CveEstatusFactura", .DataType = GetType(Integer), .DefaultValue = -1})
DtVentasNC.Columns.Add(New DataColumn With {.ColumnName = "Folio", .DataType = GetType(String), .DefaultValue = ""})
DtVentasNC.Rows.Add(Venta.CveVenta, Total, "")
DtVentasNC.Rows.Add(Venta.CveVenta, Total, LblFolioFiscal.Text.Trim())
ObjNC.DtVentasNC = DtVentasNC
@@ -17808,11 +17816,12 @@ Partial Class Ventas
ObjNC.CveUsoCFDI = Venta.CveUsoCFDI
ObjNC.CveVendedor = CveVendedor
ObjNC.CveTipoRelacion = 7
ObjNC.CveVentaPadre = Venta.CveVenta
ObjNC.PreparaTimbre()
AjustarTimbreNC(ObjNC)
Retorno = ObjNC.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Cobranza/GuardarVenta", MostrarURL:=True)
Retorno = ObjNC.EmitirFactura(False, Transac:=ObjVentas.IniciaTransacSQL(), Modulo:="Vta/NC/GuardarVenta", MostrarURL:=True)
Retorno.Factura = ObjNC
If Retorno IsNot Nothing AndAlso Retorno.CveVenta > 0 Then
@@ -23254,7 +23263,7 @@ Partial Class Ventas
If CveMovimientoInventario > 0 Then
'Agregamos los detalles
For Each MovDet As DataRow In DtMovDetalle.FiltraParametros("CantidadDisponible > 0").Rows
For Each MovDet As DataRow In DtMovDetalle.Rows
Dim Cantidad As Decimal = 0
Dim CantidadRemision As Decimal = DtRemisionesTmpDT.FiltroPrimeroValor("Cantidad", $"CveVentaDetalleRemision={MovDet("CveVentaDetalle").ToString()}").ToDecimal
@@ -25367,7 +25376,7 @@ Partial Class Ventas
End If
TxtImporteContado.Text = TxtTotal.Text
'SI ES MODALIDAD COBRANZA, NO MOSTRAR
If (UsuarioActual.Empresa.Funcionalidad(109) = "1") Then
If (UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.CveEmpresa = 197) Then
DivContado.Visible = UsuarioActual.TienePermisoProceso(375)
End If
End If
@@ -25884,7 +25893,7 @@ Partial Class Ventas
Dim TienePagos As Boolean = ((Not (DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0)) AndAlso (DtPagos IsNot Nothing AndAlso DtPagos.Rows.Count > 0)) OrElse AmortizacionNC > 0
'SI LA VENTA ES NUEVA VALIDAR TAMBIEN LOS PAGOS DE CONTADO
If (UsuarioActual.Empresa.Funcionalidad(558) = "1" OrElse UsuarioActual.CveEmpresa = 197) AndAlso ((CveVenta <= 0 OrElse EsCreaApartirDe OrElse TipoDoctoViejo = "Cot") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant")) Then
If (UsuarioActual.Empresa.Funcionalidad(558) = "1") AndAlso ((CveVenta <= 0 OrElse EsCreaApartirDe OrElse TipoDoctoViejo = "Cot") AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ant")) Then
If Not PermiteCredito AndAlso Not TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
If MostrarAlertas Then
@@ -27412,7 +27421,7 @@ Partial Class Ventas
End If
If Extra.Trim().Length > 0 Then
SbCondiciones.AppendFormat("<br><b>*{0}</b>", Extra)
SbCondiciones.AppendFormat("{0}", Extra)
End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
@@ -27439,6 +27448,29 @@ Partial Class Ventas
Private Sub LbCancelarDocumento_Click(sender As Object, e As EventArgs) Handles LbCancelarDocumento.Click
Dim SaldoAlmacen As Decimal = 0
If DdlTipoComprobante.SelectedValue = "Ing" Then
Dim DtNCCancelar As DataTable = Nothing
Dim ObjVta As New ClsVentas
If ObjVta.GetVentasAntNC(CveVenta, -1) Then
DtNCCancelar = (
From row In ObjVta.DtResultados.AsEnumerable()
Where row("TipoDocto").ToString() = "Egs" AndAlso row("CveTipoRelacion").ToString() = "7"
Group row By categoria = row.Field(Of Integer)("CveVenta") Into grupo = Group
Select New With {
.CveVenta = categoria,
.Total = grupo.Sum(Function(r) r.Field(Of Decimal)("Importe"))
}
).QueryToDataTable(True)
End If
ObjVta.Dispose()
If DtNCCancelar IsNot Nothing AndAlso DtNCCancelar.FiltraParametros("Total > 0").Rows.Count > 0 Then
DivCancelarEgs.Visible = True
ChkCancelarNC.Checked = True
End If
End If
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Dev", "Ped") Then
Dim PermiteCancelar As Boolean = True
@@ -27947,8 +27979,81 @@ Partial Class Ventas
CveEstatusFacturaAsignado = 4
End If
resp = ObjFacturaCancelacion.CancelarFactura(If(ChkDevAlm.Checked, 1, 0), ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion, ForzarDevolucion:=GenerarDevolucionAnticipada, CancelacionPagos:=CancelacionPagos, ValidarSAT:=ValidarSAT, CveEstatusFacturaAsignado:=CveEstatusFacturaAsignado)
Dim SbNC As New StringBuilder
Dim ErrorCancelacionNC As Boolean = False
Dim SbNCError As New StringBuilder
If ObjFacturaCancelacion.TipoDocto = "Ing" AndAlso ChkCancelarNC.Checked Then
'NO CANCELAR EL PAGO EN LA CANCELACION DE LA FACTURA, SI NO DESDE LA CANCELACION DESDE LA NC
CancelacionPagos = OpcionesCancelacionPagos.SinPagos
Dim DtNCCancelar As DataTable = Nothing
Dim ObjVta As New ClsVentas
If ObjVta.GetVentasAntNC(CveVenta, -1) Then
DtNCCancelar = (
From row In ObjVta.DtResultados.AsEnumerable()
Where row("TipoDocto").ToString() = "Egs" AndAlso row("CveTipoRelacion").ToString() = "7"
Group row By categoria = row.Field(Of Integer)("CveVenta") Into grupo = Group
Select New With {
.CveVenta = categoria,
.Total = grupo.Sum(Function(r) r.Field(Of Decimal)("Importe"))
}
).QueryToDataTable(True)
End If
ObjVta.Dispose()
If DtNCCancelar IsNot Nothing Then
For Each RowVta As DataRow In DtNCCancelar.FiltraParametros("Total > 0").Rows
Dim ObjNCCancelacion As New Modelos.Factura(UsuarioActual, RowVta("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa, EsCancelacion:=True, VerificaAlmacen:=False)
ObjNCCancelacion.CveDevolucion = ObjFacturaCancelacion.CveVenta
If ObjNCCancelacion IsNot Nothing Then
Dim respNC = ObjNCCancelacion.CancelarFactura(RealizarDevolucionAlmacen:=0, ValidarSAT:=ValidarSAT)
If respNC IsNot Nothing Then
If respNC.HuboError Then
SbNCError.Append(respNC.Mensaje)
ErrorCancelacionNC = True
Exit For
Else
SbNC.AppendFormat(" - <b>{0}</b>", ObjNCCancelacion.SerieFolio)
End If
End If
End If
Next
If Not ErrorCancelacionNC Then
Using ObjV As New ClsVentas
If ObjV.GetVenta(ObjFacturaCancelacion.CveVenta, UsuarioActual.CveEmpresa) Then
Dim DbRowVenta As DataRow = ObjV.DtResultados.FiltroPrimero("")
If DbRowVenta IsNot Nothing Then
ObjFacturaCancelacion.Pagado = DbRowVenta("Pagado").ToString().ToDecimal()
ObjFacturaCancelacion.Saldo = DbRowVenta("Saldo").ToString().ToDecimal()
End If
End If
End Using
End If
End If
End If
If Not ErrorCancelacionNC Then
resp = ObjFacturaCancelacion.CancelarFactura(If(ChkDevAlm.Checked, 1, 0), ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion, ForzarDevolucion:=GenerarDevolucionAnticipada, CancelacionPagos:=CancelacionPagos, ValidarSAT:=ValidarSAT, CveEstatusFacturaAsignado:=CveEstatusFacturaAsignado)
Else
resp = New Modelos.Factura.MCancelacionVentaMensaje()
resp.HuboError = True
resp.Mensaje = "No se pudo cancelar la factura"
End If
strMensaje.Append(resp.Mensaje)
If ChkCancelarNC.Checked Then
strMensaje.AppendFormat("<br/>{0}", If(ErrorCancelacionNC, $"Ocurrió un error al cancelar las NC relacionadas. <br/> {SbNCError.ToString()}", $"Se cancelaron las siguientes notas de crédito. <br/> {SbNC.ToString()}"))
End If
Dim DtBonificaciones As DataTable = Nothing
'SI ES RNC DE CARGO DEBE CANCELAR LAS BON