Merge Ventas

This commit is contained in:
2020-07-06 18:03:17 -07:00
40 changed files with 2556 additions and 2271 deletions

View File

@@ -250,10 +250,10 @@
<br /> <br />
<div class="form-group form-md-line-input input-iconright" style="width: 170px!important"> <div class="form-group form-md-line-input input-iconright" style="width: 170px!important">
<asp:Label runat="server" ID="lblSubProyecto" for="<%= DdlSubProyectos.ClientID.ToString()%>">SubProyecto:</asp:Label>
<asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="200px" AutoPostBack="true"></asp:DropDownList> <asp:DropDownList ID="DdlSubProyectos" runat="server" CssClass="form-control input-sm select2me" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Width="200px" AutoPostBack="true"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVProducto2" InitialValue="-1" runat="server" ControlToValidate="DdlSubProyectos" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFolioGarantia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCEProducto2" runat="server" HighlightCssClass="vco" TargetControlID="RFVProducto2" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= DdlSubProyectos.ClientID.ToString()%>">SubProyecto:</label>
<i></i> <i></i>
</div> </div>

View File

@@ -47,6 +47,7 @@ Partial Class Acumuladores_CatFoliosGarantia
#Region "Folios Garantía" #Region "Folios Garantía"
Private Sub CargaSubProyectos() Private Sub CargaSubProyectos()
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, lblSubProyecto)
DdlSubProyectos.Items.Clear() DdlSubProyectos.Items.Clear()
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyectos.DataBind() DdlSubProyectos.DataBind()

View File

@@ -4452,7 +4452,8 @@ Public Class ClsBancos
Dim RutaComprobante As String = "" Dim RutaComprobante As String = ""
If GetBancosIE(CveIENotificar, UsuarioActual.CveEmpresa) Then If GetBancosIE(CveIENotificar, UsuarioActual.CveEmpresa) Then
RutaComprobante = Comprobante RutaComprobante = $"{UsuarioActual.Empresa.Ruta}IE/{Comprobante}"
End If End If
@@ -4742,6 +4743,7 @@ Public Class ClsBancos
strBody.AppendFormat("</div>") strBody.AppendFormat("</div>")
End If End If
strBody.Append(" <div><b>Correo automatizado por SIG ERP <a href='http://adsistemas.mx/'>www.adsistemas.mx</a></b> </div> ")
strBody.Append(" <div> Favor de no responder a este correo. </div> ") strBody.Append(" <div> Favor de no responder a este correo. </div> ")
strBody.Append("</body></html>") strBody.Append("</body></html>")

View File

@@ -240,7 +240,7 @@ Public Class ClsMovimientos
Gpo As Integer, CveResponsable As Integer, Gpo As Integer, CveResponsable As Integer,
TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1", TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional FechaCorte As Date = Nothing, Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1) As Boolean Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -272,6 +272,7 @@ Public Class ClsMovimientos
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus .Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
End With End With
Try Try
@@ -317,15 +318,12 @@ Public Class ClsMovimientos
Return Retorno Return Retorno
End Function End Function
Public Function GetCxCDetalle(FechaI As String, FechaF As String, CveCliente As Integer, CveSubProyecto As Integer, Public Function GetCxCDetalle(FechaI As String, FechaF As String, CveCliente As Integer, CveSubProyecto As Integer, CveVendedor As Integer, CveUsuario As Integer, Anio As Integer, Mes As Integer,
CveVendedor As Integer, CveUsuario As Integer, Anio As Integer, Mes As Integer, AnioMes As String, Fecha As String, CveClienteSucursal As Integer, Opcion As String, CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer,
AnioMes As String, CveResponsable As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
Fecha As String,
CveClienteSucursal As Integer, Opcion As String,
CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer, CveResponsable As Integer,
TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoDocto As String = "-1",
Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1, Optional FechaVI As String = "-1", Optional FechaVF As String = "1", Optional FechaCorte As Date = Nothing, Optional CveUsuarioConsulta As Integer = -1,
Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1) As Boolean Optional CveCobranzaEstatus As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional LimiteCredito As Decimal = -1,
Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
'Data = New DataTable 'Data = New DataTable
@@ -363,6 +361,10 @@ Public Class ClsMovimientos
.Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus .Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito .Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@EstatusCliente", SqlDbType.Int).Value = EstatusCliente
End With End With
Try Try

View File

@@ -1431,7 +1431,7 @@ Public Class ClsOC
Return Retorno Return Retorno
End Function End Function
Public Function UpdateEstatus(Estatus As String, Tipo As String, CveEstatusSiguiente As Integer, TipoTermino As Integer, EstatusActivo As Boolean, EsCancelable As Boolean, CveEstatus As Integer) As Boolean Public Function UpdateEstatus(Estatus As String, Tipo As String, CveEstatusSiguiente As Integer, TipoTermino As Integer, EstatusActivo As Boolean, EsCancelable As Boolean, CveEstatus As Integer, EsatatusSiguiente As String) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_OC_EstatusUpdate") DataAdapter("PA_OC_EstatusUpdate")
@@ -1452,6 +1452,9 @@ Public Class ClsOC
Catch Ex1 As SqlException Catch Ex1 As SqlException
If Ex1.Message.Contains("Número: 2627;") Then If Ex1.Message.Contains("Número: 2627;") Then
Alert("Ya existe un Estatus con el mismo nombre: " & Estatus & ".", TipoMensaje.MsgAdvertencia) Alert("Ya existe un Estatus con el mismo nombre: " & Estatus & ".", TipoMensaje.MsgAdvertencia)
ElseIf Ex1.Message.Contains("Número: 530;") Then
Alert($"La asiganación del campo estatus siguiente <b>{EsatatusSiguiente}</b> esta creando problema de recursividad.", TipoMensaje.MsgAdvertencia)
Else Else
Me.OnError("Ocurrió un error al guardar los cambios en el Estatus", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Me.OnError("Ocurrió un error al guardar los cambios en el Estatus", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If End If

View File

@@ -8053,12 +8053,24 @@ Public Class ClsPaginas
If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False
LblSubProyecto.Text = "Proyecto" LblSubProyecto.Text = "Proyecto"
Case 4 Case 4
If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto" If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto<br/>"
LblSubProyecto.Text = "Subproyecto" LblSubProyecto.Text = "Subproyecto"
Case 5 Case 5
If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto" If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto<br/>"
LblSubProyecto.Text = "Sucursal" LblSubProyecto.Text = "Sucursal"
End Select End Select
If DdlProyecto IsNot Nothing Then
DdlProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}), GlobalDTProyectos(UsuarioActual.CveEmpresa, -1).FiltraParametros("", "", {"CveProyecto", "Proyecto"}))
DdlProyecto.DataBind()
DdlProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
If DdlSubProyecto IsNot Nothing Then
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
End Sub End Sub
End Class End Class

View File

@@ -1320,7 +1320,7 @@ Public Class ClsVentas
Public Function GetRepVentas(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, Public Function GetRepVentas(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1",
Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1,
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1) As Boolean Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasGetRep") DataAdapter("PA_Vta_VentasGetRep")
@@ -1346,6 +1346,7 @@ Public Class ClsVentas
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
End With End With
Try Try
@@ -1405,7 +1406,7 @@ Public Class ClsVentas
Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer, Public Function GetRepVentasPeriodos(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1", CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1",
Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1, Optional CveProyecto As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1, Optional VerEn As Integer = -1,
Optional CveClienteClasificacion As Integer = -1) As Boolean Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_VentasGetRepPeriodo") DataAdapter("PA_VentasGetRepPeriodo")
@@ -1432,6 +1433,7 @@ Public Class ClsVentas
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@VerEn", SqlDbType.Int).Value = VerEn .Add("@VerEn", SqlDbType.Int).Value = VerEn
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
End With End With
Try Try
@@ -1449,7 +1451,7 @@ Public Class ClsVentas
Vendedor As String, CveUsuario As Integer, CveEstatus As String, FechaI As Date, FechaF As Date, CveCorte As Integer, TipoDocto As String, Vendedor As String, CveUsuario As Integer, CveEstatus As String, FechaI As Date, FechaF As Date, CveCorte As Integer, TipoDocto As String,
CveSubProyectoEjecucion As Integer, CveEmpresa As Integer, FechaIEjec As Date, FechaFEjec As Date, Optional CveProyecto As Integer = -1, CveSubProyectoEjecucion As Integer, CveEmpresa As Integer, FechaIEjec As Date, FechaFEjec As Date, Optional CveProyecto As Integer = -1,
Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveMoneda As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveMoneda As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1) As Boolean Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasGetRepDetalle") DataAdapter("PA_Vta_VentasGetRepDetalle")
@@ -1480,6 +1482,7 @@ Public Class ClsVentas
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion .Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago .Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
End With End With
Try Try
@@ -1499,7 +1502,7 @@ Public Class ClsVentas
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer,
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1,
Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1,
Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False) As Boolean Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_GetRepPS") DataAdapter("PA_Vta_GetRepPS")
@@ -1528,6 +1531,7 @@ Public Class ClsVentas
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra .Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@MostrarLitraje", SqlDbType.Bit).Value = MostrarLitraje .Add("@MostrarLitraje", SqlDbType.Bit).Value = MostrarLitraje
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
End With End With
@@ -1544,8 +1548,9 @@ Public Class ClsVentas
Public Function GetRepProductosServiciosDetalle(CveProyecto As Integer, CveSubProyecto As Integer, CveCategoria As Integer, CveClasificacion As Integer, CvePS As Integer, Public Function GetRepProductosServiciosDetalle(CveProyecto As Integer, CveSubProyecto As Integer, CveCategoria As Integer, CveClasificacion As Integer, CvePS As Integer,
FechaI As Date, FechaF As Date, Mes As Integer, FechaIEjec As Date, FechaFEjec As Date, MesEjec As Integer, CveCliente As Integer, CveSubProyectoEjecucion As Integer, FechaI As Date, FechaF As Date, Mes As Integer, FechaIEjec As Date, FechaFEjec As Date, MesEjec As Integer, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1,
Optional TipoDocto As String = "-1", Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TipoDocto As String = "-1", Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1,
Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1, Optional CveClasificacionDetalle As Integer = -1) As Boolean Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1,
Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_GetRepPSDetalle") DataAdapter("PA_Vta_GetRepPSDetalle")
@@ -1577,6 +1582,9 @@ Public Class ClsVentas
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra .Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveClasificacionDetalle", SqlDbType.Int).Value = CveClasificacionDetalle .Add("@CveClasificacionDetalle", SqlDbType.Int).Value = CveClasificacionDetalle
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
End With End With
Try Try

View File

@@ -2917,42 +2917,66 @@ Namespace Modelos
importeMovimiento = 0 importeMovimiento = 0
Case 103 'Descuento Case 103 'Descuento
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoAmortizacionAnticipo = -1 Then If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoAmortizacionAnticipo = -1 Then
importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador) importeMovimiento = ObjFactura.Descuento * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago FechaMovimiento = ObjFactura.FechaPago
CveSubProyectoContabilizar = CveSubProyectoVenta CveSubProyectoContabilizar = CveSubProyectoVenta
If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString.ToEntero IdCtaContable = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero()
'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString.ToEntero 'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero()
End If End If
End If End If
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
If importeMovimiento > 0 AndAlso UsuarioActual.CveEmpresa = 119 Then
'código fijo en base el porcentaje iva, que se afecten las clasificaciones
For i = 0 To TmpDTDetalle.Rows.Count - 1
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then DT = TmpDTDetalle.FiltraParametros("", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveClasificacion").ToString
If DT.Rows.Count > 0 Then
'Se agrega movimiento separado por la cuenta de ventas (ER)
For Each Row2 As DataRow In DT.Rows
importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
Concepto = $"{ObjFactura.SerieFolio} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs") Then
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
Else
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
End If
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
idCuentaContabilizacion = 0
End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 103, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
ErrorPrepoliza = True
Else
ObjFactura.SeGuardoPrePoliza = True
End If
End If End If
Next Next
End If End If
End If End If
importeMovimiento = 0
Case 103 'Descuento 'Case 103 'Descuento
'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida. ' 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida.
If ObjFactura.CveTipoAmortizacionAnticipo <> 1 Then ' If ObjFactura.CveTipoAmortizacionAnticipo <> 1 Then
importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador) ' importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador)
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador ' importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago ' FechaMovimiento = ObjFactura.FechaPago
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" ' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
IdCtaContable = 0 ' IdCtaContable = 0
End If ' End If
Case 8 'Ret IVA por Trasladar Case 8 'Ret IVA por Trasladar
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS

View File

@@ -429,22 +429,22 @@ Public Class WS_PuntoVenta
Return Respuesta Return Respuesta
End Function End Function
<WebMethod()> '<WebMethod()>
Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS 'Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS
Dim objSucursales As New ClsSucursales ' Dim objSucursales As New ClsSucursales
Dim Respuesta As New RespuestaWS ' Dim Respuesta As New RespuestaWS
If objSucursales.GetSucursales() Then ' If objSucursales.GetSucursales() Then
Respuesta.Datos = objSucursales.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa)) ' Respuesta.Datos = objSucursales.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
Respuesta.Datos.TableName = "Resultados" ' Respuesta.Datos.TableName = "Resultados"
Respuesta.HuboError = False ' Respuesta.HuboError = False
Else ' Else
Respuesta.Descripcion = "HUBO UN ERROR" ' Respuesta.Descripcion = "HUBO UN ERROR"
End If ' End If
objSucursales.Dispose() ' objSucursales.Dispose()
Return Respuesta ' Return Respuesta
End Function 'End Function
<WebMethod()> <WebMethod()>
Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS
@@ -1170,7 +1170,7 @@ Public Class WS_PuntoVenta
'Enviar correo de corte de turno 'Enviar correo de corte de turno
EnviarCorreo(VtaCorte.CveCorte, VtaCorte.CveEmpresa) EnviarCorreo(VtaCorte.CveCorte, VtaCorte.CveEmpresa)
Dim cuenta As Integer = GetCuenta(2090) ' Dim cuenta As Integer = GetCuenta(2090)
Else Else
objPV.RollBack() objPV.RollBack()
End If End If
@@ -1197,16 +1197,16 @@ Public Class WS_PuntoVenta
Return objVentasPago Return objVentasPago
End Function End Function
<WebMethod()> '<WebMethod()>
Public Function GetCuenta(CveSucursal As Integer) As Integer 'Public Function GetCuenta(CveSucursal As Integer) As Integer
Dim objSU As New ClsSucursales ' Dim objSU As New ClsSucursales
Dim Cuenta As Integer ' Dim Cuenta As Integer
'Cuenta = objSU.GetCuenta(CveSucursal) ' 'Cuenta = objSU.GetCuenta(CveSucursal)
objSU.Dispose() ' objSU.Dispose()
Return Cuenta ' Return Cuenta
End Function 'End Function
<WebMethod()> <WebMethod()>
Public Function AddBancosIE(Importe As Double, Moneda As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer, Cuenta As Integer, Comprobante As String, Opcion As String) As Boolean Public Function AddBancosIE(Importe As Double, Moneda As Integer, Fecha As Date, CveUsuario As Integer, CveEmpresa As Integer, Cuenta As Integer, Comprobante As String, Opcion As String) As Boolean

View File

@@ -3680,7 +3680,8 @@ Partial Class Bancos_IE
'Notificación de Pago 'Notificación de Pago
If TxtNotificarA.Text.Trim <> "" And MsgError = "" Then If TxtNotificarA.Text.Trim <> "" And MsgError = "" Then
NotificacionPago(CveIE, TxtNotificarA.Text.Trim) 'NotificacionPago(CveIE, TxtNotificarA.Text.Trim)
EnviarCorreoNotificacion(CveIE, TxtNotificarA.Text.Trim, "", UsuarioActual, False)
End If End If
Else Else
@@ -3811,253 +3812,257 @@ Partial Class Bancos_IE
End Sub End Sub
#Region " NOTIFICACION PAGO " #Region " NOTIFICACION PAGO "
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(GeneraCorreo2(CveIE)) 'Body
Param.Add(CveIE.ToString) 'CveIE
Param.Add(If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "")) 'Archivo Adjunto
Dim Hilo As New Threading.Thread(AddressOf MandaCorreo)
Hilo.Start(Param)
End If
End Sub
Private Sub MandaCorreo(data As Object)
Dim Parametros As List(Of String) = DirectCast(data, List(Of String))
Dim Mail As New ClsSisMail() 'Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String)
Dim Para As String = If(Parametros(0) IsNot Nothing, Parametros(0), "")
Dim Asunto As String = If(Parametros(1) IsNot Nothing, Parametros(1), "")
Dim Body As String = If(Parametros(2) IsNot Nothing, Parametros(2), "")
Dim CveIE As Integer = If(Parametros(3) IsNot Nothing, Parametros(3).ToEntero, 0)
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail) ' If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
If Parametros(4) IsNot Nothing AndAlso Parametros(4) <> "" Then
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Parametros(4).ToString})
End If
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then ' Dim Param As New List(Of String)
Dim objIE As New ClsBancos
objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
objIE.Dispose()
End If
End Sub
Private Function GeneraCorreo2(CveIE As Integer) As String ' Param.Add(CorreoNotificarA) 'Para
Dim strBody As New StringBuilder ' Param.Add("Notificaciones de pago") 'Asunto
Dim objIE As New ClsBancos ' Param.Add(GeneraCorreo2(CveIE)) 'Body
' Param.Add(CveIE.ToString) 'CveIE
' Param.Add(If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "")) 'Archivo Adjunto
If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then ' Dim Hilo As New Threading.Thread(AddressOf MandaCorreo)
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ") ' Hilo.Start(Param)
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'>") ' End If
'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>&nbsp;</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%'>") 'End Sub
strBody.AppendFormat(" <tr>") 'Private Sub MandaCorreo(data As Object)
strBody.AppendFormat(" <td style='vertical-align: top'>") ' Dim Parametros As List(Of String) = DirectCast(data, List(Of String))
strBody.AppendFormat(" <fieldset>")
strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA) ' Dim Mail As New ClsSisMail()
strBody.AppendFormat(" <table width='100%'>") ' Dim Para As String = If(Parametros(0) IsNot Nothing, Parametros(0), "")
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;'>") ' Dim Asunto As String = If(Parametros(1) IsNot Nothing, Parametros(1), "")
strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>") ' Dim Body As String = If(Parametros(2) IsNot Nothing, Parametros(2), "")
strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>") ' Dim CveIE As Integer = If(Parametros(3) IsNot Nothing, Parametros(3).ToEntero, 0)
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <tr class='Texto'>") ' Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
strBody.AppendFormat(" <td>Movimiento:</td>") ' If Parametros(4) IsNot Nothing AndAlso Parametros(4) <> "" Then
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion) ' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Parametros(4).ToString})
strBody.AppendFormat(" </tr>") ' End If
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td>Banco:</td>") ' If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco) ' Dim objIE As New ClsBancos
strBody.AppendFormat(" </tr>") ' objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
strBody.AppendFormat(" <tr class='Texto'>") ' objIE.Dispose()
strBody.AppendFormat(" <td>Cuenta:</td>") ' End If
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta) 'End Sub
strBody.AppendFormat(" </tr>")
If objIE.CuentaDepositado.ToString <> "" Then 'Private Function GeneraCorreo2(CveIE As Integer) As String
strBody.AppendFormat(" <tr class='Texto'>") ' Dim strBody As New StringBuilder
strBody.AppendFormat(" <td>Cuenta Destino:</td>") ' Dim objIE As New ClsBancos
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
strBody.AppendFormat(" </tr>") ' If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
End If ' strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
strBody.AppendFormat(" <tr class='Texto'>") ' strBody.Append("<head> ")
strBody.AppendFormat(" <td>Fecha:</td>") ' strBody.Append(" <style type=""text/css""> ")
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy")) ' strBody.Append(" body ")
strBody.AppendFormat(" </tr>") ' strBody.Append(" { ")
strBody.AppendFormat(" <tr class='Texto'>") ' strBody.Append(" margin:0px; ")
strBody.AppendFormat(" <td>Importe:</td>") ' strBody.Append(" padding:0px 0px 0px 0px; ")
strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda) ' strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
strBody.AppendFormat(" </tr>") ' strBody.Append(" font-size: 10px; ")
strBody.AppendFormat(" <tr class='Texto'>") ' strBody.Append(" background-color:#F0F0F0; ")
strBody.AppendFormat(" <td>Observaciones:</td>") ' strBody.Append(" } ")
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones) ' strBody.Append(" a.Texto ")
strBody.AppendFormat(" </tr>") ' strBody.Append(" { ")
strBody.AppendFormat(" <tr class='Texto'>") ' strBody.Append(" font-size:11px; ")
strBody.AppendFormat(" <td colspan='2'>") ' strBody.Append(" background-color:#F7F6F3; ")
strBody.AppendFormat(" <hr />") ' strBody.Append(" text-decoration:none; ")
strBody.AppendFormat(" </td>") ' strBody.Append(" font-weight:bold; ")
strBody.AppendFormat(" </tr>") ' strBody.Append(" } ")
strBody.AppendFormat(" </table>") ' strBody.Append(" .Texto ")
strBody.AppendFormat(" </fieldset>") ' strBody.Append(" { ")
strBody.AppendFormat(" </td>") ' strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
strBody.AppendFormat(" </tr>") ' strBody.Append(" } ")
strBody.AppendFormat(" </table>") ' strBody.Append(" .TextoAlterno ")
strBody.AppendFormat("</div>") ' 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>&nbsp;</td> ")
' 'strBody.Append(" </tr> ")
' 'strBody.Append(" </table> ")
' 'strBody.AppendFormat(" </fieldset>")
' 'strBody.Append(" </div> ")
'MOVIMIENTOS CHEQUE ' strBody.AppendFormat("<div style='width: 600px'>")
'If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then ' strBody.AppendFormat(" <table style='width:100%'>")
' Dim Textov33 As String = "" ' strBody.AppendFormat(" <tr>")
' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then ' strBody.AppendFormat(" <td style='vertical-align: top'>")
' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos" ' strBody.AppendFormat(" <fieldset>")
' End If ' strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
' strBody.AppendFormat(" <table width='100%'>")
' strBody.AppendFormat("<div style='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(" <table style='width:1000px'>") ' strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
' strBody.AppendFormat(" <tr>") ' strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
' strBody.AppendFormat(" <td style='vertical-align: top'>") ' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <fieldset>") ' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33) ' strBody.AppendFormat(" <td>Movimiento:</td>")
' strBody.AppendFormat(" <table width='1000px'>") ' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
' 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(" </tr>")
' strBody.AppendFormat(" <th scope='col' style='width: 15%'>Fecha</th>") ' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <th scope='col' style='width: 25%'>Factura</th>") ' strBody.AppendFormat(" <td>Banco:</td>")
' strBody.AppendFormat(" <th scope='col' style='width: 25%'>Importe ($)</th>") ' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
' strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>") ' strBody.AppendFormat(" </tr>")
' 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>")
' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows ' 'MOVIMIENTOS CHEQUE
' strBody.AppendFormat(" <tr class='Texto'>") ' 'If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
' strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString()) ' ' Dim Textov33 As String = ""
' strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString) ' ' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
' strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero) ' ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
' strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal")) ' ' End If
' strBody.AppendFormat(" </tr>")
' Next ' ' 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: 15%'>Fecha</th>")
' ' strBody.AppendFormat(" <th scope='col' style='width: 25%'>Factura</th>")
' ' strBody.AppendFormat(" <th scope='col' style='width: 25%'>Importe ($)</th>")
' ' strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
' ' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" <tr class='Texto'>") ' ' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
' strBody.AppendFormat(" <td colspan='4'>") ' ' strBody.AppendFormat(" <tr class='Texto'>")
' strBody.AppendFormat(" <hr />") ' ' strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
' strBody.AppendFormat(" </td>") ' ' strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
' strBody.AppendFormat(" </tr>") ' ' strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
' strBody.AppendFormat(" </table>") ' ' strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
' strBody.AppendFormat(" </fieldset>") ' ' strBody.AppendFormat(" </tr>")
' strBody.AppendFormat(" </td>") ' ' Next
' 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>") ' ' strBody.AppendFormat(" <tr class='Texto'>")
End If ' ' strBody.AppendFormat(" <td colspan='4'>")
' ' 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
objIE.Dispose() ' strBody.Append(" <div> Favor de no responder a este correo. </div> ")
Return strBody.ToString
End Function ' strBody.Append("</body></html>")
' End If
' objIE.Dispose()
' Return strBody.ToString
'End Function
@@ -6102,38 +6107,77 @@ Partial Class Bancos_IE
End Function End Function
Private Sub BtnSendMail_Click(sender As Object, e As EventArgs) Handles BtnSendMail.Click Private Sub BtnSendMail_Click(sender As Object, e As EventArgs) Handles BtnSendMail.Click
'NotificacionPago(HdnCveIE.Value.ToEntero, Txt)
Dim ObjMail As New ClsSisMail()
Dim Body = GeneraCorreo(CveIE)
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
Dim ObjIE As New ClsBancos() EnviarCorreoNotificacion(CveIE, TxtParaMail.Text.Trim, TxtCC.Text.Trim, UsuarioActual, True)
If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
If ObjIE.DtResultados.Rows.Count > 0 Then
If ObjIE.Comprobante <> "" Then
ComprobanteIE = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
If IO.File.Exists(ComprobanteIE) Then ''NotificacionPago(HdnCveIE.Value.ToEntero, Txt)
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = ComprobanteIE.ToString}) 'Dim ObjMail As New ClsSisMail()
End If 'Dim Body = GeneraCorreo(CveIE)
End If
End If
End If
ObjIE.Dispose()
If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Notificaciones de pago", Body, TxtCC.Text.Trim, Displayname:="Notificaciones de pago", Archivos:=ListaArchivos) Then 'Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
'ResultadoMail = 1
TxtCC.Text = "" 'Dim ObjIE As New ClsBancos()
'TxtAdicional.Text = "" 'If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
RegistraScript("$('#ModalDivMail').modal('hide');") ' If ObjIE.DtResultados.Rows.Count > 0 Then
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion) ' If ObjIE.Comprobante <> "" Then
Else ' ComprobanteIE = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
End If ' If IO.File.Exists(ComprobanteIE) Then
' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = ComprobanteIE.ToString})
' End If
' End If
' End If
'End If
'ObjIE.Dispose()
'If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Notificaciones de pago", Body, TxtCC.Text.Trim, Displayname:="Notificaciones de pago", Archivos:=ListaArchivos) Then
' 'ResultadoMail = 1
' TxtCC.Text = ""
' 'TxtAdicional.Text = ""
' RegistraScript("$('#ModalDivMail').modal('hide');")
' Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
'Else
' Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
'End If
End Sub End Sub
Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean)
Try
Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
Hilo.Start()
If MostarAlert Then
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
RegistraScript("$('#ModalDivMail').modal('hide');")
End If
Catch ex As Exception
If MostarAlert Then
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
End If
End Try
End Sub
Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario)
Try
Dim ObjBancos As New ClsBancos()
If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
Else
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
End If
ObjBancos.Dispose()
Catch ex As Exception
GuardaLog("Error al enviar notificación de pago IE --> " & ex.StackTrace.ToString)
End Try
End Sub
Private Sub LnkAjustarMovimiento_Click(sender As Object, e As EventArgs) Handles LnkAjustarMovimiento.Click Private Sub LnkAjustarMovimiento_Click(sender As Object, e As EventArgs) Handles LnkAjustarMovimiento.Click
RegistraScript("$('#ModalAjustarMovimiento').modal('show');") RegistraScript("$('#ModalAjustarMovimiento').modal('show');")
End Sub End Sub

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -437,6 +437,22 @@ Partial Class Bancos_PopIECompras
End Set End Set
End Property End Property
Private Property NotificarA As String
Get
If ViewState("NotificarA") Is Nothing Then
Return ""
Else
Return ViewState("NotificarA").ToString
End If
End Get
Set(value As String)
ViewState("NotificarA") = value
End Set
End Property
#End Region #End Region
Private Sub Bancos_PopIECompras_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub Bancos_PopIECompras_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -724,6 +740,10 @@ Partial Class Bancos_PopIECompras
ViewState("CveCuentaRetIVA") = ObjProveedor.CveCuentaRetIVA ViewState("CveCuentaRetIVA") = ObjProveedor.CveCuentaRetIVA
ViewState("CveCuentaProveedorExtranjera") = ObjProveedor.CveCuentaProveedoresExtranjera ViewState("CveCuentaProveedorExtranjera") = ObjProveedor.CveCuentaProveedoresExtranjera
ViewState("CveCuentaComplementaria") = ObjProveedor.CveCuentaProveedoresComplementaria ViewState("CveCuentaComplementaria") = ObjProveedor.CveCuentaProveedoresComplementaria
ViewState("NotificarA") = ObjProveedor.NotificarA.Trim()
Else Else
Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia) Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
End If End If
@@ -3352,6 +3372,9 @@ Partial Class Bancos_PopIECompras
StrMsg.AppendFormat("<br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza) StrMsg.AppendFormat("<br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza)
End If End If
If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();") If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
EnviarCorreoNotificacion(CveIE, NotificarA, "", UsuarioActual, False)
Else Else
ObjIE.RollBack() ObjIE.RollBack()
Alert(MsgError, TipoMensaje.MsgError) Alert(MsgError, TipoMensaje.MsgError)
@@ -3362,6 +3385,55 @@ Partial Class Bancos_PopIECompras
End Sub End Sub
#End Region #End Region
#Region "ENVIAR CORREO NOTIFICACION DE PAGO"
Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean)
Try
Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
'Dim Hilo As New Threading.Thread( EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
Hilo.Start()
If MostarAlert Then
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
End If
Catch ex As Exception
If MostarAlert Then
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
End If
End Try
End Sub
Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario)
Try
Dim ObjBancos As New ClsBancos()
If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
Else
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
End If
ObjBancos.Dispose()
Catch ex As Exception
GuardaLog("Error al enviar notificación de pago PopIECompras --> " & ex.StackTrace.ToString)
End Try
End Sub
#End Region
#Region "COMPLEMENTO DE PAGO" #Region "COMPLEMENTO DE PAGO"
Private Sub GeneraTimbre(CvePrePoliza As Integer) Private Sub GeneraTimbre(CvePrePoliza As Integer)

View File

@@ -2365,7 +2365,8 @@ Partial Class Bancos_ProveedoresAbonar
'Notificación de Pago 'Notificación de Pago
If TxtNotificarA.Text.Trim <> "" AndAlso ChkEnviarCorreo.Checked Then If TxtNotificarA.Text.Trim <> "" AndAlso ChkEnviarCorreo.Checked Then
NotificacionPago(CveIE, TxtNotificarA.Text.Trim) 'NotificacionPago(CveIE, TxtNotificarA.Text.Trim)
EnviarCorreoNotificacion(CveIE, TxtNotificarA.Text.Trim, "", UsuarioActual, False)
End If End If
End If End If
@@ -2785,261 +2786,302 @@ Partial Class Bancos_ProveedoresAbonar
#Region " NOTIFICACION PAGO " #Region " NOTIFICACION PAGO "
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 Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean)
'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 File As Byte() = Nothing Try
If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre) 'Dim Hilo As New Threading.Thread( EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
End If
Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File))
Hilo.Start() Hilo.Start()
End If
If MostarAlert Then
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
End If
Catch ex As Exception
If MostarAlert Then
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
End If
End Try
End Sub
Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario)
Try
Dim ObjBancos As New ClsBancos()
If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
Else
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
End If
ObjBancos.Dispose()
Catch ex As Exception
GuardaLog("Error al enviar notificación de pago ProveedoresAbonar --> " & ex.StackTrace.ToString)
End Try
End Sub 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>&nbsp;</td> ")
strBody.Append(" </tr> ")
strBody.Append(" </table> ")
strBody.AppendFormat(" </fieldset>")
strBody.Append(" </div> ")
strBody.AppendFormat("<div style='width: 600px'>") 'Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String)
strBody.AppendFormat(" <table style='width:100%'>")
strBody.AppendFormat(" <tr>") ' If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
strBody.AppendFormat(" <td style='vertical-align: top'>")
strBody.AppendFormat(" <fieldset>") ' Dim Body As String = GeneraCorreo(CveIE)
strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA) ' Dim Comprobante = If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "") 'Archivo Adjunto
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;'>") ' Dim File As Byte() = Nothing
strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>") ' If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then
strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>") ' File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre)
strBody.AppendFormat(" </tr>") ' End If
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td>Movimiento:</td>") ' Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File))
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion) ' Hilo.Start()
strBody.AppendFormat(" </tr>") ' End If
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td>Banco:</td>") 'End Sub
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
strBody.AppendFormat(" </tr>") 'Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte())
strBody.AppendFormat(" <tr class='Texto'>") ' 'Dim Parametros As List(Of String) = DirectCast(Data, List(Of String))
strBody.AppendFormat(" <td>Cuenta:</td>")
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta) ' Dim Mail As New ClsSisMail()
strBody.AppendFormat(" </tr>") ' Para = If(Para IsNot Nothing, Para, "")
If objIE.CuentaDepositado.ToString <> "" Then ' Asunto = If(Asunto IsNot Nothing, Asunto, "")
strBody.AppendFormat(" <tr class='Texto'>") ' Body = If(Body IsNot Nothing, Body, "")
strBody.AppendFormat(" <td>Cuenta Destino:</td>")
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado) ' Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
strBody.AppendFormat(" </tr>") ' If Comprobante IsNot Nothing AndAlso Comprobante <> "" Then
End If ' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Comprobante})
strBody.AppendFormat(" <tr class='Texto'>") ' End If
strBody.AppendFormat(" <td>Fecha:</td>")
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy")) ' If File IsNot Nothing Then
strBody.AppendFormat(" </tr>") ' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"})
strBody.AppendFormat(" <tr class='Texto'>") ' End If
strBody.AppendFormat(" <td>Importe:</td>")
strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda) ' If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
strBody.AppendFormat(" </tr>") ' Dim objIE As New ClsBancos
strBody.AppendFormat(" <tr class='Texto'>") ' objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
strBody.AppendFormat(" <td>Observaciones:</td>") ' objIE.Dispose()
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones) ' End If
strBody.AppendFormat(" </tr>") 'End Sub
strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <td colspan='2'>") 'Private Function GeneraCorreo(CveIE As Integer) As String
strBody.AppendFormat(" <hr />") ' Dim strBody As New StringBuilder
strBody.AppendFormat(" </td>") ' Dim objIE As New ClsBancos
strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" </table>") ' If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
strBody.AppendFormat(" </fieldset>") ' strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
strBody.AppendFormat(" </td>") ' strBody.Append("<head> ")
strBody.AppendFormat(" </tr>") ' strBody.Append(" <style type=""text/css""> ")
strBody.AppendFormat(" </table>") ' strBody.Append(" body ")
strBody.AppendFormat("</div>") ' 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>&nbsp;</td> ")
' strBody.Append(" </tr> ")
' strBody.Append(" </table> ")
' strBody.AppendFormat(" </fieldset>")
' strBody.Append(" </div> ")
'MOVIMIENTOS CHEQUE ' strBody.AppendFormat("<div style='width: 600px'>")
If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then ' strBody.AppendFormat(" <table style='width:100%'>")
Dim Textov33 As String = "" ' strBody.AppendFormat(" <tr>")
If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then ' strBody.AppendFormat(" <td style='vertical-align: top'>")
Textov33 = "Favor de emitir complemento de pago de los siguientes documentos" ' strBody.AppendFormat(" <fieldset>")
End If ' strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
' strBody.AppendFormat(" <table width='100%'>")
strBody.AppendFormat("<div style='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(" <table style='width:1000px'>") ' strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
strBody.AppendFormat(" <tr>") ' strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
strBody.AppendFormat(" <td style='vertical-align: top'>") ' strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <fieldset>") ' strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33) ' strBody.AppendFormat(" <td>Movimiento:</td>")
strBody.AppendFormat(" <table width='1000px'>") ' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
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(" </tr>")
strBody.AppendFormat(" <th scope='col' style='width: 10%'>Fecha</th>") ' strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Factura</th>") ' strBody.AppendFormat(" <td>Banco:</td>")
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Importe ($)</th>") ' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>") ' strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" <th scope='col' style='width: 15%'>NC Aplicadas</th>") ' strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" </tr>") ' 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>")
For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows ' 'MOVIMIENTOS CHEQUE
strBody.AppendFormat(" <tr class='Texto'>") ' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString()) ' Dim Textov33 As String = ""
strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString) ' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero) ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal")) ' End If
strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
strBody.AppendFormat(" </tr>") ' strBody.AppendFormat("<div style='width: 1000px'>")
Next ' 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>")
strBody.AppendFormat(" <tr class='Texto'>") ' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
strBody.AppendFormat(" <td colspan='5'>") ' strBody.AppendFormat(" <tr class='Texto'>")
strBody.AppendFormat(" <hr />") ' strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
strBody.AppendFormat(" </td>") ' strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
strBody.AppendFormat(" </tr>") ' strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
strBody.AppendFormat(" </table>") ' strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
strBody.AppendFormat(" </fieldset>") ' strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
strBody.AppendFormat(" </td>") ' strBody.AppendFormat(" </tr>")
strBody.AppendFormat(" </tr>") ' Next
strBody.AppendFormat(" </table>")
strBody.AppendFormat("</div>")
End If
strBody.Append(" <div> Favor de no responder a este correo. </div> ")
strBody.Append("</body></html>") ' strBody.AppendFormat(" <tr class='Texto'>")
End If ' 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
objIE.Dispose() ' strBody.Append(" <div> Favor de no responder a este correo. </div> ")
Return strBody.ToString
End Function ' strBody.Append("</body></html>")
' End If
' objIE.Dispose()
' Return strBody.ToString
'End Function
#End Region #End Region

View File

@@ -613,9 +613,8 @@
Producto o Servicio<asp:HyperLink ID="HyperLink1" data-toggle="tooltip" CssClass="btn btn-default btn-circle btn-xs " data-placement="top" ToolTip="Agregar Producto o Servicio" NavigateUrl="/Ventas/CatPS.aspx" runat="server"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:HyperLink></th> Producto o Servicio<asp:HyperLink ID="HyperLink1" data-toggle="tooltip" CssClass="btn btn-default btn-circle btn-xs " data-placement="top" ToolTip="Agregar Producto o Servicio" NavigateUrl="/Ventas/CatPS.aspx" runat="server"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:HyperLink></th>
<th style="width: 200px">Observación</th> <th style="width: 200px">Observación</th>
<th style="width: 150px"> <th style="width: 150px">
<asp:Label ID="LitHProyecto" runat="server" Text=""></asp:Label><asp:Label runat="server" ID="LblSubProyectoHeader" Text=""></asp:Label>&nbsp; <asp:Label ID="LitHProyecto" runat="server" Text=""></asp:Label>
<asp:Label runat="server" ID="LblSubProyectoHeader" Text=""></asp:Label>&nbsp;
<asp:LinkButton ID="ImgActualizarProyecto" CssClass="btn btn-default btn-circle" data-toggle="tooltip" data-placement="top" ToolTip="Actualizar Cambios" runat="server" Visible="False"><i class="fa fa-arrow-circle-down" aria-hidden="true"></i></asp:LinkButton> <asp:LinkButton ID="ImgActualizarProyecto" CssClass="btn btn-default btn-circle" data-toggle="tooltip" data-placement="top" ToolTip="Actualizar Cambios" runat="server" Visible="False"><i class="fa fa-arrow-circle-down" aria-hidden="true"></i></asp:LinkButton>
<span data-toggle="collapse" data-target="#DivReclasifica"> <span data-toggle="collapse" data-target="#DivReclasifica">
@@ -650,13 +649,21 @@
<th> <th>
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpReclasificarSubProyecto"> <asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpReclasificarSubProyecto">
<ContentTemplate> <ContentTemplate>
<asp:DropDownList ID="DdlAsignarProyecto" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto"> <div class="row">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <div class="col-md-1" style="width:100%">
</asp:DropDownList> <asp:DropDownList ID="DdlAsignarProyecto" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto">
<%--<br />--%> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
<asp:DropDownList ID="DdlAsignaSubProyecto" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlAsignaSubProyecto_SelectedIndexChanged" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto"> </asp:DropDownList>
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> </div>
</asp:DropDownList> <%--<br runat="server" id="brProyectoSubProyecto" style="display:none"/>--%>
</div>
<div class="row">
<div class="col-md-1" style="width:100%">
<asp:DropDownList ID="DdlAsignaSubProyecto" runat="server" CssClass="form-control input-sm select2me" AutoPostBack="true" OnSelectedIndexChanged="DdlAsignaSubProyecto_SelectedIndexChanged" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</th> </th>

View File

@@ -1546,11 +1546,11 @@ Partial Class Compras_Compras
' LblSubProyecto.InnerText = "Proyecto" ' LblSubProyecto.InnerText = "Proyecto"
' 'LblSubProyectoDivAplica.InnerText = "Proyecto" ' 'LblSubProyectoDivAplica.InnerText = "Proyecto"
DdlSubProyecto.Items.Clear() 'DdlSubProyecto.Items.Clear()
' 'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) ''DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) 'DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
DdlSubProyecto.DataBind() 'DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
' 'DdlAsignaSubProyecto.Items.Clear() ' 'DdlAsignaSubProyecto.Items.Clear()
' 'DdlAsignaSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) ' 'DdlAsignaSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
@@ -1572,48 +1572,48 @@ Partial Class Compras_Compras
' LblSubProyecto.InnerText = "Sucursal" ' LblSubProyecto.InnerText = "Sucursal"
' 'LblSubProyectoDivAplica.InnerText = "Sucursal" ' 'LblSubProyectoDivAplica.InnerText = "Sucursal"
DdlSubProyecto.Items.Clear() 'DdlSubProyecto.Items.Clear()
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) ''DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) 'DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
DdlSubProyecto.DataBind() 'DdlSubProyecto.DataBind()
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
' 'DdlAsignaSubProyecto.Items.Clear() ' 'DdlAsignaSubProyecto.Items.Clear()
' 'DdlAsignaSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) ' 'DdlAsignaSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
' 'DdlAsignaSubProyecto.DataBind() ' 'DdlAsignaSubProyecto.DataBind()
' 'DdlAsignaSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) ' 'DdlAsignaSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
divproyecto.Visible = False divproyecto.Visible = False
'divasignaproyecto.Visible = False 'divasignaproyecto.Visible = False
DdlProyecto.Visible = False DdlProyecto.Visible = False
DdlProyecto.Items(0).Text = "" DdlProyecto.Items(0).Text = ""
'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
' LitHProyecto.Text = "Sucursal" ' LitHProyecto.Text = "Sucursal"
' LthProyectoP.Text = "Sucursal" ' LthProyectoP.Text = "Sucursal"
' LblSubProyectoHeader.Text = "Proyecto" ' LblSubProyectoHeader.Text = "Proyecto"
' LblSubProyectoPHeader.Text = "Proyecto" ' LblSubProyectoPHeader.Text = "Proyecto"
' 'LblSubProyectoDivAplica.InnerText = "Sucursal" ' 'LblSubProyectoDivAplica.InnerText = "Sucursal"
' 'LblProyectoDivAplica.InnerText = "Proyecto" ' 'LblProyectoDivAplica.InnerText = "Proyecto"
' LblSubProyecto.InnerText = "Sucursal" ' LblSubProyecto.InnerText = "Sucursal"
' LblProyecto.InnerText = "Proyecto" ' LblProyecto.InnerText = "Proyecto"
'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then 'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
' LitHProyecto.Text = "Proyecto" ' LitHProyecto.Text = "Proyecto"
' LthProyectoP.Text = "Proyecto" ' LthProyectoP.Text = "Proyecto"
' LblSubProyectoHeader.Text = "Sucursal" ' LblSubProyectoHeader.Text = "Sucursal"
' LblSubProyectoPHeader.Text = "Sucursal" ' LblSubProyectoPHeader.Text = "Sucursal"
' 'LblSubProyectoDivAplica.InnerText = "Proyecto" ' 'LblSubProyectoDivAplica.InnerText = "Proyecto"
' 'LblProyectoDivAplica.InnerText = "Sucursal" ' 'LblProyectoDivAplica.InnerText = "Sucursal"
' LblSubProyecto.InnerText = "Proyecto" ' LblSubProyecto.InnerText = "Proyecto"
' LblProyecto.InnerText = "Sucursal" ' LblProyecto.InnerText = "Sucursal"
End If End If
CargaGvPersonal() CargaGvPersonal()
CargaDdlPersonal() CargaDdlPersonal()

View File

@@ -141,6 +141,7 @@
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem> <asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem> <asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
<asp:ListItem Text="Límite de Crédito" Value="11"></asp:ListItem> <asp:ListItem Text="Límite de Crédito" Value="11"></asp:ListItem>
<asp:ListItem Text="Tipo Cliente" Value="12"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
@@ -322,6 +323,19 @@
</div> </div>
</div> </div>
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top">
Tipo Cliente:
</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Frecuente" Value="1"></asp:ListItem>
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>

View File

@@ -199,7 +199,8 @@ Partial Class RepCxC
If ObjMovtos.GetCxC(FechaI, FechaF, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1, If ObjMovtos.GetCxC(FechaI, FechaF, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico,
If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, FechaCorte:=txtCorteA.Text.ToDate, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero,
CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero) Then CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjMovtos.DtResultados GvDatos.DataSource = ObjMovtos.DtResultados
DtDatos = ObjMovtos.DtResultados DtDatos = ObjMovtos.DtResultados
@@ -378,53 +379,53 @@ Partial Class RepCxC
End If End If
End If End If
Dim Liga1 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C1&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim Liga1 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C1&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&CveMoneda={25}&EstatusCliente={26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
Dim Liga2 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C2&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim Liga2 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C2&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
Dim Liga3 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C3&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim Liga3 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C3&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
Dim Liga4 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C4&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim Liga4 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C4&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
Dim Liga5 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C5&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim Liga5 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C5&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente{26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
Dim Liga6 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C6&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim Liga6 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C6&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
Dim Liga7 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C7&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim Liga7 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C7&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
Dim Liga8 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim Liga8 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=C8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
Dim Liga9 As String = String.Format("/CxC/RepCxCDetalle.aspx.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim Liga9 As String = String.Format("/CxC/RepCxCDetalle.aspx.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
Dim Liga10 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim Liga10 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
Dim Liga11 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TPV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim Liga11 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TPV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
Dim LigaTot As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}", Dim LigaTot As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}&CveResponsable={13}&TipoDocto={14}&TipoCambio={15}&TCEspecifico={16}&FechaVI={17}&FechaVF={18}&CveClienteSucursal={19}&FechaCorte={20}&CveCobranzaEstatus={21}&CveClienteClasificacion={22}&LimiteCredito={23}&TipoCliente={24}&EstatusCliente={26}",
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"), DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito")) e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), FechaVI, FechaVF, CveClienteSucursal, txtCorteA.Text, CveCobranzaEstatus, CveClienteClasificacion, e.Row.DBCampo("LimiteCredito"), If(DdlGrupo.SelectedValue.ToEntero = 12, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), e.Row.DBCampo("CveMoneda"), DdlEstatusCliente.SelectedValue.ToEntero)
e.Row.FCHyperLink("HplSaldo").NavigateUrl = LigaTot e.Row.FCHyperLink("HplSaldo").NavigateUrl = LigaTot

View File

@@ -118,6 +118,7 @@
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem> <asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem> <asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
<asp:ListItem Text="Límite de Crédito" Value="11"></asp:ListItem> <asp:ListItem Text="Límite de Crédito" Value="11"></asp:ListItem>
<asp:ListItem Text="Tipo Cliente" Value="12"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
@@ -216,6 +217,8 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@@ -273,13 +276,45 @@
</div> </div>
</div> </div>
<div class="col-md-1 truncate" title="Clasificación Cliente" data-toggle="tooltip" data-placement="top" >
<div class="col-md-1 truncate">
Estatus Cliente:
</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlEstatusCliente" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Inactivos" Value="0"></asp:ListItem>
<asp:ListItem Text="Activos" Value="1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row">
<div class="col-md-1 truncate" title="Clasificación Cliente" data-toggle="tooltip" data-placement="top" >
Clasificación Cliente: Clasificación Cliente:
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList> <asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList>
</div> </div>
</div>
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top">
Tipo Cliente:
</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Frecuente" Value="1"></asp:ListItem>
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div> </div>
</div> </div>

View File

@@ -179,6 +179,47 @@ Partial Class RepCxCDetalle
ViewState("LimiteCredito") = value ViewState("LimiteCredito") = value
End Set End Set
End Property End Property
Private Property TipoCliente As Integer
Get
If ViewState("TipoCliente") Is Nothing Then
Return -1
Else
Return DirectCast(ViewState("TipoCliente"), Integer)
End If
End Get
Set(value As Integer)
ViewState("TipoCliente") = value
End Set
End Property
Private Property CveMoneda As Integer
Get
If ViewState("CveMoneda") Is Nothing Then
Return -1
Else
Return DirectCast(ViewState("CveMoneda"), Integer)
End If
End Get
Set(value As Integer)
ViewState("CveMoneda") = value
End Set
End Property
Private Property EstatusCliente As Integer
Get
If ViewState("EstatusCliente") Is Nothing Then
Return -1
Else
Return DirectCast(ViewState("EstatusCliente"), Integer)
End If
End Get
Set(value As Integer)
ViewState("EstatusCliente") = value
End Set
End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -252,7 +293,12 @@ Partial Class RepCxCDetalle
CveCobranzaEstatus = If(Request("CveCobranzaEstatus") IsNot Nothing, Request("CveCobranzaEstatus").ToString, "-1").ToString.ToEntero CveCobranzaEstatus = If(Request("CveCobranzaEstatus") IsNot Nothing, Request("CveCobranzaEstatus").ToString, "-1").ToString.ToEntero
CveClienteClasificacion = If(Request("CveClienteClasificacion") IsNot Nothing, Request("CveClienteClasificacion").ToString, "-1").ToString.ToEntero CveClienteClasificacion = If(Request("CveClienteClasificacion") IsNot Nothing, Request("CveClienteClasificacion").ToString, "-1").ToString.ToEntero
LimiteCredito = If(Request("LimiteCredito") IsNot Nothing, Request("LimiteCredito").ToString, "-1").ToString.ToDecimal LimiteCredito = If(Request("LimiteCredito") IsNot Nothing, Request("LimiteCredito").ToString, "-1").ToString.ToDecimal
TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString, "-1").ToString.ToEntero
CveMoneda = If(Request("CveMoneda") IsNot Nothing, Request("CveMoneda").ToString, "-1").ToString.ToEntero
EstatusCliente = If(Request("EstatusCliente") IsNot Nothing, Request("EstatusCliente").ToString, "-1").ToString.ToEntero
DdlTipoCliente.SelectedValueExist(TipoCliente)
DdlEstatusCliente.SelectedValueExist(EstatusCliente)
If FechaF <> "-1" Then If FechaF <> "-1" Then
txtFechaF.Text = FechaF txtFechaF.Text = FechaF
@@ -387,7 +433,8 @@ Partial Class RepCxCDetalle
Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero, Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero,
RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF,
FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=DdlCobranzaEstatusFiltro.SelectedValue.ToEntero, FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=DdlCobranzaEstatusFiltro.SelectedValue.ToEntero,
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito) Then CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero,
CveMoneda:=CveMoneda, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjMovtos.DtResultados GvDatos.DataSource = ObjMovtos.DtResultados
dt = ObjMovtos.DtResultados dt = ObjMovtos.DtResultados

View File

@@ -303,7 +303,7 @@
</div> </div>
</div> </div>
<div class="row" runat="server" id="TrSubProyectoActivoFijo" visible="false"> <div class="row" runat="server" id="TrSubProyectoActivoFijo" visible="false">
<label class="col-md-1 truncate">Proyecto:</label> <asp:Label runat="server" ID="LblSubProyecto" class="col-md-1 truncate">Proyecto:</asp:Label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" CssClass=" form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="max-width: 250px"></asp:DropDownList> <asp:DropDownList ID="DdlSubProyecto" CssClass=" form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="max-width: 250px"></asp:DropDownList>
<asp:RangeValidator ID="RVSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" MinimumValue="0" MaximumValue="9999999" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RangeValidator> <asp:RangeValidator ID="RVSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" MinimumValue="0" MaximumValue="9999999" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RangeValidator>

View File

@@ -542,8 +542,9 @@ Partial Class Inventarios_EntradasSalidas
End Sub End Sub
Private Sub CargaSubProyectos() Private Sub CargaSubProyectos()
DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
DdlSubProyecto.DataBind() 'DdlSubProyecto.DataSource = If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
'DdlSubProyecto.DataBind()
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) 'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
End Sub End Sub
Private Sub CargaPersonal() Private Sub CargaPersonal()

View File

@@ -166,15 +166,26 @@ Partial Class OC_CatEstatus
Dim TieneError = False Dim TieneError = False
Dim ObjEstatus As New ClsOC Dim ObjEstatus As New ClsOC
'No quitar transacción la transacción es por que el update puede generar recursividad en la vista Vw_OC_Estatus error 530
ObjEstatus.IniciaTransacSQL()
If HdnModalidad.Value = "I" Then If HdnModalidad.Value = "I" Then
If Not ObjEstatus.AddEstatus(TxtEstatus.Text.Trim, DdlTipo.SelectedValue.ToString, DdlEstatusSiguiente.SelectedValue.ToEntero, DdlTipoTermino.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If Not ObjEstatus.AddEstatus(TxtEstatus.Text.Trim, DdlTipo.SelectedValue.ToString, DdlEstatusSiguiente.SelectedValue.ToEntero, DdlTipoTermino.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
TieneError = True TieneError = True
End If End If
Else Else
If Not ObjEstatus.UpdateEstatus(TxtEstatus.Text.Trim, DdlTipo.SelectedValue.ToString, DdlEstatusSiguiente.SelectedValue.ToEntero, DdlTipoTermino.SelectedValue.ToEntero, ChkEstatus.Checked, ChkCancelable.Checked, CveEstatus) Then If Not ObjEstatus.UpdateEstatus(TxtEstatus.Text.Trim, DdlTipo.SelectedValue.ToString, DdlEstatusSiguiente.SelectedValue.ToEntero, DdlTipoTermino.SelectedValue.ToEntero, ChkEstatus.Checked, ChkCancelable.Checked, CveEstatus, DdlEstatusSiguiente.SelectedItem.Text) Then
TieneError = True TieneError = True
End If End If
End If End If
If TieneError Then
ObjEstatus.RollBack()
Else
ObjEstatus.Commit()
End If
ObjEstatus.Dispose() ObjEstatus.Dispose()
If Not TieneError Then If Not TieneError Then
@@ -189,7 +200,7 @@ Partial Class OC_CatEstatus
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarEstatus")) RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarEstatus"))
CargaDatos() CargaDatos()
Else Else
Alert("Ocurrió un error al guardar/editar estatus de órden de compra", TipoMensaje.MsgError) 'Alert("Ocurrió un error al guardar/editar estatus de órden de compra", TipoMensaje.MsgError)
End If End If
End Sub End Sub

View File

@@ -1738,6 +1738,7 @@ Partial Class RH_Personal
'If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then 'If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then
' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & ObjPersonal.URL ' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & ObjPersonal.URL
'End If 'End If
GlobalDTRHPersonal(UsuarioActual.CveEmpresa) = Nothing
If CvePersonal > 0 Then If CvePersonal > 0 Then
CargaDatos() CargaDatos()
@@ -5774,33 +5775,34 @@ Partial Class RH_Personal
If dtVC.Rows.Count > 0 Then If dtVC.Rows.Count > 0 Then
dr = dtVC.Rows(0) dr = dtVC.Rows(0)
If UsuarioActual.CveEmpresa.Contiene(72) Then 'If UsuarioActual.CveEmpresa.Contiene(72, 119) Then
Dim SBDomicilioSucursal As New StringBuilder() 'End If
Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero, Estatus:=1).FiltroPrimero("")
If DRSucursal IsNot Nothing Then Dim SBDomicilioSucursal As New StringBuilder()
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado")) Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero, Estatus:=1).FiltroPrimero("")
Dim DomicilioSucursal As String = ""
SBDomicilioSucursal.AppendFormat("{0}", DRSucursal("Calle")) If DRSucursal IsNot Nothing Then
If DRSucursal("NoExt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString().ToEntero) Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
If DRSucursal("NoInt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString().ToEntero) Dim DomicilioSucursal As String = ""
If DRSucursal("Colonia").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", DRSucursal("Colonia").ToString())
If DRSucursal("CP").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", DRSucursal("CP").ToString())
If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
If DRSucursal("Pais").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", DRSucursal("Pais").ToString())
End If
params.Add(New ReportParameter("NombreResponsable", dr("NombreCompleto").ToString())) SBDomicilioSucursal.AppendFormat("{0}", DRSucursal("Calle"))
params.Add(New ReportParameter("RFC", dr("RFC").ToString())) If DRSucursal("NoExt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString().ToEntero)
params.Add(New ReportParameter("Puesto", dr("Puesto").ToString())) If DRSucursal("NoInt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString().ToEntero)
params.Add(New ReportParameter("Departamento", dr("Departamento").ToString())) If DRSucursal("Colonia").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", DRSucursal("Colonia").ToString())
params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString())) If DRSucursal("CP").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", DRSucursal("CP").ToString())
params.Add(New ReportParameter("Telefono", dr("Celular").ToString())) If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
params.Add(New ReportParameter("DireccionSucursal", SBDomicilioSucursal.ToString())) If DRSucursal("Pais").ToString().Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", DRSucursal("Pais").ToString())
params.Add(New ReportParameter("PuestoUsuarioActual", dr("PuestoUsuarioImprimio").ToString()))
End If End If
params.Add(New ReportParameter("NombreResponsable", dr("NombreCompleto").ToString()))
params.Add(New ReportParameter("RFC", dr("RFC").ToString()))
params.Add(New ReportParameter("Puesto", dr("Puesto").ToString()))
params.Add(New ReportParameter("Departamento", dr("Departamento").ToString()))
params.Add(New ReportParameter("Sucursal", dr("SubProyecto").ToString()))
params.Add(New ReportParameter("Telefono", dr("Celular").ToString()))
params.Add(New ReportParameter("DireccionSucursal", SBDomicilioSucursal.ToString()))
params.Add(New ReportParameter("PuestoUsuarioActual", dr("PuestoUsuarioImprimio").ToString()))
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))

View File

@@ -9,6 +9,7 @@ using System.Web.Services;
using System.Web.Services.Protocols; using System.Web.Services.Protocols;
using GemBox.Spreadsheet; using GemBox.Spreadsheet;
using System.Data; using System.Data;
using System.Text;
public class TareasJam : IHttpHandler public class TareasJam : IHttpHandler
{ {
@@ -46,6 +47,9 @@ public class TareasJam : IHttpHandler
private bool EjecutaThalamus(int CveEmpresa) private bool EjecutaThalamus(int CveEmpresa)
{ {
bool Respuesta = false;
StringBuilder SBLog = new StringBuilder();
ClsGenerales ObjGenerales = new ClsGenerales(); ClsGenerales ObjGenerales = new ClsGenerales();
DataTable DTProductos = new DataTable(); DataTable DTProductos = new DataTable();
@@ -53,53 +57,97 @@ public class TareasJam : IHttpHandler
DataTable DTClientes = new DataTable(); DataTable DTClientes = new DataTable();
DataTable DTAlmacenes = new DataTable(); DataTable DTAlmacenes = new DataTable();
string FTPServer = "ftp://127.0.0.1/";
string TFPUsr = "Toor";
string FTPPass = "agj-3500";
bool ErrorProceso = false; bool ErrorProceso = false;
SBLog.AppendLine("<b>Consultas</b><br>");
SBLog.AppendLine("<table border='1'><tr><th>Consulta</th><th>Registros</th></tr>");
if (ObjGenerales.GetJAMCorveta(1)) if (ObjGenerales.GetJAMCorveta(1))
{ {
DTProductos = ObjGenerales.DtResultados.Copy(); DTProductos = ObjGenerales.DtResultados.Copy();
SBLog.AppendLine($"<tr><td>Productos</td><td>{DTProductos.Rows.Count}</td></tr>");
}
else {
ErrorProceso = true;
SBLog.AppendLine($"<tr><td>Productos</td><td>Error al consultar</td></tr>");
} }
else { ErrorProceso = true; }
if (ObjGenerales.GetJAMCorveta(2)) if (ObjGenerales.GetJAMCorveta(2) & ErrorProceso == false)
{ {
DTVentas = ObjGenerales.DtResultados.Copy(); DTVentas = ObjGenerales.DtResultados.Copy();
SBLog.AppendLine($"<tr>Ventas<td></td><td>{DTVentas.Rows.Count}</td></tr>");
}
else
{
ErrorProceso = true;
SBLog.AppendLine($"<tr><td>Ventas</td><td>Error al consultar</td></tr>");
} }
else { ErrorProceso = true; }
if (ObjGenerales.GetJAMCorveta(3)) if (ObjGenerales.GetJAMCorveta(3) & ErrorProceso == false)
{ {
DTClientes = ObjGenerales.DtResultados.Copy(); DTClientes = ObjGenerales.DtResultados.Copy();
} SBLog.AppendLine($"<tr><td>Clientes</td><td>{DTClientes.Rows.Count}</td></tr>");
else { ErrorProceso = true; }
if (ObjGenerales.GetJAMCorveta(4)) }
else {
ErrorProceso = true;
SBLog.AppendLine($"<tr><td>Clientes</td><td>Error al consultar</td></tr>");
}
if (ObjGenerales.GetJAMCorveta(4) & ErrorProceso == false)
{ {
DTAlmacenes = ObjGenerales.DtResultados.Copy(); DTAlmacenes = ObjGenerales.DtResultados.Copy();
SBLog.AppendLine($"<tr><td>Almacenes</td><td>{DTAlmacenes.Rows.Count}</td></tr>");
} }
else { ErrorProceso = true; } else {
ErrorProceso = true;
SBLog.AppendLine($"<tr><td>Almacenes</td><td>Error al consultar</td></tr>");
}
SBLog.AppendLine("</table>");
SBLog.AppendLine("<br>");
ObjGenerales.Dispose(); ObjGenerales.Dispose();
DTProductos.Columns[0].ColumnName = "Código Producto Interno "; if (!ErrorProceso)
DTProductos.Columns[1].ColumnName = "Nombre del Producto"; {
DTProductos.Columns[2].ColumnName = "Presentación";
DTProductos.AcceptChanges(); try
{
DTProductos.Columns[0].ColumnName = "Código Producto Interno ";
DTProductos.Columns[1].ColumnName = "Nombre del Producto";
DTProductos.Columns[2].ColumnName = "Presentación";
DTProductos.AcceptChanges();
DTClientes.Columns[4].ColumnName = "address.countryId"; DTClientes.Columns[4].ColumnName = "address.countryId";
DTClientes.Columns[5].ColumnName = "address.stateId"; DTClientes.Columns[5].ColumnName = "address.stateId";
DTClientes.Columns[6].ColumnName = "address.city"; DTClientes.Columns[6].ColumnName = "address.city";
DTClientes.Columns[7].ColumnName = "address.street1"; DTClientes.Columns[7].ColumnName = "address.street1";
DTClientes.Columns[8].ColumnName = "address.street2"; DTClientes.Columns[8].ColumnName = "address.street2";
DTClientes.Columns[9].ColumnName = "address.postalCode"; DTClientes.Columns[9].ColumnName = "address.postalCode";
DTClientes.Columns[9].ColumnName = "phone.intCode"; DTClientes.Columns[9].ColumnName = "phone.intCode";
DTClientes.Columns[9].ColumnName = "phone.areaCode"; DTClientes.Columns[9].ColumnName = "phone.areaCode";
DTClientes.Columns[9].ColumnName = "phone.number"; DTClientes.Columns[9].ColumnName = "phone.number";
DTClientes.Dispose(); DTClientes.Dispose();
DTVentas.Columns.RemoveAt(7);
DTVentas.AcceptChanges();
}
catch (Exception e)
{
SBLog.AppendLine("<b>Error al renombrar columnas</b>");
}
}
DTVentas.Columns.RemoveAt(7);
DTVentas.AcceptChanges();
if (!ErrorProceso) if (!ErrorProceso)
@@ -109,11 +157,6 @@ public class TareasJam : IHttpHandler
string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx"; string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
string FTPServer = "ftp://127.0.0.1/";
string TFPUsr = "Toor";
string FTPPass = "agj-3500";
SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet()); SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet());
var workbookProductos = new ExcelFile(); var workbookProductos = new ExcelFile();
@@ -160,18 +203,30 @@ public class TareasJam : IHttpHandler
var FInfoClientes = new FileInfo(RutaClientes); var FInfoClientes = new FileInfo(RutaClientes);
var FInfoAlmacenes = new FileInfo(RutaAlmacenes); var FInfoAlmacenes = new FileInfo(RutaAlmacenes);
bool CargaProductos = false; bool CargaProductos = false;
bool CargaVentas = false; bool CargaVentas = false;
bool CargaClientes = false; bool CargaClientes = false;
bool CargaAlmacenes = false; bool CargaAlmacenes = false;
SBLog.AppendLine("<b>Cargas</b><br>");
SBLog.AppendLine("<table border='1'> <tr><th>Archivo</th><th>Estado</th></tr>");
CargaProductos = CargarArchivos(FInfoProductos, FTPServer, TFPUsr, FTPPass); CargaProductos = CargarArchivos(FInfoProductos, FTPServer, TFPUsr, FTPPass);
if (CargaProductos) if (CargaProductos)
{ {
CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, FTPServer, TFPUsr, FTPPass); CargaProductos = VerificarArchivo(FInfoProductos, FInfoProductos.Length, FTPServer, TFPUsr, FTPPass);
} }
if (CargaProductos)
{
SBLog.AppendLine($"<tr><td>Productos</td><td>ok</td></tr>");
}
else
{
SBLog.AppendLine($"<tr><td>Productos</td><td>Error carga</td></tr>");
}
if (CargaProductos) if (CargaProductos)
{ {
CargaVentas = CargarArchivos(FInfoVentas, FTPServer, TFPUsr, FTPPass); CargaVentas = CargarArchivos(FInfoVentas, FTPServer, TFPUsr, FTPPass);
@@ -181,6 +236,14 @@ public class TareasJam : IHttpHandler
} }
} }
if (CargaVentas)
{
SBLog.AppendLine($"<tr><td>Ventas</td><td>ok</td></tr>");
}else
{
SBLog.AppendLine($"<tr><td>Ventas</td><td>Error carga</td></tr>");
}
if (CargaProductos & CargaVentas) if (CargaProductos & CargaVentas)
{ {
CargaClientes = CargarArchivos(FInfoClientes, FTPServer, TFPUsr, FTPPass); CargaClientes = CargarArchivos(FInfoClientes, FTPServer, TFPUsr, FTPPass);
@@ -190,6 +253,13 @@ public class TareasJam : IHttpHandler
} }
} }
if (CargaClientes)
{
SBLog.AppendLine($"<tr><td>Clientes</td><td>ok</td></tr>");
}else
{
SBLog.AppendLine($"<tr><td>Clientes</td><td>Error carga</td></tr>");
}
if (CargaProductos & CargaVentas& CargaClientes ) if (CargaProductos & CargaVentas& CargaClientes )
{ {
@@ -200,25 +270,60 @@ public class TareasJam : IHttpHandler
} }
} }
if (CargaAlmacenes)
{
SBLog.AppendLine($"<tr><td>Almacenes</td><td>ok</td></tr>");
}else
{
SBLog.AppendLine($"<tr><td>Almacenes</td><td>Error carga</td></tr>");
}
if (CargaProductos & CargaVentas & CargaClientes & CargaAlmacenes) if (CargaProductos & CargaVentas & CargaClientes & CargaAlmacenes)
{ {
return true; Respuesta = true;
} }
else else
{ {
return false; Respuesta = false;
} }
SBLog.AppendLine("</table>");
} }
else else
{ {
return false; Respuesta = false;
} }
string Cuerpo = Respuesta ? $"<b>Correcto</b><br>Tarea de carga de archios Corteva realizada correctamente<br> {SBLog.ToString()}" : $"<b>Error</b><br> Error tarea de carga de archios Corteva<br> {SBLog.ToString()}" ;
MandaCorreo(Cuerpo, Respuesta);
return Respuesta;
} }
private void MandaCorreo(string Cuerpo, bool ErrorProceso)
{
try
{
ClsSisMail Correo = new ClsSisMail();
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
//string Para = "oscar.irigoyen@adssistemas.mx";
string Asunto = ErrorProceso ? $"Carga Layout Corteva {DateTime.Now.ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {DateTime.Now.ToString("yyyy-MM-dd")}";
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo);
}catch(Exception ex)
{
Extensiones.ModExtensiones.GuardaLog(null,$"Error Tareas Programadas 119 error enviar mail --> {ex.Message} ");
}
}
private bool CargarArchivos(FileInfo FInfo, string FTPServer, string FTPUsr, string FTPPass) private bool CargarArchivos(FileInfo FInfo, string FTPServer, string FTPUsr, string FTPPass)
{ {

View File

@@ -633,7 +633,7 @@
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoCliente" runat="server" CssClass=" form-control input-sm select2me" Width="200px"> <asp:DropDownList ID="DdlTipoCliente" runat="server" CssClass=" form-control input-sm select2me" Width="200px">
<asp:ListItem Selected="True" Value="1">Frecuente</asp:ListItem> <asp:ListItem Selected="True" Value="1">Frecuente</asp:ListItem>
<asp:ListItem Value="2">No Frecuente</asp:ListItem> <asp:ListItem Value="2">Venta Mostrador</asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlTipoCliente.ClientID.ToString()%>">Tipo de Cliente:</label> <label for="<%= DdlTipoCliente.ClientID.ToString()%>">Tipo de Cliente:</label>
</div> </div>

View File

@@ -2277,6 +2277,8 @@ Partial Class Ventas_ClientesAbonar
IDPoliza = -1 IDPoliza = -1
FolioIECancelado = "" FolioIECancelado = ""
Anexo.Text = ""
If UsuarioActual.Empresa.UsaAC Then If UsuarioActual.Empresa.UsaAC Then
TxtOtrosImportes.Text = "" TxtOtrosImportes.Text = ""
UpDatos.Update() UpDatos.Update()

View File

@@ -297,13 +297,28 @@
<asp:DropDownList ID="DdlMarcaPSDes" CssClass="select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Style="width: 100%" Height="22px"></asp:DropDownList> <asp:DropDownList ID="DdlMarcaPSDes" CssClass="select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Style="width: 100%" Height="22px"></asp:DropDownList>
</div> </div>
<label runat="server" id="LblLitraje" title="Mostrar Litraje" data-toggle="tooltip" data-placement="top" class="col-md-1">Litraje:</label> <label runat="server" id="LblLitraje" title="Mostrar Litraje" data-toggle="tooltip" data-placement="top" class="col-md-1" visible="false">Litraje:</label>
<div runat="server" id="Div1" class="col-md-2"> <div runat="server" id="DvLitraje" class="col-md-2" visible ="false" >
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" /> <asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" />
</div> </div>
</div>
<div class="row">
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Frecuente" Value="1"></asp:ListItem>
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -61,6 +61,12 @@ Partial Class Ventas_RepProductosServicios
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx") If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
CargarMarcas() CargarMarcas()
SetValues() SetValues()
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
LblLitraje.Visible = True
DvLitraje.Visible = True
End If
End If End If
End Sub End Sub
@@ -86,6 +92,7 @@ Partial Class Ventas_RepProductosServicios
DdlGrupo.Items.Insert(15, New ListItem("Cliente - PS", "20")) DdlGrupo.Items.Insert(15, New ListItem("Cliente - PS", "20"))
DdlGrupo.Items.Insert(16, New ListItem("Sucursal - PS", "21")) DdlGrupo.Items.Insert(16, New ListItem("Sucursal - PS", "21"))
DdlGrupo.Items.Insert(17, New ListItem("Familia - Marca - Tipo", "22")) DdlGrupo.Items.Insert(17, New ListItem("Familia - Marca - Tipo", "22"))
DdlGrupo.Items.Insert(18, New ListItem("Tipo Cliente", "23"))
DdlGrupo.DataBind() DdlGrupo.DataBind()
DdlGrupo.SelectedValueExist("8") DdlGrupo.SelectedValueExist("8")
@@ -266,7 +273,7 @@ Partial Class Ventas_RepProductosServicios
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked) Then CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados
Else Else
@@ -346,11 +353,11 @@ Partial Class Ventas_RepProductosServicios
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1") FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1")
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1") FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1")
Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}", Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}",
e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"),
e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"),
e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"), e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"),
FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, CveClasificacionDetalle) FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue))
e.Row.FCLiteral("LtlGrupo").Text = String.Format("<a target=""_blank"" Class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.DBCampo("Gpo")) e.Row.FCLiteral("LtlGrupo").Text = String.Format("<a target=""_blank"" Class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.DBCampo("Gpo"))

View File

@@ -303,6 +303,18 @@
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Frecuente" Value="1"></asp:ListItem>
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -60,6 +60,23 @@ Partial Class Ventas_RepProductosServiciosDetalle
ViewState("Agrupador") = value ViewState("Agrupador") = value
End Set End Set
End Property End Property
Private Property TipoCliente As Integer
Get
If ViewState("TipoCliente") Is Nothing Then
Return -1
Else
Return ViewState("TipoCliente").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("TipoCliente") = value
End Set
End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -299,6 +316,10 @@ Partial Class Ventas_RepProductosServiciosDetalle
CveMarca = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca").ToEntero() > 0, Request("CveMarca").ToEntero(), -1).ToString.ToEntero CveMarca = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca").ToEntero() > 0, Request("CveMarca").ToEntero(), -1).ToString.ToEntero
CveClasificacionDetalle = If(Request("CveClasificacionDetalle") IsNot Nothing AndAlso Request("CveClasificacionDetalle").ToEntero() > 0, Request("CveClasificacionDetalle").ToEntero(), -1).ToString.ToEntero CveClasificacionDetalle = If(Request("CveClasificacionDetalle") IsNot Nothing AndAlso Request("CveClasificacionDetalle").ToEntero() > 0, Request("CveClasificacionDetalle").ToEntero(), -1).ToString.ToEntero
TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString, "-1").ToString.ToEntero
DdlTipoCliente.SelectedValueExist(TipoCliente)
If Fecha <> "-1" Then If Fecha <> "-1" Then
txtFechaI.Text = Fecha txtFechaI.Text = Fecha
txtFechaF.Text = Fecha txtFechaF.Text = Fecha
@@ -410,7 +431,8 @@ Partial Class Ventas_RepProductosServiciosDetalle
DdlPS.SelectedValue.ToEntero, FechaI, FechaF, -1, FechaIEjec, FechaFEjec, -1, CveCliente, DdlPS.SelectedValue.ToEntero, FechaI, FechaF, -1, FechaIEjec, FechaFEjec, -1, CveCliente,
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero,
UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, GPO:=DdlGrupo.SelectedValue.ToEntero, CveMoneda:=CveMoneda, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, GPO:=DdlGrupo.SelectedValue.ToEntero, CveMoneda:=CveMoneda,
TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra, CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero()) Then TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra,
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
TmpDT = ObjVentas.DtResultados TmpDT = ObjVentas.DtResultados
Else Else
@@ -438,7 +460,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
FechaI, FechaF, Mes.ToEntero, FechaIEjec, FechaFEjec, MesEjec.ToEntero, CveCliente.ToEntero, CveSubProyectoEjecucion.ToEntero, FechaI, FechaF, Mes.ToEntero, FechaIEjec, FechaFEjec, MesEjec.ToEntero, CveCliente.ToEntero, CveSubProyectoEjecucion.ToEntero,
CveVendedor, CveUsuario.ToEntero, CveEstatus.ToEntero, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, CveVendedor, CveUsuario.ToEntero, CveEstatus.ToEntero, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
GPO:=Gpo, CveMoneda:=CveMoneda, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, GPO:=Gpo, CveMoneda:=CveMoneda, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
CveProveedorCompra:=CveProveedorCompra, CveMarca:=CveMarca) Then CveProveedorCompra:=CveProveedorCompra, CveMarca:=CveMarca, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
TmpDT = ObjVentas.DtResultados TmpDT = ObjVentas.DtResultados
Else Else

View File

@@ -283,6 +283,7 @@
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList> <asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList>
</div> </div>
<label title="Condiciones de Pago" data-toggle="tooltip" class="col-md-1 truncate">Condiciones Pago:</label> <label title="Condiciones de Pago" data-toggle="tooltip" class="col-md-1 truncate">Condiciones Pago:</label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlCondicionesPago" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me"> <asp:DropDownList ID="DdlCondicionesPago" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
@@ -291,6 +292,16 @@
<asp:ListItem Text="Contado" Value="0"></asp:ListItem> <asp:ListItem Text="Contado" Value="0"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label title="Tipo Cliente" data-toggle="tooltip" class="col-md-1 truncate">Tipo Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Frecuente" Value="1"></asp:ListItem>
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -55,6 +55,25 @@ Partial Class RepVentaDetalle
ViewState("CveMoneda") = value ViewState("CveMoneda") = value
End Set End Set
End Property End Property
Private Property TipoCliente As Integer
Get
If ViewState("TipoCliente") Is Nothing Then
Return -1
Else
Return ViewState("TipoCliente").ToString.ToEntero
End If
End Get
Set(value As Integer)
ViewState("TipoCliente") = value
End Set
End Property
Private Property TCEspecifico As Decimal Private Property TCEspecifico As Decimal
Get Get
Return ViewState("TCEspecifico").ToString.ToDecimal Return ViewState("TCEspecifico").ToString.ToDecimal
@@ -141,7 +160,9 @@ Partial Class RepVentaDetalle
TipoCambio = If(Request("TipoCambio") IsNot Nothing, Request("TipoCambio").ToString.ToEntero, -1).ToString.ToEntero TipoCambio = If(Request("TipoCambio") IsNot Nothing, Request("TipoCambio").ToString.ToEntero, -1).ToString.ToEntero
TCEspecifico = If(Request("TCEspecifico") IsNot Nothing, Request("TCEspecifico").ToString.ToEntero, -1).ToString.ToDecimal TCEspecifico = If(Request("TCEspecifico") IsNot Nothing, Request("TCEspecifico").ToString.ToEntero, -1).ToString.ToDecimal
CveMoneda = If(Request("CveMoneda") IsNot Nothing, Request("CveMoneda").ToString.ToEntero, -1).ToString.ToEntero CveMoneda = If(Request("CveMoneda") IsNot Nothing, Request("CveMoneda").ToString.ToEntero, -1).ToString.ToEntero
TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString.ToEntero, -1).ToString.ToEntero
DdlTipoCliente.SelectedValueExist(TipoCliente)
'LISTBOXS 'LISTBOXS
TipoDocto = If(Request("TipoDocto") IsNot Nothing, Request("TipoDocto").ToString, "-1").ToString TipoDocto = If(Request("TipoDocto") IsNot Nothing, Request("TipoDocto").ToString, "-1").ToString
@@ -461,7 +482,8 @@ Partial Class RepVentaDetalle
If ObjVentas.GetRepVentasDetalle(DdlGrupo.SelectedValue.ToEntero, Anio.ToEntero, Mes.ToEntero, AnioMes, Fecha, CveCliente, If ObjVentas.GetRepVentasDetalle(DdlGrupo.SelectedValue.ToEntero, Anio.ToEntero, Mes.ToEntero, AnioMes, Fecha, CveCliente,
IVA, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, FechaI, FechaF, IVA, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, FechaI, FechaF,
CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec, CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec,
CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=CveCondicionesPago) Then CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
DtVentas = AddRows(ObjVentas.DtResultados) DtVentas = AddRows(ObjVentas.DtResultados)
ImgImprimir.Enabled = True ImgImprimir.Enabled = True
GvDatos.DataSource = AddRows(ObjVentas.DtResultados) GvDatos.DataSource = AddRows(ObjVentas.DtResultados)

View File

@@ -284,6 +284,17 @@
<asp:ListItem Text="Contado" Value="0"></asp:ListItem> <asp:ListItem Text="Contado" Value="0"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label title="Tipo Cliente" data-toggle="tooltip" class="col-md-1 truncate">Tipo Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Frecuente" Value="1"></asp:ListItem>
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -137,6 +137,7 @@ Partial Class Ventas_RepVentas
DdlGrupo.Items.Insert(11, New ListItem("Mes Ejec.", "12")) DdlGrupo.Items.Insert(11, New ListItem("Mes Ejec.", "12"))
DdlGrupo.Items.Insert(12, New ListItem("Año/Mes Ejec.", "13")) DdlGrupo.Items.Insert(12, New ListItem("Año/Mes Ejec.", "13"))
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14")) DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
DdlGrupo.Items.Insert(13, New ListItem("Tipo Cliente", "20"))
DdlGrupo.DataBind() DdlGrupo.DataBind()
DdlGrupo.SelectedValueExist("3") DdlGrupo.SelectedValueExist("3")
End Sub End Sub
@@ -320,7 +321,7 @@ Partial Class Ventas_RepVentas
If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores, If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores,
DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero) Then CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados
Else Else
@@ -420,14 +421,14 @@ Partial Class Ventas_RepVentas
'LIGA A DETALLE 'LIGA A DETALLE
Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaI}&FechaF={FechaF}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}" Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaI}&FechaF={FechaF}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}"
e.Row.FCLiteral("LtlGrupo").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlGrupo").Text & "</a>" e.Row.FCLiteral("LtlGrupo").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlGrupo").Text & "</a>"
e.Row.FCLiteral("LtlCantidad").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlCantidad").Text & "</a>" e.Row.FCLiteral("LtlCantidad").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlCantidad").Text & "</a>"
If DdlGrupo.SelectedValue.ToEntero > 16 AndAlso e.Row.DBCampo("Orden") = "2" Then If DdlGrupo.SelectedValue.ToEntero > 16 AndAlso e.Row.DBCampo("Orden") = "2" AndAlso DdlGrupo.SelectedValue.ToEntero <> 20 Then
e.Row.CssClass = "SubTotales" e.Row.CssClass = "SubTotales"
e.Row.Attributes.Add("style", "background:#CCCCCC !important") e.Row.Attributes.Add("style", "background:#CCCCCC !important")
End If End If

View File

@@ -117,6 +117,7 @@
<asp:ListItem Text="Sucursal Ejec" Value="15"></asp:ListItem> <asp:ListItem Text="Sucursal Ejec" Value="15"></asp:ListItem>
<asp:ListItem Text="Año/Mes Sucursal" Value="17"></asp:ListItem> <asp:ListItem Text="Año/Mes Sucursal" Value="17"></asp:ListItem>
<asp:ListItem Text="% IVA Sucursal" Value="18"></asp:ListItem> <asp:ListItem Text="% IVA Sucursal" Value="18"></asp:ListItem>
<asp:ListItem Text="Tipo Cliente" Value="19"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -233,6 +234,16 @@
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList> <asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList>
</div> </div>
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Frecuente" Value="1"></asp:ListItem>
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -193,7 +193,10 @@ Partial Class RepVentasPeriodo
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha) FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
If ObjVentas.GetRepVentasPeriodos(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, If ObjVentas.GetRepVentasPeriodos(FechaI, FechaF, FechaIEjec, FechaFEjec, DdlClientes.SelectedValue.ToEntero, DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero,
DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario, VerEn:=VerEn, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero) Then DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlTipoComprobante.SelectedValue,
DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
VerEn:=VerEn, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados
Else Else

View File

@@ -891,8 +891,8 @@
<th id="ThCantidadFacturada" runat="server" visible="false">Cantidad<br /> <th id="ThCantidadFacturada" runat="server" visible="false">Cantidad<br />
Facturada</th> Facturada</th>
<th id="ThProyecto" runat="server"> <th id="ThProyecto" runat="server">
<asp:Label runat="server" ID="LblProyectoHeader" Text="Proyecto" /><br /> <asp:Label runat="server" ID="LblProyectoHeader" Text="" />
<asp:Label runat="server" ID="LblSubProyecto" Text="SubProyecto" /></th> <asp:Label runat="server" ID="LblSubProyecto" Text="" /></th>
<th>P.U.&nbsp;<asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-comment-o'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" /></th> <th>P.U.&nbsp;<asp:LinkButton ID="ImgDescPU" runat="server" Text="<i class='fa fa-comment-o'></i>" Style="cursor: pointer;" AlternateText="Agregar Descuento" /></th>
<th id="thEncDesc1" runat="server" visible="true">Desc <th id="thEncDesc1" runat="server" visible="true">Desc
</th> </th>
@@ -976,11 +976,11 @@
<asp:UpdatePanel ID="UPPProy" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPPProy" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:DropDownList ID="DdlProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%"> <asp:DropDownList ID="DdlProyecto" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="100%">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem> <%--<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>--%>
</asp:DropDownList> </asp:DropDownList>
<asp:Literal runat="server" ID="BrSubProyecto" Text="<br/>" /> <asp:Literal runat="server" ID="BrSubProyecto" Text="<br/>" />
<asp:DropDownList ID="DdlSubProyecto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%"> <asp:DropDownList ID="DdlSubProyecto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem> <%--<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>--%>
</asp:DropDownList> </asp:DropDownList>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -5345,16 +5345,16 @@
<asp:UpdatePanel ID="UPPProyecto" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPPProyecto" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="form-group form-md-line-input input-iconright" id="divProyectoPyME" runat="server"> <div class="form-group form-md-line-input input-iconright" id="divProyectoPyME" runat="server">
<asp:Label id="LblProyectoPyME" runat="server" for="<%= DdlProyectoPyME.ClientID.ToString()%>">Proyecto:</asp:Label>
<asp:DropDownList ID="DdlProyectoPyME" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="50%"> <asp:DropDownList ID="DdlProyectoPyME" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto" Width="50%">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label id="LblProyectoPyME" runat="server" for="<%= DdlProyectoPyME.ClientID.ToString()%>">Proyecto:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:Label id="LblSubProyectoPyME" runat="server" for="<%= DdlSubProyectoPyME.ClientID.ToString()%>">SubProyecto:</asp:Label>
<asp:DropDownList ID="DdlSubProyectoPyME" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="50%"> <asp:DropDownList ID="DdlSubProyectoPyME" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="50%">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
<label id="LblSubProyectoPyME" runat="server" for="<%= DdlSubProyectoPyME.ClientID.ToString()%>">SubProyecto:</label>
</div> </div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>

View File

@@ -2452,13 +2452,13 @@ Partial Class Ventas
CargaFletes() CargaFletes()
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
'DdlProyecto.Visible = False DdlProyecto.Visible = False
BrSubProyecto.Visible = False BrSubProyecto.Visible = False
DdlProyectoPyME.Visible = False DdlProyectoPyME.Visible = False
LblProyectoHeader.Text = "Sucursal" LblProyectoHeader.Text = "Sucursal"
LblSubProyecto.Text = "" LblSubProyecto.Text = ""
divProyectoPyME.Visible = False divProyectoPyME.Visible = False
LblSubProyectoPyME.InnerText = "Sucursal" LblSubProyectoPyME.Text = "Sucursal"
Dim dttSub As New DataTable Dim dttSub As New DataTable
dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
@@ -2476,13 +2476,13 @@ Partial Class Ventas
dttSub.Dispose() dttSub.Dispose()
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
'DdlProyecto.Visible = False DdlProyecto.Visible = False
BrSubProyecto.Visible = False BrSubProyecto.Visible = False
DdlProyectoPyME.Visible = False DdlProyectoPyME.Visible = False
LblProyectoHeader.Text = "Proyecto" LblProyectoHeader.Text = "Proyecto"
LblSubProyecto.Text = "" LblSubProyecto.Text = ""
divProyectoPyME.Visible = False divProyectoPyME.Visible = False
LblSubProyectoPyME.InnerText = "Proyecto" LblSubProyectoPyME.Text = "Proyecto"
Dim dttSub As New DataTable Dim dttSub As New DataTable
dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
@@ -2509,7 +2509,8 @@ Partial Class Ventas
End If End If
CargarCentrosDeCosto(Nothing, Nothing, LblProyectoHeader, LblSubProyecto) 'CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto)
'CargarCentrosDeCosto(DdlProyectoPyME, DdlSubProyectoPyME, LblProyectoPyME, LblSubProyectoPyME)
'MOSTRAR LA OPCION DE AGREGAR PS EN BDH 'MOSTRAR LA OPCION DE AGREGAR PS EN BDH
If UsuarioActual.CveEmpresa = 140 AndAlso CveVenta <= 0 Then If UsuarioActual.CveEmpresa = 140 AndAlso CveVenta <= 0 Then
@@ -10046,17 +10047,17 @@ Partial Class Ventas
CveCuentaCliente = CveCuenta CveCuentaCliente = CveCuenta
End If End If
Case 7 'descuentos 'Case 7 'descuentos
If LblDescuentos.Text.ToDecimal > 0 Then ' If LblDescuentos.Text.ToDecimal > 0 Then
importeMovimiento = (ObjFactura.Descuento) * ValorMultiplicador ' importeMovimiento = (ObjFactura.Descuento) * ValorMultiplicador
importeMX = importeMovimiento * tipoCambio * Multiplicador ' importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago ' FechaMovimiento = ObjFactura.FechaPago
CveSubProyectoContabilizar = CveSubProyectoVenta ' CveSubProyectoContabilizar = CveSubProyectoVenta
IdCtaContable = 0 ' IdCtaContable = 0
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" ' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
End If ' End If
Case 3 'Cliente Case 3 'Cliente
If ObjFactura.TipoDocto = "Ant" Then If ObjFactura.TipoDocto = "Ant" Then
@@ -10955,7 +10956,7 @@ Partial Class Ventas
importeMovimiento = 0 importeMovimiento = 0
Case 103 'Descuento Case 103 'Descuento
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "-1" Then If ObjFactura.Descuento <> 0 AndAlso Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "-1" Then
importeMovimiento = ObjFactura.Descuento * ValorMultiplicador importeMovimiento = ObjFactura.Descuento * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
@@ -10968,38 +10969,52 @@ Partial Class Ventas
'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero() 'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero()
End If End If
End If End If
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
If importeMovimiento > 0 AndAlso UsuarioActual.CveEmpresa = 119 Then
'código fijo en base el porcentaje iva, que se afecten las clasificaciones
For i = 0 To TmpDTDetalle.Rows.Count - 1
'If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal > 0 Then
' If TmpDTDetalle(i)("PorcentajeIVA").ToString().ToDecimal = 0.08 Then
' TmpDTDetalle(i)("CveClasificacion") = 20242 'clasif: ventas tasa 8%
' Else
' TmpDTDetalle(i)("CveClasificacion") = 19929 'clasif: ventas tasa 16%
' End If
'Else
' TmpDTDetalle(i)("CveClasificacion") = 19930 'clasif: ventas tasa 0%
'End If
If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then DT = TmpDTDetalle.FiltraParametros("", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveClasificacion").ToString()
If DT.Rows.Count > 0 Then
'Se agrega movimiento separado por la cuenta de ventas (ER)
For Each Row2 As DataRow In DT.Rows
importeMovimiento = (TmpDTDetalle.SUM("Descuento", String.Format("CveClasificacion = {0} And CveSubProyecto = {1}", Row2("CveClasificacion"), Row2("CveSubProyecto"))).ToString().ToDecimal) * ValorMultiplicador
importeMX = importeMovimiento * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago
Concepto = $"{ViewState("VentaFolio").ToString()} {If(Row2("CveClasificacion").ToString().ToEntero() > 0, GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"), "")} - {If(Row2("CveSubProyecto").ToString().ToEntero() > 0, GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto", $"CveSubProyecto = {Row2("CveSubProyecto").ToString()}"), "Sin SubProyecto Asignado")}"
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If ObjFactura.TipoDocto.Contiene("Egs") Then
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
Else
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
End If
If importeMovimiento <> 0 Then
If IdCtaContable <= 0 Then
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}"))
idCuentaContabilizacion = 0
End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 103, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=-1, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
ErrorPrepoliza = True
Else
ViewState("SeGuardoPrePoliza") = True
End If
End If End If
Next Next
End If End If
End If End If
importeMovimiento = 0
Case 103 'Descuento 'Case 103 'Descuento
'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida. ' 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida.
If DdlTipoAmortizacionAnticipo.SelectedValue <> "1" Then ' If DdlTipoAmortizacionAnticipo.SelectedValue <> "1" Then
importeMovimiento = ObjFactura.Descuento * ValorMultiplicador ' importeMovimiento = ObjFactura.Descuento * ValorMultiplicador
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador ' importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
FechaMovimiento = ObjFactura.FechaPago ' FechaMovimiento = ObjFactura.FechaPago
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" ' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
IdCtaContable = 0 ' IdCtaContable = 0
End If ' End If
Case 8 'Ret IVA por Trasladar Case 8 'Ret IVA por Trasladar
If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") AndAlso ObjFactura.CveTipoRetencion <> 4 Then 'SI NO ES RETENCION DE IVA DE SERVICIOS
@@ -11011,7 +11026,7 @@ Partial Class Ventas
'SI LA FACTURA ESTA PAGADA EN SU TOTALIDAD DEBE REGRESAR EL IMPUESTO 'SI LA FACTURA ESTA PAGADA EN SU TOTALIDAD DEBE REGRESAR EL IMPUESTO
If (ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.Pagado > 0) AndAlso ObjFactura.TipoDocto = "Dev" Then If (ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.Pagado > 0) AndAlso ObjFactura.TipoDocto = "Dev" Then
TipoMovimiento = Not TipoMovimiento TipoMovimiento = True
ConceptoContable = 62 ConceptoContable = 62
importeMovimiento = importeMovimiento * -1 importeMovimiento = importeMovimiento * -1
importeMX = importeMX * -1 importeMX = importeMX * -1
@@ -11050,7 +11065,7 @@ Partial Class Ventas
'SI LA FACTURA ESTA PAGADA EN SU TOTALIDAD DEBE REGRESAR EL IMPUESTO 'SI LA FACTURA ESTA PAGADA EN SU TOTALIDAD DEBE REGRESAR EL IMPUESTO
If (ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.Pagado > 0) AndAlso ObjFactura.TipoDocto = "Dev" Then If (ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.Pagado > 0) AndAlso ObjFactura.TipoDocto = "Dev" Then
TipoMovimiento = Not TipoMovimiento TipoMovimiento = True
ConceptoContable = 314 ConceptoContable = 314
importeMovimiento = importeMovimiento * -1 importeMovimiento = importeMovimiento * -1
importeMX = importeMX * -1 importeMX = importeMX * -1
@@ -11075,7 +11090,7 @@ Partial Class Ventas
'SI LA FACTURA ESTA PAGADA EN SU TOTALIDAD DEBE REGRESAR EL IMPUESTO 'SI LA FACTURA ESTA PAGADA EN SU TOTALIDAD DEBE REGRESAR EL IMPUESTO
If (ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.Pagado > 0) AndAlso ObjFactura.TipoDocto = "Dev" Then If (ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.Pagado > 0) AndAlso ObjFactura.TipoDocto = "Dev" Then
TipoMovimiento = Not TipoMovimiento TipoMovimiento = True
ConceptoContable = 63 ConceptoContable = 63
importeMovimiento = importeMovimiento * -1 importeMovimiento = importeMovimiento * -1
importeMX = importeMX * -1 importeMX = importeMX * -1
@@ -11114,7 +11129,7 @@ Partial Class Ventas
'SI LA FACTURA ESTA PAGADA EN SU TOTALIDAD DEBE REGRESAR EL IMPUESTO 'SI LA FACTURA ESTA PAGADA EN SU TOTALIDAD DEBE REGRESAR EL IMPUESTO
If (ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.Pagado > 0) AndAlso ObjFactura.TipoDocto = "Dev" Then If (ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.Pagado > 0) AndAlso ObjFactura.TipoDocto = "Dev" Then
TipoMovimiento = Not TipoMovimiento TipoMovimiento = True
ConceptoContable = 61 ConceptoContable = 61
importeMovimiento = importeMovimiento * -1 importeMovimiento = importeMovimiento * -1
importeMX = importeMX * -1 importeMX = importeMX * -1
@@ -11174,7 +11189,7 @@ Partial Class Ventas
'SI LA FACTURA ESTA PAGADA EN SU TOTALIDAD DEBE REGRESAR EL IMPUESTO 'SI LA FACTURA ESTA PAGADA EN SU TOTALIDAD DEBE REGRESAR EL IMPUESTO
If (ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.Pagado > 0) AndAlso ObjFactura.TipoDocto = "Dev" Then If (ObjFacturaNC IsNot Nothing AndAlso ObjFacturaNC.Pagado > 0) AndAlso ObjFactura.TipoDocto = "Dev" Then
TipoMovimiento = Not TipoMovimiento TipoMovimiento = True
ConceptoContable = 39 ConceptoContable = 39
importeMovimiento = importeMovimiento * -1 importeMovimiento = importeMovimiento * -1
importeMX = importeMX * -1 importeMX = importeMX * -1
@@ -12898,69 +12913,8 @@ Partial Class Ventas
Else Else
importeMovimiento = 0 importeMovimiento = 0
End If End If
Case 13 ' IVA x Trasladar
If gvr.DataKey("RegresarImpuesto") = "1" Then
importeMovimiento = gvr.DataKey("IVA").ToString().ToDecimal()
importeMX = importeMovimiento
PorcentajeImpuesto = (importeMovimiento / gvr.DataKey("SubTotal").ToString().ToDecimal())
If importeMovimiento <> 0 Then
IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
CveCuenta = If(CveCuentaIVAXTrasladar > 0, CveCuentaIVAXTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
End If
Else
importeMovimiento = 0
PorcentajeImpuesto = 0
End If
Case 61 ' IVA Trasladado
If gvr.DataKey("RegresarImpuesto") = "1" Then
importeMovimiento = gvr.DataKey("IVA").ToString().ToDecimal()
importeMX = importeMovimiento
PorcentajeImpuesto = (importeMovimiento / gvr.DataKey("SubTotal").ToString().ToDecimal())
If importeMovimiento <> 0 Then
IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
End If
Else
importeMovimiento = 0
PorcentajeImpuesto = 0
End If
Case 38 ' IEPS x Trasladar
If gvr.DataKey("RegresarImpuesto") = "1" Then
importeMovimiento = gvr.DataKey("IEPS").ToString().ToDecimal()
importeMX = importeMovimiento
PorcentajeImpuesto = (importeMovimiento / gvr.DataKey("SubTotal").ToString().ToDecimal())
If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladar").ToString().ToEntero()
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladarSIG").ToString().ToEntero()
End If
End If
Else
importeMovimiento = 0
PorcentajeImpuesto = 0
End If
Case 39 ' IEPS Trasladado
If gvr.DataKey("RegresarImpuesto") = "1" Then
importeMovimiento = gvr.DataKey("IEPS").ToString().ToDecimal()
importeMX = importeMovimiento
PorcentajeImpuesto = (importeMovimiento / gvr.DataKey("SubTotal").ToString().ToDecimal())
If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then
If ObjConta.DtResultados.Rows.Count > 0 Then
IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSTrasladado").ToString().ToEntero()
CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSTrasladadoSIG").ToString().ToEntero()
End If
End If
Else
importeMovimiento = 0
PorcentajeImpuesto = 0
End If
Case Else Case Else
importeMovimiento = 0 importeMovimiento = 0
PorcentajeImpuesto = 0
importeMX = 0
End Select End Select
If importeMovimiento <> 0 Then If importeMovimiento <> 0 Then
@@ -12974,15 +12928,13 @@ Partial Class Ventas
' CveCuentaContabilizacion = 0 ' CveCuentaContabilizacion = 0
'End If 'End If
If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral, PorcentajeImpuesto:=PorcentajeImpuesto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral) Then
ErrorConta = True ErrorConta = True
Exit For
End If End If
End If End If
Next Next
End If End If
End If End If
Next Next
Else Else
ErrorConta = True ErrorConta = True

View File

@@ -76,6 +76,8 @@