This commit is contained in:
2023-08-03 17:49:20 -07:00
14 changed files with 3319 additions and 86 deletions

View File

@@ -9207,6 +9207,7 @@ Public Class ClsPaginas
'PaginaDict.Add("/Sistemas/CatEmpresas.aspx".ToUpper(), 2) 'PaginaDict.Add("/Sistemas/CatEmpresas.aspx".ToUpper(), 2)
PaginaDict.Add("/Sistemas/CatEmpresas.aspx".ToUpper(), 24) PaginaDict.Add("/Sistemas/CatEmpresas.aspx".ToUpper(), 24)
PaginaDict.Add("/Sistemas/Empresa.aspx".ToUpper(), 2) PaginaDict.Add("/Sistemas/Empresa.aspx".ToUpper(), 2)
PaginaDict.Add("/Sistemas/Empresa2.aspx".ToUpper(), -1)
PaginaDict.Add("/Sistemas/CatUsuarios.aspx".ToUpper(), 20) PaginaDict.Add("/Sistemas/CatUsuarios.aspx".ToUpper(), 20)
PaginaDict.Add("/Sistemas/Usuarios.aspx".ToUpper(), 20) PaginaDict.Add("/Sistemas/Usuarios.aspx".ToUpper(), 20)
PaginaDict.Add("/Sistemas/UsuarioDetalle.aspx".ToUpper(), 20) PaginaDict.Add("/Sistemas/UsuarioDetalle.aspx".ToUpper(), 20)

View File

@@ -443,6 +443,10 @@ Public Class ClsSisEmpresas
_Empresa.GrupoEmpresa = Data.Rows(0)("GrupoEmpresa").ToString.ToEntero _Empresa.GrupoEmpresa = Data.Rows(0)("GrupoEmpresa").ToString.ToEntero
_Empresa.PlantillaMailVenta = Data.Rows(0)("PlantillaMailVenta").ToString _Empresa.PlantillaMailVenta = Data.Rows(0)("PlantillaMailVenta").ToString
_Empresa.AsuntoPlantillaMailVenta = Data.Rows(0)("AsuntoPlantillaMailVenta").ToString _Empresa.AsuntoPlantillaMailVenta = Data.Rows(0)("AsuntoPlantillaMailVenta").ToString
_Empresa.PlantillaMailVentaCotizacion = Data.Rows(0)("PlantillaMailVentaCotizacion").ToString
_Empresa.AsuntoPlantillaMailVentaCotizacion = Data.Rows(0)("AsuntoPlantillaMailVentaCotizacion").ToString
_Empresa.CvePlataforma = Data.Rows(0)("CvePlataforma").ToString.ToEntero _Empresa.CvePlataforma = Data.Rows(0)("CvePlataforma").ToString.ToEntero
_Empresa.CveDistribuidor = Data.Rows(0)("CveDistribuidor").ToString.ToEntero _Empresa.CveDistribuidor = Data.Rows(0)("CveDistribuidor").ToString.ToEntero
_Empresa.DiasPermitidos = Data.Rows(0)("DiasPermitidos").ToString.ToEntero _Empresa.DiasPermitidos = Data.Rows(0)("DiasPermitidos").ToString.ToEntero

View File

@@ -33,7 +33,7 @@ Public Class ClsSisMail
Return Resultado Return Resultado
End Function End Function
Public Function SendMail(ObjEmpresa As Empresa, Para As String, Asunto As String, Body As String, Optional CCP As String = "", Optional Archivos As List(Of ArchivoMail) = Nothing, Optional Displayname As String = "") As Boolean Public Function SendMail(ObjEmpresa As Empresa, Para As String, Asunto As String, Body As String, Optional CCP As String = "", Optional Archivos As List(Of ArchivoMail) = Nothing, Optional Displayname As String = "", Optional CCO As String = "") As Boolean
Dim ObjMail As New Mail Dim ObjMail As New Mail
ObjMail.ObjEmpresa = ObjEmpresa ObjMail.ObjEmpresa = ObjEmpresa
ObjMail.De = If(Displayname.Trim = String.Empty, "", Displayname) ObjMail.De = If(Displayname.Trim = String.Empty, "", Displayname)
@@ -41,6 +41,7 @@ Public Class ClsSisMail
ObjMail.CCP = CCP ObjMail.CCP = CCP
ObjMail.Asunto = Asunto ObjMail.Asunto = Asunto
ObjMail.Body = Body ObjMail.Body = Body
ObjMail.CCO = CCO
If Archivos IsNot Nothing AndAlso Archivos.Count > 0 Then ' si tiene adjuntos, me crea el objeto If Archivos IsNot Nothing AndAlso Archivos.Count > 0 Then ' si tiene adjuntos, me crea el objeto
ObjMail.Archivos = New List(Of ArchivoMail) ObjMail.Archivos = New List(Of ArchivoMail)
@@ -85,6 +86,7 @@ Public Class ClsSisMail
Dim Mensaje As String = String.Empty Dim Mensaje As String = String.Empty
Dim ArrayPara() As String = ObjMail.Para.Replace(",", ";").Split(";"c) Dim ArrayPara() As String = ObjMail.Para.Replace(",", ";").Split(";"c)
Dim ArrayCCP() As String = ObjMail.CCP.Replace(",", ";").Split(";"c) Dim ArrayCCP() As String = ObjMail.CCP.Replace(",", ";").Split(";"c)
Dim ArrayBCC() As String = ObjMail.CCO.Replace(",", ";").Split(";"c)
'"sgd.facturacion@adsistemas.mx" '"sgd.facturacion@adsistemas.mx"
If ObjMail.De = String.Empty Then If ObjMail.De = String.Empty Then
@@ -103,6 +105,12 @@ Public Class ClsSisMail
For Each CorreoCCPPara As String In ArrayCCP.Distinct For Each CorreoCCPPara As String In ArrayCCP.Distinct
If IsMail(CorreoCCPPara.Trim) Then Correo.To.Add(CorreoCCPPara.Trim) If IsMail(CorreoCCPPara.Trim) Then Correo.To.Add(CorreoCCPPara.Trim)
Next Next
End If
If ArrayBCC IsNot Nothing AndAlso ArrayBCC.Length > 0 Then
For Each CorreoCCOPara As String In ArrayBCC.Distinct
If IsMail(CorreoCCOPara.Trim) Then Correo.Bcc.Add(CorreoCCOPara.Trim)
Next
End If End If
Correo.Subject = ObjMail.Asunto Correo.Subject = ObjMail.Asunto
@@ -120,7 +128,6 @@ Public Class ClsSisMail
Correo.Body = Mensaje & ObjMail.Body Correo.Body = Mensaje & ObjMail.Body
Correo.IsBodyHtml = True Correo.IsBodyHtml = True
Correo.Priority = Net.Mail.MailPriority.Normal Correo.Priority = Net.Mail.MailPriority.Normal
If ObjMail.Archivos IsNot Nothing Then If ObjMail.Archivos IsNot Nothing Then
For Each Item As ArchivoMail In ObjMail.Archivos For Each Item As ArchivoMail In ObjMail.Archivos
If Item.ArchivoBinario IsNot Nothing Then If Item.ArchivoBinario IsNot Nothing Then
@@ -190,6 +197,7 @@ Public Class ClsSisMail
Public Property Para As String Public Property Para As String
Public Property Asunto As String Public Property Asunto As String
Public Property CCP As String Public Property CCP As String
Public Property CCO As String
Public Property Body As String Public Property Body As String
Public Property Archivos As List(Of ArchivoMail) Public Property Archivos As List(Of ArchivoMail)
End Class End Class

View File

@@ -5850,7 +5850,7 @@ Public Class ClsVentas
.Add("@CamionRemolque2", SqlDbType.VarChar).Value = CamionRemolque2 .Add("@CamionRemolque2", SqlDbType.VarChar).Value = CamionRemolque2
.Add("@Distancia", SqlDbType.Decimal).Value = Distancia .Add("@Distancia", SqlDbType.Decimal).Value = Distancia
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@ErrorMSG", SqlDbType.VarChar, 300).Direction = ParameterDirection.Output .Add("@ErrorMSG", SqlDbType.VarChar, 5000).Direction = ParameterDirection.Output
End With End With
Try Try

View File

@@ -140,8 +140,9 @@ Public Class Empresa
Public Property CveEncuestaCRM As Integer Public Property CveEncuestaCRM As Integer
Public Property FielPassword As String Public Property FielPassword As String
Public Property FielPFX As String Public Property FielPFX As String
Public Property AsuntoPlantillaMailVentaCotizacion As String
Public Property PlantillaMailVentaCotizacion As String
Dim Funcionalidades As HybridDictionary Dim Funcionalidades As HybridDictionary
'HybridDictionary, no se puede serializar, por eso no es propiedad, y se utilizar el setfuncionalidad, para asignarle valor 'HybridDictionary, no se puede serializar, por eso no es propiedad, y se utilizar el setfuncionalidad, para asignarle valor
Public Sub SetFuncionalidades(HD As HybridDictionary) Public Sub SetFuncionalidades(HD As HybridDictionary)

View File

@@ -130,7 +130,7 @@ Public Class E141 : Implements IHttpHandler
End If End If
Catch ex As Exception Catch ex As Exception
GuardaLogAD("Ocurrió un error al descargar el pdf. " + ex.ToString() + ".parametros: " + Params, "LogE141") GuardaLogAD("Ocurrió un error al descargar el pdf. " + ex.ToString() + ".parametros: " + Params, "LogE141Descargas")
End Try End Try
Else Else
@@ -250,6 +250,16 @@ Public Class E141 : Implements IHttpHandler
Else Else
retorno = "False" retorno = "False"
End If End If
Case "EnviarCorreoAltasSemanal"
GuardaLogAD("CA-Inicia envio de correo semanal", "LogE141")
respuesta = EnviarCorreoActualizarProductos()
GuardaLogAD("CA-Finaliza envio de correo semanal", "LogE141")
If respuesta Then
retorno = "True"
Else
retorno = "False"
End If
End Select End Select
End If End If
@@ -268,6 +278,27 @@ Public Class E141 : Implements IHttpHandler
End Try End Try
End Sub End Sub
Private Sub EnviarCorreoNotificacion(TareaNotificar As String, Cuerpo As String)
Dim ResultadoMail As Integer = 0
Dim CorreoDestino As String = "atencion@fidelityapps.mx"
Dim MailCC As String = "citas@econollantas.com;sixrogs@hotmail.com;ffelix@econollantas.com"
Dim MailCCO As String = "jonathan.perez@adssistemas.mx;rene.molina@adsistemas.mx"
If Not EsProduccion Then
CorreoDestino = "jonathan.perez@adssistemas.mx"
MailCC = "rene.molina@adsistemas.mx"
MailCCO = "japmx95@gmail.com"
End If
Dim ObjMail As New ClsSisMail
If ObjMail.SendMail(ClsPaginas.EmpresaNotificaciones, CorreoDestino, TareaNotificar, Cuerpo, CCP:=MailCC, CCO:=MailCCO) Then
GuardaLogAD($"EC-Envio de correo exitoso. Tarea: {TareaNotificar}", "LogE141")
Else
GuardaLogAD($"EC-No se pudo enviar el correo. Tarea: {TareaNotificar}", "LogE141")
End If
End Sub
Private Function ValidarSolicitud(ByVal context As HttpContext) As AuthMessage Private Function ValidarSolicitud(ByVal context As HttpContext) As AuthMessage
Dim unauthorized As Boolean = True Dim unauthorized As Boolean = True
Dim respuesta As New AuthMessage Dim respuesta As New AuthMessage
@@ -1729,6 +1760,38 @@ Public Class E141 : Implements IHttpHandler
'End Function 'End Function
#Region "C R E A C I Ó N / A C T U A L I Z A C I Ó N - P R O D U C T O S" #Region "C R E A C I Ó N / A C T U A L I Z A C I Ó N - P R O D U C T O S"
Private Function EnviarCorreoActualizarProductos() As Boolean
Dim Retorno As Boolean = True
Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0
Dim DtPS As DataTable = Nothing
Using ObjPS As New ClsProductosServicios
'OBTENER LOS PRODUCTOS NUEVOS EN LA ULTIMA SEMANA
If ObjPS.GetProductosModificados(CveEmpresa, 44, HorasDiferencia:=(24 * 7)) Then
DtPS = ObjPS.DtResultados
End If
End Using
If DtPS IsNot Nothing Then
Dim sb As New StringBuilder
For Each Row As DataRow In DtPS.Rows
sb.AppendFormat("- {0}. <br/>", Row("CodigoPS"))
Next
Dim msg As String = ""
If sb.Length > 0 Then
msg = $"Se enviaron los siguientes productos: <br/> {sb.ToString()} <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}"
Else
msg = $"No se enviaron productos esta semana <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}"
End If
EnviarCorreoNotificacion("SIG - Productos enviados en la semana", msg)
End If
Return Retorno
End Function
Private Function CrearActualizarProductos(Todos As Boolean) As Boolean Private Function CrearActualizarProductos(Todos As Boolean) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0 Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0
@@ -1738,6 +1801,8 @@ Public Class E141 : Implements IHttpHandler
'OBTERNER PRECIOS DE PUBLICO GENERAL 'OBTERNER PRECIOS DE PUBLICO GENERAL
If ObjPS.GetProductosModificados(CveEmpresa, 44, If(Todos, -1, 26)) Then If ObjPS.GetProductosModificados(CveEmpresa, 44, If(Todos, -1, 26)) Then
DtPS = ObjPS.DtResultados.Copy() DtPS = ObjPS.DtResultados.Copy()
Else
GuardaLogAD($"NP-Ocurrió un error al obtener los productos", "LogE141")
End If End If
End Using End Using
@@ -1759,10 +1824,10 @@ Public Class E141 : Implements IHttpHandler
CountPeticionesExitosas += 1 CountPeticionesExitosas += 1
GuardaLogAD("NP-Creacion/actualizacion de productos exitosa", "LogE141") GuardaLogAD("NP-Creacion/actualizacion de productos exitosa", "LogE141")
Else Else
GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${respuesta.ToString()}", "LogE141") GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${respuesta.ToString()}", "LogE141")
End If End If
Else Else
GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${resp}", "LogE141") GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${resp}", "LogE141")
End If End If
Else Else
@@ -1799,16 +1864,18 @@ Public Class E141 : Implements IHttpHandler
CountPeticionesExitosas += 1 CountPeticionesExitosas += 1
GuardaLogAD("NP-Creacion/actualizacion de productos exitosa", "LogE141") GuardaLogAD("NP-Creacion/actualizacion de productos exitosa", "LogE141")
Else Else
GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${respuesta.ToString()}", "LogE141") GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${respuesta.ToString()}", "LogE141")
End If End If
Else Else
GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${resp}", "LogE141") GuardaLogAD($"NP-No se pudo realizar la Creacion/actualizacion de productos ${resp}", "LogE141")
End If End If
Threading.Thread.Sleep(1000) Threading.Thread.Sleep(1000)
End While End While
End If End If
If DtPS.Rows.Count > 0 Then
EnviarCorreoNotificacion("SIG - Actualización de productos", $"Se ejecuto la tarea de actualización de productos. <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}")
End If
End If End If
If CountPeticionesExitosas = CountPeticiones Then If CountPeticionesExitosas = CountPeticiones Then
@@ -1826,7 +1893,7 @@ Public Class E141 : Implements IHttpHandler
Dim DtPS As DataTable = Nothing Dim DtPS As DataTable = Nothing
Using ObjPS As New ClsProductosServicios Using ObjPS As New ClsProductosServicios
'OBTERNER PRECIOS DE PUBLICO GENERAL 'OBTERNER PRECIOS DE PUBLICO GENERAL
If ObjPS.GetProductosModificados(CveEmpresa, 44, If(Todos, -1, 1)) Then If ObjPS.GetProductosModificados(CveEmpresa, 44, If(Todos, -1, 26)) Then
DtPS = ObjPS.DtResultados.Copy() DtPS = ObjPS.DtResultados.Copy()
End If End If
End Using End Using
@@ -1890,6 +1957,12 @@ Public Class E141 : Implements IHttpHandler
Private Function ActualizarPrecios(Todos As Boolean) As Boolean Private Function ActualizarPrecios(Todos As Boolean) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'ENVIAR PRECIOS SOLO DE 8am a 7pm
If Now.Hour < 7 OrElse Now.Hour > 21 Then
Retorno = True
Return Retorno
End If
Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0 Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0
Dim DtPS As DataTable = Nothing Dim DtPS As DataTable = Nothing
@@ -1897,6 +1970,8 @@ Public Class E141 : Implements IHttpHandler
'OBTERNER PRECIOS DE PUBLICO GENERAL 'OBTERNER PRECIOS DE PUBLICO GENERAL
If ObjPS.GetPreciosModificados(CveEmpresa, 44, If(Todos, -1, 1)) Then If ObjPS.GetPreciosModificados(CveEmpresa, 44, If(Todos, -1, 1)) Then
DtPS = ObjPS.DtResultados.Copy() DtPS = ObjPS.DtResultados.Copy()
Else
GuardaLogAD($"AP-Ocurrió un error al obtener los precios", "LogE141")
End If End If
End Using End Using
@@ -1965,8 +2040,13 @@ Public Class E141 : Implements IHttpHandler
End While End While
End If End If
If DtPS.Rows.Count > 0 Then
EnviarCorreoNotificacion("SIG - Actualización de precios", $"Se ejecuto la tarea de actualización de precios. <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}")
End If
End If End If
Return Retorno Return Retorno
End Function End Function
@@ -2017,11 +2097,19 @@ Public Class E141 : Implements IHttpHandler
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0 Dim CountPeticiones As Integer = 0, CountPeticionesExitosas As Integer = 0
'ENVIAR SOLO DE 8am a 8pm
If Now.Hour < 7 OrElse Now.Hour > 21 Then
Retorno = True
Return Retorno
End If
Dim DtPS As DataTable = Nothing Dim DtPS As DataTable = Nothing
Using ObjPS As New ClsProductosServicios Using ObjPS As New ClsProductosServicios
'OBTERNER PRECIOS DE PUBLICO GENERAL 'OBTERNER PRECIOS DE PUBLICO GENERAL
If ObjPS.GetExistenciasEmpresa("-1", CveEmpresa) Then If ObjPS.GetExistenciasEmpresa("-1", CveEmpresa) Then
DtPS = ObjPS.DtResultados.Copy() DtPS = ObjPS.DtResultados.Copy()
Else
GuardaLogAD($"AE-Ocurrió un error al obtener las existencias", "LogE141")
End If End If
End Using End Using
@@ -2087,6 +2175,10 @@ Public Class E141 : Implements IHttpHandler
Threading.Thread.Sleep(1000) Threading.Thread.Sleep(1000)
End While End While
End If End If
If DtPS.Rows.Count > 0 Then
EnviarCorreoNotificacion("SIG - Actualización de existencias", $"Se ejecuto la tarea de actualización de existencias. <br/> Fecha y hora: {Now.ToString("dd/MM/yyyy hh:mm:ss tt")}")
End If
End If End If
If CountPeticionesExitosas = CountPeticiones Then If CountPeticionesExitosas = CountPeticiones Then

View File

@@ -413,11 +413,13 @@ Partial Class Compras_ReembolsosComprobaciones
Dim FechaFactura As Date = gvRowVal.DataKey("FechaCompra").ToDate Dim FechaFactura As Date = gvRowVal.DataKey("FechaCompra").ToDate
Dim FechaDocumento As Date Dim FechaDocumento As Date
If DDlCheques.SelectedValue.ToEntero = -1 Then
If DDlCheques.SelectedValue.ToEntero = -1 And Not ChkReembolsarSinBancos.Checked Then
FechaDocumento = TxtFechaDocumento.Text.ToDate FechaDocumento = TxtFechaDocumento.Text.ToDate
Else Else
FechaDocumento = TxtFechaPrePoliza.Text.ToDate FechaDocumento = TxtFechaPrePoliza.Text.ToDate
End If End If
Dim AnioFactura As Integer = FechaFactura.Year Dim AnioFactura As Integer = FechaFactura.Year
Dim MesFactura As Integer = FechaFactura.Month Dim MesFactura As Integer = FechaFactura.Month
Dim AnioDocumento As Integer = FechaDocumento.Year Dim AnioDocumento As Integer = FechaDocumento.Year

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"> <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
<AutoRefresh>0</AutoRefresh> <AutoRefresh>0</AutoRefresh>
<DataSources> <DataSources>
<DataSource Name="DataSet"> <DataSource Name="DataSet">
@@ -65,6 +65,10 @@
<DataField>Valor</DataField> <DataField>Valor</DataField>
<rd:TypeName>System.Decimal</rd:TypeName> <rd:TypeName>System.Decimal</rd:TypeName>
</Field> </Field>
<Field Name="Disponible">
<DataField>Disponible</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
</Fields> </Fields>
<rd:DataSetInfo> <rd:DataSetInfo>
<rd:DataSetName>DataSet</rd:DataSetName> <rd:DataSetName>DataSet</rd:DataSetName>
@@ -811,7 +815,6 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>
@@ -823,7 +826,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Fields!Cantidad.Value</Value> <Value>=Fields!Disponible .Value</Value>
<Style> <Style>
<FontSize>7pt</FontSize> <FontSize>7pt</FontSize>
<FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight> <FontWeight>=IIf(Fields!PS.Value = "", "Bold", "Default")</FontWeight>
@@ -1612,7 +1615,6 @@
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
</ReportParameters> </ReportParameters>
<rd:ReportUnitType>Cm</rd:ReportUnitType> <rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID> <rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>
</Report> </Report>

View File

@@ -4825,10 +4825,13 @@
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox CssClass="form-control" ID="TxtNumeroCuenta" runat="server"></asp:TextBox> <asp:TextBox CssClass="form-control" ID="TxtNumeroCuenta" runat="server" CausesValidation="true"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtNumeroCuenta" Text="Cuenta:"></asp:Label> <asp:Label runat="server" AssociatedControlID="TxtNumeroCuenta" Text="Cuenta:"></asp:Label>
<asp:RequiredFieldValidator ID="RFVNumeroCuenta" runat="server" InitialValue="-1" ControlToValidate="TxtNumeroCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVNumeroCuenta" runat="server" ControlToValidate="TxtNumeroCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregarBanco"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RGVNumeroCuenta" ValidationExpression="^(?:\d{10}|\d{11}|\d{15}|\d{16}|\d{18})$" runat="server" ControlToValidate="TxtNumeroCuenta" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> debe de tener una logitud de 10,11,15,16,18 caracteres." ValidationGroup="GrpAgregarBanco"></asp:RegularExpressionValidator>
<ajax:ValidatorCalloutExtender ID="VcoNumeroCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroCuenta" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VcoNumeroCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVNumeroCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VcoRGVNumeroCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RGVNumeroCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">

1049
Sistemas/Empresa2.aspx Normal file

File diff suppressed because it is too large Load Diff

2048
Sistemas/Empresa2.aspx.vb Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -109,21 +109,30 @@ Partial Class Ventas_FacturacionAcarreos
Try Try
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
For Each row As DataRow In dt.Rows For Each row As DataRow In dt.Rows
Dim msg As String = ObjVentas.AddFacturacionAcarreos(row("Sucursal").ToString(), row("RFC").ToString(), row("Cantidad").ToString().ToDecimal(), row("ProductoGeneral").ToString(), Dim FechaSalida As DateTime = MinFecha
row("Origen").ToString(), row("Destino").ToString(), row("FechaSalida").ToString().ToDateTime(), row("FechaLlegada").ToString().ToDateTime(), Dim FechaLlegada As DateTime = MinFecha
row("Unidad").ToString(), row("Chofer").ToString(), row("Configuración").ToString(), row("Remolque1").ToString(), row("Remolque2").ToString(),
row("Distancia").ToString().ToDecimal(), UsuarioActual.CveEmpresa) If row("FechaSalida").ToString().ToDateTime() > FechaSalida Then
FechaSalida = row("FechaSalida").ToString().ToDateTime()
End If
If row("FechaLlegada").ToString().ToDateTime() > FechaLlegada Then
FechaLlegada = row("FechaLlegada").ToString().ToDateTime()
End If
Dim msg As String = ObjVentas.AddFacturacionAcarreos(row("Sucursal").ToString(), row("RFC").ToString(), row("Cantidad").ToString().ToDecimal(), row("ProductoGeneral").ToString(), row("Origen").ToString(),
row("Destino").ToString(), FechaSalida, FechaLlegada, row("Unidad").ToString(), row("Chofer").ToString(), row("Configuración").ToString(),
row("Remolque1").ToString(), row("Remolque2").ToString(), row("Distancia").ToString().ToDecimal(), UsuarioActual.CveEmpresa)
If msg = "Correcto" Then If msg = "Correcto" Then
RowsCargados += 1 RowsCargados += 1
Else Else
TieneError = True TieneError = True
MsgFacturacionAcarreos.AppendFormat("{0}", msg) MsgFacturacionAcarreos.AppendFormat("Ocurrió un error al procesar la fila: {0}<br/>{1}", row("NoExcel"), msg)
RowsNoCargados += 1 RowsNoCargados += 1
Exit For Exit For
End If End If
Next Next
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al cargar los precios.", ex) OnError("Ocurrió un error al cargar los datos.", ex)
Finally Finally
Dim MensajeFinal As New StringBuilder() Dim MensajeFinal As New StringBuilder()
If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then
@@ -179,15 +188,21 @@ Partial Class Ventas_FacturacionAcarreos
End If End If
Next Next
dataTable.Columns.Add("NoExcel", GetType(String))
While curRow < worksheet.Rows.Count While curRow < worksheet.Rows.Count
columns = New String(cols - 1) {} columns = New String(cols) {}
For curCol = 0 To cols - 1 For curCol = 0 To cols
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then If curCol = cols Then
columns(curCol) = "" columns(curCol) = worksheet.Rows(curRow).Name
Else Else
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString() If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
columns(curCol) = ""
Else
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
End If
End If End If
Next Next

View File

@@ -625,72 +625,74 @@
<table class="table table-striped nobordertop table-advance table-hover"> <table class="table table-striped nobordertop table-advance table-hover">
<tbody> <tbody>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkTipoDocto" runat="server" Text="*Tipo Documento" Checked="true" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkTipoDocto" runat="server" Text="&nbsp;*Tipo Documento" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursal" runat="server" Text="*Sucursal" Checked="true" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkSucursal" runat="server" Text="&nbsp;*Sucursal" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCobranza" runat="server" Text="Sucursal Cobranza" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCobranza" runat="server" Text="&nbsp;Sucursal Cobranza" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkFolio" runat="server" Text="*Folio" Checked="true" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkFolio" runat="server" Text="&nbsp;*Folio" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFactura" runat="server" Text="*Estatus de Factura" Checked="true" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFactura" runat="server" Text="&nbsp;*Estatus de Factura" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalEjecucion" runat="server" Text="Sucursal Ejecución" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkSucursalEjecucion" runat="server" Text="&nbsp;Sucursal Ejecución" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkFecha" runat="server" Text="*Fecha" Checked="true" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkFecha" runat="server" Text="&nbsp;*Fecha" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkVendedor" runat="server" Text="Vendedor" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkVendedor" runat="server" Text="&nbsp;Vendedor" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text="Motivo Cancelacion" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text="&nbsp;Motivo Cancelacion" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkSubTotal" runat="server" Text="*SubTotal" Checked="true" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkSubTotal" runat="server" Text="&nbsp;*SubTotal" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkCodigo" runat="server" Text="Código Cliente" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkCodigo" runat="server" Text="&nbsp;Código Cliente" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkUsuario" runat="server" Text="&nbsp;Usuario" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkDescuento" runat="server" Text="*Descuento" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkDescuento" runat="server" Text="&nbsp;*Descuento" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkCliente" runat="server" Text="*Cliente" Checked="true" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkCliente" runat="server" Text="&nbsp;*Cliente" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFacturacion" runat="server" Text="Estatus Facturación" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFacturacion" runat="server" Text="&nbsp;Estatus Facturación" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkIVA" runat="server" Text="*IVA" Checked="true" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkIVA" runat="server" Text="&nbsp;*IVA" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkMailCliente" runat="server" Text="Mail Cliente" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkMailCliente" runat="server" Text="&nbsp;Mail Cliente" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkFolioFacturacion" runat="server" Text="Factura Cotización" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkFolioFacturacion" runat="server" Text="&nbsp;Factura Cotización" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkIEPS" runat="server" Text="*IEPS" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkRetIVA" runat="server" Text="&nbsp;Ret. IVA" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkCuentaContable" runat="server" Text="Cuenta Contable" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkCuentaContable" runat="server" Text="&nbsp;Cuenta Contable" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkObservaciones" runat="server" Text="Observaciones" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkObservaciones" runat="server" Text="&nbsp;Observaciones" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkRetISR" runat="server" Text="&nbsp;Ret. ISR" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCliente" runat="server" Text="Sucursal Cliente" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCliente" runat="server" Text="&nbsp;Sucursal Cliente" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkOrdenCompra" runat="server" Text="OrdenCompra" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkOrdenCompra" runat="server" Text="&nbsp;OrdenCompra" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkTotalImpuestos" runat="server" Text="&nbsp;Impuestos Locales" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSaldo" runat="server" Text="Saldo" Checked="false" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkSaldo" runat="server" Text="&nbsp;Saldo" Checked="false" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkPedidoContrato" runat="server" Text="Pedido Contrato" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkPedidoContrato" runat="server" Text="&nbsp;Pedido Contrato" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkTotalImpuestos" runat="server" Text="Impuestos Locales" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkFolioFiscal" runat="server" Text="Folio Fiscal (UUID)" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkTotal" runat="server" Text="&nbsp;*Total" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChlMotivoDescuento" runat="server" Text="Motivo Descuento" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkFolioFiscal" runat="server" Text="&nbsp;Folio Fiscal (UUID)" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChlMotivoDescuento" runat="server" Text="&nbsp;Motivo Descuento" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkTotal" runat="server" Text="*Total" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkMoneda" runat="server" Text="&nbsp;*Moneda" Checked="true" /></td>
<td style="text-align: left;"></td> <td style="text-align: left;"></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkAmortizacion" runat="server" Text="Amortización" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkAmortizacion" runat="server" Text="&nbsp;Amortización" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"><asp:CheckBox ID="ChkMoneda" runat="server" Text="*Moneda" Checked="true" /></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkIEPS" runat="server" Text="&nbsp;*IEPS" /></td>
<td style="text-align: left;"></td> <td style="text-align: left;"></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSeTimbro" runat="server" Text="Se Timbró" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkSeTimbro" runat="server" Text="&nbsp;Se Timbró" /></td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"></td> <td style="text-align: left;"></td>
<td style="text-align: left;"></td> <td style="text-align: left;"></td>
<td style="text-align: left;"><asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text="Se envió Mail" /></td> <td style="text-align: left;"><asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text="&nbsp; Se envió Mail" />&nbst</td>
</tr> </tr>
</tbody> </tbody>

View File

@@ -423,66 +423,69 @@
<tbody> <tbody>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkCantidad" runat="server" Text="*Cantidad" /></td> <asp:CheckBox ID="ChkCantidad" runat="server" Text="&nbsp;*Cantidad" /></td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" /> <asp:CheckBox ID="ChkMaxSub" runat="server" Text="&nbsp;SubTotal Máximo" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkSubtotal" runat="server" Text="Sub total" /></td> <asp:CheckBox ID="ChkSubtotal" runat="server" Text="&nbsp;Sub total" /></td>
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="SubTotal Promedio" /> <asp:CheckBox ID="ChkAVGSub" runat="server" Text="&nbsp;SubTotal Promedio" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkDescuentos" runat="server" Text="*Descuentos" /></td> <asp:CheckBox ID="ChkDescuentos" runat="server" Text="&nbsp;*Descuentos" /></td>
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkMinSub" runat="server" Text="SubTotal Mínimo" /> <asp:CheckBox ID="ChkMinSub" runat="server" Text="&nbsp;SubTotal Mínimo" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkSubTotal2" runat="server" Text="*Subtotal 2" /> <asp:CheckBox ID="ChkSubTotal2" runat="server" Text="&nbsp;*Subtotal 2" />
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="Total Máximo" /> <asp:CheckBox ID="ChkMaxTot" runat="server" Text="&nbsp;Total Máximo" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkIVA" runat="server" Text="*IVA" /> <asp:CheckBox ID="ChkIVA" runat="server" Text="&nbsp;*IVA" />
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="Total Promedio" /> <asp:CheckBox ID="ChkAvgTot" runat="server" Text="&nbsp;Total Promedio" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkIEPS" runat="server" Text="*IEPS" /> <asp:CheckBox ID="ChkRetIVA" runat="server" Text="&nbsp;Ret. IVA" />
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" /> <asp:CheckBox ID="ChkMinTot" runat="server" Text="&nbsp;Total Mínimo" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" />
<asp:CheckBox ID="ChkRetISR" runat="server" Text="&nbsp;Ret. ISR" />
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="CheckRefacturado" runat="server" Text="Refacturado" /> <asp:CheckBox ID="CheckRefacturado" runat="server" Text="&nbsp;Refacturado" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" />
<asp:CheckBox ID="ChkImpLoc" runat="server" Text="&nbsp;Impuestos Locales" />
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
@@ -491,7 +494,8 @@
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkImpLoc" runat="server" Text="Impuestos Locales" />
<asp:CheckBox ID="ChkTotal" runat="server" Text="&nbsp;*Total" />
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
@@ -500,7 +504,9 @@
<tr> <tr>
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkTotal" runat="server" Text="*Total" />
<asp:CheckBox ID="ChkIEPS" runat="server" Text="&nbsp;*IEPS" />
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">