Merge Ventas
This commit is contained in:
@@ -250,10 +250,10 @@
|
||||
<br />
|
||||
|
||||
<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: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>
|
||||
<label for="<%= DdlSubProyectos.ClientID.ToString()%>">SubProyecto:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ Partial Class Acumuladores_CatFoliosGarantia
|
||||
|
||||
#Region "Folios Garantía"
|
||||
Private Sub CargaSubProyectos()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, lblSubProyecto)
|
||||
DdlSubProyectos.Items.Clear()
|
||||
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyectos.DataBind()
|
||||
|
||||
@@ -4452,7 +4452,8 @@ Public Class ClsBancos
|
||||
|
||||
Dim RutaComprobante As String = ""
|
||||
If GetBancosIE(CveIENotificar, UsuarioActual.CveEmpresa) Then
|
||||
RutaComprobante = Comprobante
|
||||
RutaComprobante = $"{UsuarioActual.Empresa.Ruta}IE/{Comprobante}"
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -4742,6 +4743,7 @@ Public Class ClsBancos
|
||||
strBody.AppendFormat("</div>")
|
||||
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("</body></html>")
|
||||
|
||||
@@ -240,7 +240,7 @@ Public Class ClsMovimientos
|
||||
Gpo 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 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
|
||||
'Data = New DataTable
|
||||
@@ -272,6 +272,7 @@ Public Class ClsMovimientos
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -317,15 +318,12 @@ Public Class ClsMovimientos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
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,
|
||||
AnioMes As String,
|
||||
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",
|
||||
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,
|
||||
AnioMes As String, 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 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
|
||||
'Data = New DataTable
|
||||
@@ -363,6 +361,10 @@ Public Class ClsMovimientos
|
||||
.Add("@CveCobranzaEstatus", SqlDbType.Int).Value = CveCobranzaEstatus
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.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
|
||||
|
||||
Try
|
||||
|
||||
@@ -1431,7 +1431,7 @@ Public Class ClsOC
|
||||
|
||||
Return Retorno
|
||||
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
|
||||
|
||||
DataAdapter("PA_OC_EstatusUpdate")
|
||||
@@ -1452,6 +1452,9 @@ Public Class ClsOC
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
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
|
||||
Me.OnError("Ocurrió un error al guardar los cambios en el Estatus", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
|
||||
@@ -8053,12 +8053,24 @@ Public Class ClsPaginas
|
||||
If DdlProyecto IsNot Nothing Then DdlProyecto.Visible = False
|
||||
LblSubProyecto.Text = "Proyecto"
|
||||
Case 4
|
||||
If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto"
|
||||
If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto<br/>"
|
||||
LblSubProyecto.Text = "Subproyecto"
|
||||
Case 5
|
||||
If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto"
|
||||
If LthProyectoP IsNot Nothing Then LthProyectoP.Text = "Proyecto<br/>"
|
||||
LblSubProyecto.Text = "Sucursal"
|
||||
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 Class
|
||||
|
||||
|
||||
@@ -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,
|
||||
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 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
|
||||
DataAdapter("PA_Vta_VentasGetRep")
|
||||
|
||||
@@ -1346,6 +1346,7 @@ Public Class ClsVentas
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
End With
|
||||
|
||||
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,
|
||||
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 CveClienteClasificacion As Integer = -1) As Boolean
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_VentasGetRepPeriodo")
|
||||
@@ -1432,6 +1433,7 @@ Public Class ClsVentas
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@VerEn", SqlDbType.Int).Value = VerEn
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
End With
|
||||
|
||||
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,
|
||||
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 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
|
||||
DataAdapter("PA_Vta_VentasGetRepDetalle")
|
||||
|
||||
@@ -1480,6 +1482,7 @@ Public Class ClsVentas
|
||||
.Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
End With
|
||||
|
||||
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,
|
||||
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 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
|
||||
DataAdapter("PA_Vta_GetRepPS")
|
||||
|
||||
@@ -1528,6 +1531,7 @@ Public Class ClsVentas
|
||||
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@MostrarLitraje", SqlDbType.Bit).Value = MostrarLitraje
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
|
||||
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,
|
||||
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,
|
||||
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 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, Optional TipoCliente As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_GetRepPSDetalle")
|
||||
|
||||
@@ -1577,6 +1582,9 @@ Public Class ClsVentas
|
||||
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
.Add("@CveClasificacionDetalle", SqlDbType.Int).Value = CveClasificacionDetalle
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -2917,42 +2917,66 @@ Namespace Modelos
|
||||
|
||||
importeMovimiento = 0
|
||||
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
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
|
||||
If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then
|
||||
If ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
IdCtaContable = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString.ToEntero
|
||||
'CveCuenta = 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()
|
||||
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
|
||||
TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDTDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveClasificacion").ToString
|
||||
DT = TmpDTDetalle.FiltraParametros("", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||
|
||||
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
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
importeMovimiento = 0
|
||||
|
||||
Case 103 'Descuento
|
||||
'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida.
|
||||
If ObjFactura.CveTipoAmortizacionAnticipo <> 1 Then
|
||||
importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador)
|
||||
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
IdCtaContable = 0
|
||||
End If
|
||||
'Case 103 'Descuento
|
||||
' 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida.
|
||||
' If ObjFactura.CveTipoAmortizacionAnticipo <> 1 Then
|
||||
' importeMovimiento = (ObjFactura.Descuento * ValorMultiplicador)
|
||||
' importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||
' FechaMovimiento = ObjFactura.FechaPago
|
||||
' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
' IdCtaContable = 0
|
||||
' End If
|
||||
|
||||
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
|
||||
|
||||
@@ -429,22 +429,22 @@ Public Class WS_PuntoVenta
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
<WebMethod()>
|
||||
Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS
|
||||
Dim objSucursales As New ClsSucursales
|
||||
Dim Respuesta As New RespuestaWS
|
||||
'<WebMethod()>
|
||||
'Public Function GetSucursales(CveEmpresa As Integer) As RespuestaWS
|
||||
' Dim objSucursales As New ClsSucursales
|
||||
' Dim Respuesta As New RespuestaWS
|
||||
|
||||
If objSucursales.GetSucursales() Then
|
||||
Respuesta.Datos = objSucursales.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
|
||||
Respuesta.Datos.TableName = "Resultados"
|
||||
Respuesta.HuboError = False
|
||||
Else
|
||||
Respuesta.Descripcion = "HUBO UN ERROR"
|
||||
End If
|
||||
' If objSucursales.GetSucursales() Then
|
||||
' Respuesta.Datos = objSucursales.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", CveEmpresa))
|
||||
' Respuesta.Datos.TableName = "Resultados"
|
||||
' Respuesta.HuboError = False
|
||||
' Else
|
||||
' Respuesta.Descripcion = "HUBO UN ERROR"
|
||||
' End If
|
||||
|
||||
objSucursales.Dispose()
|
||||
Return Respuesta
|
||||
End Function
|
||||
' objSucursales.Dispose()
|
||||
' Return Respuesta
|
||||
'End Function
|
||||
|
||||
<WebMethod()>
|
||||
Public Function GetClientes(CveEmpresa As Integer) As RespuestaWS
|
||||
@@ -1170,7 +1170,7 @@ Public Class WS_PuntoVenta
|
||||
'Enviar correo de corte de turno
|
||||
EnviarCorreo(VtaCorte.CveCorte, VtaCorte.CveEmpresa)
|
||||
|
||||
Dim cuenta As Integer = GetCuenta(2090)
|
||||
' Dim cuenta As Integer = GetCuenta(2090)
|
||||
Else
|
||||
objPV.RollBack()
|
||||
End If
|
||||
@@ -1197,16 +1197,16 @@ Public Class WS_PuntoVenta
|
||||
Return objVentasPago
|
||||
End Function
|
||||
|
||||
<WebMethod()>
|
||||
Public Function GetCuenta(CveSucursal As Integer) As Integer
|
||||
Dim objSU As New ClsSucursales
|
||||
Dim Cuenta As Integer
|
||||
'<WebMethod()>
|
||||
'Public Function GetCuenta(CveSucursal As Integer) As Integer
|
||||
' Dim objSU As New ClsSucursales
|
||||
' Dim Cuenta As Integer
|
||||
|
||||
'Cuenta = objSU.GetCuenta(CveSucursal)
|
||||
objSU.Dispose()
|
||||
' 'Cuenta = objSU.GetCuenta(CveSucursal)
|
||||
' objSU.Dispose()
|
||||
|
||||
Return Cuenta
|
||||
End Function
|
||||
' Return Cuenta
|
||||
'End Function
|
||||
|
||||
<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
|
||||
|
||||
@@ -3680,7 +3680,8 @@ Partial Class Bancos_IE
|
||||
|
||||
'Notificación de Pago
|
||||
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
|
||||
|
||||
Else
|
||||
@@ -3811,253 +3812,257 @@ Partial Class Bancos_IE
|
||||
End Sub
|
||||
|
||||
#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()
|
||||
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 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 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
|
||||
Dim strBody As New StringBuilder
|
||||
Dim objIE As New ClsBancos
|
||||
|
||||
If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||
strBody.Append("<head> ")
|
||||
strBody.Append(" <style type=""text/css""> ")
|
||||
strBody.Append(" body ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" margin:0px; ")
|
||||
strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||
strBody.Append(" font-size: 10px; ")
|
||||
strBody.Append(" background-color:#F0F0F0; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" a.Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" font-size:11px; ")
|
||||
strBody.Append(" background-color:#F7F6F3; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .TextoAlterno ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .BarraIdentidad ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" color:#FFFFFF; ")
|
||||
strBody.Append(" background:#F0F0F0; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" font-size:19px; ")
|
||||
strBody.Append(" font-style:oblique; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Titulos ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color: Gray;")
|
||||
strBody.Append(" color:White; ")
|
||||
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Verde {color: #00CC00;} ")
|
||||
strBody.Append(" .Negro {color: #000000;} ")
|
||||
strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||
strBody.Append(" </style> ")
|
||||
strBody.Append("</head> ")
|
||||
strBody.Append("<body> ")
|
||||
strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
|
||||
strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat("</div><br/><br/>")
|
||||
|
||||
'strBody.AppendFormat("<div style='width: 600px'>")
|
||||
'strBody.AppendFormat(" <fieldset>")
|
||||
'strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
'strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
'End If
|
||||
|
||||
'If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
'End If
|
||||
|
||||
'strBody.Append(" <tr style=""height: 22px""> ")
|
||||
'strBody.AppendFormat(" <td> </td> ")
|
||||
'strBody.Append(" </tr> ")
|
||||
'strBody.Append(" </table> ")
|
||||
'strBody.AppendFormat(" </fieldset>")
|
||||
'strBody.Append(" </div> ")
|
||||
|
||||
|
||||
strBody.AppendFormat("<div style='width: 600px'>")
|
||||
strBody.AppendFormat(" <table style='width:100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
|
||||
strBody.AppendFormat(" <table width='100%'>")
|
||||
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Movimiento:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Banco:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
If objIE.CuentaDepositado.ToString <> "" Then
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
End If
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Fecha:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Importe:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Observaciones:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td colspan='2'>")
|
||||
strBody.AppendFormat(" <hr />")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat("</div>")
|
||||
|
||||
|
||||
'MOVIMIENTOS CHEQUE
|
||||
'If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' Dim Textov33 As String = ""
|
||||
' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
' End If
|
||||
|
||||
' strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
' strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
|
||||
' strBody.AppendFormat(" <table width='1000px'>")
|
||||
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 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>")
|
||||
|
||||
|
||||
' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||
' strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' Next
|
||||
|
||||
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' 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
|
||||
|
||||
strBody.Append(" <div> Favor de no responder a este correo. </div> ")
|
||||
|
||||
strBody.Append("</body></html>")
|
||||
End If
|
||||
|
||||
objIE.Dispose()
|
||||
Return strBody.ToString
|
||||
End Function
|
||||
|
||||
'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()
|
||||
' 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 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 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
|
||||
' Dim strBody As New StringBuilder
|
||||
' Dim objIE As New ClsBancos
|
||||
|
||||
' If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||
' strBody.Append("<head> ")
|
||||
' strBody.Append(" <style type=""text/css""> ")
|
||||
' strBody.Append(" body ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" margin:0px; ")
|
||||
' strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||
' strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||
' strBody.Append(" font-size: 10px; ")
|
||||
' strBody.Append(" background-color:#F0F0F0; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" a.Texto ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" font-size:11px; ")
|
||||
' strBody.Append(" background-color:#F7F6F3; ")
|
||||
' strBody.Append(" text-decoration:none; ")
|
||||
' strBody.Append(" font-weight:bold; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Texto ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .TextoAlterno ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||
' strBody.Append(" vertical-align:middle; height:20px;")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .BarraIdentidad ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" color:#FFFFFF; ")
|
||||
' strBody.Append(" background:#F0F0F0; ")
|
||||
' strBody.Append(" font-weight:bold; ")
|
||||
' strBody.Append(" font-size:19px; ")
|
||||
' strBody.Append(" font-style:oblique; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Titulos ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color: Gray;")
|
||||
' strBody.Append(" color:White; ")
|
||||
' strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||
' strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||
' strBody.Append(" text-decoration:none; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Verde {color: #00CC00;} ")
|
||||
' strBody.Append(" .Negro {color: #000000;} ")
|
||||
' strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||
' strBody.Append(" </style> ")
|
||||
' strBody.Append("</head> ")
|
||||
' strBody.Append("<body> ")
|
||||
' strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
|
||||
' strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.AppendFormat("</div><br/><br/>")
|
||||
|
||||
' 'strBody.AppendFormat("<div style='width: 600px'>")
|
||||
' 'strBody.AppendFormat(" <fieldset>")
|
||||
' 'strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
' 'strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
' 'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
' ' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' ' strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||
' ' strBody.Append(" </tr> ")
|
||||
' 'End If
|
||||
|
||||
' 'If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
' ' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' ' strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||
' ' strBody.Append(" </tr> ")
|
||||
' 'End If
|
||||
|
||||
' 'strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' 'strBody.AppendFormat(" <td> </td> ")
|
||||
' 'strBody.Append(" </tr> ")
|
||||
' 'strBody.Append(" </table> ")
|
||||
' 'strBody.AppendFormat(" </fieldset>")
|
||||
' 'strBody.Append(" </div> ")
|
||||
|
||||
|
||||
' strBody.AppendFormat("<div style='width: 600px'>")
|
||||
' strBody.AppendFormat(" <table style='width:100%'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
|
||||
' strBody.AppendFormat(" <table width='100%'>")
|
||||
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Movimiento:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Banco:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' If objIE.CuentaDepositado.ToString <> "" Then
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' End If
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Fecha:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Importe:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Observaciones:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td colspan='2'>")
|
||||
' strBody.AppendFormat(" <hr />")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat("</div>")
|
||||
|
||||
|
||||
' 'MOVIMIENTOS CHEQUE
|
||||
' 'If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' ' Dim Textov33 As String = ""
|
||||
' ' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
' ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
' ' End If
|
||||
|
||||
' ' strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
' ' strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
' ' strBody.AppendFormat(" <tr>")
|
||||
' ' strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
' ' strBody.AppendFormat(" <fieldset>")
|
||||
' ' strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
|
||||
' ' strBody.AppendFormat(" <table width='1000px'>")
|
||||
' ' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
' ' strBody.AppendFormat(" <th scope='col' style='width: 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>")
|
||||
|
||||
|
||||
' ' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
|
||||
' ' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' ' strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||
' ' strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||
' ' strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
|
||||
' ' strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
|
||||
' ' strBody.AppendFormat(" </tr>")
|
||||
' ' Next
|
||||
|
||||
|
||||
' ' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' ' 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
|
||||
|
||||
' strBody.Append(" <div> Favor de no responder a este correo. </div> ")
|
||||
|
||||
' strBody.Append("</body></html>")
|
||||
' End If
|
||||
|
||||
' objIE.Dispose()
|
||||
' Return strBody.ToString
|
||||
'End Function
|
||||
|
||||
|
||||
|
||||
@@ -6102,38 +6107,77 @@ Partial Class Bancos_IE
|
||||
End Function
|
||||
|
||||
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()
|
||||
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)
|
||||
EnviarCorreoNotificacion(CveIE, TxtParaMail.Text.Trim, TxtCC.Text.Trim, UsuarioActual, True)
|
||||
|
||||
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()
|
||||
''NotificacionPago(HdnCveIE.Value.ToEntero, Txt)
|
||||
'Dim ObjMail As New ClsSisMail()
|
||||
'Dim Body = GeneraCorreo(CveIE)
|
||||
|
||||
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
|
||||
'Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
|
||||
'Dim ObjIE As New ClsBancos()
|
||||
'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
|
||||
' 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
|
||||
|
||||
|
||||
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
|
||||
RegistraScript("$('#ModalAjustarMovimiento').modal('show');")
|
||||
End Sub
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -437,6 +437,22 @@ Partial Class Bancos_PopIECompras
|
||||
End Set
|
||||
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
|
||||
|
||||
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("CveCuentaProveedorExtranjera") = ObjProveedor.CveCuentaProveedoresExtranjera
|
||||
ViewState("CveCuentaComplementaria") = ObjProveedor.CveCuentaProveedoresComplementaria
|
||||
ViewState("NotificarA") = ObjProveedor.NotificarA.Trim()
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -3351,7 +3371,10 @@ Partial Class Bancos_PopIECompras
|
||||
If IdPoliza > 0 Then
|
||||
StrMsg.AppendFormat("<br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza)
|
||||
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
|
||||
ObjIE.RollBack()
|
||||
Alert(MsgError, TipoMensaje.MsgError)
|
||||
@@ -3359,11 +3382,60 @@ Partial Class Bancos_PopIECompras
|
||||
|
||||
ObjIE.Dispose()
|
||||
ObjMov.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#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"
|
||||
|
||||
|
||||
Private Sub GeneraTimbre(CvePrePoliza As Integer)
|
||||
|
||||
Dim Str As New StringBuilder
|
||||
|
||||
@@ -2365,7 +2365,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
'Notificación de Pago
|
||||
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
|
||||
@@ -2785,261 +2786,302 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
#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(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
|
||||
Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean)
|
||||
|
||||
Dim File As Byte() = Nothing
|
||||
If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then
|
||||
File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre)
|
||||
End If
|
||||
|
||||
Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File))
|
||||
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()
|
||||
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
|
||||
|
||||
Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte())
|
||||
'Dim Parametros As List(Of String) = DirectCast(Data, List(Of String))
|
||||
|
||||
Dim Mail As New ClsSisMail()
|
||||
Para = If(Para IsNot Nothing, Para, "")
|
||||
Asunto = If(Asunto IsNot Nothing, Asunto, "")
|
||||
Body = If(Body IsNot Nothing, Body, "")
|
||||
|
||||
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
If Comprobante IsNot Nothing AndAlso Comprobante <> "" Then
|
||||
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Comprobante})
|
||||
End If
|
||||
|
||||
If File IsNot Nothing Then
|
||||
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"})
|
||||
End If
|
||||
|
||||
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
|
||||
Dim objIE As New ClsBancos
|
||||
objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
|
||||
objIE.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function GeneraCorreo(CveIE As Integer) As String
|
||||
Dim strBody As New StringBuilder
|
||||
Dim objIE As New ClsBancos
|
||||
|
||||
If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||
strBody.Append("<head> ")
|
||||
strBody.Append(" <style type=""text/css""> ")
|
||||
strBody.Append(" body ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" margin:0px; ")
|
||||
strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||
strBody.Append(" font-size: 10px; ")
|
||||
strBody.Append(" background-color:#F0F0F0; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" a.Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" font-size:11px; ")
|
||||
strBody.Append(" background-color:#F7F6F3; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .TextoAlterno ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .BarraIdentidad ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" color:#FFFFFF; ")
|
||||
strBody.Append(" background:#F0F0F0; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" font-size:19px; ")
|
||||
strBody.Append(" font-style:oblique; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Titulos ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color: Gray;")
|
||||
strBody.Append(" color:White; ")
|
||||
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Verde {color: #00CC00;} ")
|
||||
strBody.Append(" .Negro {color: #000000;} ")
|
||||
strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||
strBody.Append(" </style> ")
|
||||
strBody.Append("</head> ")
|
||||
strBody.Append("<body> ")
|
||||
strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
|
||||
strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat("</div><br/><br/>")
|
||||
|
||||
strBody.AppendFormat("<div style='width: 600px'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
End If
|
||||
|
||||
If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
End If
|
||||
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.AppendFormat(" <td> </td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
strBody.Append(" </table> ")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.Append(" </div> ")
|
||||
|
||||
|
||||
strBody.AppendFormat("<div style='width: 600px'>")
|
||||
strBody.AppendFormat(" <table style='width:100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
|
||||
strBody.AppendFormat(" <table width='100%'>")
|
||||
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Movimiento:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Banco:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
If objIE.CuentaDepositado.ToString <> "" Then
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
End If
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Fecha:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Importe:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Observaciones:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td colspan='2'>")
|
||||
strBody.AppendFormat(" <hr />")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat("</div>")
|
||||
'Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String)
|
||||
|
||||
' If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
|
||||
|
||||
' 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
|
||||
' If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then
|
||||
' File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre)
|
||||
' End If
|
||||
|
||||
' Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File))
|
||||
' Hilo.Start()
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
'Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte())
|
||||
' 'Dim Parametros As List(Of String) = DirectCast(Data, List(Of String))
|
||||
|
||||
' Dim Mail As New ClsSisMail()
|
||||
' Para = If(Para IsNot Nothing, Para, "")
|
||||
' Asunto = If(Asunto IsNot Nothing, Asunto, "")
|
||||
' Body = If(Body IsNot Nothing, Body, "")
|
||||
|
||||
' Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
' If Comprobante IsNot Nothing AndAlso Comprobante <> "" Then
|
||||
' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Comprobante})
|
||||
' End If
|
||||
|
||||
' If File IsNot Nothing Then
|
||||
' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"})
|
||||
' End If
|
||||
|
||||
' If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
|
||||
' Dim objIE As New ClsBancos
|
||||
' objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
|
||||
' objIE.Dispose()
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Private Function GeneraCorreo(CveIE As Integer) As String
|
||||
' Dim strBody As New StringBuilder
|
||||
' Dim objIE As New ClsBancos
|
||||
|
||||
' If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||
' strBody.Append("<head> ")
|
||||
' strBody.Append(" <style type=""text/css""> ")
|
||||
' strBody.Append(" body ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" margin:0px; ")
|
||||
' strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||
' strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||
' strBody.Append(" font-size: 10px; ")
|
||||
' strBody.Append(" background-color:#F0F0F0; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" a.Texto ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" font-size:11px; ")
|
||||
' strBody.Append(" background-color:#F7F6F3; ")
|
||||
' strBody.Append(" text-decoration:none; ")
|
||||
' strBody.Append(" font-weight:bold; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Texto ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .TextoAlterno ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||
' strBody.Append(" vertical-align:middle; height:20px;")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .BarraIdentidad ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" color:#FFFFFF; ")
|
||||
' strBody.Append(" background:#F0F0F0; ")
|
||||
' strBody.Append(" font-weight:bold; ")
|
||||
' strBody.Append(" font-size:19px; ")
|
||||
' strBody.Append(" font-style:oblique; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Titulos ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color: Gray;")
|
||||
' strBody.Append(" color:White; ")
|
||||
' strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||
' strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||
' strBody.Append(" text-decoration:none; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Verde {color: #00CC00;} ")
|
||||
' strBody.Append(" .Negro {color: #000000;} ")
|
||||
' strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||
' strBody.Append(" </style> ")
|
||||
' strBody.Append("</head> ")
|
||||
' strBody.Append("<body> ")
|
||||
' strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
|
||||
' strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.AppendFormat("</div><br/><br/>")
|
||||
|
||||
' strBody.AppendFormat("<div style='width: 600px'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
' strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
' If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
' End If
|
||||
|
||||
' If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
' End If
|
||||
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.AppendFormat(" <td> </td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
' strBody.Append(" </table> ")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.Append(" </div> ")
|
||||
|
||||
|
||||
'MOVIMIENTOS CHEQUE
|
||||
If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
Dim Textov33 As String = ""
|
||||
If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
End If
|
||||
|
||||
strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
|
||||
strBody.AppendFormat(" <table width='1000px'>")
|
||||
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 10%'>Fecha</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Factura</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Importe ($)</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 15%'>NC Aplicadas</th>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat("<div style='width: 600px'>")
|
||||
' strBody.AppendFormat(" <table style='width:100%'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
|
||||
' strBody.AppendFormat(" <table width='100%'>")
|
||||
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Movimiento:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Banco:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' If objIE.CuentaDepositado.ToString <> "" Then
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' End If
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Fecha:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Importe:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Observaciones:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td colspan='2'>")
|
||||
' strBody.AppendFormat(" <hr />")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat("</div>")
|
||||
|
||||
|
||||
For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||
strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
Next
|
||||
' 'MOVIMIENTOS CHEQUE
|
||||
' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' Dim Textov33 As String = ""
|
||||
' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
' End If
|
||||
|
||||
' strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
' strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
|
||||
' strBody.AppendFormat(" <table width='1000px'>")
|
||||
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 10%'>Fecha</th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 20%'>Factura</th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 20%'>Importe ($)</th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 15%'>NC Aplicadas</th>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
|
||||
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td colspan='5'>")
|
||||
strBody.AppendFormat(" <hr />")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat("</div>")
|
||||
End If
|
||||
' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||
' strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' Next
|
||||
|
||||
strBody.Append(" <div> Favor de no responder a este correo. </div> ")
|
||||
|
||||
strBody.Append("</body></html>")
|
||||
End If
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td colspan='5'>")
|
||||
' strBody.AppendFormat(" <hr />")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat("</div>")
|
||||
' End If
|
||||
|
||||
objIE.Dispose()
|
||||
Return strBody.ToString
|
||||
End Function
|
||||
' strBody.Append(" <div> Favor de no responder a este correo. </div> ")
|
||||
|
||||
' strBody.Append("</body></html>")
|
||||
' End If
|
||||
|
||||
' objIE.Dispose()
|
||||
' Return strBody.ToString
|
||||
'End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -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>
|
||||
<th style="width: 200px">Observación</th>
|
||||
<th style="width: 150px">
|
||||
<asp:Label ID="LitHProyecto" runat="server" Text=""></asp:Label><asp:Label runat="server" ID="LblSubProyectoHeader" Text=""></asp:Label>
|
||||
|
||||
|
||||
<asp:Label ID="LitHProyecto" runat="server" Text=""></asp:Label>
|
||||
<asp:Label runat="server" ID="LblSubProyectoHeader" Text=""></asp:Label>
|
||||
|
||||
<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">
|
||||
@@ -650,13 +649,21 @@
|
||||
<th>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpReclasificarSubProyecto">
|
||||
<ContentTemplate>
|
||||
<asp:DropDownList ID="DdlAsignarProyecto" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--<br />--%>
|
||||
<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 class="row">
|
||||
<div class="col-md-1" style="width:100%">
|
||||
<asp:DropDownList ID="DdlAsignarProyecto" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<%--<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>
|
||||
</asp:UpdatePanel>
|
||||
</th>
|
||||
|
||||
@@ -1546,11 +1546,11 @@ Partial Class Compras_Compras
|
||||
' LblSubProyecto.InnerText = "Proyecto"
|
||||
' 'LblSubProyectoDivAplica.InnerText = "Proyecto"
|
||||
|
||||
DdlSubProyecto.Items.Clear()
|
||||
' '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.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'DdlSubProyecto.Items.Clear()
|
||||
''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.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
' '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))
|
||||
@@ -1572,48 +1572,48 @@ Partial Class Compras_Compras
|
||||
' LblSubProyecto.InnerText = "Sucursal"
|
||||
' 'LblSubProyectoDivAplica.InnerText = "Sucursal"
|
||||
|
||||
DdlSubProyecto.Items.Clear()
|
||||
'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.DataBind()
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'DdlSubProyecto.Items.Clear()
|
||||
''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.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
' '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.DataBind()
|
||||
' 'DdlAsignaSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
' '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.DataBind()
|
||||
' 'DdlAsignaSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
divproyecto.Visible = False
|
||||
'divasignaproyecto.Visible = False
|
||||
DdlProyecto.Visible = False
|
||||
DdlProyecto.Items(0).Text = ""
|
||||
divproyecto.Visible = False
|
||||
'divasignaproyecto.Visible = False
|
||||
DdlProyecto.Visible = False
|
||||
DdlProyecto.Items(0).Text = ""
|
||||
|
||||
'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
|
||||
' LitHProyecto.Text = "Sucursal"
|
||||
' LthProyectoP.Text = "Sucursal"
|
||||
'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then
|
||||
' LitHProyecto.Text = "Sucursal"
|
||||
' LthProyectoP.Text = "Sucursal"
|
||||
|
||||
' LblSubProyectoHeader.Text = "Proyecto"
|
||||
' LblSubProyectoPHeader.Text = "Proyecto"
|
||||
' LblSubProyectoHeader.Text = "Proyecto"
|
||||
' LblSubProyectoPHeader.Text = "Proyecto"
|
||||
|
||||
' 'LblSubProyectoDivAplica.InnerText = "Sucursal"
|
||||
' 'LblProyectoDivAplica.InnerText = "Proyecto"
|
||||
' LblSubProyecto.InnerText = "Sucursal"
|
||||
' LblProyecto.InnerText = "Proyecto"
|
||||
' 'LblSubProyectoDivAplica.InnerText = "Sucursal"
|
||||
' 'LblProyectoDivAplica.InnerText = "Proyecto"
|
||||
' LblSubProyecto.InnerText = "Sucursal"
|
||||
' LblProyecto.InnerText = "Proyecto"
|
||||
|
||||
'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
|
||||
' LitHProyecto.Text = "Proyecto"
|
||||
' LthProyectoP.Text = "Proyecto"
|
||||
'ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then
|
||||
' LitHProyecto.Text = "Proyecto"
|
||||
' LthProyectoP.Text = "Proyecto"
|
||||
|
||||
' LblSubProyectoHeader.Text = "Sucursal"
|
||||
' LblSubProyectoPHeader.Text = "Sucursal"
|
||||
' LblSubProyectoHeader.Text = "Sucursal"
|
||||
' LblSubProyectoPHeader.Text = "Sucursal"
|
||||
|
||||
' 'LblSubProyectoDivAplica.InnerText = "Proyecto"
|
||||
' 'LblProyectoDivAplica.InnerText = "Sucursal"
|
||||
' LblSubProyecto.InnerText = "Proyecto"
|
||||
' LblProyecto.InnerText = "Sucursal"
|
||||
End If
|
||||
' 'LblSubProyectoDivAplica.InnerText = "Proyecto"
|
||||
' 'LblProyectoDivAplica.InnerText = "Sucursal"
|
||||
' LblSubProyecto.InnerText = "Proyecto"
|
||||
' LblProyecto.InnerText = "Sucursal"
|
||||
End If
|
||||
|
||||
CargaGvPersonal()
|
||||
CargaGvPersonal()
|
||||
CargaDdlPersonal()
|
||||
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
<asp:ListItem Text="Estatus Fact." Value="9"></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="Tipo Cliente" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
@@ -322,6 +323,19 @@
|
||||
</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>
|
||||
|
||||
@@ -199,7 +199,8 @@ Partial Class RepCxC
|
||||
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,
|
||||
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
|
||||
DtDatos = ObjMovtos.DtResultados
|
||||
@@ -378,53 +379,53 @@ Partial Class RepCxC
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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"),
|
||||
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
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
<asp:ListItem Text="Estatus Fact." Value="9"></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="Tipo Cliente" Value="12"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
@@ -215,6 +216,8 @@
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -273,13 +276,45 @@
|
||||
</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:
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 truncate" title="Tipo Cliente:" data-toggle="tooltip" data-placement="top">
|
||||
Tipo Cliente:
|
||||
</div>
|
||||
</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>
|
||||
|
||||
@@ -178,9 +178,50 @@ Partial Class RepCxCDetalle
|
||||
Set(value As Decimal)
|
||||
ViewState("LimiteCredito") = value
|
||||
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
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
ViewState("Opcion") = IfNull(Request("Op"), "-1")
|
||||
@@ -252,7 +293,12 @@ Partial Class RepCxCDetalle
|
||||
CveCobranzaEstatus = If(Request("CveCobranzaEstatus") IsNot Nothing, Request("CveCobranzaEstatus").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
|
||||
|
||||
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
|
||||
txtFechaF.Text = FechaF
|
||||
@@ -387,7 +433,8 @@ Partial Class RepCxCDetalle
|
||||
Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero,
|
||||
RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF,
|
||||
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
|
||||
dt = ObjMovtos.DtResultados
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<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>
|
||||
|
||||
@@ -542,8 +542,9 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
End Sub
|
||||
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))
|
||||
DdlSubProyecto.DataBind()
|
||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
||||
'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 Sub
|
||||
Private Sub CargaPersonal()
|
||||
|
||||
@@ -165,16 +165,27 @@ Partial Class OC_CatEstatus
|
||||
Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||
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 Not ObjEstatus.AddEstatus(TxtEstatus.Text.Trim, DdlTipo.SelectedValue.ToString, DdlEstatusSiguiente.SelectedValue.ToEntero, DdlTipoTermino.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
TieneError = True
|
||||
End If
|
||||
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
|
||||
End If
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
ObjEstatus.RollBack()
|
||||
Else
|
||||
ObjEstatus.Commit()
|
||||
End If
|
||||
|
||||
ObjEstatus.Dispose()
|
||||
|
||||
If Not TieneError Then
|
||||
@@ -189,7 +200,7 @@ Partial Class OC_CatEstatus
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarEstatus"))
|
||||
CargaDatos()
|
||||
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 Sub
|
||||
|
||||
@@ -1738,6 +1738,7 @@ Partial Class RH_Personal
|
||||
'If File.Exists(ModExtensiones.DirectorioBaseEmpresas & "Empresas\" & UsuarioActual.CveEmpresa & "\RH\Personal\" & ObjPersonal.URL) Then
|
||||
' ImgPersonal.ImageUrl = "/Empresas/" & UsuarioActual.CveEmpresa & "/RH/Personal/" & ObjPersonal.URL
|
||||
'End If
|
||||
GlobalDTRHPersonal(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
If CvePersonal > 0 Then
|
||||
CargaDatos()
|
||||
@@ -5774,33 +5775,34 @@ Partial Class RH_Personal
|
||||
If dtVC.Rows.Count > 0 Then
|
||||
dr = dtVC.Rows(0)
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72) Then
|
||||
Dim SBDomicilioSucursal As New StringBuilder()
|
||||
Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero, Estatus:=1).FiltroPrimero("")
|
||||
'If UsuarioActual.CveEmpresa.Contiene(72, 119) Then
|
||||
'End If
|
||||
|
||||
If DRSucursal IsNot Nothing Then
|
||||
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
|
||||
Dim DomicilioSucursal As String = ""
|
||||
Dim SBDomicilioSucursal As New StringBuilder()
|
||||
Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero, Estatus:=1).FiltroPrimero("")
|
||||
|
||||
SBDomicilioSucursal.AppendFormat("{0}", DRSucursal("Calle"))
|
||||
If DRSucursal("NoExt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString().ToEntero)
|
||||
If DRSucursal("NoInt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString().ToEntero)
|
||||
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
|
||||
If DRSucursal IsNot Nothing Then
|
||||
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
|
||||
Dim DomicilioSucursal As String = ""
|
||||
|
||||
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()))
|
||||
SBDomicilioSucursal.AppendFormat("{0}", DRSucursal("Calle"))
|
||||
If DRSucursal("NoExt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", DRSucursal("NoExt").ToString().ToEntero)
|
||||
If DRSucursal("NoInt").ToString().ToEntero > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", DRSucursal("NoInt").ToString().ToEntero)
|
||||
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()))
|
||||
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("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ using System.IO;
|
||||
using System.Web.Services;
|
||||
using System.Web.Services.Protocols;
|
||||
using GemBox.Spreadsheet;
|
||||
using System.Data;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
|
||||
public class TareasJam : IHttpHandler
|
||||
{
|
||||
@@ -46,6 +47,9 @@ public class TareasJam : IHttpHandler
|
||||
private bool EjecutaThalamus(int CveEmpresa)
|
||||
{
|
||||
|
||||
bool Respuesta = false;
|
||||
StringBuilder SBLog = new StringBuilder();
|
||||
|
||||
ClsGenerales ObjGenerales = new ClsGenerales();
|
||||
|
||||
DataTable DTProductos = new DataTable();
|
||||
@@ -53,53 +57,97 @@ public class TareasJam : IHttpHandler
|
||||
DataTable DTClientes = new DataTable();
|
||||
DataTable DTAlmacenes = new DataTable();
|
||||
|
||||
string FTPServer = "ftp://127.0.0.1/";
|
||||
string TFPUsr = "Toor";
|
||||
string FTPPass = "agj-3500";
|
||||
|
||||
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))
|
||||
{
|
||||
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();
|
||||
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();
|
||||
}
|
||||
else { ErrorProceso = true; }
|
||||
SBLog.AppendLine($"<tr><td>Clientes</td><td>{DTClientes.Rows.Count}</td></tr>");
|
||||
|
||||
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();
|
||||
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();
|
||||
|
||||
DTProductos.Columns[0].ColumnName = "Código Producto Interno ";
|
||||
DTProductos.Columns[1].ColumnName = "Nombre del Producto";
|
||||
DTProductos.Columns[2].ColumnName = "Presentación";
|
||||
DTProductos.AcceptChanges();
|
||||
if (!ErrorProceso)
|
||||
{
|
||||
|
||||
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[5].ColumnName = "address.stateId";
|
||||
DTClientes.Columns[6].ColumnName = "address.city";
|
||||
DTClientes.Columns[7].ColumnName = "address.street1";
|
||||
DTClientes.Columns[8].ColumnName = "address.street2";
|
||||
DTClientes.Columns[9].ColumnName = "address.postalCode";
|
||||
DTClientes.Columns[9].ColumnName = "phone.intCode";
|
||||
DTClientes.Columns[9].ColumnName = "phone.areaCode";
|
||||
DTClientes.Columns[9].ColumnName = "phone.number";
|
||||
DTClientes.Dispose();
|
||||
DTClientes.Columns[4].ColumnName = "address.countryId";
|
||||
DTClientes.Columns[5].ColumnName = "address.stateId";
|
||||
DTClientes.Columns[6].ColumnName = "address.city";
|
||||
DTClientes.Columns[7].ColumnName = "address.street1";
|
||||
DTClientes.Columns[8].ColumnName = "address.street2";
|
||||
DTClientes.Columns[9].ColumnName = "address.postalCode";
|
||||
DTClientes.Columns[9].ColumnName = "phone.intCode";
|
||||
DTClientes.Columns[9].ColumnName = "phone.areaCode";
|
||||
DTClientes.Columns[9].ColumnName = "phone.number";
|
||||
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)
|
||||
@@ -107,12 +155,7 @@ public class TareasJam : IHttpHandler
|
||||
string RutaProductos = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Productos{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
||||
string RutaVentas = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Ventas{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 FTPServer = "ftp://127.0.0.1/";
|
||||
string TFPUsr = "Toor";
|
||||
string FTPPass = "agj-3500";
|
||||
string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{DateTime.Now.ToString("yyyyMMdd")}.xlsx";
|
||||
|
||||
SpreadsheetInfo.SetLicense(Extensiones.ModExtensiones.SerialGemBoxSpreadsheet());
|
||||
|
||||
@@ -160,18 +203,30 @@ public class TareasJam : IHttpHandler
|
||||
var FInfoClientes = new FileInfo(RutaClientes);
|
||||
var FInfoAlmacenes = new FileInfo(RutaAlmacenes);
|
||||
|
||||
|
||||
bool CargaProductos = false;
|
||||
bool CargaVentas = false;
|
||||
bool CargaClientes = 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);
|
||||
|
||||
if (CargaProductos)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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 )
|
||||
{
|
||||
@@ -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)
|
||||
{
|
||||
return true;
|
||||
Respuesta = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
Respuesta = false;
|
||||
}
|
||||
|
||||
SBLog.AppendLine("</table>");
|
||||
|
||||
}
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -633,7 +633,7 @@
|
||||
<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: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>
|
||||
<label for="<%= DdlTipoCliente.ClientID.ToString()%>">Tipo de Cliente:</label>
|
||||
</div>
|
||||
|
||||
@@ -2277,6 +2277,8 @@ Partial Class Ventas_ClientesAbonar
|
||||
IDPoliza = -1
|
||||
FolioIECancelado = ""
|
||||
|
||||
Anexo.Text = ""
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
TxtOtrosImportes.Text = ""
|
||||
UpDatos.Update()
|
||||
|
||||
@@ -297,13 +297,28 @@
|
||||
<asp:DropDownList ID="DdlMarcaPSDes" CssClass="select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Style="width: 100%" Height="22px"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label runat="server" id="LblLitraje" title="Mostrar Litraje" data-toggle="tooltip" data-placement="top" class="col-md-1">Litraje:</label>
|
||||
<div runat="server" id="Div1" class="col-md-2">
|
||||
<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="DvLitraje" class="col-md-2" visible ="false" >
|
||||
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" />
|
||||
</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>
|
||||
|
||||
@@ -60,7 +60,13 @@ Partial Class Ventas_RepProductosServicios
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
||||
CargarMarcas()
|
||||
SetValues()
|
||||
SetValues()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
|
||||
LblLitraje.Visible = True
|
||||
DvLitraje.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -86,6 +92,7 @@ Partial Class Ventas_RepProductosServicios
|
||||
DdlGrupo.Items.Insert(15, New ListItem("Cliente - PS", "20"))
|
||||
DdlGrupo.Items.Insert(16, New ListItem("Sucursal - PS", "21"))
|
||||
DdlGrupo.Items.Insert(17, New ListItem("Familia - Marca - Tipo", "22"))
|
||||
DdlGrupo.Items.Insert(18, New ListItem("Tipo Cliente", "23"))
|
||||
DdlGrupo.DataBind()
|
||||
DdlGrupo.SelectedValueExist("8")
|
||||
|
||||
@@ -266,7 +273,7 @@ Partial Class Ventas_RepProductosServicios
|
||||
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
|
||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
|
||||
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
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
Else
|
||||
@@ -346,11 +353,11 @@ Partial Class Ventas_RepProductosServicios
|
||||
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.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("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"),
|
||||
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"))
|
||||
|
||||
@@ -303,6 +303,18 @@
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</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>
|
||||
|
||||
@@ -60,6 +60,23 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
ViewState("Agrupador") = value
|
||||
End Set
|
||||
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
|
||||
|
||||
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
|
||||
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
|
||||
txtFechaI.Text = Fecha
|
||||
txtFechaF.Text = Fecha
|
||||
@@ -410,7 +431,8 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
DdlPS.SelectedValue.ToEntero, FechaI, FechaF, -1, FechaIEjec, FechaFEjec, -1, CveCliente,
|
||||
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,
|
||||
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
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
Else
|
||||
@@ -438,7 +460,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
||||
FechaI, FechaF, Mes.ToEntero, FechaIEjec, FechaFEjec, MesEjec.ToEntero, CveCliente.ToEntero, CveSubProyectoEjecucion.ToEntero,
|
||||
CveVendedor, CveUsuario.ToEntero, CveEstatus.ToEntero, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
|
||||
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
|
||||
TmpDT = ObjVentas.DtResultados
|
||||
Else
|
||||
|
||||
@@ -283,6 +283,7 @@
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<label title="Condiciones de Pago" data-toggle="tooltip" class="col-md-1 truncate">Condiciones Pago:</label>
|
||||
<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">
|
||||
@@ -291,6 +292,16 @@
|
||||
<asp:ListItem Text="Contado" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</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>
|
||||
|
||||
@@ -54,7 +54,26 @@ Partial Class RepVentaDetalle
|
||||
Set(value As Integer)
|
||||
ViewState("CveMoneda") = value
|
||||
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
|
||||
Get
|
||||
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
|
||||
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
|
||||
TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString.ToEntero, -1).ToString.ToEntero
|
||||
|
||||
DdlTipoCliente.SelectedValueExist(TipoCliente)
|
||||
|
||||
'LISTBOXS
|
||||
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,
|
||||
IVA, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, FechaI, FechaF,
|
||||
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)
|
||||
ImgImprimir.Enabled = True
|
||||
GvDatos.DataSource = AddRows(ObjVentas.DtResultados)
|
||||
|
||||
@@ -284,6 +284,17 @@
|
||||
<asp:ListItem Text="Contado" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</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>
|
||||
|
||||
@@ -137,6 +137,7 @@ Partial Class Ventas_RepVentas
|
||||
DdlGrupo.Items.Insert(11, New ListItem("Mes Ejec.", "12"))
|
||||
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("Tipo Cliente", "20"))
|
||||
DdlGrupo.DataBind()
|
||||
DdlGrupo.SelectedValueExist("3")
|
||||
End Sub
|
||||
@@ -320,7 +321,7 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
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,
|
||||
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
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
Else
|
||||
@@ -420,14 +421,14 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
|
||||
'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("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.Attributes.Add("style", "background:#CCCCCC !important")
|
||||
End If
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
<asp:ListItem Text="Sucursal Ejec" Value="15"></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="Tipo Cliente" Value="19"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -233,6 +234,16 @@
|
||||
<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>
|
||||
</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>
|
||||
|
||||
@@ -193,7 +193,10 @@ Partial Class RepVentasPeriodo
|
||||
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,
|
||||
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
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
Else
|
||||
|
||||
@@ -891,8 +891,8 @@
|
||||
<th id="ThCantidadFacturada" runat="server" visible="false">Cantidad<br />
|
||||
Facturada</th>
|
||||
<th id="ThProyecto" runat="server">
|
||||
<asp:Label runat="server" ID="LblProyectoHeader" Text="Proyecto" /><br />
|
||||
<asp:Label runat="server" ID="LblSubProyecto" Text="SubProyecto" /></th>
|
||||
<asp:Label runat="server" ID="LblProyectoHeader" Text="" />
|
||||
<asp:Label runat="server" ID="LblSubProyecto" Text="" /></th>
|
||||
<th>P.U. <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>
|
||||
@@ -976,11 +976,11 @@
|
||||
<asp:UpdatePanel ID="UPPProy" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<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: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:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<%--<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>--%>
|
||||
</asp:DropDownList>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -5345,16 +5345,16 @@
|
||||
<asp:UpdatePanel ID="UPPProyecto" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<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:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label id="LblProyectoPyME" runat="server" for="<%= DdlProyectoPyME.ClientID.ToString()%>">Proyecto:</label>
|
||||
</div>
|
||||
<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:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label id="LblSubProyectoPyME" runat="server" for="<%= DdlSubProyectoPyME.ClientID.ToString()%>">SubProyecto:</label>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -2452,13 +2452,13 @@ Partial Class Ventas
|
||||
CargaFletes()
|
||||
|
||||
If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then
|
||||
'DdlProyecto.Visible = False
|
||||
DdlProyecto.Visible = False
|
||||
BrSubProyecto.Visible = False
|
||||
DdlProyectoPyME.Visible = False
|
||||
LblProyectoHeader.Text = "Sucursal"
|
||||
LblSubProyecto.Text = ""
|
||||
divProyectoPyME.Visible = False
|
||||
LblSubProyectoPyME.InnerText = "Sucursal"
|
||||
LblSubProyectoPyME.Text = "Sucursal"
|
||||
Dim dttSub As New DataTable
|
||||
dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
|
||||
@@ -2476,13 +2476,13 @@ Partial Class Ventas
|
||||
dttSub.Dispose()
|
||||
|
||||
ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
||||
'DdlProyecto.Visible = False
|
||||
DdlProyecto.Visible = False
|
||||
BrSubProyecto.Visible = False
|
||||
DdlProyectoPyME.Visible = False
|
||||
LblProyectoHeader.Text = "Proyecto"
|
||||
LblSubProyecto.Text = ""
|
||||
divProyectoPyME.Visible = False
|
||||
LblSubProyectoPyME.InnerText = "Proyecto"
|
||||
LblSubProyectoPyME.Text = "Proyecto"
|
||||
Dim dttSub As New DataTable
|
||||
dttSub = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
|
||||
@@ -2509,7 +2509,8 @@ Partial Class Ventas
|
||||
|
||||
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
|
||||
If UsuarioActual.CveEmpresa = 140 AndAlso CveVenta <= 0 Then
|
||||
@@ -10046,17 +10047,17 @@ Partial Class Ventas
|
||||
CveCuentaCliente = CveCuenta
|
||||
End If
|
||||
|
||||
Case 7 'descuentos
|
||||
If LblDescuentos.Text.ToDecimal > 0 Then
|
||||
'Case 7 'descuentos
|
||||
' If LblDescuentos.Text.ToDecimal > 0 Then
|
||||
|
||||
importeMovimiento = (ObjFactura.Descuento) * ValorMultiplicador
|
||||
importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
IdCtaContable = 0
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
' importeMovimiento = (ObjFactura.Descuento) * ValorMultiplicador
|
||||
' importeMX = importeMovimiento * tipoCambio * Multiplicador
|
||||
' FechaMovimiento = ObjFactura.FechaPago
|
||||
' CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
' IdCtaContable = 0
|
||||
' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
End If
|
||||
' End If
|
||||
Case 3 'Cliente
|
||||
|
||||
If ObjFactura.TipoDocto = "Ant" Then
|
||||
@@ -10955,7 +10956,7 @@ Partial Class Ventas
|
||||
|
||||
importeMovimiento = 0
|
||||
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
|
||||
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||
@@ -10968,38 +10969,52 @@ Partial Class Ventas
|
||||
'CveCuenta = ObjConta.DtResultados.Rows(0)("Conta_IdCuentaDescuentoVenta").ToString().ToEntero()
|
||||
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
|
||||
TmpDTDetalle(i)("CveClasificacion") = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=TmpDT.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveClasificacion").ToString()
|
||||
DT = TmpDTDetalle.FiltraParametros("", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
|
||||
|
||||
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
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Case 103 'Descuento
|
||||
'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida.
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue <> "1" Then
|
||||
importeMovimiento = ObjFactura.Descuento * ValorMultiplicador
|
||||
importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||
FechaMovimiento = ObjFactura.FechaPago
|
||||
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
IdCtaContable = 0
|
||||
End If
|
||||
importeMovimiento = 0
|
||||
'Case 103 'Descuento
|
||||
' 'si se amortiza anticipo por concepto de descuento, no debe de registrar esta partida.
|
||||
' If DdlTipoAmortizacionAnticipo.SelectedValue <> "1" Then
|
||||
' importeMovimiento = ObjFactura.Descuento * ValorMultiplicador
|
||||
' importeMX = Math.Round(importeMovimiento, 2) * tipoCambio * Multiplicador
|
||||
' FechaMovimiento = ObjFactura.FechaPago
|
||||
' If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
|
||||
' IdCtaContable = 0
|
||||
' End If
|
||||
|
||||
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
|
||||
@@ -11011,7 +11026,7 @@ Partial Class Ventas
|
||||
|
||||
'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
|
||||
TipoMovimiento = Not TipoMovimiento
|
||||
TipoMovimiento = True
|
||||
ConceptoContable = 62
|
||||
importeMovimiento = importeMovimiento * -1
|
||||
importeMX = importeMX * -1
|
||||
@@ -11050,7 +11065,7 @@ Partial Class Ventas
|
||||
|
||||
'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
|
||||
TipoMovimiento = Not TipoMovimiento
|
||||
TipoMovimiento = True
|
||||
ConceptoContable = 314
|
||||
importeMovimiento = importeMovimiento * -1
|
||||
importeMX = importeMX * -1
|
||||
@@ -11075,7 +11090,7 @@ Partial Class Ventas
|
||||
|
||||
'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
|
||||
TipoMovimiento = Not TipoMovimiento
|
||||
TipoMovimiento = True
|
||||
ConceptoContable = 63
|
||||
importeMovimiento = importeMovimiento * -1
|
||||
importeMX = importeMX * -1
|
||||
@@ -11114,7 +11129,7 @@ Partial Class Ventas
|
||||
|
||||
'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
|
||||
TipoMovimiento = Not TipoMovimiento
|
||||
TipoMovimiento = True
|
||||
ConceptoContable = 61
|
||||
importeMovimiento = importeMovimiento * -1
|
||||
importeMX = importeMX * -1
|
||||
@@ -11174,7 +11189,7 @@ Partial Class Ventas
|
||||
|
||||
'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
|
||||
TipoMovimiento = Not TipoMovimiento
|
||||
TipoMovimiento = True
|
||||
ConceptoContable = 39
|
||||
importeMovimiento = importeMovimiento * -1
|
||||
importeMX = importeMX * -1
|
||||
@@ -12898,69 +12913,8 @@ Partial Class Ventas
|
||||
Else
|
||||
importeMovimiento = 0
|
||||
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
|
||||
importeMovimiento = 0
|
||||
PorcentajeImpuesto = 0
|
||||
importeMX = 0
|
||||
End Select
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
@@ -12974,15 +12928,13 @@ Partial Class Ventas
|
||||
' CveCuentaContabilizacion = 0
|
||||
'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
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
Else
|
||||
ErrorConta = True
|
||||
|
||||
@@ -76,6 +76,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user