Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -22,6 +22,8 @@ Public Class ClsClasificaciones
|
||||
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"
|
||||
@@ -47,6 +49,7 @@ Public Class ClsClasificaciones
|
||||
Else
|
||||
SqlConexion = TransaccionCompartida.Connection
|
||||
SqlTransacc = TransaccionCompartida
|
||||
EsTransaccionCompartida = True
|
||||
End If
|
||||
|
||||
SqlCommand = New SqlCommand("", SqlConexion)
|
||||
@@ -67,7 +70,7 @@ Public Class ClsClasificaciones
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
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
|
||||
|
||||
@@ -1506,7 +1506,7 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito As Integer, EstatusPagoElectronicoGrupos As Boolean) As Boolean
|
||||
Public Function UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito As Integer, EstatusPagoElectronicoGrupos As Boolean, CveSATBanco As Integer, BBVAAlias As String) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1515,6 +1515,8 @@ Public Class ClsGenerales
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCuentaDeposito", SqlDbType.VarChar).Value = CveCuentaDeposito
|
||||
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
|
||||
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
|
||||
.Add("@BBVAAlias", SqlDbType.VarChar).Value = BBVAAlias
|
||||
End With
|
||||
|
||||
|
||||
@@ -2724,7 +2726,8 @@ Public Class ClsGenerales
|
||||
|
||||
Public Function GetPaqueteriasGuias(CvePaqueteriaGuia As Integer, CvePaqueteriaGuiaTipo As Integer, CvePaqueteria As Integer, CveEstatus As Integer, CveSubProyecto As Integer,
|
||||
CveEmpresa As Integer, Guia As String, FechaInicio As String, FechaFin As String, Optional FechaIngInicio As String = "-1",
|
||||
Optional FechaIngFin As String = "-1", Optional Filtro As Integer = -1, Optional CveUsuarioEntrega As Integer = -1) As Boolean
|
||||
Optional FechaIngFin As String = "-1", Optional Filtro As Integer = -1, Optional CveUsuarioEntrega As Integer = -1,
|
||||
Optional EsEntregaInterna As Boolean = False) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -2744,6 +2747,7 @@ Public Class ClsGenerales
|
||||
.Add("@FechaIngFin", SqlDbType.VarChar).Value = FechaIngFin
|
||||
.Add("@Filtro", SqlDbType.Int).Value = Filtro
|
||||
.Add("@CveUsuarioEntrega", SqlDbType.Int).Value = CveUsuarioEntrega
|
||||
.Add("@EsEntregaInterna", SqlDbType.Bit).Value = EsEntregaInterna
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -2833,7 +2837,7 @@ Public Class ClsGenerales
|
||||
DataAdapter("PA_Gral_AsignarEntregasPorRealizar")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePaqueteriaGuia", SqlDbType.Int).Value = CvePaqueteriaGuia
|
||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||
.Add("@CveUsuarioAsignado", SqlDbType.Int).Value = CvePersonal
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -542,7 +542,10 @@ Public Class ClsMovimientos
|
||||
End With
|
||||
|
||||
|
||||
|
||||
Try
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
|
||||
@@ -1730,7 +1730,7 @@ Public Class ClsPaginas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1) As DataTable
|
||||
Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1, Optional CveAlmacen As Integer = -1) As DataTable
|
||||
Get
|
||||
|
||||
Dim Str As New StringBuilder
|
||||
@@ -1738,6 +1738,7 @@ Public Class ClsPaginas
|
||||
If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
|
||||
If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen)
|
||||
If CveEstatus > 0 Then Str.AppendFormat("AND CveEstatus = {0}", CveEstatus)
|
||||
If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTAlmacen = Dv.ToTable
|
||||
|
||||
@@ -19,6 +19,7 @@ Public Class ClsUnidadesMedida
|
||||
Private disposedValue As Boolean = False
|
||||
'PARA REGISTRAR CONEXION
|
||||
Private CveConexion As Integer = 0
|
||||
Private EsTransaccionCompartida As Boolean = False
|
||||
#End Region
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -69,6 +70,7 @@ Public Class ClsUnidadesMedida
|
||||
Else
|
||||
SqlConexion = TransaccionCompartida.Connection
|
||||
SqlTransacc = TransaccionCompartida
|
||||
EsTransaccionCompartida = True
|
||||
End If
|
||||
|
||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||
@@ -86,7 +88,7 @@ Public Class ClsUnidadesMedida
|
||||
#Region "Conexiones"
|
||||
|
||||
Private Sub ConexionAdd()
|
||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||
|
||||
Try
|
||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||
|
||||
@@ -341,7 +341,7 @@ Public Class ClsVentas
|
||||
Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0,
|
||||
Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1,
|
||||
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||
Optional CorreoNotificacion As String = "") As Boolean
|
||||
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_VentasAdd")
|
||||
@@ -431,6 +431,7 @@ Public Class ClsVentas
|
||||
.Add("@EsAmortizacion", SqlDbType.Bit).Value = EsAmortizacion
|
||||
.Add("@CveTipoRetencion", SqlDbType.TinyInt).Value = CveTipoRetencion
|
||||
.Add("@CorreoNotificacion", SqlDbType.VarChar).Value = CorreoNotificacion
|
||||
.Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
|
||||
179
App_Code/Thalamus.vb
Normal file
179
App_Code/Thalamus.vb
Normal file
@@ -0,0 +1,179 @@
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Web
|
||||
Imports System.Web.Services
|
||||
Imports System.Web.Services.Protocols
|
||||
Imports Extensiones.ModExtensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports System.Data
|
||||
|
||||
' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
|
||||
' <System.Web.Script.Services.ScriptService()> _
|
||||
<WebService(Namespace:="http://ADSistemas.mx/")>
|
||||
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Public Class Thalamus
|
||||
Inherits System.Web.Services.WebService
|
||||
|
||||
<WebMethod()>
|
||||
Public Function GenerarArchivos(CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim RutaArchivoVentas As String = $"C:\Temp\Ventas{Now.ToString("yyyyMMdd")}.xlsx"
|
||||
|
||||
Dim DTVentas As New DataTable
|
||||
DTVentas.Columns.Add("systemId")
|
||||
DTVentas.Columns.Add("Branch")
|
||||
DTVentas.Columns.Add("Code")
|
||||
DTVentas.Columns.Add("Sale Date")
|
||||
DTVentas.Columns.Add("Quantity")
|
||||
DTVentas.Columns.Add("Amount")
|
||||
DTVentas.Columns.Add("Transaction ID")
|
||||
|
||||
|
||||
For x = 0 To 50
|
||||
Dim dr As DataRow = DTVentas.NewRow
|
||||
|
||||
dr(0) = $"systemId {x}"
|
||||
dr(1) = $"Branch {x}"
|
||||
dr(2) = $"{x}"
|
||||
dr(3) = $"{Now.ToString("yyyy-MM-dd")}"
|
||||
dr(4) = $"{x}"
|
||||
dr(5) = $"{x}.00"
|
||||
dr(6) = $"{x}"
|
||||
|
||||
DTVentas.Rows.Add(dr)
|
||||
|
||||
Next
|
||||
|
||||
SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet())
|
||||
|
||||
Dim workbook = New ExcelFile
|
||||
Dim worksheet = workbook.Worksheets.Add("Ventas")
|
||||
|
||||
worksheet.InsertDataTable(DTVentas,
|
||||
New InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
.StartRow = 0
|
||||
})
|
||||
|
||||
workbook.Save(RutaArchivoVentas)
|
||||
|
||||
Dim FTPServer As String = "ftp://127.0.0.1/"
|
||||
Dim TFPUsr As String = "Toor"
|
||||
Dim FTPPass As String = "agj-3500"
|
||||
|
||||
|
||||
Dim FInfo As New FileInfo(RutaArchivoVentas)
|
||||
|
||||
|
||||
Dim Carga As Boolean = CargarArchivos(FInfo.FullName, FTPServer, TFPUsr, FTPPass)
|
||||
If Carga Then
|
||||
Carga = VerificarArchivo(FInfo.Name, FInfo.Length, FTPServer, TFPUsr, FTPPass)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Return Carga
|
||||
|
||||
End Function
|
||||
|
||||
Private Function CargarArchivos(RutaArchivo As String, FTPServer As String, FTPUsr As String, FTPPass As String) As Boolean
|
||||
|
||||
Dim Respuesta As Boolean
|
||||
|
||||
Dim FInfo As New FileInfo(RutaArchivo)
|
||||
|
||||
If FInfo.Exists Then
|
||||
|
||||
Dim request As FtpWebRequest = DirectCast(WebRequest.Create($"{FTPServer}/{FInfo.Name}"), FtpWebRequest)
|
||||
request.Method = WebRequestMethods.Ftp.UploadFile
|
||||
|
||||
Dim tamanio As Integer = 1024
|
||||
Dim buffer As Byte() = New Byte(tamanio) {}
|
||||
Dim byteRead As Integer = 0
|
||||
|
||||
Dim Conected As Boolean = False
|
||||
|
||||
|
||||
|
||||
request.Credentials = New NetworkCredential(FTPUsr, FTPPass)
|
||||
|
||||
Try
|
||||
request.GetResponse()
|
||||
Conected = True
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
If Conected Then
|
||||
|
||||
Dim ftpStream As Stream
|
||||
Dim f As FileStream
|
||||
|
||||
ftpStream = request.GetRequestStream
|
||||
f = File.OpenRead(FInfo.FullName)
|
||||
|
||||
Try
|
||||
Do
|
||||
byteRead = f.Read(buffer, 0, tamanio)
|
||||
ftpStream.Write(buffer, 0, byteRead)
|
||||
|
||||
Loop While byteRead <> 0
|
||||
|
||||
Respuesta = True
|
||||
'validar si existe archivo si coincide en tamaño
|
||||
Catch ex As Exception
|
||||
Respuesta = False
|
||||
End Try
|
||||
|
||||
|
||||
If f IsNot Nothing Then
|
||||
f.Close()
|
||||
End If
|
||||
|
||||
If ftpStream IsNot Nothing Then
|
||||
ftpStream.Close()
|
||||
End If
|
||||
|
||||
Else
|
||||
Respuesta = False
|
||||
'no se conecto al ftp probablemente credenciales erroneas
|
||||
End If
|
||||
Else
|
||||
Respuesta = False
|
||||
'El archivo no existe en el disco local
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
Private Function VerificarArchivo(Archivo As String, Tamanio As Long, FTPServer As String, FTPUsr As String, FTPPass As String) As Boolean
|
||||
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
Dim reqSize As FtpWebRequest = DirectCast(FtpWebRequest.Create(New Uri(FTPServer & Archivo)), FtpWebRequest)
|
||||
reqSize.Credentials = New NetworkCredential(FTPUsr, FTPPass)
|
||||
reqSize.Method = WebRequestMethods.Ftp.GetFileSize
|
||||
reqSize.UseBinary = True
|
||||
|
||||
Dim loginresponse As FtpWebResponse = DirectCast(reqSize.GetResponse(), FtpWebResponse)
|
||||
Dim respSize As FtpWebResponse = DirectCast(reqSize.GetResponse(), FtpWebResponse)
|
||||
respSize = DirectCast(reqSize.GetResponse(), FtpWebResponse)
|
||||
Dim size As Long = respSize.ContentLength
|
||||
|
||||
respSize.Close()
|
||||
|
||||
|
||||
If Tamanio = size Then
|
||||
Respuesta = True
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -4653,6 +4653,26 @@ Partial Class Bancos_IE
|
||||
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 Dep.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados
|
||||
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
|
||||
|
||||
|
||||
UpGuardar.Update()
|
||||
|
||||
Else
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
@@ -4663,6 +4683,19 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") 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
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
Pago Electrónico
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<i>
|
||||
<asp:LinkButton ID="LnlImprimir" runat="server" Text="Imprimir" OnClick="BtnReportePago_Click"></asp:LinkButton>
|
||||
</i>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
@@ -255,6 +258,17 @@
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkAyuda" runat="server" href="#" OnClientClick="return false;"
|
||||
CssClass="btn btn-circle btn-sm bg-warning" Text="<i class='fa fa-info'></i>" Visible="false" Height="25" Width="25"
|
||||
data-toggle="popover" title="Ayuda" data-placement="top" data-trigger="hover" />
|
||||
</ItemTemplate>
|
||||
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%--<asp:BoundField DataField="Abonado" HeaderText="Importe" DataFormatString="{0:N2}" />--%>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
@@ -481,6 +495,15 @@
|
||||
<asp:DropDownList ID="DdlCuentaEnviados" runat="server" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="100px" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<li>Tipo:
|
||||
<asp:DropDownList ID="DdlTipoGeneracionEnviados" runat="server" CssClass="form-control input-sm select2me" Width="100px">
|
||||
<asp:ListItem Text="Todos" Value="-1" />
|
||||
<asp:ListItem Text="Pagos Proveedor" Selected="True" Value="PAGO" />
|
||||
<asp:ListItem Text="Anticipos" Value="ANT" />
|
||||
<asp:ListItem Text="Funcionarios y Empleados" Value="FyE" />
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
|
||||
<li >Estatus
|
||||
<asp:DropDownList ID="DdlEstatusEnviados" runat="server" Width="100px" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Text="Todos" Value="-1" />
|
||||
@@ -556,7 +579,7 @@
|
||||
</div>
|
||||
|
||||
<asp:GridView ID="GvEnviadas" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros enviados" ToolTip="Tabla de pagos electronicos"
|
||||
DataKeyNames="CveLayoutEnvioDetalle,CveIE,CveLayoutEnvio,CveProveedor,Archivo,Estatus"
|
||||
DataKeyNames="CveLayoutEnvioDetalle,CveIE,CveLayoutEnvio,CveProveedor,Archivo,Estatus,NotificarA"
|
||||
OnRowDataBound="GvEnviadas_RowDataBound" CssClass="table table-striped table-hover Widthall ScrollAD" data-heigth="350px" data-freezerows="1" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha Envio" DataFormatString="{0:d}" />
|
||||
@@ -682,7 +705,7 @@
|
||||
|
||||
<asp:Button ID="BtnReporteAltaCarga" ClientIDMode="Static" Text="" runat="server" Style="display: none;" OnClick="BtnReporteAltaCarga_Click" />
|
||||
<asp:Button ID="BtnReporteAltaGenera" ClientIDMode="Static" Text="" runat="server" Style="display: none;" OnClick="BtnReporteAltaGenera_Click" />
|
||||
<asp:Button ID="BtnReportePago" ClientIDMode="Static" Text="" runat="server" Style="display: none;" OnClick="BtnReportePago_Click" />
|
||||
<%--<asp:Button ID="BtnReportePago" ClientIDMode="Static" Text="" runat="server" Style="display: none;" OnClick="BtnReportePago_Click" />--%>
|
||||
|
||||
|
||||
|
||||
@@ -690,7 +713,7 @@
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width:750px!important">
|
||||
<div class="modal-content" style="width:900px!important">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Alta Cuentas</h4>
|
||||
@@ -700,7 +723,8 @@
|
||||
<asp:UpdatePanel ID="UpModalCuentasCuerpo" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvCuentasModal" runat="server" DataKeyNames="CveCuentaDeposito" AutoGenerateColumns="False" ToolTip="Cuentas modal" OnRowDataBound="GvCuentasModal_RowDataBound"
|
||||
<asp:GridView ID="GvCuentasModal" runat="server" DataKeyNames="CveCuentaDeposito,CveSATBanco" AutoGenerateColumns="False" ToolTip="Cuentas modal"
|
||||
OnRowDataBound="GvCuentasModal_RowDataBound"
|
||||
CssClass="table table-striped table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
@@ -710,18 +734,32 @@
|
||||
<asp:BoundField HeaderText="Cuenta" DataField="Cuenta" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Clabe" DataField="CLABEDestino" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:BoundField HeaderText="Alias" DataField="BBVAAlias" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:TemplateField HeaderText="Alta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px">
|
||||
<asp:TemplateField HeaderText="Banco" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkCuentasEstatus" runat="server" Checked='<%# Eval("EstatusPagoElectronicoGrupos") %>' />
|
||||
<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>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Alias" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtBBVAAlias" Text='<%# Bind("BBVAAlias") %>' Width="100%" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
|
||||
<%--________________________________________________________--%>
|
||||
<asp:TemplateField HeaderText="Alta" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="40px">
|
||||
<HeaderTemplate>
|
||||
<input type="checkbox" class="form-check-input" id="ChkSelector" onclick="SelectorCuentasProveedor(this)">
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkCuentasEstatus" runat="server" Checked='<%# Eval("EstatusPagoElectronicoGrupos") %>' CssClass="CssCuentasSelector" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
@@ -813,10 +851,15 @@
|
||||
<div class="col-md-12" runat="server" id="DVDescargaCuentas1" visible=" false" >
|
||||
<p> Cuentas Bancomer <asp:LinkButton runat="server" ID="LnkDescargaCuentas1" OnClick="LnkDescargaCuentas1_Click" CssClass="Texto"></asp:LinkButton> </p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" runat="server" id="DVDescargaCuentas2" visible=" false">
|
||||
<p> Cuentas Interbancarias <asp:LinkButton runat="server" ID="LnkDescargaCuentas2" OnClick="LnkDescargaCuentas2_Click" CssClass="Texto"></asp:LinkButton> </p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" runat="server" id="DVDescargaReporte" visible=" false">
|
||||
<p> <asp:LinkButton runat="server" ID="LnkDescargaReporte" OnClick="LnkDescargaReporte_Click" CssClass="Texto" Text="Descargar Reporte"></asp:LinkButton> </p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
@@ -825,6 +868,7 @@
|
||||
<asp:PostBackTrigger ControlID="LnkDescarga" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaCuentas1" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaCuentas2" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaReporte" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -847,24 +891,40 @@
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
<script type="text/javascript">
|
||||
function fncg() {
|
||||
$get('BtnReporteAltaCarga').click();
|
||||
|
||||
function pageLoad() {
|
||||
$(document).ready(function () {
|
||||
$('[data-toggle="popover"]').popover();
|
||||
});
|
||||
}
|
||||
|
||||
function fncp() {
|
||||
$get('BtnReportePago').click();
|
||||
}
|
||||
|
||||
|
||||
//function fncg() {
|
||||
// $get('BtnReporteAltaCarga').click();
|
||||
//}
|
||||
|
||||
//function fncp() {
|
||||
// $get('BtnReportePago').click();
|
||||
//}
|
||||
|
||||
|
||||
function PrefijoFolioEnviados(TxtPrefijo) {
|
||||
|
||||
|
||||
$(`.CSSPrefijo`).each(function () {
|
||||
$(this).val(TxtPrefijo.value)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function SelectorCuentasProveedor(Chk) {
|
||||
|
||||
$(`.CssCuentasSelector input[type=checkbox]`).each(function () {
|
||||
$(this).prop('checked', Chk.checked);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -70,6 +70,17 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DT_PagosReporte As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DT_PagosReporte"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DT_PagosReporte") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property DTAltasPendientes As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DTAltasPendientes"), DataTable)
|
||||
@@ -181,6 +192,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
ViewState("NombreArchivoBancomer") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property NombreArchivoInterbancario As String
|
||||
Get
|
||||
Return ViewState("NombreArchivoInterbancario").ToString
|
||||
@@ -190,6 +202,18 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DTSATBancos As DataTable
|
||||
Get
|
||||
If ViewState("DTSATBancos") Is Nothing Then
|
||||
Return New DataTable
|
||||
Else
|
||||
Return DirectCast(ViewState("DTSATBancos"), DataTable)
|
||||
End If
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTSATBancos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -273,11 +297,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
GvPendientes.DataBind()
|
||||
UpEnviados.Update()
|
||||
|
||||
|
||||
UpGVDatos.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub CargaDatosInformativos()
|
||||
Dim Altas = 0
|
||||
@@ -369,7 +390,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Response.ContentType = "application/zip"
|
||||
Response.End()
|
||||
End Sub
|
||||
Private Function CreaArchivo(Tipo As Integer, Optional MismoBanco As Boolean = True, Optional NombreArchivoEnviado As String = "") As Boolean
|
||||
Private Function CreaArchivo(Tipo As Integer, Optional MismoBanco As Boolean = True, Optional ByRef NombreArchivoEnviado As String = "") As Boolean
|
||||
|
||||
|
||||
System.Threading.Thread.Sleep(1000) 'Un segundo de diferencia Para doferentes tipos de bancos
|
||||
@@ -386,6 +407,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
If NombreArchivoEnviado.Length > 0 Then
|
||||
NombreArchivo = NombreArchivoEnviado
|
||||
Else
|
||||
NombreArchivoEnviado = NombreArchivo
|
||||
End If
|
||||
|
||||
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
||||
@@ -428,13 +451,20 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim LnkAyuda As LinkButton = e.Row.FCLinkButton("LnkAyuda")
|
||||
|
||||
'Colorea GV
|
||||
If e.Row.DBCampo("RazonSocial").ToString = "" Then
|
||||
e.Row.BackColor = Drawing.Color.WhiteSmoke
|
||||
Else
|
||||
If e.Row.DBCampo("EstatusPagoElectronicoGrupos").ToString <> "True" Then
|
||||
e.Row.BackColor = Drawing.Color.LightSalmon
|
||||
|
||||
'e.Row.BackColor = Drawing.Color.LightSalmon
|
||||
e.Row.ToolTip = "Cuenta Deposito aun sin dar de Alta."
|
||||
|
||||
LnkAyuda.Attributes.Add("data-content", "Cuenta Deposito aún sin dar de Alta.")
|
||||
LnkAyuda.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveProveedor").ToString.ToEntero > 0 Then
|
||||
@@ -446,13 +476,22 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End If
|
||||
|
||||
If Not e.Row.DBCampo("CveCuentaDeposito").ToString.ToEntero > 0 Then
|
||||
e.Row.Cells(0).BackColor = Drawing.Color.Red
|
||||
'e.Row.Cells(0).BackColor = Drawing.Color.Red
|
||||
e.Row.ToolTip = "Sin Cuenta Deposito asignada"
|
||||
|
||||
LnkAyuda.Attributes.Add("data-content", "Sin Cuenta Deposito asignada")
|
||||
LnkAyuda.Visible = True
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("EstatusCtaDeposito").ToString = "False" Then
|
||||
e.Row.Cells(0).BackColor = Drawing.Color.Red
|
||||
'e.Row.Cells(0).BackColor = Drawing.Color.Red
|
||||
e.Row.ToolTip = "Cuenta Deposito INACTIVA"
|
||||
LnkAyuda.Attributes.Add("data-content", "Cuenta Deposito INACTIVA")
|
||||
LnkAyuda.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("HLImporte").NavigateUrl = String.Format("IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
@@ -503,7 +542,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
e.Row.FCHyperLink("HLDetalle").NavigateUrl = String.Format("IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
|
||||
|
||||
If e.Row.DataKey("Estatus").ToEntero = 3 Then
|
||||
If e.Row.DataKey("Estatus").ToEntero.contiene(2, 3) Then
|
||||
|
||||
e.Row.FCLinkButton("ImgUpload").Visible = False
|
||||
e.Row.FCLinkButton("LnkGvCancelar").Visible = False
|
||||
@@ -755,6 +794,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
'Mensaje.Append("Descarga Layouts<br><br>")
|
||||
|
||||
DVDescargaPagos.Visible = False
|
||||
DVDescargaReporte.Visible = False
|
||||
|
||||
|
||||
|
||||
@@ -1192,6 +1232,9 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
DVDescargaPagos.Visible = True
|
||||
DVDescargaCuentas1.Visible = False
|
||||
DVDescargaCuentas2.Visible = False
|
||||
DVDescargaReporte.Visible = True
|
||||
|
||||
DT_PagosReporte = DTPendientesTemp.Copy
|
||||
|
||||
LnkDescarga.Text = NombreArchivoPago
|
||||
RegistraScript("$('#ModalDescarga').modal({ backdrop: 'static', keyboard: false});")
|
||||
@@ -1703,6 +1746,8 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Then
|
||||
|
||||
DVDescargaPagos.Visible = False
|
||||
DVDescargaReporte.Visible = False
|
||||
|
||||
LnkDescargaCuentas1.Text = NombreArchivoBancomer
|
||||
LnkDescargaCuentas2.Text = NombreArchivoInterbancario
|
||||
RegistraScript("$('#ModalDescarga').modal({ backdrop: 'static', keyboard: false});")
|
||||
@@ -1850,17 +1895,18 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
'CORREO
|
||||
#Region " GENERA Y MANDA CORREO "
|
||||
Private Sub MandaCorreo(data As Object)
|
||||
Dim Parametros As List(Of String) = DirectCast(data, List(Of String))
|
||||
|
||||
Dim Mail As New ClsSisMail()
|
||||
Dim Para As String = Parametros(0)
|
||||
Dim Asunto As String = Parametros(1)
|
||||
Dim Body As String = Parametros(2)
|
||||
'Private Sub MandaCorreo(data As Object)
|
||||
' Dim Parametros As List(Of String) = DirectCast(data, List(Of String))
|
||||
|
||||
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||
' Dim Mail As New ClsSisMail()
|
||||
' Dim Para As String = Parametros(0)
|
||||
' Dim Asunto As String = Parametros(1)
|
||||
' Dim Body As String = Parametros(2)
|
||||
|
||||
End Sub
|
||||
' Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
|
||||
|
||||
'End Sub
|
||||
|
||||
Private Function GeneraCorreo(CveIE As Integer, objIE As ClsBancos) As String
|
||||
Dim strBody As New StringBuilder
|
||||
@@ -2338,11 +2384,15 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
Return strBody.ToString
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
|
||||
|
||||
Protected Sub BtnReporteAltaCarga_Click(sender As Object, e As EventArgs)
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -2374,6 +2424,9 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
ImprimirPDF("Empresas/Grales/Formatos/LayoutAltaProveedor.rdlc", DtAlta, params, "LayoutAltaProveedor", RDSName:="DsPagoElectronico")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnReporteAltaGenera_Click(sender As Object, e As EventArgs)
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
@@ -2402,12 +2455,24 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnReportePago_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim DT_PagosReporte As New DataTable
|
||||
DT_PagosReporte = DTPendientes.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito > 0").Copy()
|
||||
|
||||
'DT_PagosReporte.Columns(7).ColumnName = "Proveedor"
|
||||
'DT_PagosReporte.Columns(2).ColumnName = "Importe"
|
||||
'DT_PagosReporte.Columns(22).ColumnName = "Moneda"
|
||||
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
If Archivo.Exists Then
|
||||
ImprimirPDF(String.Format("{0}Formatos\LayoutPagoProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtPago, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2")
|
||||
@@ -2420,14 +2485,23 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion))
|
||||
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
ImprimirPDF("Empresas/Grales/Formatos/LayoutPagoProveedor.rdlc", DtPago, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2")
|
||||
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("Titulo", "Reporte Pago Proveedor Layout"))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/LayoutPagoProveedor.rdlc", DT_PagosReporte, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -2444,22 +2518,40 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub CargaGVPendintesModal()
|
||||
|
||||
Dim DTGvCuentasPendientes As DataTable = DTPendientes.Copy.FiltraParametros("CveCuentaDeposito > 0", "", {"CveCuentaDeposito", "BancoNombre", "RazonSocial", "Cuenta", "CLABEDestino", "BBVAAlias", "EstatusPagoElectronicoGrupos"})
|
||||
Dim ObjBancos As New ClsBancos
|
||||
|
||||
If ObjBancos.GetBancosSAT Then
|
||||
DTSATBancos = ObjBancos.DtResultados
|
||||
End If
|
||||
|
||||
ObjBancos.Dispose()
|
||||
|
||||
Dim DTGvCuentasPendientes As DataTable = DTPendientes.Copy.FiltraParametros("CveCuentaDeposito > 0", "", {"CveCuentaDeposito", "BancoNombre", "RazonSocial", "Cuenta", "CLABEDestino", "BBVAAlias", "EstatusPagoElectronicoGrupos", "CveSATBanco"})
|
||||
|
||||
GvCuentasModal.DataSource = DTGvCuentasPendientes
|
||||
GvCuentasModal.DataBind()
|
||||
UpModalCuentasCuerpo.Update()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub GvCuentasModal_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.FCCheckBox("ChkCuentasEstatus").Checked = True
|
||||
|
||||
'e.Row.FCCheckBox("ChkCuentasEstatus").Checked = True
|
||||
|
||||
e.Row.FCDropDownList("DdlSatBanco").DataSource = DTSATBancos
|
||||
e.Row.FCDropDownList("DdlSatBanco").DataBind()
|
||||
e.Row.FCDropDownList("DdlSatBanco").Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
e.Row.FCDropDownList("DdlSatBanco").SelectedValueExist(e.Row.DataKey("CveSATBanco"))
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -2475,10 +2567,14 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
ObjGenerales.IniciaTransacSQL()
|
||||
|
||||
For Each GvRow As GridViewRow In GvCuentasModal.Rows
|
||||
|
||||
Dim CveCuentaDeposito As Integer = GvRow.DataKey("CveCuentaDeposito").ToEntero
|
||||
Dim ChkCuentasEstatus As CheckBox = GvRow.FCCheckBox("ChkCuentasEstatus")
|
||||
Dim TxtBBVAAlias As TextBox = GvRow.FCTextBox("TxtBBVAAlias")
|
||||
Dim DdlSatBanco As DropDownList = GvRow.FCDropDownList("DdlSatBanco")
|
||||
|
||||
If Not ObjGenerales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito, ChkCuentasEstatus.Checked) Then
|
||||
|
||||
If Not ObjGenerales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito, ChkCuentasEstatus.Checked, DdlSatBanco.SelectedValue.ToEntero, TxtBBVAAlias.Text) Then
|
||||
ErrorProceso = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -2512,7 +2608,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Dim FechaI = If(IsDate(txtFechaIEnviados.Text.Trim()), txtFechaIEnviados.Text.Trim(), "-1")
|
||||
Dim FechaF = If(IsDate(txtFechaFEnviados.Text.Trim()), txtFechaFEnviados.Text.Trim(), "-1")
|
||||
|
||||
If ObjBancos.GetLayoutPagosEnviados(DdlCuentaEnviados.SelectedValue.ToEntero, DdlEstatusEnviados.SelectedValue.ToEntero, "-1", FechaI, FechaF, PorGrupos:=True) Then
|
||||
If ObjBancos.GetLayoutPagosEnviados(DdlCuentaEnviados.SelectedValue.ToEntero, DdlEstatusEnviados.SelectedValue.ToEntero, DdlTipoGeneracionEnviados.SelectedValue, FechaI, FechaF, PorGrupos:=True) Then
|
||||
DTEnviadas = ObjBancos.DtResultados
|
||||
Else
|
||||
DTEnviadas = Nothing
|
||||
@@ -2651,9 +2747,6 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -2672,6 +2765,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Dim CveLayoutEnvio As Integer = GvRow.DataKey("CveLayoutEnvio").ToEntero
|
||||
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero
|
||||
Dim CveProveedor As Integer = GvRow.DataKey("CveProveedor").ToEntero
|
||||
Dim NotificarA As String = GvRow.DataKey("NotificarA")
|
||||
|
||||
|
||||
If Not ObjBanco.UpdateLayoutEnviosDetalle(CveLayoutEnvioDetalle, CveLayoutEnvio, CveIE, CveProveedor, 2, "", True) Then
|
||||
@@ -2713,6 +2807,10 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Else
|
||||
ObjBanco.Commit()
|
||||
Alert("Confirmado Correctamente")
|
||||
NotificacionPago(CveIE, NotificarA)
|
||||
|
||||
CargaEnviados()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -2968,4 +3066,312 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
Response.TransmitFile(FilePath)
|
||||
Response.End()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkDescargaReporte_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/LayoutAltaProveedor.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
' Dim DT_PagosReporte As New DataTable
|
||||
DT_PagosReporte = DT_PagosReporte.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND EstatusCtaDeposito > 0").Copy()
|
||||
|
||||
'DT_PagosReporte.Columns(7).ColumnName = "Proveedor"
|
||||
'DT_PagosReporte.Columns(2).ColumnName = "Importe"
|
||||
'DT_PagosReporte.Columns(22).ColumnName = "Moneda"
|
||||
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
If Archivo.Exists Then
|
||||
ImprimirPDF(String.Format("{0}Formatos\LayoutPagoProveedor.rdlc", UsuarioActual.Empresa.Ruta), DtPago, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2")
|
||||
Else
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("Direccion", UsuarioActual.Empresa.Direccion))
|
||||
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
|
||||
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("Titulo", "Reporte Pago Proveedor Layout"))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/LayoutPagoProveedor.rdlc", DT_PagosReporte, params, "LayoutPagoProveedor", RDSName:="DSPagoElectronicoV2")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String)
|
||||
|
||||
'If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
|
||||
'Dim Param As New List(Of String)
|
||||
|
||||
'Param.Add(CorreoNotificarA) 'Para
|
||||
'Param.Add("Notificaciones de pago") 'Asunto
|
||||
'Param.Add(GeneraCorreo(CveIE)) 'Body
|
||||
'Param.Add(CveIE.ToString) 'CveIE
|
||||
Dim Body As String = GeneraCorreo(CveIE)
|
||||
|
||||
'Dim Comprobante = If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "") 'Archivo Adjunto
|
||||
Dim Comprobante As String = ""
|
||||
Dim File As Byte() = Nothing
|
||||
'If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then
|
||||
' File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre)
|
||||
'End If
|
||||
|
||||
Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File))
|
||||
Hilo.Start()
|
||||
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte())
|
||||
'Dim Parametros As List(Of String) = DirectCast(Data, List(Of String))
|
||||
|
||||
Dim Mail As New ClsSisMail()
|
||||
Para = If(Para IsNot Nothing, Para, "")
|
||||
Asunto = If(Asunto IsNot Nothing, Asunto, "")
|
||||
Body = If(Body IsNot Nothing, Body, "")
|
||||
|
||||
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
If Comprobante IsNot Nothing AndAlso Comprobante <> "" Then
|
||||
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Comprobante})
|
||||
End If
|
||||
|
||||
If File IsNot Nothing Then
|
||||
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"})
|
||||
End If
|
||||
|
||||
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
|
||||
Dim objIE As New ClsBancos
|
||||
objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
|
||||
objIE.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function GeneraCorreo(CveIE As Integer) As String
|
||||
|
||||
Dim strBody As New StringBuilder
|
||||
Dim objIE As New ClsBancos
|
||||
|
||||
If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||
strBody.Append("<head> ")
|
||||
strBody.Append(" <style type=""text/css""> ")
|
||||
strBody.Append(" body ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" margin:0px; ")
|
||||
strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||
strBody.Append(" font-size: 10px; ")
|
||||
strBody.Append(" background-color:#F0F0F0; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" a.Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" font-size:11px; ")
|
||||
strBody.Append(" background-color:#F7F6F3; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .TextoAlterno ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .BarraIdentidad ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" color:#FFFFFF; ")
|
||||
strBody.Append(" background:#F0F0F0; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" font-size:19px; ")
|
||||
strBody.Append(" font-style:oblique; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Titulos ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color: Gray;")
|
||||
strBody.Append(" color:White; ")
|
||||
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Verde {color: #00CC00;} ")
|
||||
strBody.Append(" .Negro {color: #000000;} ")
|
||||
strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||
strBody.Append(" </style> ")
|
||||
strBody.Append("</head> ")
|
||||
strBody.Append("<body> ")
|
||||
strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
|
||||
strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat("</div><br/><br/>")
|
||||
|
||||
strBody.AppendFormat("<div style='width: 600px'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
End If
|
||||
|
||||
If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
End If
|
||||
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.AppendFormat(" <td> </td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
strBody.Append(" </table> ")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.Append(" </div> ")
|
||||
|
||||
|
||||
strBody.AppendFormat("<div style='width: 600px'>")
|
||||
strBody.AppendFormat(" <table style='width:100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
|
||||
strBody.AppendFormat(" <table width='100%'>")
|
||||
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Movimiento:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Banco:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
If objIE.CuentaDepositado.ToString <> "" Then
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
End If
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Fecha:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Importe:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Observaciones:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td colspan='2'>")
|
||||
strBody.AppendFormat(" <hr />")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat("</div>")
|
||||
|
||||
|
||||
'MOVIMIENTOS CHEQUE
|
||||
If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
Dim Textov33 As String = ""
|
||||
If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
End If
|
||||
|
||||
strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
|
||||
strBody.AppendFormat(" <table width='1000px'>")
|
||||
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 10%'>Fecha</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Factura</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Importe ($)</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 15%'>NC Aplicadas</th>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
|
||||
|
||||
For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||
strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
Next
|
||||
|
||||
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td colspan='5'>")
|
||||
strBody.AppendFormat(" <hr />")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat("</div>")
|
||||
End If
|
||||
|
||||
strBody.Append(" <div> Favor de no responder a este correo. </div> ")
|
||||
|
||||
strBody.Append("</body></html>")
|
||||
End If
|
||||
|
||||
objIE.Dispose()
|
||||
Return strBody.ToString
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -945,6 +945,24 @@ Partial Class Bancos_PopIECompras
|
||||
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 Dep.DtResultados.Rows.Count > 0 Then
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados
|
||||
trCuentaDeposito.Visible = True
|
||||
BtnGuardar.ToolTip = ""
|
||||
Else
|
||||
|
||||
BtnGuardar.Enabled = False
|
||||
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||
|
||||
End If
|
||||
|
||||
|
||||
UpGuardar.Update()
|
||||
|
||||
|
||||
Else
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
@@ -952,6 +970,19 @@ Partial Class Bancos_PopIECompras
|
||||
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
|
||||
Dep.Dispose()
|
||||
|
||||
@@ -2518,22 +2518,23 @@ 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 DdlTipoTransaccion.SelectedValue = "17" Then
|
||||
|
||||
|
||||
' If Dep.DtResultados.Rows.Count > 0 Then
|
||||
' DdlCuentaDeposito.DataSource = Dep.DtResultados
|
||||
' trCuentaDeposito.Visible = True
|
||||
' BtnIEGuardar.ToolTip = ""
|
||||
' Else
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados
|
||||
trCuentaDeposito.Visible = True
|
||||
BtnIEGuardar.ToolTip = ""
|
||||
Else
|
||||
|
||||
' BtnIEGuardar.Enabled = False
|
||||
' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||
BtnIEGuardar.Enabled = False
|
||||
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
' End If
|
||||
End If
|
||||
|
||||
|
||||
' UpGuardar.Update()
|
||||
UpGuardar.Update()
|
||||
Else
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
@@ -2550,23 +2551,43 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
|
||||
|
||||
'Else
|
||||
Else
|
||||
|
||||
|
||||
' If DdlTipoTransaccion.SelectedValue = "17" Then
|
||||
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
|
||||
|
||||
' BtnIEGuardar.Enabled = False
|
||||
' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||
' Else
|
||||
' BtnIEGuardar.Enabled = True
|
||||
' BtnIEGuardar.ToolTip = ""
|
||||
' End If
|
||||
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()
|
||||
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
|
||||
|
||||
Dep.Dispose()
|
||||
'Else
|
||||
' trCuentaDeposito.Visible = False
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -400,6 +400,8 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||
else
|
||||
{
|
||||
ObjGeneral.Commit();
|
||||
string notificacionCorreos = getCorreoString();
|
||||
MandaCorreoNotificacionGuia(notificacionCorreos);
|
||||
if (Guia == "-1")
|
||||
{
|
||||
if (CveVenta > 0 || CveOC > 0 || CveMovimiento > 0 || CveCompra > 0)
|
||||
@@ -718,7 +720,6 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||
}
|
||||
|
||||
Destinatario = $"{DbRowVenta["Mail"].ToString()};{DbRowVenta["CorreoVendedorVenta"].ToString()}{CorreoAsistente}";
|
||||
|
||||
if (ObjVentas.GetVentaDetalle(CveVenta))
|
||||
{
|
||||
DTMovimientos = ObjVentas.DtResultados;
|
||||
@@ -727,6 +728,32 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string getCorreoString()
|
||||
{
|
||||
ClsVentas ObjVentas = new ClsVentas();
|
||||
if (ObjVentas.GetVenta(CveVenta,UsuarioActual.CveEmpresa))
|
||||
{
|
||||
int CveVendedor = ObjVentas.DtResultados.Rows[0]["CveVendedor"].ToEntero();
|
||||
int CveCliente = ObjVentas.DtResultados.Rows[0]["CveCliente"].ToEntero();
|
||||
DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}",CveVendedor));
|
||||
DataRow Cliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}",CveCliente));
|
||||
|
||||
string CorreosConcat = "{0};{1};{2};{3};{4}";
|
||||
return CorreosConcat;
|
||||
}
|
||||
ObjVentas.Dispose();
|
||||
return "";
|
||||
}
|
||||
|
||||
private void MandaCorreoNotificacionGuia(string Correos)
|
||||
{
|
||||
Correos.GuardaLog();
|
||||
|
||||
ClsSisMail MailCls = new ClsSisMail();
|
||||
MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, Correos, "Se enviara la compra a su dirección", "Pendiente", Correos);
|
||||
MailCls = null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -170,7 +170,12 @@
|
||||
|
||||
<label class="col-md-1" style="width: 90px; margin-top: 5px;">Usuario:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlUsuarios" DataTextField="Nombre" DataValueField="CveUsuario" runat="server" Width="100%" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me"/>
|
||||
<asp:DropDownList ID="DdlUsuarios" DataTextField="Nombre" DataValueField="CveUsuario" runat="server" Width="100%" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" />
|
||||
</div>
|
||||
<div runat="server" id="DivEstatusEntrega" visible="false">
|
||||
<div class="col-md-2">
|
||||
<label>Entregas Directas</label> <asp:CheckBox ID="ChkLote" data-size="small" runat="server"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -185,13 +190,13 @@
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CvePaqueteriaGuia, CveSubProyecto, SubProyecto, CveAgrupador, TipoAgrupador, Folio, CvePaqueteria, Paqueteria, Liga, CveEstatus, Estatus, Rastreo, Guia, NumCajas, Peso, Dimensiones, Fecha, FechaEstimada, CveUsuario, CveEmpresa, FechaIng, Observaciones, ImplicaCosto, CvePaqueteriaGuiaTipo"
|
||||
<asp:GridView ID="GVDatos" runat="server" DataKeyNames="CvePaqueteriaGuia, CveSubProyecto, SubProyecto, CveAgrupador, TipoAgrupador, Folio, CvePaqueteria, Paqueteria, Liga, CveEstatus, Estatus, Rastreo, Guia, NumCajas, Peso, Dimensiones, Fecha, FechaEstimada, CveUsuario, CveEmpresa, FechaIng, Observaciones, ImplicaCosto, CvePaqueteriaGuiaTipo,EsEntregaInterna"
|
||||
AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros con los filtros especificados" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" GridLines="None"
|
||||
EmptyDataRowStyle-HorizontalAlign="Center" OnRowDataBound="GVDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="Sucursal" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="PaqueteriaGuiaTipo" HeaderText="Guía Tipo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="7%">
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="4%">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" ID="HLFolio" Text='<%# Eval("Folio")%>' ToolTip='<%# "Ir a " + Eval("TipoAgrupador")%>' Target="_blank" />
|
||||
</ItemTemplate>
|
||||
@@ -207,11 +212,12 @@
|
||||
<asp:BoundField DataField="FechaEstimada" HeaderText="Fecha Est." ItemStyle-Width="4%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="FechaIng" HeaderText="Fecha Ing" ItemStyle-Width="4%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" HeaderText="Editar/Liga/Subir">
|
||||
<asp:TemplateField ItemStyle-Width="13%" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="Editar/Liga/Subir/Reasignar">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgEditar" runat="server" OnClick="imgEditar_Click" AlternateText="Editar" ToolTip="Actualizar" CommandArgument='<%# Eval("CvePaqueteriaGuia")%>' CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:HyperLink ID="BtnLiga" runat="server" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-external-link' aria-hidden='true'></i>" ToolTip="Ir a Paquetería" Target="_blank"></asp:HyperLink>
|
||||
<asp:LinkButton ID="SubirArchivo" runat="server" OnClick="SubirArchivo_Click" Visible="true" AlternateText="Subir" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i title='Subir Documento' class='fa fa-upload' title='Subir Documento' ></i>" />
|
||||
<asp:LinkButton ID="LnkReasignar" runat="server" OnClick="Reasignar_Click" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i title='Reasignar' class='fa fa-user' title='Reasignar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
@@ -229,6 +229,11 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
DdlEstatusEditar.Items.Insert(3, new ListItem("Entregado ", "3"));
|
||||
DdlEstatusEditar.Items.Insert(4, new ListItem("Confirmado por Cliente", "4"));
|
||||
DdlEstatusEditar.SelectedValue = "-1";
|
||||
|
||||
if(UsuarioActual.Empresa.Funcionalidad(280) == "1"){
|
||||
DivEstatusEntrega.Visible = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void CargaUsuarios()
|
||||
@@ -270,7 +275,8 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
String FechaIngInicio = TxtFechaInicialIngreso.Text == "" ? "-1" : TxtFechaInicialIngreso.Text;
|
||||
String FechaIngFin = TxtFechaFinalIngreso.Text == "" ? "-1" : TxtFechaFinalIngreso.Text;
|
||||
|
||||
if (ObjGeneral.GetPaqueteriasGuias(CvePaqueteriaGuia, CvePaqueteriaGuiaTipo, CvePaqueteria, CveEstatus, CveSubProyecto, CveEmpresa, Guia, FechaInicio, FechaFin, FechaIngInicio, FechaIngFin, Filtro: Filtro, CveUsuarioEntrega: CveUsuarioEntrega))
|
||||
if (ObjGeneral.GetPaqueteriasGuias(CvePaqueteriaGuia, CvePaqueteriaGuiaTipo, CvePaqueteria, CveEstatus, CveSubProyecto, CveEmpresa, Guia, FechaInicio, FechaFin,
|
||||
FechaIngInicio, FechaIngFin, Filtro: Filtro, CveUsuarioEntrega: CveUsuarioEntrega, EsEntregaInterna: ChkLote.Checked))
|
||||
{
|
||||
DTDatos = ObjGeneral.DtResultados;
|
||||
GVDatos.DataSource = DTDatos;
|
||||
@@ -532,7 +538,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
{
|
||||
e.Row.FCLinkButton("SubirArchivo").Visible = false;
|
||||
}
|
||||
|
||||
e.Row.FCLinkButton("LnkReasignar").Visible = e.Row.DataKey("EsEntregaInterna").ToString() == "True";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -924,6 +930,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
DataRow DbRowVenta = ObjVentas.DtResultados.Rows[0];
|
||||
|
||||
int CveCliente = DbRowVenta["CveCliente"].ToString().ToEntero();
|
||||
int CveVendedor = DbRowVenta["CveVendedor"].ToString().ToEntero();
|
||||
SerieFolio = String.Format("{0}-{1}", DbRowVenta["Serie"].ToString(), DbRowVenta["Folio"].ToString().ToEntero());
|
||||
NombreCliente = DbRowVenta["ClienteNombre"].ToString();
|
||||
|
||||
@@ -941,6 +948,10 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
}
|
||||
|
||||
// Destinatario = "sig.buzon02@gmail.com"; // CORREO PRUEBA
|
||||
//if (UsuarioActual.Empresa.Funcionalidad(280) == "1" && CveCliente > 0 && CveVendedor > 0)
|
||||
//{
|
||||
// Destinatario = getCorreoNotificacion(CveCliente,CveVendedor);
|
||||
//}
|
||||
|
||||
if (ObjVentas.GetVentaDetalle(CveVenta))
|
||||
{
|
||||
@@ -951,8 +962,37 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string getCorreoNotificacion(int CveCliente, int CveVendedor)
|
||||
{
|
||||
DataRow DatosCliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}",CveCliente));
|
||||
DataRow DatosVendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}", CveVendedor));
|
||||
if (DatosCliente != null && DatosVendedor != null)
|
||||
{
|
||||
StringBuilder correos = new StringBuilder("");
|
||||
if (DatosCliente["CorreoEntregaCompras"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosCliente["CorreoEntregaCompras"].ToString()));
|
||||
if (DatosCliente["CorreoEntregaAlmacen"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosCliente["CorreoEntregaAlmacen"].ToString()));
|
||||
if (DatosVendedor["Correo"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["Correo"].ToString()));
|
||||
if (DatosVendedor["CorreoAdicionalNotificaciones"].ToString().Length > 0) correos.Append(string.Format("{0};", DatosVendedor["CorreoAdicionalNotificaciones"].ToString()));
|
||||
return correos.ToString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Reasignar_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||
int CvePaqueteriaGuia = GvRow.DataKey("CvePaqueteriaGuia").ToEntero();
|
||||
|
||||
ClsGenerales ObjGeneral = new ClsGenerales();
|
||||
if (ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriaGuia, -1))
|
||||
{
|
||||
Alert("La guía está lista para volver a ser asignada, disponible en el reporte <a style='color:#23527c' href='/Inventarios/EntregasPorRealizar.aspx'>Entregas Por Realizar</a>");
|
||||
}
|
||||
ObjGeneral.Dispose();
|
||||
CargaDatos();
|
||||
UPDatos.Update();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -714,6 +714,8 @@ Partial Class General_SaldosIniciales
|
||||
Dim CveSATPS As Integer = GlobalDTPSATPS.FiltroPrimeroValor("CveSATPS", $"SATClavePS = '{SATClavePS}'").ToString.ToEntero
|
||||
Dim CveTamaño As Integer = GlobalDTAcumTamaños.FiltroPrimeroValor("CveTamaño", $"Tamaño = '{Tamaño}' AND CveEmpresa = {UsuarioActual.CveEmpresa}").ToString.ToEntero
|
||||
Dim CveClasificacion2 As Integer = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", $"Clasificacion = '{Clasificacion2}'").ToString.ToEntero
|
||||
Dim CveClasificacionDetalle As Integer = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CveClasificacionDetalle", $"ClasificacionDetalle = '{Linea}'").ToString.ToEntero
|
||||
|
||||
|
||||
If Not CveClasificacion > 0 AndAlso Clasificacion <> "" Then
|
||||
If ObjClas.AddClasificaciones(Clasificacion, "", -1, "-1", -1, "-1", -1, "-1",
|
||||
@@ -851,16 +853,16 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||
CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
|
||||
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2) <= 0 Then
|
||||
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle) <= 0 Then
|
||||
'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||
' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then
|
||||
ErrorPS = True
|
||||
Codigo.GuardaLog
|
||||
Exit For
|
||||
Else
|
||||
If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DTPS = ObjPS.DtResultados
|
||||
End If
|
||||
'Else
|
||||
' If ObjPS.GetPS(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
' DTPS = ObjPS.DtResultados
|
||||
' End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -244,10 +244,11 @@
|
||||
<td colspan="2">
|
||||
|
||||
<asp:Panel ID="PnlEntrega" runat="server" Visible="false">
|
||||
<asp:RadioButton id="RbSinEntrega" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="25%" GroupName="EntregaRadioGroup" Text="Sin Entrega" AutoPostBack="true"></asp:RadioButton>
|
||||
<asp:RadioButton id="RbEntregaInterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="25%" GroupName="EntregaRadioGroup" Text="Entrega Interna" AutoPostBack="true"></asp:RadioButton>
|
||||
<asp:RadioButton id="RbEntregaExterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="25%" GroupName="EntregaRadioGroup" Text="Entrega Externa" AutoPostBack="true"></asp:RadioButton>
|
||||
<asp:RadioButton id="RbSinEntrega" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="33%" GroupName="EntregaRadioGroup" Text="Entrega en mostrador" AutoPostBack="true"></asp:RadioButton>
|
||||
<asp:RadioButton id="RbEntregaInterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="30%" GroupName="EntregaRadioGroup" Text="Entrega Interna" AutoPostBack="true"></asp:RadioButton>
|
||||
<asp:RadioButton id="RbEntregaExterna" runat="server" OnCheckedChanged="EntregaRadioGroup_Click" Width="30%" GroupName="EntregaRadioGroup" Text="Entrega Externa" AutoPostBack="true"></asp:RadioButton>
|
||||
</asp:Panel>
|
||||
<asp:LinkButton ID="LnkPaqueteriaDetalle" runat="server" OnClick="PaqueteriaDetalle_Click" Visible="false">ver detalle de entrega</asp:LinkButton>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@@ -452,7 +453,7 @@
|
||||
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:TemplateField HeaderText="Cant. a Surtir" ItemStyle-Width="10%">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="60px" Mask="9,999.99" Text='<%# Eval("CantidadF") %>'></asp:TextBox>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="60px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" style="text-align: right" Text='<%# Eval("CantidadF") %>'></asp:TextBox>
|
||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" />
|
||||
</ItemTemplate>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
|
||||
@@ -244,6 +244,14 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ViewState("EsDevolucionDirecta") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FormaPaqueteria As Integer
|
||||
Get
|
||||
Return CType(ViewState("FormaPaqueteria"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("FormaPaqueteria") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -614,7 +622,21 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
DtDatos.Columns.Add("CantidadSeleccionada", GetType(Double))
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(280) = "1" Then
|
||||
FormaPaqueteria = DtDatos.Rows(0)("FormaPaqueteria").ToString.ToEntero
|
||||
Dim FormaPaq As Integer = FormaPaqueteria
|
||||
Select Case FormaPaq
|
||||
Case 1
|
||||
RbSinEntrega.Checked = True
|
||||
Case 2
|
||||
RbEntregaInterna.Checked = True
|
||||
LnkPaqueteriaDetalle.Visible = True
|
||||
DdlEstatus.SelectedValue = "5"
|
||||
Case 3
|
||||
RbEntregaExterna.Checked = True
|
||||
LnkPaqueteriaDetalle.Visible = True
|
||||
End Select
|
||||
End If
|
||||
'TxtFecha.Text = If(EsDevolucionVenta = 1, Now.ToShortDateString, DtDatos.Rows(0)("Fecha").ToString)
|
||||
End If
|
||||
|
||||
@@ -2261,13 +2283,15 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ElseIf TipoMovimiento = 2 Then
|
||||
CantidadPendientePorSalir = CantidadPendientePorSalir - CantidadEntradaSinCosto
|
||||
End If
|
||||
'si el alamcen del que salio, es el mismo que entra, no hay traspasos.
|
||||
If CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero Then CveAlmacenTraspasoDestino = 0
|
||||
|
||||
If Not ErrorMovInv AndAlso CantidadPendientePorSalir > 0 Then
|
||||
Dim ConceptoMovimiento = 3
|
||||
ConceptoMovimiento = If(TipoMovimiento = 1, ConceptoMovimiento, 18)
|
||||
ConceptoMovimiento = If(CveAlmacenTraspasoDestino > 0, 8, ConceptoMovimiento)
|
||||
|
||||
Dim Almacen1 = DdlAlmacen.SelectedValue.ToEntero
|
||||
Dim Almacen1 As Integer = DdlAlmacen.SelectedValue.ToEntero
|
||||
|
||||
If TipoDocto = "Rem" AndAlso CveAlmacenTraspasoDestino = 0 Then
|
||||
ErrorMovInv = True
|
||||
@@ -3631,6 +3655,13 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
TxtObservacionesPaqInterna.Text = ""
|
||||
UpPaqInterna.Update()
|
||||
End Sub
|
||||
Protected Sub PaqueteriaDetalle_Click(sender As Object, e As EventArgs)
|
||||
If RbEntregaExterna.Checked Then
|
||||
RegistraScript("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx',800,547,'N')")
|
||||
ElseIf RbEntregaInterna.Checked Then
|
||||
RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<asp:GridView ID="GvPaqueteriasGuias" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePaqueteriaGuia,Folio,FechaIng,Nombre,Contacto,Estatus"
|
||||
DataKeyNames="CvePaqueteriaGuia,Folio,FechaIng,Nombre,Contacto,Estatus,CobranzaCorreo,CorreoEntregaAlmacen,CorreoEntregaCompras,Correo,CorreoAdicionalNotificaciones"
|
||||
EmptyDataText="No se encontraron registros" ToolTip="Listado de Temas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true"
|
||||
|
||||
@@ -40,15 +40,30 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
||||
ObjGeneral.IniciaTransacSQL();
|
||||
GridViewRowCollection Grid = GvPaqueteriasGuias.Rows;
|
||||
|
||||
int CvePersonal = DdlUsuario.SelectedValue.ToEntero();
|
||||
foreach (GridViewRow row in Grid)
|
||||
{
|
||||
if (row.FCCheckBox("ChkAsigna").Checked)
|
||||
{
|
||||
int CvePaqueteriasGuias = row.DataKey("CvePaqueteriaGuia").ToEntero();
|
||||
int CvePersonal = DdlUsuario.SelectedValue.ToEntero();
|
||||
|
||||
if(!ObjGeneral.AsignarEntregasPorRealizar(CvePaqueteriasGuias, CvePersonal)){
|
||||
TieneError = true;
|
||||
}else
|
||||
{
|
||||
string CobranzaCorreo = row.DataKey("CobranzaCorreo");
|
||||
string CorreoEntregaAlmacen = row.DataKey("CorreoEntregaAlmacen");
|
||||
string CorreoEntregaCompras = row.DataKey("CorreoEntregaCompras");
|
||||
string CorreoVendedor = row.DataKey("Correo");
|
||||
string CorreoAdicionalNotificacionesVendedor = row.DataKey("CorreoAdicionalNotificaciones");
|
||||
|
||||
string CorreosCC = string.Format("{0};{1};{2};{3}", CorreoVendedor, CorreoAdicionalNotificacionesVendedor, CobranzaCorreo, CorreoEntregaCompras);
|
||||
string LogCorreo = string.Format("{0} -- {1} --- {2}", "Tipo de entrega", CorreoEntregaAlmacen, CorreosCC);
|
||||
LogCorreo.GuardaLog();
|
||||
|
||||
ClsSisMail MailCls = new ClsSisMail();
|
||||
MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, CorreoVendedor, "Se enviara la compra a su dirección", "Pendiente", CorreosCC);
|
||||
MailCls = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
<label class="col-md-1 truncate">Clasificación:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text=" Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Unidad Medida:</label>
|
||||
@@ -161,7 +161,7 @@
|
||||
<label class="col-md-1 truncate">Tipo Almacen:</label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlTipoAlmacen" CssClass="select2me" runat="server" AppendDataBoundItems="true" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 100px !important;">
|
||||
<asp:ListItem Selected="True" Text="Seleccione el tipo de Almacen (Todos)" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate">Tránsito?:</label>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<asp:BoundField DataField="Existencia" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="PendientePorSurtir" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Surtir" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="ExistenciaFinal" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia Real" DataFormatString="{0:#,###.######}" />
|
||||
<asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Precio" DataFormatString="{0:N2}"/>
|
||||
<asp:BoundField DataField="Importe" ItemStyle-HorizontalAlign="Right" HeaderText="Precio Neto" DataFormatString="{0:N2}"/>
|
||||
<asp:BoundField DataField="CantidadDisponibleInv" ItemStyle-HorizontalAlign="Right" HeaderText="Pendiente Por Recibir" DataFormatString="{0:#,###.######}" Visible="false"/>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -850,7 +850,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
TipoCambio = ObjCompras.DtResultados.Rows(0)("TipoCambio").ToString.ToDecimal
|
||||
TipoMovimiento = If(ObjCompras.DtResultados.Rows(0)("EstatusAlmacen").ToString.ToEntero = 1, 2, 1)
|
||||
TipoMovimiento = If(ObjCompras.DtResultados.Rows(0)("TipoDocto").ToString.Contiene("NC", "DEV"), 3, TipoMovimiento)
|
||||
TotalCompraOC = ObjCompras.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal
|
||||
TotalCompraOC = ObjCompras.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal - ObjCompras.DtResultados.Rows(0)("Descuentos").ToString.ToDecimal
|
||||
CveTipoCompra = ObjCompras.DtResultados.Rows(0)("CveTipoCompra").ToString.ToEntero
|
||||
|
||||
If TipoMovimiento = 3 Then
|
||||
@@ -1259,6 +1259,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero
|
||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||
End If
|
||||
If UsuarioActual.CveRol = 1 Then 'carga la cantidad con el rol AD
|
||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero
|
||||
End If
|
||||
End If
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaSeccion")) Then
|
||||
@@ -2155,6 +2158,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Private Sub GuardaCompraOC()
|
||||
|
||||
Dim CveMovimiento As Integer
|
||||
Dim CveMovimientoOriginal As Integer
|
||||
' Dim CveMovimientoS
|
||||
|
||||
Dim InvFolio As String = ""
|
||||
@@ -2203,6 +2207,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio),
|
||||
MovimientoFijo:=If(TipoMovimiento = 2, True, False), Remision:=TxtRemision.Text, Modulo:="RA/G1")
|
||||
If CveMovimiento > 0 Then
|
||||
CveMovimientoOriginal = CveMovimiento
|
||||
InvFolio = ObjInventario.Folio.ToString
|
||||
Dim DtDetalle As New DataTable
|
||||
Dim DtDetalleLote As New DataTable
|
||||
@@ -2283,7 +2288,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
''VALIDACIÓN DE IMPORTES INGRESADOS VS LA COMPRA U OC
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
If Not ErrorMovInv AndAlso RecibidaCompleta AndAlso ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
If Not ErrorMovInv AndAlso RecibidaCompleta AndAlso ObjInventario.GetMovimientosDetalle(CveMovimientoOriginal, UsuarioActual.CveEmpresa) Then
|
||||
Dim dtt As DataTable = ObjInventario.DtResultados
|
||||
Dim tTotalInsertado As Decimal = dtt.SUMD("TotalOriginal")
|
||||
If CveTipoCompra = 8 Then 'entrada almacen con costo indirecto cargado en la misma compra
|
||||
@@ -2297,6 +2302,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim ImporteIngresoAdicional As Decimal = 0
|
||||
|
||||
'SI RECEPCION VALIDA [ENTREGADIRECTA, APARTADOS, AC]
|
||||
If TipoMovimiento = 1 Then
|
||||
'ENTREGA DIRECTA
|
||||
@@ -2410,45 +2417,11 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
|
||||
Dim DtPSVirtual As New DataTable("DtTamanios")
|
||||
DtPSVirtual.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||
DtPSVirtual.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||
DtPSVirtual.Columns.Add(New DataColumn("PU", GetType(Decimal)))
|
||||
DtPSVirtual.Columns.Add(New DataColumn("CveUM", GetType(Integer)))
|
||||
|
||||
Dim DtComprasDetalle As DataTable = Nothing
|
||||
Dim DtTamanios As DataTable = Nothing
|
||||
|
||||
If ObjCompras.GetCompraDetalle(CveCompraSurtir) Then
|
||||
DtComprasDetalle = ObjCompras.DtResultados.Copy()
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados
|
||||
End If
|
||||
|
||||
If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then
|
||||
DtTamanios = ObjAcum.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
For Each GvRow As GridViewRow In GvInv.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
For Each Tam As DataRow In DtTamanios.Rows
|
||||
If Tam("CveTamaño").ToString() = GvRow.DataKey("CveTamaño") Then
|
||||
Dim CvePSCargo = Tam("CvePSCargo").ToString().ToEntero()
|
||||
Dim RowCompraDetalle = DtComprasDetalle.FiltroPrimero($"CvePS = {CvePSCargo}")
|
||||
|
||||
If RowCompraDetalle IsNot Nothing Then
|
||||
Dim Row As DataRow = DtPSVirtual.NewRow()
|
||||
Row("CvePS") = CvePSCargo
|
||||
Row("Cantidad") = GvRow.FCTextBox("TbCantidadF").Text.ToDecimal()
|
||||
Row("PU") = RowCompraDetalle("PU").ToString().ToDecimal()
|
||||
Row("CveUM") = GvRow.DataKey("CveUM").ToEntero()
|
||||
DtPSVirtual.Rows.Add(Row)
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
|
||||
|
||||
@@ -2461,8 +2434,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Double = RowUsado("Cantidad").ToString().ToDouble()
|
||||
Dim PU As Decimal = RowUsado("PU").ToString().ToDecimal()
|
||||
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
@@ -2470,6 +2443,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) Then
|
||||
ImporteIngresoAdicional = ObjInventario.DtResultados.SUMD("TotalOriginal")
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2549,8 +2528,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
Else
|
||||
|
||||
|
||||
|
||||
'VIRTUAL
|
||||
If CveTipoCompra = 9 And UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
|
||||
@@ -2618,6 +2595,27 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
End If
|
||||
|
||||
|
||||
''VALIDACIÓN DE IMPORTES INGRESADOS VS LA COMPRA U OC
|
||||
'If Not UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
If Not ErrorMovInv AndAlso RecibidaCompleta Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoOriginal, UsuarioActual.CveEmpresa) Then
|
||||
Dim dtt As DataTable = ObjInventario.DtResultados
|
||||
Dim tTotalInsertado As Decimal = dtt.SUMD("TotalOriginal") + ImporteIngresoAdicional
|
||||
If CveTipoCompra = 8 Then 'entrada almacen con costo indirecto cargado en la misma compra
|
||||
tTotalInsertado = dtt.SUMD("Total") ' está incluido el costo indirecto en la factura
|
||||
End If
|
||||
If Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) <> Math.Round(tTotalInsertado, 2) Then
|
||||
ErrorMovInv = True
|
||||
Alert("La Entrada no coincide con el valor del documento." & Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) & " -" & tTotalInsertado.RoundSQL.ToString, TipoMensaje.MsgError)
|
||||
GuardaLog("La Entrada no coincide con el valor del documento." & Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) & " -" & tTotalInsertado.RoundSQL.ToString)
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
' End If
|
||||
|
||||
'ACTUALIZA ESTATUS ALMACEN
|
||||
If TipoMovimiento = 2 Then
|
||||
If Not ObjCompras.UpdateEstatusAlmacen(CveCompraSurtir, 0) Then
|
||||
@@ -2631,7 +2629,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
'PREPOLIZA - SOLO CUANDO SEA RECEPCIÓN
|
||||
If TipoMovimiento = 1 AndAlso ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
If TipoMovimiento = 1 AndAlso Not ErrorMovInv Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim DtCostos As DataTable = Nothing
|
||||
Dim ValorInventario As Decimal = 0
|
||||
DtCostos = ObjInventario.DtResultados
|
||||
@@ -2827,16 +2827,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ErrorMovInv = True
|
||||
MensajeError = "Error al obtener movimientos"
|
||||
End If
|
||||
|
||||
End If
|
||||
'PREPOLIZA - NC
|
||||
If TipoMovimiento = 3 Then
|
||||
If TipoMovimiento = 3 AndAlso Not ErrorMovInv Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
|
||||
|
||||
Dim DtCostos As DataTable = Nothing
|
||||
DtCostos = ObjInventario.DtResultados
|
||||
Dim TotalCosto As Decimal = DtCostos.SUM("Total").ToDecimal
|
||||
Dim TotalCosto As Decimal = DtCostos.SUMD("Total").RoundSQL
|
||||
|
||||
Dim TotalNC As Decimal = 0
|
||||
Dim CveClasificacionDifCostoNC = -1
|
||||
@@ -2850,11 +2848,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim IdCtaContableClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacionDifCostoNC}").ToEntero
|
||||
Dim CveCuentaClasificacion As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostosSIG", $"CveClasificacion = {CveClasificacionDifCostoNC}").ToEntero
|
||||
|
||||
TotalCosto = Math.Round(TotalCosto, 2)
|
||||
TotalNC = Math.Round(TotalNC, 2)
|
||||
TotalNC = TotalNC.RoundSQL
|
||||
Dim DifCostoNC = Math.Round(TotalCosto - TotalNC, 2)
|
||||
|
||||
|
||||
'VARIABLES
|
||||
Dim IdCtaContableAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
|
||||
Dim CveCuentaAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContableSIG", $"CveAlmacen = {DdlAlmacen.SelectedValue}").ToEntero
|
||||
|
||||
@@ -653,13 +653,33 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim DrAlmO, DrAlmD As DataRow
|
||||
Dim CveSucursalOrigen, CveSucursalDestino As Integer
|
||||
Dim TipoAlmacenOrigen, TipoAlmacenDestino As Integer
|
||||
Dim CveSubProyectoOrigen, CveSubProyectoDestino As Integer
|
||||
Dim IdCtaContableOrigen, IdCtaContableDestino As Integer
|
||||
|
||||
DrAlmO = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
DrAlmD = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenDestino.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
|
||||
If DrAlmO IsNot Nothing AndAlso DrAlmD IsNot Nothing Then
|
||||
CveSucursalOrigen = DrAlmO("CveSubProyecto").ToString.ToEntero
|
||||
TipoAlmacenOrigen = DrAlmO("CveTipoAlmacen").ToString.ToEntero
|
||||
CveSubProyectoOrigen = DrAlmO("CveSubProyecto").ToString.ToEntero
|
||||
IdCtaContableOrigen = DrAlmO("IdCtaContable").ToString.ToEntero
|
||||
|
||||
CveSucursalDestino = DrAlmD("CveSubProyecto").ToString.ToEntero
|
||||
TipoAlmacenDestino = DrAlmD("CveTipoAlmacen").ToString.ToEntero
|
||||
CveSubProyectoDestino = DrAlmD("CveSubProyecto").ToString.ToEntero
|
||||
IdCtaContableDestino = DrAlmO("IdCtaContable").ToString.ToEntero
|
||||
|
||||
End If
|
||||
|
||||
'VALIDA ALMACEN DISTINTA SUCURSAL DEBE SER TRANSITORIO
|
||||
If Not UsuarioActual.CveEmpresa.Contiene(7, 140) Then '[IPP] EMPRESA VIGILANCIA NO OCUPA TRANSITORIOS - TIENEN MIL SUCURSALES Xd
|
||||
If Not ChkTransitorio.Checked Then
|
||||
Dim CveSucursalOrigen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen = {DdlAlmacenOrigen.SelectedValue.ToEntero}")
|
||||
Dim CveSucursalDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen = {DdlAlmacenDestino.SelectedValue.ToEntero}")
|
||||
|
||||
If Not GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacenDestino.SelectedValue.ToEntero}").Contiene("21", "26") Then 'NO SE VALIDA CUANDO EL TIPO DE ALMACEN DESTINO ES DE DEVOLUCION
|
||||
If Not TipoAlmacenDestino.Contiene(21, 26) Then 'NO SE VALIDA CUANDO EL TIPO DE ALMACEN DESTINO ES DE DEVOLUCION
|
||||
If CveSucursalOrigen <> CveSucursalDestino Then
|
||||
Alert("Por ser un traspaso entre sucursales es necesario indicar que el traspaso es transitorio.", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'');", "SonidoError")
|
||||
@@ -757,9 +777,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Dim TotalCantidad As Decimal = DtMovimientos.SUMD("Cantidad")
|
||||
|
||||
Dim TipoAlmacenOrigen = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacenOrigen.SelectedValue.ToEntero}").ToEntero
|
||||
Dim TipoAlmacenDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {DdlAlmacenDestino.SelectedValue.ToEntero}").ToEntero
|
||||
|
||||
''[IPP-1Noviembre2018] SE COMENTA PORQUE NO TIENE NI PIES NI CABEZA. LE FALTA DESARROLLO
|
||||
'If (TipoAlmacenOrigen = 14 Or TipoAlmacenDestino = 14) And TipoAlmacenOrigen <> TipoAlmacenDestino Then
|
||||
' ObjInventario.Dispose()
|
||||
@@ -813,9 +830,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
'VIRTUAL SALIDA
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenOrigen.SelectedValue}").ToEntero()
|
||||
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenOrigen.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyectoOrigen}").ToEntero()
|
||||
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida)
|
||||
FolioVirtualSalida = ObjInventario.Folio
|
||||
@@ -845,7 +862,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim TipoMovimientoEntrada = 27
|
||||
AlmacenEntrada = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero)
|
||||
|
||||
Dim TipoAlmacenEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {AlmacenEntrada}").ToEntero()
|
||||
'Dim TipoAlmacenEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {AlmacenEntrada}").ToEntero()
|
||||
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(AlmacenEntrada, TipoMovimientoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
|
||||
@@ -858,7 +875,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Dim Cont As Integer = 0
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
Dim CostoEntrada As Decimal = If(TipoAlmacenEntrada = 26, 0, Dr("PU").ToString.ToDecimal())
|
||||
Dim CostoEntrada As Decimal = If(TipoAlmacenDestino = 26, 0, Dr("PU").ToString.ToDecimal())
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, CostoEntrada, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=-1, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Observaciones:=Dr("Observaciones").ToString) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
@@ -870,9 +887,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
'VIRTUAL ENTRADA
|
||||
If UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenDestino.SelectedValue}").ToEntero()
|
||||
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacenDestino.SelectedValue}").ToEntero()
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen =24 AND CveSubProyecto={CveSubProyectoDestino }").ToEntero()
|
||||
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/S3")
|
||||
FolioVirtualEntrada = ObjInventario.Folio
|
||||
@@ -904,17 +921,33 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
Dim IdCtaContableSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero
|
||||
Dim IdCtaContableEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenDestino.SelectedValue.ToEntero)).ToEntero
|
||||
'Dim IdCtaContableSalida As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero
|
||||
'Dim IdCtaContableEntrada As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenDestino.SelectedValue.ToEntero)).ToEntero
|
||||
Dim Contabilizable As Boolean = True
|
||||
|
||||
If IdCtaContableSalida = IdCtaContableEntrada Then Contabilizable = False
|
||||
If IdCtaContableOrigen = IdCtaContableDestino And TipoAlmacenDestino <> 26 Then Contabilizable = False
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableSalida, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=importe) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableEntrada, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable, ImporteMX:=importe) Then
|
||||
'si el tipo de almacen de entrada es Almacen sin costo, se registra al costo, la salida.
|
||||
If TipoAlmacenOrigen <> 26 AndAlso TipoAlmacenDestino = 26 Then
|
||||
|
||||
Dim tCveClasificacion As Integer = DtMovimientos.MAX("CveClasificacion").ToEntero
|
||||
Dim dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveClasificacion:=tCveClasificacion).FiltroPrimero("")
|
||||
Dim IdCuentaCostos As Integer = -1
|
||||
If dr IsNot Nothing Then
|
||||
IdCuentaCostos = dr("IdCuentaCostos").ToString.ToEntero
|
||||
End If
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -importe, TxtObservaciones.Text, 69, TxtObservaciones.Text, Fecha, IdCuentaCostos, -1, CveClasificacion:=tCveClasificacion, CveSubProyecto:=CveSubProyectoOrigen, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable, ImporteMX:=-importe) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Contabilizable = False
|
||||
importe = 0
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableDestino, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, Contabilizable:=Contabilizable, ImporteMX:=importe) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
@@ -1083,6 +1116,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Mensaje.AppendFormat("<br/> Folio: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioMov, CveMovimiento)
|
||||
|
||||
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
|
||||
Mensaje.Clear()
|
||||
|
||||
LimpiaMovimiento()
|
||||
|
||||
|
||||
@@ -460,7 +460,7 @@ Partial Class Site
|
||||
'End If
|
||||
'OC.Dispose()
|
||||
|
||||
LtlMNotificaciones.Text = LtlMNotificaciones.Text & Notificaciones.ToString
|
||||
LtlMNotificaciones.Text = String.Format("{0}{1}", LtlMNotificaciones.Text, Notificaciones.ToString)
|
||||
Notificaciones.Clear()
|
||||
End Sub
|
||||
|
||||
@@ -494,11 +494,41 @@ Partial Class Site
|
||||
|
||||
#Region "TIPO DE CAMBIO"
|
||||
Private Sub CargaTipoCambio()
|
||||
|
||||
If Application("TipoCambioActual") Is Nothing Then
|
||||
'sino existe el dato, lo carga por ser la primera vez
|
||||
Application("TipoCambioActual") = GetTipoCambio()
|
||||
Else
|
||||
Dim TCA As TipoCambioActual = CType(Application("TipoCambioActual"), TipoCambioActual)
|
||||
If TCA.Fecha <> DateTime.Today Then
|
||||
Application("TipoCambioActual") = GetTipoCambio()
|
||||
End If
|
||||
End If
|
||||
lblTipoCambio.Text = String.Format(" | TC {0:C4}", CType(Application("TipoCambioActual"), TipoCambioActual).TipoCambio)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GetTipoCambio() As TipoCambioActual
|
||||
'Dim Retorno As TipoCambioActual
|
||||
|
||||
Dim TCT As Decimal = 0
|
||||
Dim ObjGenerales As ClsGenerales = New ClsGenerales
|
||||
If ObjGenerales.GetTipoCambio(-1, DateTime.Now) And ObjGenerales.DtResultados.Rows.Count > 0 Then
|
||||
lblTipoCambio.Text = String.Format(" | TC {0:C4}", ObjGenerales.DtResultados(0)("TipoCambio").ToString().ToDecimal())
|
||||
If ObjGenerales.GetTipoCambio(-1, DateTime.Today) Then
|
||||
|
||||
If ObjGenerales.DtResultados.Rows.Count > 0 Then
|
||||
TCT = ObjGenerales.DtResultados(0)("TipoCambio").ToString().ToDecimal()
|
||||
End If
|
||||
|
||||
End If
|
||||
ObjGenerales.Dispose()
|
||||
End Sub
|
||||
|
||||
Return New TipoCambioActual With {.Fecha = DateTime.Today, .TipoCambio = TCT}
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
Public Class TipoCambioActual
|
||||
Public Fecha As Date
|
||||
Public TipoCambio As Decimal
|
||||
End Class
|
||||
1
Tareas/Thalamus.asmx
Normal file
1
Tareas/Thalamus.asmx
Normal file
@@ -0,0 +1 @@
|
||||
<%@ WebService Language="VB" CodeBehind="~/App_Code/Thalamus.vb" Class="Thalamus" %>
|
||||
@@ -5984,6 +5984,9 @@ Partial Class Clientes
|
||||
#Region "C U E N T A S - B A N C A R I A S"
|
||||
|
||||
Private Sub CargaCuentasBancarias()
|
||||
|
||||
If CveCliente <= 0 Then Exit Sub
|
||||
|
||||
Dim ObjCuentasBancos As New ClsGenerales
|
||||
ViewState("OrdenCuentasBancos") = ""
|
||||
DTCuentasBancos = New DataTable
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
.nolineheight TxtNombreCliente
|
||||
line-height: 1;
|
||||
.nolineheight TxtNombreCliente line-height: 1;
|
||||
}
|
||||
|
||||
.claseesconder {
|
||||
@@ -1599,7 +1598,8 @@
|
||||
<div class="portlet box purpleAlmacen" id="DivSalidaAlmacen" runat="server">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-dropbox"></i><asp:Literal ID="LltSalidaAlmacen" runat="server" Text="Salida Almacen"></asp:Literal>
|
||||
<i class="fa fa-dropbox"></i>
|
||||
<asp:Literal ID="LltSalidaAlmacen" runat="server" Text="Salida Almacen"></asp:Literal>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
@@ -3294,6 +3294,18 @@
|
||||
<td>
|
||||
<asp:TextBox ID="TxtCorreoNotificaciones" runat="server" Width="100%" CssClass="form-control"></asp:TextBox></td>
|
||||
</tr>
|
||||
<tr align="left" id="trPaqueteriOpcionesLabel" runat="server" visible="false">
|
||||
<td id="Td2" runat="server">Tipo de Entrega: </td>
|
||||
</tr>
|
||||
<tr align="left" id="trPaqueteriaOpciones" runat="server" visible="false">
|
||||
<td colspan="2">
|
||||
<asp:RadioButtonList runat="server" ID="RblPaqueteria">
|
||||
<asp:ListItem Value="1" Text="Entrega En Mostrador" />
|
||||
<asp:ListItem Value="2" Text="Entrega Interna" />
|
||||
<asp:ListItem Value="3" Text="Entrega Externa" />
|
||||
</asp:RadioButtonList>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -7239,7 +7251,7 @@
|
||||
|
||||
$get("HdnTipoDescuento").value = "3";
|
||||
//si es con.nc,es.el.total
|
||||
var Total = ToDouble($get(TipoAnticipo == 2? 'TxtTotal':'TxtSubTotal').value);
|
||||
var Total = ToDouble($get(TipoAnticipo == 2 ? 'TxtTotal' : 'TxtSubTotal').value);
|
||||
|
||||
var SaldoCompra = parseFloat(parseFloat($get('HdnVentaSaldo').value).toFixed(2));
|
||||
if (ToDouble($get('HdnCveVenta').value) == 0) SaldoCompra = Total;
|
||||
|
||||
@@ -1206,6 +1206,15 @@ Partial Class Ventas
|
||||
ViewState("SaldoAnticipo") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CorreoEntregaAlmacen As String
|
||||
Get
|
||||
Return If(IsNothing(ViewState("CorreoEntregaAlmacen")), "", ViewState("CorreoEntregaAlmacen").ToString())
|
||||
End Get
|
||||
|
||||
Set(value As String)
|
||||
ViewState("CorreoEntregaAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -2634,6 +2643,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
BtnModalAddPS.Enabled = False
|
||||
End If
|
||||
MostrarOpcioensPaqueteria()
|
||||
End Sub
|
||||
Private Sub BloqueaClasificaciones()
|
||||
If UsuarioActual.CveEmpresa = 141 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
@@ -4847,6 +4857,7 @@ Partial Class Ventas
|
||||
|
||||
ViewState("Mail") = If(DdlTipoComprobante.SelectedValue = "Cot", ObjCliente.MailCotizacion, ObjCliente.Mail)
|
||||
ViewState("MailCC") = ObjCliente.NotificarA
|
||||
CorreoEntregaAlmacen = ObjCliente.DtResultados(0)("CorreoEntregaAlmacen").ToString
|
||||
LblDireccion.Text = ObjCliente.Direccion
|
||||
LblColonia.Text = ObjCliente.Colonia
|
||||
LblCiudad.Text = ObjCliente.Ciudad
|
||||
@@ -5157,8 +5168,8 @@ Partial Class Ventas
|
||||
CargarAlmacenes()
|
||||
|
||||
If UsuarioActual.Empresa.FacturaProduccion Then
|
||||
CargaDocumentacionCliente()
|
||||
End If
|
||||
CargaDocumentacionCliente()
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 1, 119) Then
|
||||
BtnEmitirImprimir.OnClientClick = $"ValidaGuardar({ If(ImprimeNombreSucursal = True, 1, 0)});"
|
||||
@@ -7470,7 +7481,7 @@ Partial Class Ventas
|
||||
ObjContr.Dispose()
|
||||
ObjDocCliente.Dispose()
|
||||
'ObjFolios.Dispose()
|
||||
ErrorList.Clear
|
||||
ErrorList.Clear()
|
||||
ErrorList = Nothing
|
||||
MensajeAlert = Nothing
|
||||
If ObjContPaq IsNot Nothing Then ObjContPaq.Dispose()
|
||||
@@ -9502,7 +9513,7 @@ Partial Class Ventas
|
||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero() > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
|
||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text) Then
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero) Then
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Or CveEstatusRefacturacion = 1 Then
|
||||
@@ -9523,6 +9534,10 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(280) = "1" And RblPaqueteria.SelectedValue = "1" Then
|
||||
NotificarPaqueteria()
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not GuardarUsados(ObjVentas.IniciaTransacSQL, ObjVentas.CveVenta) Then
|
||||
@@ -14055,7 +14070,7 @@ Partial Class Ventas
|
||||
TrVistaPrevia.Visible = EstatusCliente
|
||||
End If
|
||||
|
||||
|
||||
MostrarOpcioensPaqueteria()
|
||||
|
||||
TrAtencionA.Visible = True
|
||||
tdVigencia.Visible = DdlTipoComprobante.SelectedValue.Contiene("Cot")
|
||||
@@ -14066,6 +14081,7 @@ Partial Class Ventas
|
||||
UPCondicionesPago.Update()
|
||||
UpCliente.Update()
|
||||
UpPS.Update()
|
||||
UPObservaciones.Update()
|
||||
End Sub
|
||||
Protected Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged
|
||||
CargaClienteSucursal(DdlSucursalCliente.SelectedValue.ToEntero())
|
||||
@@ -25660,6 +25676,27 @@ Partial Class Ventas
|
||||
CargaEventoBitacora()
|
||||
End Sub
|
||||
|
||||
Private Sub MostrarOpcioensPaqueteria()
|
||||
Dim mostrarOpcionesPaq As Boolean = DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped")
|
||||
trPaqueteriaOpciones.Visible = mostrarOpcionesPaq
|
||||
trPaqueteriOpcionesLabel.Visible = mostrarOpcionesPaq
|
||||
End Sub
|
||||
|
||||
Private Sub NotificarPaqueteria()
|
||||
Dim DtVendedores As DataTable = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim CorreoVendedor As String = DtVendedores.FiltroPrimeroValor("Correo", String.Format("CveVendedor = {0}", DdlVendedor.SelectedValue))
|
||||
Dim CorreoVendedorAdicional As String = DtVendedores.FiltroPrimeroValor("CorreoAdicionalNotificaciones", String.Format("CveVendedor = {0}", DdlVendedor.SelectedValue))
|
||||
Dim CorreoCliente As String = Mail
|
||||
Dim CorreoClienteAlmacen As String = CorreoEntregaAlmacen
|
||||
Dim CorreoNotificacionCliente As String = MailCC
|
||||
|
||||
Dim CorreosCC As String = String.Format("{0};{1};{2};{3}", CorreoVendedor, CorreoVendedorAdicional, CorreoCliente, CorreoNotificacionCliente)
|
||||
Dim LogCorreo As String = String.Format("{0} -- {1} --- {2}", "Tipo de entrega", CorreoClienteAlmacen, CorreosCC)
|
||||
LogCorreo.GuardaLog
|
||||
|
||||
Dim MailCls As New ClsSisMail
|
||||
MailCls.SendMail(ClsPaginas.EmpresaNotificaciones, CorreoVendedor, "Entrega en mostrador", "Pendiente", CorreosCC)
|
||||
MailCls = Nothing
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user