Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -293,7 +293,7 @@ Public Class ClsContabilidad
|
|||||||
Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
|
Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
|
||||||
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
|
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
|
||||||
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1,
|
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1,
|
||||||
Optional TipoCambio As Decimal = -1, Optional CveClasificacion As Integer = -1) As Boolean
|
Optional TipoCambio As Decimal = -1, Optional CveClasificacion As Integer = -1, Optional CveActivoFijo As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_PrePolizasDetalleUpdate")
|
DataAdapter("PA_Conta_PrePolizasDetalleUpdate")
|
||||||
@@ -313,6 +313,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
|
||||||
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
|
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
|
||||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
|
|||||||
@@ -854,28 +854,9 @@ Public Class ClsMovimientos
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetDeudoresrXSaldar(CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
DataAdapter("PA_Banc_DuedorXSaldar")
|
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
|
||||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
|
||||||
End With
|
|
||||||
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al obtener los ingresos por saldar del acreedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function GetIngresosPorComprobar(FechaInicio As String, FechaFin As String, CveCliente As Integer, CveUsuarioRegistro As Integer, CveMoneda As Integer, Saldo As Double, CveEmpresa As Integer) As Boolean
|
Public Function GetIngresosPorComprobar(FechaInicio As String, FechaFin As String, CveCliente As Integer, CveUsuarioRegistro As Integer, CveMoneda As Integer, Saldo As Double, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -1030,7 +1011,27 @@ Public Class ClsMovimientos
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
'Public Function GetDeudoresDetalleSaldos(CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
' Dim Retorno As Boolean = False
|
||||||
|
' DataAdapter("PA_Banc_DeudoresSaldosDetalleGet")
|
||||||
|
|
||||||
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
|
' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
' .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||||
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
' End With
|
||||||
|
|
||||||
|
' Try
|
||||||
|
' SqlAdapter.Fill(Data)
|
||||||
|
' Retorno = True
|
||||||
|
' Catch ex As Exception
|
||||||
|
' OnError("Ocurrió un error al obtener los ingresos por saldar del acreedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
' End Try
|
||||||
|
|
||||||
|
' Return Retorno
|
||||||
|
'End Function
|
||||||
Public Function GetDeudoresComisionesSaldos(CveEmpresa As Integer) As Boolean
|
Public Function GetDeudoresComisionesSaldos(CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ Public Class ClsNominas
|
|||||||
|
|
||||||
Public Property FolioSolicitud As Integer
|
Public Property FolioSolicitud As Integer
|
||||||
|
|
||||||
|
Public Property SalarioDiario As Double
|
||||||
|
Public Property SDI As Double
|
||||||
|
Public Property SBC As Double
|
||||||
|
|
||||||
|
|
||||||
Public Property RegistroPatronal As String
|
Public Property RegistroPatronal As String
|
||||||
Public Property SerieFolio As String
|
Public Property SerieFolio As String
|
||||||
@@ -1102,6 +1106,10 @@ Public Class ClsNominas
|
|||||||
Me.CveUsuario = Data.Rows(0)("CveUsuario").ToString.ToEntero
|
Me.CveUsuario = Data.Rows(0)("CveUsuario").ToString.ToEntero
|
||||||
Me.Usuario = Data.Rows(0)("Usuario").ToString
|
Me.Usuario = Data.Rows(0)("Usuario").ToString
|
||||||
Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero
|
Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero
|
||||||
|
Me.SalarioDiario = Data.Rows(0)("SalarioDiario").ToString.ToDecimal()
|
||||||
|
Me.SDI = Data.Rows(0)("SDI").ToString.ToDecimal()
|
||||||
|
Me.SBC = Data.Rows(0)("SBC").ToString.ToDecimal()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|||||||
@@ -8521,12 +8521,10 @@ Public Class ClsPaginas
|
|||||||
Departamento = drow("NomRDepartamento").ToString()
|
Departamento = drow("NomRDepartamento").ToString()
|
||||||
Puesto = drow("NomRPuesto").ToString()
|
Puesto = drow("NomRPuesto").ToString()
|
||||||
End If
|
End If
|
||||||
RptParametro.Add(New ReportParameter("SalarioBase", SalarioDiario))
|
|
||||||
RptParametro.Add(New ReportParameter("SalarioDiarioInt", SDI))
|
|
||||||
RptParametro.Add(New ReportParameter("Departamento", Departamento))
|
|
||||||
RptParametro.Add(New ReportParameter("Puesto", Puesto))
|
|
||||||
'DATOS NOMINA
|
'DATOS NOMINA
|
||||||
If ObjNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) Then
|
If ObjNomina.GetNom_Nominas(CveNomina, CvePersonal, CvePeriodo, 1, CveEmpresa) Then
|
||||||
|
SalarioDiario = ObjNomina.SalarioDiario.ToString
|
||||||
|
SDI = ObjNomina.SDI.ToString
|
||||||
RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString))
|
RptParametro.Add(New ReportParameter("ReciboNomina", ObjNomina.Folio.ToString))
|
||||||
RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie))
|
RptParametro.Add(New ReportParameter("Serie", ObjNomina.Serie))
|
||||||
RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString))
|
RptParametro.Add(New ReportParameter("Fecha", ObjNomina.Fecha.ToString))
|
||||||
@@ -8544,6 +8542,10 @@ Public Class ClsPaginas
|
|||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
RptParametro.Add(New ReportParameter("SalarioBase", SalarioDiario))
|
||||||
|
RptParametro.Add(New ReportParameter("SalarioDiarioInt", SDI))
|
||||||
|
RptParametro.Add(New ReportParameter("Departamento", Departamento))
|
||||||
|
RptParametro.Add(New ReportParameter("Puesto", Puesto))
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
@@ -9475,6 +9477,14 @@ Public Class ClsPaginas
|
|||||||
Retorno.CveConcepto = 296
|
Retorno.CveConcepto = 296
|
||||||
Retorno.CveConceptoComplementario = 227
|
Retorno.CveConceptoComplementario = 227
|
||||||
End Select
|
End Select
|
||||||
|
Case 19 ' deudores
|
||||||
|
Select Case CveMoneda
|
||||||
|
Case 1 'pesos
|
||||||
|
Retorno.CveConcepto = 37
|
||||||
|
Case 2 'dólares
|
||||||
|
Retorno.CveConcepto = 382
|
||||||
|
Retorno.CveConceptoComplementario = 256
|
||||||
|
End Select
|
||||||
End Select
|
End Select
|
||||||
Else 'cuando es la provisión
|
Else 'cuando es la provisión
|
||||||
Select Case CveTipoSaldo
|
Select Case CveTipoSaldo
|
||||||
@@ -9534,6 +9544,14 @@ Public Class ClsPaginas
|
|||||||
Retorno.CveConcepto = 295
|
Retorno.CveConcepto = 295
|
||||||
Retorno.CveConceptoComplementario = 226
|
Retorno.CveConceptoComplementario = 226
|
||||||
End Select
|
End Select
|
||||||
|
Case 19 ' deudores
|
||||||
|
Select Case CveMoneda
|
||||||
|
Case 1 'pesos
|
||||||
|
Retorno.CveConcepto = 43
|
||||||
|
Case 2 'dólares
|
||||||
|
Retorno.CveConcepto = 381
|
||||||
|
Retorno.CveConceptoComplementario = 256
|
||||||
|
End Select
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ Public Class ClsProductosServicios
|
|||||||
Public Property NumeroParte As String
|
Public Property NumeroParte As String
|
||||||
Public Property CodigoBarras As String
|
Public Property CodigoBarras As String
|
||||||
Public Property PS As String
|
Public Property PS As String
|
||||||
|
Public Property PSExtranjero As String
|
||||||
Public Property Precio As Double
|
Public Property Precio As Double
|
||||||
Public Property PrecioMinimo As Double
|
Public Property PrecioMinimo As Double
|
||||||
Public Property Oferta As Double
|
Public Property Oferta As Double
|
||||||
@@ -203,7 +204,7 @@ Public Class ClsProductosServicios
|
|||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional NumeroParte As String = "-1",
|
Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional NumeroParte As String = "-1",
|
||||||
Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional PSExtranjero As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||||
Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1,
|
Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1,
|
||||||
Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000, Optional CveMarca As Integer = -1) As Boolean
|
Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000, Optional CveMarca As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -216,6 +217,7 @@ Public Class ClsProductosServicios
|
|||||||
.Add("@NumeroParte", SqlDbType.VarChar).Value = NumeroParte
|
.Add("@NumeroParte", SqlDbType.VarChar).Value = NumeroParte
|
||||||
.Add("@CodigoBarras", SqlDbType.VarChar).Value = CodigoBarras
|
.Add("@CodigoBarras", SqlDbType.VarChar).Value = CodigoBarras
|
||||||
.Add("@PS", SqlDbType.VarChar).Value = PS
|
.Add("@PS", SqlDbType.VarChar).Value = PS
|
||||||
|
.Add("@PSExtranjero", SqlDbType.VarChar).Value = PSExtranjero
|
||||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
.Add("@EsPaquete", SqlDbType.SmallInt).Value = EsPaquete
|
.Add("@EsPaquete", SqlDbType.SmallInt).Value = EsPaquete
|
||||||
.Add("@AplicaParaVenta", SqlDbType.Int).Value = pAplicaParaVenta
|
.Add("@AplicaParaVenta", SqlDbType.Int).Value = pAplicaParaVenta
|
||||||
@@ -245,6 +247,7 @@ Public Class ClsProductosServicios
|
|||||||
Me.NumeroParte = Data.Rows(0)("NumeroParte").ToString
|
Me.NumeroParte = Data.Rows(0)("NumeroParte").ToString
|
||||||
Me.CodigoBarras = Data.Rows(0)("CodigoBarras").ToString
|
Me.CodigoBarras = Data.Rows(0)("CodigoBarras").ToString
|
||||||
Me.PS = Data.Rows(0)("PS").ToString
|
Me.PS = Data.Rows(0)("PS").ToString
|
||||||
|
Me.PSExtranjero = Data.Rows(0)("PSExtranjero").ToString
|
||||||
Precio = Data.Rows(0)("Precio").ToString.ToDouble
|
Precio = Data.Rows(0)("Precio").ToString.ToDouble
|
||||||
PrecioMinimo = Data.Rows(0)("PrecioMinimo").ToString.ToDouble
|
PrecioMinimo = Data.Rows(0)("PrecioMinimo").ToString.ToDouble
|
||||||
Oferta = Data.Rows(0)("Oferta").ToString.ToDouble
|
Oferta = Data.Rows(0)("Oferta").ToString.ToDouble
|
||||||
@@ -402,7 +405,7 @@ Public Class ClsProductosServicios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function AddPS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer,
|
Public Function AddPS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer,
|
||||||
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, CveUsuario As Integer, CveEmpresa As Integer, CveMetodoInventario As Integer, EsPaquete As Integer,
|
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, CveUsuario As Integer, CveEmpresa As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, Optional PSExtranjero As String = "-1",
|
||||||
Optional CveTipoPS As Integer = -1, Optional FuePorXML As Boolean = True, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1,
|
Optional CveTipoPS As Integer = -1, Optional FuePorXML As Boolean = True, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1,
|
||||||
Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
|
Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
|
||||||
Optional CveCompuesto As Integer = -1, Optional CveSATPS As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
|
Optional CveCompuesto As Integer = -1, Optional CveSATPS As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
|
||||||
@@ -438,6 +441,7 @@ Public Class ClsProductosServicios
|
|||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@EsPaquete", SqlDbType.Bit).Value = EsPaquete
|
.Add("@EsPaquete", SqlDbType.Bit).Value = EsPaquete
|
||||||
|
.Add("@PSExtranjero", SqlDbType.VarChar).Value = If(PSExtranjero.Length > 845, PSExtranjero.Substring(0, 845), PSExtranjero)
|
||||||
.Add("@CveMetodoInventario", SqlDbType.Int).Value = CveMetodoInventario
|
.Add("@CveMetodoInventario", SqlDbType.Int).Value = CveMetodoInventario
|
||||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||||
.Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS
|
.Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS
|
||||||
@@ -687,7 +691,7 @@ Public Class ClsProductosServicios
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer,
|
Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer,
|
||||||
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1,
|
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional PSExtranjero As String = "-1", Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1,
|
||||||
Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
|
Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
|
||||||
Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
|
Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
|
||||||
Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1,
|
Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1,
|
||||||
@@ -734,6 +738,7 @@ Public Class ClsProductosServicios
|
|||||||
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
|
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
|
||||||
.Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS
|
.Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@PSExtranjero", SqlDbType.VarChar).Value = PSExtranjero
|
||||||
|
|
||||||
'Nuevo R: 26/09/2017'
|
'Nuevo R: 26/09/2017'
|
||||||
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
|
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
using Extensiones;
|
using Extensiones;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Activities.Expressions;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using static Extensiones.ModExtensiones;
|
using static Extensiones.ModExtensiones;
|
||||||
|
using static Stimulsoft.Report.Export.DeflaterHuffman;
|
||||||
|
|
||||||
public partial class Bancos_PagoDeudor : ClsPaginas
|
public partial class Bancos_PagoDeudor : ClsPaginas
|
||||||
{
|
{
|
||||||
@@ -186,12 +188,10 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
|
|
||||||
string MsgError = "";
|
string MsgError = "";
|
||||||
int CveIE = 0;
|
int CveIE = 0;
|
||||||
int CveConceptoContableBanco = 30;
|
int CveConceptoContableBanco = 30;
|
||||||
int CveConceptoContablePrestamo = 43;
|
|
||||||
int CvePlantillaPoliza = 45;
|
int CvePlantillaPoliza = 45;
|
||||||
int CvePrePoliza = 0;
|
int CvePrePoliza = 0;
|
||||||
int FolioFijo = 0;
|
int FolioFijo = 0;
|
||||||
//int IDPoliza = 0;
|
|
||||||
decimal tipoCambio = (CveMonedaPrestamo == 2) ? TxtTCDolaresPrestamo.Text.ToDecimal() : 1;
|
decimal tipoCambio = (CveMonedaPrestamo == 2) ? TxtTCDolaresPrestamo.Text.ToDecimal() : 1;
|
||||||
StringBuilder Msg = new StringBuilder();
|
StringBuilder Msg = new StringBuilder();
|
||||||
|
|
||||||
@@ -225,14 +225,12 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
{
|
{
|
||||||
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
|
filemove.FilesMove(CveIE.ToString(), string.Format(@"{0}IE", UsuarioActual.Empresa.Ruta), ConcatenarDirectorioBase: false);
|
||||||
}
|
}
|
||||||
|
ConceptosTipoSaldo ConPreP = ClsPaginas.get_ObtenerCveConceptoPrePoliza(19, CveMonedaPrestamo, false, -1, "");
|
||||||
// SI ES DOLARES
|
// SI ES DOLARES
|
||||||
if (CveMonedaPrestamo == 2)
|
if (CveMonedaPrestamo == 2)
|
||||||
{
|
{ // BANCOS - BANCOS COMPLEMENTARIA
|
||||||
// BANCOS - BANCOS COMPLEMENTARIA
|
|
||||||
if (UsaComplementaria)
|
if (UsaComplementaria)
|
||||||
{
|
{
|
||||||
|
|
||||||
// BANCOS
|
// BANCOS
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(),CveConceptoContableBanco, Ref, Conc, CveIE:CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(),CveConceptoContableBanco, Ref, Conc, CveIE:CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
@@ -243,7 +241,6 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
{
|
{
|
||||||
MsgError = "No se pudo insertar concepto de bancos complementaria";
|
MsgError = "No se pudo insertar concepto de bancos complementaria";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -253,26 +250,24 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
MsgError = "No se pudo insertar concepto de bancos";
|
MsgError = "No se pudo insertar concepto de bancos";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// DEUDORES - DEUDORES COMPLEMENTARIAI
|
// DEUDORES - DEUDORES COMPLEMENTARIAI
|
||||||
if (UsaComplementaria)
|
if (UsaComplementaria)
|
||||||
{
|
{
|
||||||
// DEUDOR COMPLEMENTARIA
|
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, 0, (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), 256, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
|
||||||
{
|
|
||||||
MsgError = "No se pudo insertar concepto de deudor complementaria";
|
|
||||||
}
|
|
||||||
|
|
||||||
// DEUDOR
|
// DEUDOR
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(), CveConceptoContablePrestamo, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(), ConPreP.CveConcepto, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
MsgError = "No se pudo insertar concepto de deudor";
|
MsgError = "No se pudo insertar concepto de deudor";
|
||||||
}
|
}
|
||||||
|
// DEUDOR COMPLEMENTARIA
|
||||||
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, 0, (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), ConPreP.CveConceptoComplementario, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||||
|
{
|
||||||
|
MsgError = "No se pudo insertar concepto de deudor complementaria";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// DEUDOR
|
// DEUDOR
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal() * tipoCambio, CveConceptoContablePrestamo, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal() * tipoCambio, ConPreP.CveConcepto, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
MsgError = "No se pudo insertar concepto de deudor";
|
MsgError = "No se pudo insertar concepto de deudor";
|
||||||
}
|
}
|
||||||
@@ -288,7 +283,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DEUDOR
|
// DEUDOR
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(), CveConceptoContablePrestamo, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(), ConPreP.CveConcepto, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
MsgError = "No se pudo insertar concepto de deudor";
|
MsgError = "No se pudo insertar concepto de deudor";
|
||||||
}
|
}
|
||||||
@@ -461,12 +456,10 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
protected void DdlProveedores_selectedindexchange(object sender, EventArgs e)
|
protected void DdlProveedores_selectedindexchange(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ClsMovimientos ObjMov = new ClsMovimientos();
|
ClsMovimientos ObjMov = new ClsMovimientos();
|
||||||
ClsCompProveedores proveedores = new ClsCompProveedores();
|
|
||||||
|
|
||||||
|
|
||||||
if (DdlProveedores.SelectedValue.ToEntero() > 0)
|
if (DdlProveedores.SelectedValue.ToEntero() > 0)
|
||||||
{
|
{
|
||||||
if (ObjMov.GetDeudoresrXSaldar(DdlProveedores.SelectedValue.ToEntero(), -1, UsuarioActual.CveEmpresa))
|
if (ObjMov.GetDeudoresSaldosDetalle(DdlProveedores.SelectedValue.ToEntero(), -1, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
GvMovDeudor.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0 AND Saldo > 0 ", "");
|
GvMovDeudor.DataSource = ObjMov.DtResultados.FiltraParametros("CveIE > 0 AND Saldo > 0 ", "");
|
||||||
}
|
}
|
||||||
@@ -478,8 +471,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
TxtImporte.Text = "0.00";
|
TxtImporte.Text = "0.00";
|
||||||
|
|
||||||
GvMovDeudor.DataBind();
|
GvMovDeudor.DataBind();
|
||||||
ObjMov.Dispose();
|
ObjMov.Dispose();
|
||||||
proveedores.Dispose();
|
|
||||||
UpMovDeudor.Update();
|
UpMovDeudor.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -507,9 +499,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
string MsgError = "";
|
string MsgError = "";
|
||||||
int CveIE = 0;
|
int CveIE = 0;
|
||||||
int CveConceptoContableBanco = 30;
|
int CveConceptoContableBanco = 30;
|
||||||
int CveConceptoContableBancoComplementario = 204;
|
int CveConceptoContableBancoComplementario = 204;
|
||||||
int CveConceptoContablePago = 37;
|
|
||||||
int CveConceptoContablePagoComplementaria = 256;
|
|
||||||
int CvePlantillaPoliza = 39;
|
int CvePlantillaPoliza = 39;
|
||||||
int CvePrePoliza = 0;
|
int CvePrePoliza = 0;
|
||||||
int CveMoneda = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero()}").ToEntero();
|
int CveMoneda = get_GlobalDTBancosCuentas(-1, CveEmpresa: UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda", $"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveCuenta = {DdlCuenta.SelectedValue.ToEntero()}").ToEntero();
|
||||||
@@ -519,7 +509,6 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
decimal importeMN = HdnImporteMN.Value.ToDecimal();
|
decimal importeMN = HdnImporteMN.Value.ToDecimal();
|
||||||
StringBuilder Msg = new StringBuilder();
|
StringBuilder Msg = new StringBuilder();
|
||||||
|
|
||||||
|
|
||||||
//OBTIENE COMPROBANTE !!
|
//OBTIENE COMPROBANTE !!
|
||||||
string Comprobante = "";
|
string Comprobante = "";
|
||||||
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
||||||
@@ -580,6 +569,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
ImporteComplementaria = 0;
|
ImporteComplementaria = 0;
|
||||||
|
|
||||||
int tCveMoneda = gvr.DataKey("CveMoneda").ToEntero();
|
int tCveMoneda = gvr.DataKey("CveMoneda").ToEntero();
|
||||||
|
int PrestamoCveIE = gvr.DataKey("CveIE").ToEntero();
|
||||||
if (CveMoneda == 1 && tCveMoneda == 1)
|
if (CveMoneda == 1 && tCveMoneda == 1)
|
||||||
{
|
{
|
||||||
ImporteMN = Importe;
|
ImporteMN = Importe;
|
||||||
@@ -618,23 +608,22 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
|
|
||||||
ImporteMN = ImporteMN.RoundSQL();
|
ImporteMN = ImporteMN.RoundSQL();
|
||||||
ImporteComplementaria = ImporteComplementaria.RoundSQL();
|
ImporteComplementaria = ImporteComplementaria.RoundSQL();
|
||||||
|
ConceptosTipoSaldo ConPreP = ClsPaginas.get_ObtenerCveConceptoPrePoliza(19, tCveMoneda, true, -1, "");
|
||||||
|
|
||||||
if (tCveMoneda != 1)
|
if (tCveMoneda != 1)
|
||||||
{
|
{
|
||||||
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteMN, ConPreP.CveConcepto, Ref, Conc, CveIE: PrestamoCveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TCDoc, TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteMN, CveConceptoContablePago, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: TCDoc, TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
|
||||||
{
|
{
|
||||||
MsgError = "No se pudo insertar concepto de pago deudor";
|
MsgError = "No se pudo insertar concepto de pago deudor";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (UsaComplementaria)
|
if (UsaComplementaria)
|
||||||
{
|
{
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteComplementaria, CveConceptoContablePagoComplementaria, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TCDoc, TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteComplementaria, ConPreP.CveConceptoComplementario, Ref, Conc, CveIE: PrestamoCveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: TCDoc, TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
MsgError = "No se pudo insertar concepto de deudor complementaria";
|
MsgError = "No se pudo insertar concepto de deudor complementaria";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TC != TCDoc)
|
if (TC != TCDoc)
|
||||||
{
|
{
|
||||||
int CveConceptoDiferenciaCambiaria = 0;
|
int CveConceptoDiferenciaCambiaria = 0;
|
||||||
@@ -652,27 +641,22 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
Importe = (Importe * TC) - (Importe * gvr.DataKey("TipoCambio").ToDecimal());
|
Importe = (Importe * TC) - (Importe * gvr.DataKey("TipoCambio").ToDecimal());
|
||||||
}
|
}
|
||||||
ImporteMN = Importe;
|
ImporteMN = Importe;
|
||||||
|
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, ImporteMN, CveConceptoDiferenciaCambiaria, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: gvr.DataKey("TipoCambio").ToDecimal(), TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, ImporteMN, CveConceptoDiferenciaCambiaria, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), ImporteME: Importe, TipoCambio: gvr.DataKey("TipoCambio").ToDecimal(), TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
MsgError = "No se pudo insertar concepto de diferencia cambiaria";
|
MsgError = "No se pudo insertar concepto de diferencia cambiaria";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteMN, CveConceptoContablePago, Ref, Conc, CveIE: CveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: gvr.DataKey("TipoCambio").ToDecimal(), TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, Importe, ImporteMN, ConPreP.CveConcepto, Ref, Conc, CveIE: PrestamoCveIE, CveProveedor: DdlProveedores.SelectedValue.ToEntero(), CveIEDevolucion: gvr.DataKey("CveIE").ToEntero(), TipoCambio: gvr.DataKey("TipoCambio").ToDecimal(), TipoCambioPago: TC, CveSubProyecto: DdlSubProyectoPago.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
MsgError = "No se pudo insertar concepto de pago deudor";
|
MsgError = "No se pudo insertar concepto de pago deudor";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CveMoneda != 1)
|
if (CveMoneda != 1)
|
||||||
{
|
{
|
||||||
if (UsaComplementaria)
|
if (UsaComplementaria)
|
||||||
@@ -710,8 +694,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
|||||||
}
|
}
|
||||||
|
|
||||||
Usuario UA = UsuarioActual;
|
Usuario UA = UsuarioActual;
|
||||||
if (ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: 10))
|
if (ObjMov.ValidacionesPrePoliza(CvePrePoliza, ref UA, Opcion: 10))
|
||||||
|
|
||||||
{
|
{
|
||||||
if (ObjMov.ValorPolizaDescuadre > 0)
|
if (ObjMov.ValorPolizaDescuadre > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -569,7 +569,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Header.Append(TipoArchivo.PadRight(2, Space)) 'TIPO ARCHIVO (2)
|
Header.Append(TipoArchivo.PadRight(2, Space)) 'TIPO ARCHIVO (2)
|
||||||
Header.Append("HA") 'TIPO REGISTRO (2)
|
Header.Append("HA") 'TIPO REGISTRO (2)
|
||||||
Header.Append("JDF") 'SISTEMA-CENTRAL (3)
|
Header.Append("JDF") 'SISTEMA-CENTRAL (3)
|
||||||
Header.Append(NumeroConvenio.PadLeft(7, Space)) 'NUMERO DE CONTRATO (7) ' ocupa 5 dígitos pero en el layout se usa 7
|
Header.Append(NumeroConvenio.PadLeft(7, Cero)) 'NUMERO DE CONTRATO (7) ' ocupa 5 dígitos pero en el layout se usa 7
|
||||||
Header.Append(NowADS.ToString("yyyyMMdd")) 'FECHA-SOLICITUD (8)
|
Header.Append(NowADS.ToString("yyyyMMdd")) 'FECHA-SOLICITUD (8)
|
||||||
Header.Append("001") 'SECUENCIA (3)
|
Header.Append("001") 'SECUENCIA (3)
|
||||||
Header.Append("M") 'MANTENIMIENTO-O-CONSULTA (1)
|
Header.Append("M") 'MANTENIMIENTO-O-CONSULTA (1)
|
||||||
@@ -594,7 +594,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Dim CuentaDestino As String = ""
|
Dim CuentaDestino As String = ""
|
||||||
Dim cuentaDigitos As String = dr("CLABEDestino").ToString.Trim
|
Dim cuentaDigitos As String = dr("CLABEDestino").ToString.Trim
|
||||||
Dim Clabe As String = dr("CLABE").ToString.Trim
|
Dim Clabe As String = dr("CLABE").ToString.Trim
|
||||||
Dim limite As String = (900000000 * 100D).ToEntero.ToString("F0")
|
Dim limite As String = (9000000000 * 100D).ToString("F0")
|
||||||
Dim banco As String = dr("CveBanco").ToString.PadLeft(3, Cero)
|
Dim banco As String = dr("CveBanco").ToString.PadLeft(3, Cero)
|
||||||
|
|
||||||
If cuentaDigitos.Length = 11 AndAlso banco = "044" Then
|
If cuentaDigitos.Length = 11 AndAlso banco = "044" Then
|
||||||
@@ -672,10 +672,10 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
trailer.Append(TipoArchivo.PadRight(2, Space)) 'TIPO DE ARCHIVO (2)
|
trailer.Append(TipoArchivo.PadRight(2, Space)) 'TIPO DE ARCHIVO (2)
|
||||||
trailer.Append("TA") 'TIPO DE REGISTRO (2)
|
trailer.Append("TA") 'TIPO DE REGISTRO (2)
|
||||||
trailer.Append(Altas.ToString.PadLeft(8, Space)) 'CANTIDAD DE MOVIMIENTOS ALTAS (8)
|
trailer.Append(Altas.ToString.PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS ALTAS (8)
|
||||||
trailer.Append(Cambios.ToString.PadLeft(8, Space)) 'CANTIDAD DE MOVIMIENTOS CAMBIOS (8)
|
trailer.Append(Cambios.ToString.PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS CAMBIOS (8)
|
||||||
trailer.Append(Bajas.ToString.PadLeft(8, Space)) 'CANTIDAD DE MOVIMIENTOS BAJAS (8)
|
trailer.Append(Bajas.ToString.PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS BAJAS (8)
|
||||||
trailer.Append(Consultas.ToString.PadLeft(8, Space)) 'CANTIDAD DE CONSULTAS (8)
|
trailer.Append(Consultas.ToString.PadLeft(8, Cero)) 'CANTIDAD DE CONSULTAS (8)
|
||||||
'MOVIMIENTOS ACEPTADOS
|
'MOVIMIENTOS ACEPTADOS
|
||||||
trailer.Append("0".PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS ALTAS (8) *** Respusta de ScotiaBank ***
|
trailer.Append("0".PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS ALTAS (8) *** Respusta de ScotiaBank ***
|
||||||
trailer.Append("0".PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS CAMBIOS (8) *** Respusta de ScotiaBank ***
|
trailer.Append("0".PadLeft(8, Cero)) 'CANTIDAD DE MOVIMIENTOS CAMBIOS (8) *** Respusta de ScotiaBank ***
|
||||||
@@ -957,7 +957,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
da.Append("".PadLeft(34, CERO)) ' 105-138 Uso Futuro
|
da.Append("".PadLeft(34, CERO)) ' 105-138 Uso Futuro
|
||||||
da.Append("".PadLeft(30, SPACE)) ' 139-168 Clave de Rastreo llenar con espacios en blanco
|
da.Append("".PadLeft(30, SPACE)) ' 139-168 Clave de Rastreo llenar con espacios en blanco
|
||||||
da.Append("".PadLeft(20, SPACE)) ' 169-188 Referencia de Abono Banxico
|
da.Append("".PadLeft(20, SPACE)) ' 169-188 Referencia de Abono Banxico
|
||||||
dm.Append("01") ' 189-190 Tipo de Operación anexo G
|
dm.Append(" ") ' 189-190 Tipo de Operación anexo G
|
||||||
da.Append("".PadLeft(232, SPACE)) ' 191-370 FILLER
|
da.Append("".PadLeft(232, SPACE)) ' 191-370 FILLER
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17690,9 +17690,9 @@ Partial Class Compras_Compras
|
|||||||
Dim NumNoDed As Integer = TmpDT.COUNT("CvePS", "NoDeducible = True ")
|
Dim NumNoDed As Integer = TmpDT.COUNT("CvePS", "NoDeducible = True ")
|
||||||
If NumNoDed > 0 Then GvPS.Columns(13).Visible = True 'visualiza columnas de nodeducibles
|
If NumNoDed > 0 Then GvPS.Columns(13).Visible = True 'visualiza columnas de nodeducibles
|
||||||
|
|
||||||
'If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") And CveFactura <= 0 Then
|
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") And CveFactura <= 0 And CveCompra <= 0 Then
|
||||||
' InicializaAplicaNCFact()
|
InicializaAplicaNCFact()
|
||||||
'End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub OriginalesVisible(Accion As Boolean)
|
Private Sub OriginalesVisible(Accion As Boolean)
|
||||||
|
|||||||
@@ -262,12 +262,18 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server">
|
<asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="row" id="trCuentaDeposito" runat="server" visible="False">
|
<div class="row" id="trCuentaDeposito" runat="server" visible="false">
|
||||||
<label class="col-md-2 control-label">Cuenta Depósito: </label>
|
<label class="col-md-2 control-label">Cuenta Depósito: </label>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<asp:DropDownList ID="DdlCuentaDeposito" runat="server" DataTextField="CuentaDeposito" DataValueField="CveCuentaDeposito" CssClass="form-control input-sm select2me" Width="400px" AppendDataBoundItems="True"></asp:DropDownList>
|
<asp:DropDownList ID="DdlCuentaDeposito" runat="server" DataTextField="CuentaDeposito" DataValueField="CveCuentaDeposito" CssClass="form-control input-sm select2me" Width="400px" AppendDataBoundItems="True"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta de Depósito''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCECuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDeposito" Width="300px"></ajax:ValidatorCalloutExtender>
|
<div runat="server" id="DVValidacionesCuentaDeposito" visible="false">
|
||||||
|
<asp:RequiredFieldValidator ID="RFVCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta de Depósito''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCECuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDeposito" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%--<asp:ImageButton ID="ImgUpdateCuentaDeposito" ImageUrl="/Imagenes/accept.png" OnClick="ImgUpdateCuentaDeposito_Click" ValidationGroup="GrpGuardar" runat="server" />--%>
|
<%--<asp:ImageButton ID="ImgUpdateCuentaDeposito" ImageUrl="/Imagenes/accept.png" OnClick="ImgUpdateCuentaDeposito_Click" ValidationGroup="GrpGuardar" runat="server" />--%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -349,43 +349,52 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
DdlCuentaDeposito.SelectedValue = Nothing
|
DdlCuentaDeposito.SelectedValue = Nothing
|
||||||
DdlCuentaDeposito.Items.Clear()
|
DdlCuentaDeposito.Items.Clear()
|
||||||
|
|
||||||
trCuentaDeposito.Visible = False
|
DVValidacionesCuentaDeposito.Visible = False
|
||||||
DdlCuentaDeposito.Enabled = False
|
'trCuentaDeposito.Visible = False
|
||||||
|
'DdlCuentaDeposito.Enabled = False
|
||||||
|
|
||||||
|
|
||||||
Dim CvePersonal As Integer = DdlPersonal.SelectedValue.ToEntero
|
Dim CvePersonal As Integer = DdlPersonal.SelectedValue.ToEntero
|
||||||
|
|
||||||
If CvePersonal > 0 Then
|
If CvePersonal > 0 And DdlTipoPago.SelectedValue.ToEntero = 1 Then
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
|
'If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
|
||||||
|
|
||||||
trCuentaDeposito.Visible = True
|
trCuentaDeposito.Visible = True
|
||||||
DdlCuentaDeposito.Enabled = True
|
DdlCuentaDeposito.Enabled = True
|
||||||
|
|
||||||
Dim Dep As New ClsGenerales
|
Dim Dep As New ClsGenerales
|
||||||
If Dep.GetCuentasDepositos(CvePersonal:=CvePersonal, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
If Dep.GetCuentasDepositos(CvePersonal:=CvePersonal, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue = "9" Then
|
If DdlTipoTransaccion.SelectedValue = "9" Then
|
||||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" EstatusPagoElectronico = 'True'")
|
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" EstatusPagoElectronico = 'True'")
|
||||||
Else
|
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
|
||||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True'")
|
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True'")
|
||||||
End If
|
Else
|
||||||
|
DdlCuentaDeposito.DataSource = Dep.DtResultados
|
||||||
|
|
||||||
If Dep.DtResultados.Rows.Count > 0 Then
|
|
||||||
|
|
||||||
trCuentaDeposito.Visible = True
|
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dep.Dispose()
|
'If Dep.DtResultados.Rows.Count > 0 Then
|
||||||
DdlCuentaDeposito.DataBind()
|
trCuentaDeposito.Visible = True
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
'End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dep.Dispose()
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
|
|
||||||
|
|
||||||
|
'End If
|
||||||
|
Else
|
||||||
|
trCuentaDeposito.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
|
||||||
|
DVValidacionesCuentaDeposito.Visible = True
|
||||||
|
Else
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpCuentaDeposito.Update()
|
UpCuentaDeposito.Update()
|
||||||
|
|||||||
@@ -317,7 +317,7 @@
|
|||||||
|
|
||||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="True"
|
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="True"
|
||||||
DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConceptoContable,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones,EsComplementaria, EsMonedaExtranjera,ImporteME, PorcentajeImpuesto, TC"
|
DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConceptoContable,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones,EsComplementaria, EsMonedaExtranjera,ImporteME, PorcentajeImpuesto,CveActivoFijo, TC"
|
||||||
Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -1100,7 +1100,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
CveTipoGasto:=tCveTipoGasto,
|
CveTipoGasto:=tCveTipoGasto,
|
||||||
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveActivoFijo:=gvr.DataKey("CveActivoFijo").ToEntero, CveCuenta:=tCveCuenta, PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal) Then
|
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveActivoFijo:=gvr.DataKey("CveActivoFijo").ToEntero, CveCuenta:=tCveCuenta, PorcentajeImpuesto:=gvr.DataKey("PorcentajeImpuesto").ToDecimal) Then
|
||||||
ContRegInsertados = ContRegInsertados + 1
|
ContRegInsertados = ContRegInsertados + 1
|
||||||
|
|
||||||
Else
|
Else
|
||||||
MsgError = "No se pudo insertar el detalle de la póliza2"
|
MsgError = "No se pudo insertar el detalle de la póliza2"
|
||||||
Exit For
|
Exit For
|
||||||
@@ -1152,7 +1151,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
ObjContabilidad.IniciaTransacSQL()
|
ObjContabilidad.IniciaTransacSQL()
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|
||||||
Dim Retorno As Boolean = ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
|
Dim Retorno As Boolean = ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
|
||||||
|
|
||||||
If Retorno Then
|
If Retorno Then
|
||||||
@@ -1195,7 +1193,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
||||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CveClasificacion:=row.DataKey("CveClasificacion").ToEntero,
|
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CveClasificacion:=row.DataKey("CveClasificacion").ToEntero,
|
||||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text,
|
CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text,
|
||||||
TipoCambio:=row.DataKey("TC").ToDecimal,
|
TipoCambio:=row.DataKey("TC").ToDecimal, CveActivoFijo:=row.DataKey("CveActivoFijo").ToEntero,
|
||||||
CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then
|
CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -1306,6 +1304,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Dim Abono As Decimal = GvPrePoliza.Rows(IndiceGrid).FCLabel("TxtAbono").Text.ToDecimal
|
Dim Abono As Decimal = GvPrePoliza.Rows(IndiceGrid).FCLabel("TxtAbono").Text.ToDecimal
|
||||||
Dim PorcentajeImpuesto As Decimal = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToDecimal
|
Dim PorcentajeImpuesto As Decimal = GvPrePoliza.Rows(IndiceGrid).DataKey("PorcentajeImpuesto").ToDecimal
|
||||||
Dim CveClasificacion As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveClasificacion").ToEntero
|
Dim CveClasificacion As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveClasificacion").ToEntero
|
||||||
|
Dim CveActivoFijo As Integer = GvPrePoliza.Rows(IndiceGrid).DataKey("CveActivoFijo").ToEntero
|
||||||
'Dim MonedaExtr As Decimal = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDecimal
|
'Dim MonedaExtr As Decimal = GvPrePoliza.Rows(IndiceGrid).FCLiteral("TxtCargo").Text.ToDecimal
|
||||||
|
|
||||||
'CargaConceptosContablesE()
|
'CargaConceptosContablesE()
|
||||||
@@ -1351,6 +1350,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
DdlTipoGastoE.SelectedValueExist(CveTipoGasto)
|
DdlTipoGastoE.SelectedValueExist(CveTipoGasto)
|
||||||
CargaCuentasContables()
|
CargaCuentasContables()
|
||||||
DdlCuentaContableE.SelectedValueExist(CveCuenta)
|
DdlCuentaContableE.SelectedValueExist(CveCuenta)
|
||||||
|
DdlAF.SelectedValueExist(CveActivoFijo)
|
||||||
|
|
||||||
If Cargo <> 0 Then TxtCargoE.Text = Cargo.FormatoNumero
|
If Cargo <> 0 Then TxtCargoE.Text = Cargo.FormatoNumero
|
||||||
If Abono <> 0 Then TxtAbonoE.Text = Abono.FormatoNumero
|
If Abono <> 0 Then TxtAbonoE.Text = Abono.FormatoNumero
|
||||||
@@ -1741,11 +1741,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
x = x + 1
|
x = x + 1
|
||||||
Next
|
Next
|
||||||
DtMovimientos.AcceptChanges()
|
DtMovimientos.AcceptChanges()
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
|
dr("CveCuenta") = DdlCuentaContableE.SelectedValue
|
||||||
dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text
|
dr("CodigoNombreCuenta") = DdlCuentaContableE.SelectedItem.Text
|
||||||
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
|
dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.table td, .table th {
|
.table td, .table th {
|
||||||
|
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,7 +372,9 @@
|
|||||||
max-height: 170px;
|
max-height: 170px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#containerC_gvResumenSucursales tr.stickyRow th{
|
||||||
|
white-space:nowrap !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Estilos para el header */
|
/* Estilos para el header */
|
||||||
@@ -405,12 +408,35 @@
|
|||||||
background-color: #f8f9fa !important;
|
background-color: #f8f9fa !important;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-flex {
|
||||||
|
display: flex !important;
|
||||||
|
flex-direction: row !important;
|
||||||
|
align-items: center !important;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
element.style {
|
||||||
|
display: flex
|
||||||
|
;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
.gvMaxHeight{
|
.gvMaxHeight{
|
||||||
max-height: 160px;
|
max-height: 160px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
.thcenternowrap th{
|
||||||
|
text-align:center;
|
||||||
|
white-space:nowrap
|
||||||
|
}
|
||||||
|
.thcenternowrap th div{
|
||||||
|
display:inline-block !important;
|
||||||
|
text-align:center;
|
||||||
|
white-space:nowrap
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
@@ -475,7 +501,7 @@
|
|||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
|
|
||||||
<asp:GridView ID="gvResumenSucursales" runat="server"
|
<asp:GridView ID="gvResumenSucursales" runat="server"
|
||||||
CssClass="adssigrid-scroll adssigrid-order table table-hover table-light custom-grid"
|
CssClass="adssigrid-scroll adssigrid-order table table-light custom-grid thcenternowrap"
|
||||||
data-rows="2"
|
data-rows="2"
|
||||||
data-cols="1"
|
data-cols="1"
|
||||||
AutoGenerateColumns="false"
|
AutoGenerateColumns="false"
|
||||||
@@ -499,12 +525,12 @@
|
|||||||
|
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<div style="display: flex; flex-direction: column; align-items: center;">
|
<div style="display: flex; flex-direction:row !important; flex-wrap: nowrap !important; white-space: nowrap;">
|
||||||
<span>Venta Anual</span>
|
<span>Venta Anual</span>
|
||||||
<div>
|
<input type="checkbox" id="chkVentaAnual" class="header-checkbox" data-field="VentaAnual" style="margin-left: auto;" />
|
||||||
<asp:CheckBox ID="chkVentaAnual" runat="server" CssClass="header-checkbox" data-field="VentaAnual" />
|
<%--<asp:CheckBox ID="chkVentaAnual" runat="server" CssClass="header-checkbox" data-field="VentaAnual" Style="margin-left: auto;" />--%>
|
||||||
<label for="chkVentaAnual">Graficar</label>
|
<label for="chkVentaAnual" style="margin-bottom: 0; margin-left: 4px;">Graficar</label>
|
||||||
</div>
|
<span class="adssigrid-order" style="margin-left: 4px;"></span>
|
||||||
</div>
|
</div>
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -514,7 +540,7 @@
|
|||||||
|
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<div style="display: flex; flex-direction: column; align-items: center;">
|
<div style="display: flex; align-items: center;">
|
||||||
<span>Utilidad Anual</span>
|
<span>Utilidad Anual</span>
|
||||||
<div>
|
<div>
|
||||||
<asp:CheckBox ID="chkUtilidadAnual" runat="server" CssClass="header-checkbox" data-field="UtilidadAnual" />
|
<asp:CheckBox ID="chkUtilidadAnual" runat="server" CssClass="header-checkbox" data-field="UtilidadAnual" />
|
||||||
@@ -529,7 +555,7 @@
|
|||||||
|
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<div style="display: flex; flex-direction: column; align-items: center;">
|
<div style="display: flex; align-items: center;">
|
||||||
<span>Venta Mensual</span>
|
<span>Venta Mensual</span>
|
||||||
<div>
|
<div>
|
||||||
<asp:CheckBox ID="chkVentaMensual" runat="server" CssClass="header-checkbox" data-field="VentaMensual" />
|
<asp:CheckBox ID="chkVentaMensual" runat="server" CssClass="header-checkbox" data-field="VentaMensual" />
|
||||||
@@ -544,7 +570,7 @@
|
|||||||
|
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<div style="display: flex; flex-direction: column; align-items: center;">
|
<div style="display: flex; align-items: center;">
|
||||||
<span>Utilidad Mensual</span>
|
<span>Utilidad Mensual</span>
|
||||||
<div>
|
<div>
|
||||||
<asp:CheckBox ID="chkUtilidadMensual" runat="server" CssClass="header-checkbox" data-field="UtilidadMensual" />
|
<asp:CheckBox ID="chkUtilidadMensual" runat="server" CssClass="header-checkbox" data-field="UtilidadMensual" />
|
||||||
@@ -2390,7 +2416,7 @@
|
|||||||
<span class="caption-subject font-dark bold">Pagos por Proveedor</span>
|
<span class="caption-subject font-dark bold">Pagos por Proveedor</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body table-responsive">
|
<div class="portlet-body">
|
||||||
<asp:GridView ID="gvPagosPorProveedor" runat="server"
|
<asp:GridView ID="gvPagosPorProveedor" runat="server"
|
||||||
CssClass="adssigrid-scroll adssigrid-order table table-hover table-light custom-grid"
|
CssClass="adssigrid-scroll adssigrid-order table table-hover table-light custom-grid"
|
||||||
AutoGenerateColumns="false"
|
AutoGenerateColumns="false"
|
||||||
@@ -2483,22 +2509,26 @@
|
|||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<div id="DivModalGrafica" class="modal fade" role="dialog">
|
<div class="modal fade" id="DivModalGrafica" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-lg">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<h4 class="modal-title" id="modalTitulo">Comparativo de Sucursales</h4>
|
<h4 class="modal-title" id="modalTitulo">Comparativo de Sucursales</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div id="chartContainer" style="width: 100%; height: 500px;"></div>
|
<asp:DropDownList ID="ddlTipoGrafica" runat="server">
|
||||||
</div>
|
<asp:ListItem Value="line">Líneas</asp:ListItem>
|
||||||
<div class="modal-footer">
|
<asp:ListItem Value="pie">Pastel</asp:ListItem>
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
</asp:DropDownList>
|
||||||
</div>
|
<div id="chartContainer" style="width: 100%; height: 400px;"></div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
||||||
@@ -2511,13 +2541,57 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
console.log('Document ready - Configurando evento del dropdown');
|
||||||
|
|
||||||
|
// Función para asignar el evento al dropdown
|
||||||
|
function asignarEventoDropdown() {
|
||||||
|
// Buscar el dropdown usando un selector que funcione con WebForms
|
||||||
|
var $ddl = $('[id$="ddlTipoGrafica"]');
|
||||||
|
|
||||||
|
if ($ddl.length === 0) {
|
||||||
|
console.error('ERROR: No se encontró el dropdown con id que termine en ddlTipoGrafica');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('Dropdown encontrado, configurando evento...');
|
||||||
|
console.log('ID real del dropdown:', $ddl.attr('id'));
|
||||||
|
|
||||||
|
// Remover eventos anteriores y agregar el nuevo
|
||||||
|
$ddl.off('change').on('change', function () {
|
||||||
|
console.log('=== CAMBIO EN DROPDOWN ===');
|
||||||
|
console.log('Nuevo valor seleccionado:', $(this).val());
|
||||||
|
|
||||||
|
// Verificar qué función usar según el contexto
|
||||||
|
if ($('table[id$="gvResumenSucursales"]').length > 0) {
|
||||||
|
console.log('Usando generarGraficaSucursales()');
|
||||||
|
generarGraficaSucursales();
|
||||||
|
} else {
|
||||||
|
console.log('Usando generarGrafica() con gridId:', window.lastUsedGridId);
|
||||||
|
if (window.lastUsedGridId) {
|
||||||
|
generarGrafica(window.lastUsedGridId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Asignar evento al cargar la página
|
||||||
|
asignarEventoDropdown();
|
||||||
|
|
||||||
|
// Re-asignar evento después de postbacks de AJAX (si usas UpdatePanel)
|
||||||
|
if (typeof Sys !== "undefined" && Sys.WebForms) {
|
||||||
|
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(asignarEventoDropdown);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
function generarGraficaSucursales() {
|
function generarGraficaSucursales() {
|
||||||
|
|
||||||
// 1) Obtener la tabla completa
|
// 1) Obtener la tabla completa
|
||||||
var $grid = $('table[id$="gvResumenSucursales"]');
|
var $grid = $('table[id$="gvResumenSucursales"]');
|
||||||
|
|
||||||
// 2) Buscar TODOS los checkbox marcados
|
// 2) Buscar TODOS los checkbox marcados
|
||||||
var $checks = $grid.find('input.header-checkbox:checked');
|
var $checks = $grid.find('input.header-checkbox:checked');
|
||||||
|
|
||||||
if ($checks.length === 0) {
|
if ($checks.length === 0) {
|
||||||
alert('Por favor, seleccione al menos una columna para graficar.');
|
alert('Por favor, seleccione al menos una columna para graficar.');
|
||||||
return false;
|
return false;
|
||||||
@@ -2535,20 +2609,16 @@
|
|||||||
var $headerRows = $grid.find('tr').filter(function () {
|
var $headerRows = $grid.find('tr').filter(function () {
|
||||||
return $(this).find('th').length > 1;
|
return $(this).find('th').length > 1;
|
||||||
});
|
});
|
||||||
var $subThs = $headerRows.eq(1).find('th'); // esos 4 <th>
|
var $subThs = $headerRows.eq(1).find('th');
|
||||||
|
|
||||||
// 6) Construir las series
|
// 6) Construir las series
|
||||||
var series = $checks.map(function () {
|
var series = $checks.map(function () {
|
||||||
var $chk = $(this);
|
var $chk = $(this);
|
||||||
var $th = $chk.closest('th');
|
var $th = $chk.closest('th');
|
||||||
// idxSub = posición dentro de los 4 subheaders (0..3)
|
|
||||||
var idxSub = $subThs.index($th);
|
var idxSub = $subThs.index($th);
|
||||||
// +1 porque la columna 0 es "Sucursal"
|
|
||||||
var colIndex = idxSub + 1;
|
var colIndex = idxSub + 1;
|
||||||
// Leer data-field (VentaAnual, UtilidadAnual, etc.) y formatear nombre
|
|
||||||
var field = $chk.data('field');
|
var field = $chk.data('field');
|
||||||
var name = field.replace(/([a-z])([A-Z])/g, '$1 $2');
|
var name = field.replace(/([a-z])([A-Z])/g, '$1 $2');
|
||||||
// Mapear los valores de cada fila para esta columna
|
|
||||||
var data = $dataRows.map(function () {
|
var data = $dataRows.map(function () {
|
||||||
var txt = $(this).find('td').eq(colIndex).text().replace(/,/g, '');
|
var txt = $(this).find('td').eq(colIndex).text().replace(/,/g, '');
|
||||||
return parseFloat(txt) || 0;
|
return parseFloat(txt) || 0;
|
||||||
@@ -2556,38 +2626,90 @@
|
|||||||
return { name: name, data: data };
|
return { name: name, data: data };
|
||||||
}).get();
|
}).get();
|
||||||
|
|
||||||
// 7) Dibujar Highcharts
|
// 7) Obtener el tipo de gráfica seleccionado
|
||||||
Highcharts.chart('chartContainer', {
|
var $ddl = $('[id$="ddlTipoGrafica"]');
|
||||||
chart: { type: 'line' },
|
var tipoGrafica = $ddl.length > 0 ? $ddl.val() : 'line';
|
||||||
|
|
||||||
|
// 8) Configuración base de Highcharts
|
||||||
|
var config = {
|
||||||
title: { text: 'Comparativo por Sucursal' },
|
title: { text: 'Comparativo por Sucursal' },
|
||||||
xAxis: {
|
series: series
|
||||||
|
};
|
||||||
|
|
||||||
|
// 9) Configuración específica para cada tipo de gráfica
|
||||||
|
if (tipoGrafica === 'line') {
|
||||||
|
config.chart = { type: 'line' };
|
||||||
|
config.xAxis = {
|
||||||
categories: categorias,
|
categories: categorias,
|
||||||
title: { text: 'Sucursal' }
|
title: { text: 'Sucursal' }
|
||||||
},
|
};
|
||||||
yAxis: {
|
config.yAxis = {
|
||||||
title: { text: 'Monto' },
|
title: { text: 'Monto' },
|
||||||
labels: {
|
labels: {
|
||||||
formatter: function () {
|
formatter: function () {
|
||||||
return '$' + Highcharts.numberFormat(this.value, 0);
|
return '$' + Highcharts.numberFormat(this.value, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
tooltip: {
|
config.tooltip = {
|
||||||
headerFormat: '<b>{series.name}</b><br />',
|
headerFormat: '<b>{series.name}</b><br />',
|
||||||
pointFormat: 'Sucursal: <b>{point.category}</b><br />Valor: <b>${point.y:,.2f}</b>'
|
pointFormat: 'Sucursal: <b>{point.category}</b><br />Valor: <b>${point.y:,.2f}</b>'
|
||||||
},
|
};
|
||||||
plotOptions: {
|
config.plotOptions = { series: { marker: { enabled: true } } };
|
||||||
series: { marker: { enabled: true } }
|
} else if (tipoGrafica === 'pie') {
|
||||||
},
|
config.chart = { type: 'pie' };
|
||||||
series: series
|
config.plotOptions = {
|
||||||
});
|
pie: {
|
||||||
|
allowPointSelect: true,
|
||||||
|
cursor: 'pointer',
|
||||||
|
dataLabels: {
|
||||||
|
enabled: true,
|
||||||
|
format: '<b>{point.name}</b>: {point.percentage:.1f}%'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
config.tooltip = {
|
||||||
|
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
|
||||||
|
};
|
||||||
|
|
||||||
// 8) Mostrar el modal
|
// Para gráfica de pastel, convertir las series a un formato diferente
|
||||||
$('#DivModalGrafica').modal('show');
|
if (series.length > 0) {
|
||||||
|
var firstSeries = series[0];
|
||||||
|
|
||||||
|
var pieData = categorias.map(function (categoria, index) {
|
||||||
|
return {
|
||||||
|
name: categoria,
|
||||||
|
y: firstSeries.data[index]
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
config.series = [{
|
||||||
|
name: firstSeries.name,
|
||||||
|
colorByPoint: true,
|
||||||
|
data: pieData
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 10) Dibujar Highcharts
|
||||||
|
try {
|
||||||
|
Highcharts.chart('chartContainer', config);
|
||||||
|
console.log('Gráfica creada exitosamente');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error al crear la gráfica:', error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 11) Mostrar el modal solo si no está visible
|
||||||
|
if (!$('#DivModalGrafica').hasClass('in') && !$('#DivModalGrafica').is(':visible')) {
|
||||||
|
$('#DivModalGrafica').modal('show');
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function generarGrafica(gridId) {
|
function generarGrafica(gridId) {
|
||||||
|
// Guardar el último grid usado para el evento del dropdown
|
||||||
|
window.lastUsedGridId = gridId;
|
||||||
|
|
||||||
var $grid = $('#' + gridId);
|
var $grid = $('#' + gridId);
|
||||||
|
|
||||||
// Encuentra las filas de encabezado (donde están los checkboxes)
|
// Encuentra las filas de encabezado (donde están los checkboxes)
|
||||||
@@ -2597,6 +2719,7 @@
|
|||||||
|
|
||||||
// Buscar checkboxes marcados
|
// Buscar checkboxes marcados
|
||||||
var $checks = $grid.find('input.header-checkbox:checked');
|
var $checks = $grid.find('input.header-checkbox:checked');
|
||||||
|
|
||||||
if ($checks.length === 0) {
|
if ($checks.length === 0) {
|
||||||
alert('Por favor, seleccione al menos una columna para graficar.');
|
alert('Por favor, seleccione al menos una columna para graficar.');
|
||||||
return false;
|
return false;
|
||||||
@@ -2632,7 +2755,6 @@
|
|||||||
var txt = $(this).find('td').eq(colIndex).text().replace(/,/g, '');
|
var txt = $(this).find('td').eq(colIndex).text().replace(/,/g, '');
|
||||||
return parseFloat(txt) || 0;
|
return parseFloat(txt) || 0;
|
||||||
}).get();
|
}).get();
|
||||||
|
|
||||||
series.push({ name: name, data: data });
|
series.push({ name: name, data: data });
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -2641,37 +2763,90 @@
|
|||||||
var modalTitulo = document.getElementById('modalTitulo');
|
var modalTitulo = document.getElementById('modalTitulo');
|
||||||
if (modalTitulo) modalTitulo.innerText = 'Comparativo: ' + titulo;
|
if (modalTitulo) modalTitulo.innerText = 'Comparativo: ' + titulo;
|
||||||
|
|
||||||
// Dibujar gráfica
|
// Obtener el tipo de gráfica seleccionado
|
||||||
Highcharts.chart('chartContainer', {
|
var $ddl = $('[id$="ddlTipoGrafica"]');
|
||||||
chart: { type: 'line' },
|
var tipoGrafica = $ddl.length > 0 ? $ddl.val() : 'line';
|
||||||
title: { text: titulo }, // Usar el título dinámico
|
|
||||||
xAxis: {
|
// Configuración base de Highcharts
|
||||||
|
var config = {
|
||||||
|
title: { text: titulo },
|
||||||
|
series: series
|
||||||
|
};
|
||||||
|
|
||||||
|
// Configuración específica para cada tipo de gráfica
|
||||||
|
if (tipoGrafica === 'line') {
|
||||||
|
config.chart = { type: 'line' };
|
||||||
|
config.xAxis = {
|
||||||
categories: categorias,
|
categories: categorias,
|
||||||
title: { text: 'Categoría' } // Título genérico para el eje X
|
title: { text: 'Categoría' }
|
||||||
},
|
};
|
||||||
yAxis: {
|
config.yAxis = {
|
||||||
title: { text: 'Monto (MXN)' },
|
title: { text: 'Monto (MXN)' },
|
||||||
labels: {
|
labels: {
|
||||||
formatter: function () {
|
formatter: function () {
|
||||||
return '$' + Highcharts.numberFormat(this.value, 0);
|
return '$' + Highcharts.numberFormat(this.value, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
tooltip: {
|
config.tooltip = {
|
||||||
headerFormat: '<b>{series.name}</b><br />',
|
headerFormat: '<b>{series.name}</b><br />',
|
||||||
pointFormat: 'Categoría: <b>{point.category}</b><br />Valor: <b>${point.y:,.2f}</b>'
|
pointFormat: 'Categoría: <b>{point.category}</b><br />Valor: <b>${point.y:,.2f}</b>'
|
||||||
},
|
};
|
||||||
plotOptions: {
|
config.plotOptions = { series: { marker: { enabled: true } } };
|
||||||
series: { marker: { enabled: true } }
|
} else if (tipoGrafica === 'pie') {
|
||||||
},
|
config.chart = { type: 'pie' };
|
||||||
series: series
|
config.plotOptions = {
|
||||||
});
|
pie: {
|
||||||
|
allowPointSelect: true,
|
||||||
|
cursor: 'pointer',
|
||||||
|
dataLabels: {
|
||||||
|
enabled: true,
|
||||||
|
format: '<b>{point.name}</b>: {point.percentage:.1f}%'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
config.tooltip = {
|
||||||
|
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
|
||||||
|
};
|
||||||
|
|
||||||
|
// Para gráfica de pastel, usar solo la primera serie seleccionada
|
||||||
|
if (series.length > 0) {
|
||||||
|
var firstSeries = series[0];
|
||||||
|
console.log('Primera serie para pastel:', firstSeries);
|
||||||
|
|
||||||
|
var pieData = categorias.map(function (categoria, index) {
|
||||||
|
return {
|
||||||
|
name: categoria,
|
||||||
|
y: firstSeries.data[index]
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('Datos del pastel:', pieData);
|
||||||
|
|
||||||
|
config.series = [{
|
||||||
|
name: firstSeries.name,
|
||||||
|
colorByPoint: true,
|
||||||
|
data: pieData
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dibujar gráfica
|
||||||
|
try {
|
||||||
|
Highcharts.chart('chartContainer', config);
|
||||||
|
console.log('Gráfica creada exitosamente');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Error al crear la gráfica:', error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mostrar el modal solo si no está visible
|
||||||
|
if (!$('#DivModalGrafica').hasClass('in') && !$('#DivModalGrafica').is(':visible')) {
|
||||||
|
$('#DivModalGrafica').modal('show');
|
||||||
|
}
|
||||||
|
|
||||||
$('#DivModalGrafica').modal('show');
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ Partial Class General_Dashboard
|
|||||||
|
|
||||||
Dim cellSucursal As New TableHeaderCell()
|
Dim cellSucursal As New TableHeaderCell()
|
||||||
cellSucursal.RowSpan = 2
|
cellSucursal.RowSpan = 2
|
||||||
cellSucursal.VerticalAlign = VerticalAlign.Middle
|
'cellSucursal.VerticalAlign = VerticalAlign.Middle
|
||||||
cellSucursal.Controls.Add(New LiteralControl("<span>Sucursal</span> "))
|
cellSucursal.Controls.Add(New LiteralControl("<span>Sucursal</span> "))
|
||||||
Dim hypGrafica As New HyperLink()
|
Dim hypGrafica As New HyperLink()
|
||||||
hypGrafica.NavigateUrl = "javascript:void(0);"
|
hypGrafica.NavigateUrl = "javascript:void(0);"
|
||||||
@@ -393,13 +393,13 @@ Partial Class General_Dashboard
|
|||||||
|
|
||||||
Dim cellAnio As New TableHeaderCell()
|
Dim cellAnio As New TableHeaderCell()
|
||||||
cellAnio.ColumnSpan = 2
|
cellAnio.ColumnSpan = 2
|
||||||
cellAnio.HorizontalAlign = HorizontalAlign.Center
|
'cellAnio.HorizontalAlign = HorizontalAlign.Center
|
||||||
cellAnio.Text = "Año"
|
cellAnio.Text = "Año"
|
||||||
headerRow1.Cells.Add(cellAnio)
|
headerRow1.Cells.Add(cellAnio)
|
||||||
|
|
||||||
Dim cellMes As New TableHeaderCell()
|
Dim cellMes As New TableHeaderCell()
|
||||||
cellMes.ColumnSpan = 2
|
cellMes.ColumnSpan = 2
|
||||||
cellMes.HorizontalAlign = HorizontalAlign.Center
|
'cellMes.HorizontalAlign = HorizontalAlign.Center
|
||||||
cellMes.Text = "Mes"
|
cellMes.Text = "Mes"
|
||||||
headerRow1.Cells.Add(cellMes)
|
headerRow1.Cells.Add(cellMes)
|
||||||
|
|
||||||
|
|||||||
@@ -2426,7 +2426,7 @@ Partial Class Inicio
|
|||||||
ElseIf Opcion = 5 Then
|
ElseIf Opcion = 5 Then
|
||||||
#Region "GERENTE TECNICO"
|
#Region "GERENTE TECNICO"
|
||||||
Dim CirugiasAsistidas As Integer
|
Dim CirugiasAsistidas As Integer
|
||||||
Dim MontoCirugias, TicketPromedio As Decimal
|
Dim TicketPromedio As Decimal
|
||||||
dtt = ds.Tables(0)
|
dtt = ds.Tables(0)
|
||||||
If dtt IsNot Nothing Then
|
If dtt IsNot Nothing Then
|
||||||
CirugiasAsistidas = dtt.FiltroPrimeroValor("CirugiasAsistidas").ToEntero
|
CirugiasAsistidas = dtt.FiltroPrimeroValor("CirugiasAsistidas").ToEntero
|
||||||
|
|||||||
@@ -337,6 +337,13 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="150px" HorizontalAlign="Left" />
|
<ItemStyle Width="150px" HorizontalAlign="Left" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField>
|
||||||
|
<HeaderTemplate>Días Pagados</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlDDiasPagados" Text='<%# Eval("DiasPagados")%>' runat="server"></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="150px" HorizontalAlign="Right" />
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Días IMSS</HeaderTemplate>
|
<HeaderTemplate>Días IMSS</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ public partial class Nomina_ReportedeAcumulados : ClsPaginas
|
|||||||
|
|
||||||
//string ctipo = "P";
|
//string ctipo = "P";
|
||||||
|
|
||||||
int CurrentColumn = 7;
|
int CurrentColumn = 8;
|
||||||
BoundField bf;
|
BoundField bf;
|
||||||
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ").Rows)
|
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P') AND EsPadre = 1 ").Rows)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,7 +42,10 @@ public partial class RH_CatChecadores : ClsPaginas
|
|||||||
|
|
||||||
ObjRH.Dispose();
|
ObjRH.Dispose();
|
||||||
GvDatos.DataBind();
|
GvDatos.DataBind();
|
||||||
GvDatos.HeaderRow.Cells[1].Text = LblSubProyecto.Text;
|
if(GvDatos.HeaderRow != null && GvDatos.HeaderRow.Cells.Count > 0)
|
||||||
|
{
|
||||||
|
GvDatos.HeaderRow.Cells[1].Text = LblSubProyecto.Text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CargaSubProyectos()
|
private void CargaSubProyectos()
|
||||||
|
|||||||
@@ -285,6 +285,17 @@
|
|||||||
<label class="truncate" style="padding-left: 1px;" for="<%= TxtPorMinimoUtilidad.ClientID.ToString()%>">% Minimo de utilidad:</label>
|
<label class="truncate" style="padding-left: 1px;" for="<%= TxtPorMinimoUtilidad.ClientID.ToString()%>">% Minimo de utilidad:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtPSExtranjero" TextMode="MultiLine" Rows="2" CssClass="form-control" runat="server" MaxLength="846"></asp:TextBox>
|
||||||
|
<label class="truncate" for="<%= TxtPSExtranjero.ClientID.ToString()%>">Producto Extranjero:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class=" col-md-12">
|
<div class=" col-md-12">
|
||||||
<div runat="server" id="DivCompuesto" class="form-group form-md-line-input input-iconright" visible="false">
|
<div runat="server" id="DivCompuesto" class="form-group form-md-line-input input-iconright" visible="false">
|
||||||
|
|||||||
@@ -983,6 +983,7 @@ Partial Class ProductosyServicios
|
|||||||
TxtLitraje.Text = ObjProductosServicios.DtResultados.Rows(0)("Litraje").ToString
|
TxtLitraje.Text = ObjProductosServicios.DtResultados.Rows(0)("Litraje").ToString
|
||||||
|
|
||||||
TxtPS.Text = ObjProductosServicios.PS
|
TxtPS.Text = ObjProductosServicios.PS
|
||||||
|
TxtPSExtranjero.Text = ObjProductosServicios.PSExtranjero
|
||||||
TxtPrecio.Text = ObjProductosServicios.Precio.ToString("F4") 'no usa N4, porque pone comma
|
TxtPrecio.Text = ObjProductosServicios.Precio.ToString("F4") 'no usa N4, porque pone comma
|
||||||
TxtPrecioMinimo.Text = ObjProductosServicios.PrecioMinimo.ToString("F4")
|
TxtPrecioMinimo.Text = ObjProductosServicios.PrecioMinimo.ToString("F4")
|
||||||
|
|
||||||
@@ -1577,10 +1578,12 @@ Partial Class ProductosyServicios
|
|||||||
End If
|
End If
|
||||||
If CvePS = -1 Then
|
If CvePS = -1 Then
|
||||||
Dim PSS As String = TxtPS.Text.Trim.Replace("|", "")
|
Dim PSS As String = TxtPS.Text.Trim.Replace("|", "")
|
||||||
|
Dim PSSExtranjero As String = TxtPSExtranjero.Text.Trim.Replace("|", "")
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper
|
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSSExtranjero = PSSExtranjero.ToUpper
|
||||||
If ObjProductosServicios.AddPS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS,
|
If ObjProductosServicios.AddPS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS,
|
||||||
TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True,
|
TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True,
|
||||||
ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero,
|
ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, PSSExtranjero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero,
|
||||||
FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim,
|
FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim,
|
||||||
AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
|
AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
|
||||||
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal,
|
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal,
|
||||||
@@ -1650,11 +1653,12 @@ Partial Class ProductosyServicios
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
Dim PSS As String = TxtPS.Text.Trim.Replace("|", "")
|
Dim PSS As String = TxtPS.Text.Trim.Replace("|", "")
|
||||||
|
Dim PSSExtranjero As String = TxtPSExtranjero.Text.Trim.Replace("|", "")
|
||||||
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper
|
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSS = PSS.ToUpper
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80) Then PSSExtranjero = PSSExtranjero.ToUpper
|
||||||
If ObjProductosServicios.UpdatePS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS,
|
If ObjProductosServicios.UpdatePS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtNumeroParte.Text.Trim, TxtCodigoBarras.Text.Trim, PSS,
|
||||||
TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True,
|
TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True,
|
||||||
ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
|
ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, PSSExtranjero,
|
||||||
CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim,
|
CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim,
|
||||||
AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
|
AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
|
||||||
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal,
|
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal,
|
||||||
|
|||||||
Reference in New Issue
Block a user