This commit is contained in:
2023-10-24 10:29:19 -07:00
26 changed files with 276 additions and 166 deletions

View File

@@ -1535,7 +1535,8 @@ Public Class ClsInventarios
End Function End Function
Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer, Public Function GetKardexAlmacenHorizontal(CvePS As Integer, FechaFin As Date, CveAlmacen As Integer, CveUnidadMedida As Integer, CveProveedor As Integer, CveTipoAlmacen As Integer,
IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0, IncluyeTransitorios As Integer, CveClasificacion As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CondicionExistencias As Integer = 0,
Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1", Optional GPO As Integer = 1) As Boolean Optional Orden As Integer = -1, Optional Marcas As String = "-1", Optional IncluyeProyectado As Integer = -1, Optional CveAlmacenes As String = "-1",
Optional GPO As Integer = 1, Optional CodigoPS As String = "-1") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_KardexAlmacenHorizontalGet") DataAdapter("PA_Inv_KardexAlmacenHorizontalGet")
@@ -1558,6 +1559,7 @@ Public Class ClsInventarios
.Add("@IncluyeProyectado", SqlDbType.TinyInt).Value = IncluyeProyectado .Add("@IncluyeProyectado", SqlDbType.TinyInt).Value = IncluyeProyectado
.Add("@CveAlmacenes", SqlDbType.NVarChar).Value = CveAlmacenes .Add("@CveAlmacenes", SqlDbType.NVarChar).Value = CveAlmacenes
.Add("@GPO", SqlDbType.Int).Value = GPO .Add("@GPO", SqlDbType.Int).Value = GPO
.Add("@CodigoPS", SqlDbType.VarChar).Value = CodigoPS
End With End With
@@ -5630,7 +5632,7 @@ Public Class ClsInventarios
NumPolizaSeguro As String, CveUsuario As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguroCarga As String, NumPolizaSeguro As String, CveUsuario As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguroCarga As String,
Optional CveTipoCamion As Integer = 1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "", Optional CveTipoCamion As Integer = 1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1, Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1,
Optional Marca As String = "", Optional Color As String = "") As Boolean Optional Marca As String = "", Optional Color As String = "", Optional CveChoferAsignado As Integer = -1, Optional CveRemolque1Asignado As Integer = -1, Optional CveRemolque2Asignado As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_CamionesAdd") DataAdapter("PA_Inv_CamionesAdd")
@@ -5660,6 +5662,9 @@ Public Class ClsInventarios
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@Marca", SqlDbType.VarChar).Value = Marca .Add("@Marca", SqlDbType.VarChar).Value = Marca
.Add("@Color", SqlDbType.VarChar).Value = Color .Add("@Color", SqlDbType.VarChar).Value = Color
.Add("@CveChoferAsignado", SqlDbType.Int).Value = CveChoferAsignado
.Add("@CveRemolque1Asignado", SqlDbType.Int).Value = CveRemolque1Asignado
.Add("@CveRemolque2Asignado", SqlDbType.Int).Value = CveRemolque2Asignado
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -5694,7 +5699,7 @@ Public Class ClsInventarios
NumPolizaSeguro As String, CveUsuario As Integer, CveEmpresa As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String, NumPolizaSeguro As String, CveUsuario As Integer, CveEmpresa As Integer, NombreAseguradoraMedioAmbiente As String, NumPolizaSeguroMedioAmbiente As String, NombreAseguradoraCarga As String,
NumPolizaSeguroCarga As String, Optional CveTipoCamion As Integer = -1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "", NumPolizaSeguroCarga As String, Optional CveTipoCamion As Integer = -1, Optional LongitudCaja As String = "", Optional LineaTransportacion As String = "", Optional SCAC As String = "", Optional CAAT As String = "",
Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1, Optional CveTipoRemolque As Integer = -1, Optional NumeroTrailer As String = "", Optional Estatus As Boolean = False, Optional CveProveedor As Integer = -1,
Optional Marca As String = "", Optional Color As String = "") As Boolean Optional Marca As String = "", Optional Color As String = "", Optional CveChoferAsignado As Integer = -1, Optional CveRemolque1Asignado As Integer = -1, Optional CveRemolque2Asignado As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Inv_CamionesUpdate") DataAdapter("PA_Inv_CamionesUpdate")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -5724,6 +5729,9 @@ Public Class ClsInventarios
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@Marca", SqlDbType.VarChar).Value = Marca .Add("@Marca", SqlDbType.VarChar).Value = Marca
.Add("@Color", SqlDbType.VarChar).Value = Color .Add("@Color", SqlDbType.VarChar).Value = Color
.Add("@CveChoferAsignado", SqlDbType.Int).Value = CveChoferAsignado
.Add("@CveRemolque1Asignado", SqlDbType.Int).Value = CveRemolque1Asignado
.Add("@CveRemolque2Asignado", SqlDbType.Int).Value = CveRemolque2Asignado
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -1098,6 +1098,7 @@ Public Class ClsPaginas
Application(AppNombre) = value Application(AppNombre) = value
End Set End Set
End Property End Property
Public Shared Property GlobalDTClasificacionesPresupuestos(CveEmpresa As Integer) As DataTable Public Shared Property GlobalDTClasificacionesPresupuestos(CveEmpresa As Integer) As DataTable
Get Get
Dim AppNombre As String = $"GlobalDTClasificacionesPresupuestos-{CveEmpresa}" Dim AppNombre As String = $"GlobalDTClasificacionesPresupuestos-{CveEmpresa}"
@@ -1778,7 +1779,7 @@ Public Class ClsPaginas
Application(AppNombre) = value Application(AppNombre) = value
End Set End Set
End Property End Property
Property GlobalDTInvCamiones(CveEmpresa As Integer, Optional CveCamion As Integer = -1) As DataTable Property GlobalDTInvCamiones(CveEmpresa As Integer, Optional CveCamion As Integer = -1, Optional CveTipoCamion As Integer = -1) As DataTable
Get Get
Dim AppNombre As String = $"GlobalDTInvCamiones-{CveEmpresa}" Dim AppNombre As String = $"GlobalDTInvCamiones-{CveEmpresa}"
If Application(AppNombre) Is Nothing Then If Application(AppNombre) Is Nothing Then
@@ -1788,6 +1789,7 @@ Public Class ClsPaginas
End If End If
Dim Str As New StringBuilder Dim Str As New StringBuilder
If CveCamion > 0 Then Str.AppendFormat("CveCamion = {0}", CveCamion) If CveCamion > 0 Then Str.AppendFormat("CveCamion = {0}", CveCamion)
If CveTipoCamion > 0 Then Str.AppendFormat("CveTipoCamion = {0}", CveTipoCamion)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
GlobalDTInvCamiones = Dv.ToTable GlobalDTInvCamiones = Dv.ToTable
Dv.Dispose() Dv.Dispose()
@@ -4389,9 +4391,7 @@ Public Class ClsPaginas
End If End If
Else Else
LocalStopwatch.Value.Restart() LocalStopwatch.Value.Restart()
If EsProduccion Then
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(1100)
End If
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
'If Not CType(Session("UsuarioSIG"), Usuario).SeleccionoEmpresa AndAlso Request.ServerVariables("URL") <> "/Sistemas/PopUpSeleccionarEmpresa.aspx" Then 'If Not CType(Session("UsuarioSIG"), Usuario).SeleccionoEmpresa AndAlso Request.ServerVariables("URL") <> "/Sistemas/PopUpSeleccionarEmpresa.aspx" Then
' Response.Redirect("/Sistemas/PopUpSeleccionarEmpresa.aspx") ' Response.Redirect("/Sistemas/PopUpSeleccionarEmpresa.aspx")
@@ -7883,6 +7883,11 @@ Public Class ClsPaginas
Dim Contabilizable As Boolean = True Dim Contabilizable As Boolean = True
If PorcentajePago > 1 Then PorcentajePago = 1 If PorcentajePago > 1 Then PorcentajePago = 1
''validación
If Pago.TipoPago = "I" AndAlso Pago.CveClientePago <= 0 Then
Return True
End If
Dim Concepto As String = String.Format("{0} F:{1}", VentaActual.ClienteNombre, VentaActual.SerieFolio) Dim Concepto As String = String.Format("{0} F:{1}", VentaActual.ClienteNombre, VentaActual.SerieFolio)
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(VentaActual.UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False) Dim FuncionalidadFluctuacionImpuestos As Boolean = If(VentaActual.UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
Dim tFecha As Date = Pago.Fecha Dim tFecha As Date = Pago.Fecha
@@ -8046,12 +8051,12 @@ Public Class ClsPaginas
End If End If
If Pago.CveMonedaPago > 1 Then If Pago.CveMonedaPago > 1 Then
'Agregamos la Extranjera 'Agregamos la Extranjera
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 332, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 332, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
Else Else
'Agregamos Nacional 'Agregamos Nacional
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 92, Pago.Referencia, Concepto, CveVenta:=VentaActual.CveVenta, CveCliente:=Pago.CveClientePago, CveIE:=Pago.CveIE, CveSubProyecto:=VentaActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
End If End If
End If End If
'si tiene otros gastos/ingresos 'si tiene otros gastos/ingresos
@@ -8124,7 +8129,7 @@ Public Class ClsPaginas
Public Property AplicaTraslado As Boolean = True Public Property AplicaTraslado As Boolean = True
Public Property Referencia As String Public Property Referencia As String
Public Property CveConceptoPago As Integer = -1 Public Property CveConceptoPago As Integer = -1
Public Property CveClientePago As Integer = -1
Public Property ImporteFluctuacionAdicional As Decimal = 0 Public Property ImporteFluctuacionAdicional As Decimal = 0
Public Property ValorMultiplicador As Decimal = 1 Public Property ValorMultiplicador As Decimal = 1
End Class End Class
@@ -9328,7 +9333,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx".ToUpper(), 1331) PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx".ToUpper(), 1331)
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=OP".ToUpper(), 1332) PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=OP".ToUpper(), 1332)
PaginaDict.Add("/Ventas/FacturacionAcarreos.aspx".ToUpper(), 774) PaginaDict.Add("/Ventas/FacturacionAcarreos.aspx".ToUpper(), 784)
PaginaDict.Add("/Ventas/RepIndicadoresPorProyecto.aspx".ToUpper(), 617) PaginaDict.Add("/Ventas/RepIndicadoresPorProyecto.aspx".ToUpper(), 617)

View File

@@ -412,7 +412,7 @@ Public Class ClsProductosServicios
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1, Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "") As Integer Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0) As Integer
Dim Retorno As Integer = -1 Dim Retorno As Integer = -1
DataAdapter("PA_ProductosServiciosAdd") DataAdapter("PA_ProductosServiciosAdd")
@@ -513,6 +513,8 @@ Public Class ClsProductosServicios
.Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial .Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial
.Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales .Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales
.Add("@EcommerceEtiquetas", SqlDbType.VarChar).Value = EcommerceEtiquetas .Add("@EcommerceEtiquetas", SqlDbType.VarChar).Value = EcommerceEtiquetas
.Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce
.Add("@EcommercePrecio", SqlDbType.SmallMoney).Value = EcommercePrecio
End With End With
@@ -638,7 +640,7 @@ Public Class ClsProductosServicios
Return Retorno Return Retorno
End Function End Function
Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, Codigo2 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, Codigo2 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, 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 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,
@@ -648,7 +650,7 @@ Public Class ClsProductosServicios
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0, Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1, Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "-") As Boolean Optional NombreComercial As String = "", Optional NotasAdicionales As String = "", Optional EcommerceEtiquetas As String = "", Optional ActivoEcommerce As Boolean = False, Optional EcommercePrecio As Decimal = 0) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
@@ -682,6 +684,7 @@ Public Class ClsProductosServicios
.Add("@IEPSPorcentaje", SqlDbType.SmallMoney).Value = IEPSPorcentaje .Add("@IEPSPorcentaje", SqlDbType.SmallMoney).Value = IEPSPorcentaje
.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
'Nuevo R: 26/09/2017' 'Nuevo R: 26/09/2017'
.Add("@Inventariable", SqlDbType.Bit).Value = Inventariable .Add("@Inventariable", SqlDbType.Bit).Value = Inventariable
@@ -748,6 +751,8 @@ Public Class ClsProductosServicios
.Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial .Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial
.Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales .Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales
.Add("@EcommerceEtiquetas", SqlDbType.VarChar).Value = EcommerceEtiquetas .Add("@EcommerceEtiquetas", SqlDbType.VarChar).Value = EcommerceEtiquetas
.Add("@ActivoEcommerce", SqlDbType.VarChar).Value = ActivoEcommerce
.Add("@EcommercePrecio", SqlDbType.SmallMoney).Value = EcommercePrecio
End With End With

View File

@@ -565,7 +565,7 @@ Partial Class Bancos_OtrosIE
End If End If
If TipoBeneficiario > 0 And TipoBeneficiario < 7 Then If TipoBeneficiario > 0 And TipoBeneficiario < 7 Then
If ObjColectiva.GetColectivas(CveColectiva, "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then If ObjColectiva.GetColectivas(UsuarioActual.CveEmpresa, CveColectiva:=CveColectiva) Then
If ObjColectiva.DtResultados.Rows.Count > 0 Then If ObjColectiva.DtResultados.Rows.Count > 0 Then
TxtPagueseA.Text = ObjColectiva.Colectiva TxtPagueseA.Text = ObjColectiva.Colectiva
Else Else

View File

@@ -217,7 +217,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<asp:UpdatePanel ID="UpIngresos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpIngresos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,SaldoVentas,CveMoneda,FechaDocumento" <asp:GridView ID="GvIngresos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,SaldoVentas,CveMoneda,FechaDocumento,TipoCambio"
ToolTip="Listado de Movimientos" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black"> ToolTip="Listado de Movimientos" Style="width: 100%; height: 100%; text-align: center;" GridLines="None" HeaderStyle-ForeColor="Black">
<Columns> <Columns>
<asp:TemplateField> <asp:TemplateField>

View File

@@ -1264,8 +1264,11 @@ Partial Class Bancos_PopIEVentas
CveIE = rw.DataKey("CveIE").ToEntero CveIE = rw.DataKey("CveIE").ToEntero
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.ImportePagoVenta = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal
Pago.FechaDocumentoRelacionado = rw.DataKey("Fecha").ToDate Pago.FechaDocumentoRelacionado = rw.DataKey("FechaDocumento").ToDate
Pago.CveIE = CveIE
Pago.CveClientePago = rw.DataKey("CveCliente").ToEntero
If ChkPagarPesos.Checked Then Pago.TCPago = 1 / rw.DataKey("TipoCambio").ToDecimal If ChkPagarPesos.Checked Then Pago.TCPago = 1 / rw.DataKey("TipoCambio").ToDecimal
If ChkPagarDolares.Checked Then Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal If ChkPagarDolares.Checked Then Pago.TCPago = rw.DataKey("TipoCambio").ToDecimal

View File

@@ -46,7 +46,7 @@ Partial Class Bancos_PopUpBuscarColectiva
If TxtColectiva.Text.Trim <> String.Empty Then Colectiva = TxtColectiva.Text.Trim If TxtColectiva.Text.Trim <> String.Empty Then Colectiva = TxtColectiva.Text.Trim
If TxtCodigo.Text.Trim <> String.Empty Then Codigo = TxtCodigo.Text.Trim If TxtCodigo.Text.Trim <> String.Empty Then Codigo = TxtCodigo.Text.Trim
If ObjColectiva.GetColectivas(-1, Colectiva, Codigo, DdlTipo.SelectedValue, UsuarioActual.CveEmpresa) Then If ObjColectiva.GetColectivas(UsuarioActual.CveEmpresa, Tipo:=DdlTipo.SelectedValue) Then
If ObjColectiva.DtResultados.Rows.Count > 0 Then If ObjColectiva.DtResultados.Rows.Count > 0 Then
LtlTotalRegistros.Text = ObjColectiva.DtResultados.Rows.Count.ToString.FormatoNumero(0) LtlTotalRegistros.Text = ObjColectiva.DtResultados.Rows.Count.ToString.FormatoNumero(0)

View File

@@ -79,15 +79,7 @@
<asp:RequiredFieldValidator ID="RFVTCDolares" Enabled="false" runat="server" ControlToValidate="TxtTCDolares" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTCDolares" Enabled="false" runat="server" ControlToValidate="TxtTCDolares" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="RFVTCDolares" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="RFVTCDolares" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:Label ID="LbImporteMN" Text="" ClientIDMode="Static" runat="server" /> <asp:Label ID="LbImporteMN" Text="" ClientIDMode="Static" runat="server" />
</div> </div>
<div class="col-md-5" runat="server" id="DivDolaresDolares" visible="false">
T.C:
<asp:TextBox ID="TxtTCDolaresDolares" runat="server" placeholder="Tipo de Cambio" CssClass="form-control input-sm" MaxLength="12" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
<asp:RequiredFieldValidator ID="RFVDolares" Enabled="false" runat="server" ControlToValidate="TxtTCDolaresDolares" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RFVDolares" Width="350px"></ajax:ValidatorCalloutExtender>
<asp:Label ID="LbDolaresDolares" Text="" ClientIDMode="Static" runat="server" />
</div>
<asp:Button ID="BtnCambiaTipoMoneda" Text="" OnClick="BtnCambiaTipoMoneda_Click" ClientIDMode="Static" Style="display: none;" runat="server" />
</div> </div>
<div class="row" runat="server" id="DivTarjeta" visible="false"> <div class="row" runat="server" id="DivTarjeta" visible="false">
<label class="col-xs-2 control-label">Tarjeta:</label> <label class="col-xs-2 control-label">Tarjeta:</label>

View File

@@ -294,8 +294,6 @@ Partial Class Bancos_ProveedoresAbonar
If CveMoneda = 2 Then If CveMoneda = 2 Then
ChkPagarPesos.Visible = True ChkPagarPesos.Visible = True
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4) TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
TxtTCDolaresDolares.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
DivDolaresDolares.Visible = True
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
Else Else
ChkPagarDolares.Visible = True ChkPagarDolares.Visible = True
@@ -338,10 +336,6 @@ Partial Class Bancos_ProveedoresAbonar
RegistraScript("CambiaDolaresPesos();") RegistraScript("CambiaDolaresPesos();")
End If End If
If DivDolaresDolares.Visible Then
TxtTCDolaresDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
End If
UpDatos.Update() UpDatos.Update()
End Sub End Sub
#Region " CARGA DATOS " #Region " CARGA DATOS "
@@ -728,11 +722,7 @@ Partial Class Bancos_ProveedoresAbonar
CvePrePoliza = ObjMov.AddPrePolizas("Bancos/ProveedoresAbonar", 2, ImporteSeleccionado, ImporteSeleccionado, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa)) CvePrePoliza = ObjMov.AddPrePolizas("Bancos/ProveedoresAbonar", 2, ImporteSeleccionado, ImporteSeleccionado, 1, TxtFechaDocumento.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa))
If CveMoneda = 2 Then If CveMoneda = 2 Then
If TxtTCDolares.Visible Then TipoCambio = TxtTCDolares.Text.ToDecimal
TipoCambio = TxtTCDolares.Text.ToDecimal
Else
TipoCambio = TxtTCDolaresDolares.Text.ToDecimal
End If
Else Else
If TxtTC.Visible Then If TxtTC.Visible Then
TipoCambio = TxtTC.Text.ToDecimal TipoCambio = TxtTC.Text.ToDecimal
@@ -838,15 +828,17 @@ Partial Class Bancos_ProveedoresAbonar
Pago.ImportePago = tImporteMN Pago.ImportePago = tImporteMN
Dim ImporteME As Decimal = 0 Dim ImporteME As Decimal = 0
If Pago.CveMonedaPago = 2 Then ImporteME = Pago.ImportePago If Pago.CveMonedaPago = 2 Then ImporteME = Pago.ImportePago
If Not UsaComplementariaBancos And Pago.CveMonedaPago = 2 Then If Not UsaComplementariaBancos And Pago.CveMonedaPago = 2 Then
ImporteME = tImporteMN ImporteME = tImporteMN
tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL
End If End If
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then
MsgError = "No se pudo insertar la póliza"
End If If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then
MsgError = "No se pudo insertar la póliza"
End If
If Pago.CveMonedaPago = 2 AndAlso UsaComplementariaBancos Then If Pago.CveMonedaPago = 2 AndAlso UsaComplementariaBancos Then
If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, (Pago.ImportePago * Pago.TCPago - Pago.ImportePago).RoundSQL, 204, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, ImporteME:=Pago.ImportePago, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, (Pago.ImportePago * Pago.TCPago - Pago.ImportePago).RoundSQL, 204, Referencia, ConceptoMovimiento, CveIE:=CveIE, CveProveedor:=CveProveedor, ImporteME:=Pago.ImportePago, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto) Then
@@ -1143,16 +1135,7 @@ Partial Class Bancos_ProveedoresAbonar
'recargo la moneda con la que se va a pagar 'recargo la moneda con la que se va a pagar
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta = {0}", DdlCuenta.SelectedValue)) Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta = {0}", DdlCuenta.SelectedValue))
If dr IsNot Nothing Then If dr IsNot Nothing Then
TxtFechaDocumento.Attributes.Remove("onchange")
If dr("CveMoneda").ToString.ToEntero >= 2 Then
DivDolaresDolares.Visible = True
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
BtnCambiaTipoMoneda_Click(Nothing, Nothing)
Else
DivDolaresDolares.Visible = False
TxtFechaDocumento.Attributes.Remove("onchange")
End If
UpDatos.Update() UpDatos.Update()
If ChkPagarPesos.Checked Then If ChkPagarPesos.Checked Then
@@ -1160,7 +1143,16 @@ Partial Class Bancos_ProveedoresAbonar
RegistraScript("CambiaPesosDolares();") RegistraScript("CambiaPesosDolares();")
Else Else
CveMoneda = dr("CveMoneda").ToString.ToEntero CveMoneda = dr("CveMoneda").ToString.ToEntero
RegistraScript("CambiaDolaresPesos();")
If CveMoneda = 1 Then
RegistraScript("CambiaDolaresPesos();")
End If
End If
If CveMoneda = 2 Then
DivTCDolares.Visible = True
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
End If End If
End If End If
@@ -1365,13 +1357,11 @@ Partial Class Bancos_ProveedoresAbonar
Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkPagarPesos_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagarPesos.Checked Then If ChkPagarPesos.Checked Then
DivTC.Visible = True DivTC.Visible = True
DivDolaresDolares.Visible = False
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4) TxtTC.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
Else Else
DivTC.Visible = False DivTC.Visible = False
DivDolaresDolares.Visible = True
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
TxtFechaDocumento.Attributes.Remove("onchange") TxtFechaDocumento.Attributes.Remove("onchange")
End If End If
@@ -1385,13 +1375,13 @@ Partial Class Bancos_ProveedoresAbonar
Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkPagarDolares_CheckedChanged(sender As Object, e As EventArgs)
If ChkPagarDolares.Checked Then If ChkPagarDolares.Checked Then
DivTCDolares.Visible = True DivTCDolares.Visible = True
DivDolaresDolares.Visible = False 'DivDolaresDolares.Visible = False
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);") TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4) TxtTCDolares.Text = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).FormatoNumero(4)
Else Else
DivTCDolares.Visible = False DivTCDolares.Visible = False
DivDolaresDolares.Visible = False 'DivDolaresDolares.Visible = False
CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero) CargaCuentas(DdlTipoTransaccion.SelectedValue.ToEntero)
TxtFechaDocumento.Attributes.Remove("onchange") TxtFechaDocumento.Attributes.Remove("onchange")
End If End If

View File

@@ -71,7 +71,7 @@
<asp:GridView ID="GVHuerta" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD GVCGame_TipoMaduracion mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False" <asp:GridView ID="GVHuerta" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD GVCGame_TipoMaduracion mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
DataKeyNames="CveHuerta,Huerta,CveOrigen,NombreRegistro,NumeroRegistro,CveProveedor,RazonSocial,FechaIng,Estatus,CveUsuario,Usuario,CveEmpresa,Empresa,TipoCobro,Importe,CostoXTonelada" OnRowDataBound="GvHuerta_RowDataBound"> DataKeyNames="CveHuerta,Huerta,CveOrigen,NombreRegistro,NumeroRegistro,CveProveedor,RazonSocial,FechaIng,Estatus,CveUsuario,Usuario,CveEmpresa,Empresa,TipoCobro,Importe,CostoXTonelada" OnRowDataBound="GvHuerta_RowDataBound">
<Columns> <Columns>
<asp:TemplateField HeaderText="Huerta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px"> <asp:TemplateField HeaderText="Huerta" ItemStyle-HorizontalAlign="Left" >
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblhuerta" runat="server" Text='<%# Eval("Huerta")%>'> </asp:Label> <asp:Label ID="lblhuerta" runat="server" Text='<%# Eval("Huerta")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -86,12 +86,12 @@
<asp:Label ID="lblhuerta2" runat="server" Text='<%# Eval("NombreRegistro")%>'> </asp:Label> <asp:Label ID="lblhuerta2" runat="server" Text='<%# Eval("NombreRegistro")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Número de Registro" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText="Número de Registro" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="125px">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblhuerta3" runat="server" Text='<%# Eval("NumeroRegistro")%>'> </asp:Label> <asp:Label ID="lblhuerta3" runat="server" Text='<%# Eval("NumeroRegistro")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" Visible="true" ItemStyle-Width="30%"> <asp:TemplateField HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" Visible="true" ItemStyle-Width="20%">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblrazonsocial" runat="server" Text='<%# Eval("RazonSocial")%>'> </asp:Label> <asp:Label ID="lblrazonsocial" runat="server" Text='<%# Eval("RazonSocial")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
@@ -116,7 +116,7 @@
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label> <asp:Label ID="lblestatus" runat="server" Text='<%# Eval("Estatus")%>'> </asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="FechaIng" ItemStyle-Width="150px" HeaderText="Fecha de Ingreso" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" /> <asp:BoundField DataField="FechaIng" ItemStyle-Width="80px" HeaderText="Fecha de Ing" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:d}" />
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px"> <asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="150px">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblusuario" Width="150px" CssClass="truncate" runat="server" Text='<%# Eval("Usuario")%>'> </asp:Label> <asp:Label ID="lblusuario" Width="150px" CssClass="truncate" runat="server" Text='<%# Eval("Usuario")%>'> </asp:Label>

View File

@@ -558,7 +558,7 @@ Partial Class ContabilidadC_RegPrePolizaS
Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero Dim CveConceptoContable As Integer = e.Row.DataKey("CveConceptoContable").ToEntero
If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta")) If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta"))
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 341, 342, 343, 344, 304, 272, 259) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 341, 342, 343, 344, 304, 272, 259, 287, 288) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen")) If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))

View File

@@ -7,12 +7,12 @@
<style> <style>
#chartdiv { #chartdiv {
width: 100%; width: 100%;
height: 500px; height: 400px;
} }
#chartdivgral { #chartdivgral {
width: 100%; width: 100%;
min-height: 500px; min-height: 400px;
} }
.fa.fa-bar-chart { .fa.fa-bar-chart {
@@ -145,7 +145,7 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<asp:Label Visible="false" runat="server" ID="LblVistaPorcentaje" CssClass="col-md-1">Vista Porcentaje:</asp:Label> <asp:Label Visible="false" runat="server" ID="LblVistaPorcentaje" CssClass="col-md-1">Vista %:</asp:Label>
<div class="col-md-1" runat="server" id="DVVistaPorcentaje" visible="false"> <div class="col-md-1" runat="server" id="DVVistaPorcentaje" visible="false">
<asp:DropDownList ID="DdlvistaPorcentaje" CssClass="form-control input-sm select2me" runat="server" Width="100%" > <asp:DropDownList ID="DdlvistaPorcentaje" CssClass="form-control input-sm select2me" runat="server" Width="100%" >
<asp:ListItem Selected="True" Value="1">Horizontal</asp:ListItem> <asp:ListItem Selected="True" Value="1">Horizontal</asp:ListItem>
@@ -1231,6 +1231,11 @@
<asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink> <asp:HyperLink ID="HLAnterior" runat="server" Text='<%# Eval("ImporteAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:HyperLink>
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>
<asp:TemplateField HeaderText="%" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" >
<ItemTemplate>
<asp:Label ID="LblPorcentajeAcumualdo" runat="server" Text='<%# Eval("PorcentajeAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
</ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<%--<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%> <%--<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="100px" />--%>
</Columns> </Columns>
@@ -1407,7 +1412,15 @@
</ItemTemplate> </ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" /> <ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" />
<asp:TemplateField HeaderText="%" ItemStyle-Width="30px" ItemStyle-Font-Size="10px" >
<ItemTemplate>
<asp:Label ID="LblPorcentajeAcumualdo" runat="server" Text='<%# Eval("PorcentajeAcumulado", "{0:N2}")%>' CssClass="Texto" Target="_blank"></asp:Label>
</ItemTemplate>
<ItemStyle Width="150px" HorizontalAlign="Right" />
</asp:TemplateField>
<%--<asp:BoundField HeaderText="%" DataField="PorcentajeAcumulado" DataFormatString="{0:N2}" />--%>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
@@ -1528,10 +1541,12 @@
} }
function CargaGraficaBarras() { function CargaGraficaBarras() {
let data = cdatos; let data = cdatos;
let newData = JSON.parse(JSON.stringify(data));
//newData.sort((a, b) => a.Valor - b.Valor);
var chart = AmCharts.makeChart("chartdiv", { var chart = AmCharts.makeChart("chartdiv", {
"type": "serial", "type": "serial",
"theme": "light", "theme": "light",
"dataProvider": data, "dataProvider": newData,
"startDuration": 2, "startDuration": 2,
"valueAxes": [{ "valueAxes": [{
"position": "left", "position": "left",
@@ -1565,11 +1580,21 @@
function CargaGraficaPastel() { function CargaGraficaPastel() {
let data = cdatos; let data = cdatos;
let newData = JSON.parse(JSON.stringify(data));
newData = newData.map(function (item) {
if (item.Valor < 0) {
item.Valor = Math.abs(item.Valor);
}
return item;
});
newData.sort((a, b) => b.Valor - a.Valor );
//console.log(newData);
var chart = AmCharts.makeChart("chartdiv", { var chart = AmCharts.makeChart("chartdiv", {
"type": "pie", "type": "pie",
"theme": "light", "theme": "light",
"dataProvider": "dataProvider":
data, newData,
"valueField": "Valor", "valueField": "Valor",
"titleField": "Texto", "titleField": "Texto",
"outlineAlpha": 0.4, "outlineAlpha": 0.4,
@@ -1583,11 +1608,17 @@
} }
function ADSBegin() { function ADSBegin() {
$('.DdlGrafica').on('select2:select', function (e) { $('.DdlGrafica').on('select2:select', function (e) {
var data = e.params.data; var data = e.params.data;
currentid = data.id; currentid = data.id;
if (currentid == 1) { if (currentid == 1) {
$("#chartdiv").css("height", "400px");
$("#chartdivgral").css("height", "400px");
CargaGraficaBarras(); CargaGraficaBarras();
} else { } else {
$("#chartdiv").css("height", "700px");
$("#chartdivgral").css("height", "700px");
CargaGraficaPastel(); CargaGraficaPastel();
} }
}); });
@@ -1752,7 +1783,9 @@
}); });
} }
} }
function initamgrafica() { function initamgrafica() {
AmCharts.addInitHandler(function (chart) { AmCharts.addInitHandler(function (chart) {
function handleCustomMarkerToggle(legendEvent) { function handleCustomMarkerToggle(legendEvent) {
var dataProvider = legendEvent.chart.dataProvider; var dataProvider = legendEvent.chart.dataProvider;

View File

@@ -2096,20 +2096,16 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
DtGastosSubProyectoH = DtDatosSubProyectoH.FiltraParametros("Tipo ='G' ") DtGastosSubProyectoH = DtDatosSubProyectoH.FiltraParametros("Tipo ='G' ")
DTTotalesSubProyectoH = DtDatosSubProyectoH.Clone() DTTotalesSubProyectoH = DtDatosSubProyectoH.Clone()
Dim Row As DataRow = DtIngresosSubProyectoH.NewRow Dim Row As DataRow = DtIngresosSubProyectoH.NewRow
Dim TotalActual = 0.0, TotalAnterior = 0.0 Dim TotalActual = 0.0, TotalAnterior = 0.0
Dim IndexData As Integer = 0 Dim IndexData As Integer = 0
Dim IndexGv As Integer = 1 Dim IndexGv As Integer = 1
Dim IndexMax As Integer = 1 Dim IndexMax As Integer = 1
Dim IndexSubProyecto = 0 Dim IndexSubProyecto = 0
Dim IndexSubProyectoMax As Integer = DTSubProyectosCabecerasH.Rows.Count - 1 Dim IndexSubProyectoMax As Integer = DTSubProyectosCabecerasH.Rows.Count - 1
If IndexSubProyectoMax > GvIngresosSubProyectoH.Columns.Count - 2 Then If IndexSubProyectoMax > GvIngresosSubProyectoH.Columns.Count - 2 Then
IndexSubProyectoMax = GvIngresosSubProyectoH.Columns.Count - 2 IndexSubProyectoMax = GvIngresosSubProyectoH.Columns.Count - 2
End If End If
@@ -2121,7 +2117,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
'34 '34
Dim IDX_LIMPIAR As Integer = 1 Dim IDX_LIMPIAR As Integer = 1
For IDX_LIMPIAR = 1 To GvIngresosSubProyectoH.Columns.Count - 2 For IDX_LIMPIAR = 1 To GvIngresosSubProyectoH.Columns.Count - 3
CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).DataField = Nothing CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).DataField = Nothing
CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).HeaderText = "" CType(GvIngresosSubProyectoH.Columns(IDX_LIMPIAR), BoundField).HeaderText = ""
GvIngresosSubProyectoH.Columns(IDX_LIMPIAR).Visible = False GvIngresosSubProyectoH.Columns(IDX_LIMPIAR).Visible = False
@@ -2236,13 +2232,11 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Next Next
Row.Item("Nombre") = "TOTAL INGRESOS " Row.Item("Nombre") = "TOTAL INGRESOS "
Row.Item("ImporteActual") = DtIngresosSubProyectoH.SUM("ImporteActual", "Not CtaMayor In (3,4)") 'TotalActual.ToString Row.Item("ImporteActual") = DtIngresosSubProyectoH.SUM("ImporteActual", "Not CtaMayor In (3,4)") 'TotalActual.ToString
Row.Item("PorcentajeActual") = "100.00" Row.Item("PorcentajeActual") = 100.0
Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM("ImporteAcumulado", "Not CtaMayor In (3,4)") 'TotalAnterior.ToString Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM("ImporteAcumulado", "Not CtaMayor In (3,4)") 'TotalAnterior.ToString
Row.Item("PorcentajeAcumulado") = "100.00" Row.Item("PorcentajeAcumulado") = 100.0
Row.Item("CtaMayor") = -1 Row.Item("CtaMayor") = -1
Row.Item("CountDinamico") = DtIngresosSubProyectoH.MAX("CountDinamico") Row.Item("CountDinamico") = DtIngresosSubProyectoH.MAX("CountDinamico")
CountDinamicoSubProyecto = DtIngresosSubProyectoH.MAX("CountDinamico").ToEntero CountDinamicoSubProyecto = DtIngresosSubProyectoH.MAX("CountDinamico").ToEntero
@@ -2285,7 +2279,7 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
If TotalProyectoIngreso <> 0 Or TotalProyectoEgreso <> 0 Then If TotalProyectoIngreso <> 0 Or TotalProyectoEgreso <> 0 Then
If DdlvistaPorcentaje.SelectedValue.ToEntero = 1 Then If DdlvistaPorcentaje.SelectedValue.ToEntero = 1 Then
'Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1, 3,4)") * 100 / DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = DtIngresosSubProyectoH.SUM($"[{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}]", "NOT CtaMayor in (-1, 3,4)") * 100 / DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = (TotalProyectoIngreso - TotalProyectoEgreso) * 100 / DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)") Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = (TotalProyectoIngreso - TotalProyectoEgreso) * 100 / DtIngresosSubProyectoH.SUM("ImporteAcumulado", "NOT CtaMayor in (-1,3,4)")
Else Else
Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = (TotalProyectoIngreso - TotalProyectoEgreso) * 100 / TotalProyectoIngreso Row.Item($"Porcentaje{DtIngresosSubProyectoH.Columns(IndexData).ColumnName}") = (TotalProyectoIngreso - TotalProyectoEgreso) * 100 / TotalProyectoIngreso
@@ -2299,11 +2293,15 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
End If End If
Next Next
Dim totalTemp As Decimal = DtIngresosSubProyectoH.SUMD($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)") - DtGastosSubProyectoH.SUMD($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)")
Row.Item("Nombre") = "Resultado del ejercicio" Row.Item("Nombre") = "Resultado del ejercicio"
Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)") - DtGastosSubProyectoH.SUM($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)") Row.Item("ImporteAcumulado") = DtIngresosSubProyectoH.SUM($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)") - DtGastosSubProyectoH.SUM($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)")
Row.Item("CtaMayor") = -2 Row.Item("CtaMayor") = -2
Row.Item("CountDinamico") = DtIngresosSubProyectoH.MAX("CountDinamico").ToString.ToEntero Row.Item("CountDinamico") = DtIngresosSubProyectoH.MAX("CountDinamico").ToString.ToEntero
Row.Item("PorcentajeAcumulado") = (totalTemp * 100 / DtIngresosSubProyectoH.SUMD($"ImporteAcumulado", "Not CtaMayor In (-1,3,4)"))
DTTotalesSubProyectoH.Rows.Add(Row) DTTotalesSubProyectoH.Rows.Add(Row)
End If End If
@@ -2316,6 +2314,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
GvIngresosSubProyectoH.DataBind() GvIngresosSubProyectoH.DataBind()
'GvIngresosSubProyectoH.Columns(55).Visible = True
'GvIngresosSubProyectoH.Columns(56).Visible = True
UpDatosSubProyectoH.Update() UpDatosSubProyectoH.Update()
@@ -2469,6 +2470,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
Dim lista As New List(Of Object) Dim lista As New List(Of Object)
Dim colorindex As Integer = 0 Dim colorindex As Integer = 0
For Each campo As String() In listaCampos For Each campo As String() In listaCampos
'Dim valorCampo As Decimal = If(e.Row.DBCampo(campo(0)).ToDecimal() < 0, (e.Row.DBCampo(campo(0)).ToDecimal() * -1), e.Row.DBCampo(campo(0)).ToDecimal())
lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)}) lista.Add(New With {.Texto = campo(1), .Valor = e.Row.DBCampo(campo(0)).ToDecimal(), .Color = listacolores(colorindex)})
colorindex = colorindex + 1 colorindex = colorindex + 1
If colorindex >= listacolores.Count Then If colorindex >= listacolores.Count Then
@@ -2727,3 +2731,4 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
End Class End Class

View File

@@ -17,7 +17,7 @@ Partial Class General_Colectivas
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjColectiva As New ClsGenerales Dim ObjColectiva As New ClsGenerales
If ObjColectiva.GetColectivas(-1, "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then If ObjColectiva.GetColectivas(UsuarioActual.CveEmpresa) Then
ViewState("DTColectivas") = ObjColectiva.DtResultados ViewState("DTColectivas") = ObjColectiva.DtResultados
Else Else
Me.GvDatos.DataSource = Nothing Me.GvDatos.DataSource = Nothing

View File

@@ -2,6 +2,7 @@
Option Explicit On Option Explicit On
Imports System.Data Imports System.Data
Imports System.Math Imports System.Math
Imports ClosedXML.Excel
Imports Extensiones Imports Extensiones
Imports GemBox.Spreadsheet Imports GemBox.Spreadsheet
Imports log4net.Filter Imports log4net.Filter
@@ -30,8 +31,8 @@ Partial Class General_SaldosIniciales
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String) Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
Dim dt As New DataTable Dim dt As New DataTable
Dim ErrorArchivo = False Dim ErrorArchivo As Boolean = False
Dim ErrorExcel = False Dim ErrorExcel As Boolean = False
dt = ReadExcelFile(Ruta + FileName, True) dt = ReadExcelFile(Ruta + FileName, True)
@@ -358,15 +359,15 @@ Partial Class General_SaldosIniciales
Exit Sub Exit Sub
End If End If
If Not dt.Columns(10).ColumnName = "Tamaño" Then 'If Not dt.Columns(10).ColumnName = "Tamaño" Then
Alert("El nombre de la onceava columna debe ser 'Tamaño'. Favor de corregirlo", TipoMensaje.MsgError) ' Alert("El nombre de la onceava columna debe ser 'Tamaño'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub ' Exit Sub
End If 'End If
If Not dt.Columns(11).ColumnName = "Código SAT" Then 'If Not dt.Columns(11).ColumnName = "Código SAT" Then
Alert("El nombre de la doceava columna debe ser 'Código SAT'. Favor de corregirlo", TipoMensaje.MsgError) ' Alert("El nombre de la doceava columna debe ser 'Código SAT'. Favor de corregirlo", TipoMensaje.MsgError)
Exit Sub ' Exit Sub
End If 'End If
'If Not dt.Columns(12).ColumnName = "Servicio" Then 'If Not dt.Columns(12).ColumnName = "Servicio" Then
' Alert("El nombre de la treceava columna debe ser 'Servicio'. Favor de corregirlo", TipoMensaje.MsgError) ' Alert("El nombre de la treceava columna debe ser 'Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
@@ -641,7 +642,6 @@ Partial Class General_SaldosIniciales
dt.TableName = "Datos" dt.TableName = "Datos"
Dim NumRows As Integer = dt.Rows.Count Dim NumRows As Integer = dt.Rows.Count
@@ -712,7 +712,7 @@ Partial Class General_SaldosIniciales
Dim AplicaSerie As Boolean = If(Row("AplicaSerie").ToString().Trim.ToUpper.Contiene("1", "SI"), True, False) Dim AplicaSerie As Boolean = If(Row("AplicaSerie").ToString().Trim.ToUpper.Contiene("1", "SI"), True, False)
Dim Precio As Double = Row("Precio").ToString().ToDouble Dim Precio As Double = Row("Precio").ToString().ToDouble
Dim IEPS As Decimal = Row("IEPS").ToString().ToDecimal Dim IEPS As Decimal = Row("IEPS").ToString().ToDecimal
Dim Tamaño As String = Row("Tamaño").ToString().Trim Dim Tamaño As String = If(Row.Table.Columns.Contains("Tamaño"), Row("Tamaño").ToString().Trim, "")
Dim SATClavePS As String = Row("Código SAT").ToString().Trim Dim SATClavePS As String = Row("Código SAT").ToString().Trim
Dim Clasificacion2 As String = If(dt.Columns.Contains("Servicio"), Row("Servicio").ToString().Trim, "") Dim Clasificacion2 As String = If(dt.Columns.Contains("Servicio"), Row("Servicio").ToString().Trim, "")
@@ -843,7 +843,7 @@ Partial Class General_SaldosIniciales
'If Not CveClasificacion2 > 0 AndAlso Clasificacion2 <> "" Then Alert("No se encontró la Serie: " + Clasificacion2, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For 'If Not CveClasificacion2 > 0 AndAlso Clasificacion2 <> "" Then Alert("No se encontró la Serie: " + Clasificacion2, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
If CvePS > 0 Then If CvePS > 0 Then
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, -1, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, -1, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, UsuarioActual.CveEmpresa,
CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño, CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveTamaño:=CveTamaño, AplicaSerie:=AplicaSerie, CveObjetoImpuesto:=2) Then CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveTamaño:=CveTamaño, AplicaSerie:=AplicaSerie, CveObjetoImpuesto:=2) Then
'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS, 'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
@@ -1209,25 +1209,26 @@ Partial Class General_SaldosIniciales
Dim sbErrores As New StringBuilder Dim sbErrores As New StringBuilder
Dim CveCuentaContable As Integer
If dt.Columns.Contains("CuentaContable") Then
For Each Row As DataRow In dt.Rows
For Each Row As DataRow In dt.Rows Dim RazonSocial As String = Row("RazonSocial").ToString()
Dim CuentaContable As String = Row("CuentaContable").ToString().Trim.Replace("-", "").Replace(" ", "")
Dim RazonSocial As String = Row("RazonSocial").ToString() If CuentaContable.Length > 0 Then
Dim CuentaContable As String = Row("CuentaContable").ToString().Trim.Replace("-", "").Replace(" ", "") CveCuentaContable = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
If CuentaContable.Length > 0 Then If CveCuentaContable > 0 Then
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero() Row("CveCuentaContable") = CveCuentaContable
Else
If CveCuentaContable > 0 Then sbErrores.AppendLine($"Cliente {RazonSocial} cuenta {CuentaContable} no encontrada.<br>")
Row("CveCuentaContable") = CveCuentaContable ErrorClientes = True
Else End If
sbErrores.AppendLine($"Cliente {RazonSocial} cuenta {CuentaContable} no encontrada.<br>")
ErrorClientes = True
End If End If
End If Next
Next
End If
If Not ErrorClientes Then If Not ErrorClientes Then
dt.AcceptChanges() dt.AcceptChanges()
@@ -1249,7 +1250,8 @@ Partial Class General_SaldosIniciales
Dim RazonSocial As String = Row("RazonSocial").ToString() Dim RazonSocial As String = Row("RazonSocial").ToString()
Dim RFC As String = Row("RFC").ToString().Trim Dim RFC As String = Row("RFC").ToString().Trim
Dim Calle As String = Row("Calle").ToString() Dim Calle As String = Row("Calle").ToString()
Dim NumExt As Decimal = Row("Número exterior").ToString().ToDecimal Dim NumExt As String = Row("Número exterior").ToString()
Dim NumInt As String = If(dt.Columns.Contains("Número interior"), Row("Número interior").ToString(), "")
Dim Colonia As String = Row("Colonia").ToString() Dim Colonia As String = Row("Colonia").ToString()
Dim CodigoPostal As String = Row("Código Postal").ToString() Dim CodigoPostal As String = Row("Código Postal").ToString()
Dim Poblacion As String = Row("Población").ToString() Dim Poblacion As String = Row("Población").ToString()
@@ -1278,8 +1280,17 @@ Partial Class General_SaldosIniciales
Dim CobranzaContacto As String = If(dt.Columns.Contains("Encargado Pagoa"), Row("Encargado Pago").ToString(), "") Dim CobranzaContacto As String = If(dt.Columns.Contains("Encargado Pagoa"), Row("Encargado Pago").ToString(), "")
Dim CobranzaTelefono As String = Row("Celular Contacto").ToString().Replace("-", "").Replace(" ", "").Replace("(", "").Replace(")", "") Dim CobranzaTelefono As String = Row("Celular Contacto").ToString().Replace("-", "").Replace(" ", "").Replace("(", "").Replace(")", "")
Dim CveUsoCFDI As Integer = If(Row("UsoCFDI").ToString() = "", -1, GlobalDTSATUsosCFDI().FiltroPrimeroValor("CveUsoCFDI", String.Format("UsoCFDI = '{0}'", Row("UsoCFDI").ToString())).ToEntero()) Dim CveUsoCFDI As Integer = If(Row("UsoCFDI").ToString() = "", -1, GlobalDTSATUsosCFDI().FiltroPrimeroValor("CveUsoCFDI", String.Format("UsoCFDI = '{0}'", Row("UsoCFDI").ToString())).ToEntero())
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString().ToEntero() Dim CuentaContable As String = If(dt.Columns.Contains("CuentaContable"), Row("CuentaContable").ToString(), "")
' CobranzaContacto = Regex.Replace(CobranzaContacto, "[^0-9]", "") CuentaContable = CuentaContable.Trim.Replace("-", "").Replace(" ", "")
If CuentaContable.Length > 0 Then
CveCuentaContable = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
If CveCuentaContable <= 0 Then
sbErrores.AppendLine($"Cliente {RazonSocial} cuenta {CuentaContable} no encontrada.<br>")
ErrorClientes = True
End If
End If
'Telefono 'Telefono
@@ -1380,7 +1391,7 @@ Partial Class General_SaldosIniciales
Else Else
Dim CveSATEstado As Integer = GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveSATEstado", String.Format(" NombreEstado ='{0}'", Estado.ToUpper)).ToEntero() Dim CveSATEstado As Integer = GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveSATEstado", String.Format(" NombreEstado ='{0}'", Estado.ToUpper)).ToEntero()
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString(), "", Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, "", "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, PlazoCobranza, -1, If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString(), NumInt, Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, "", "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, PlazoCobranza, -1,
"-1", "-1", "-1", Codigo, LimiteCredito, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado, "-1", "-1", "-1", Codigo, LimiteCredito, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado,
BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado, CveAdminTrayecto:=0) Then BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado, CveAdminTrayecto:=0) Then
@@ -1440,8 +1451,8 @@ Partial Class General_SaldosIniciales
Dim CveCompra As Integer Dim CveCompra As Integer
Dim Contador As Integer = 0 Dim Contador As Integer = 0
Dim ExisteCompra As Boolean = False Dim ExisteCompra As Boolean = False
Dim DtProveedores = New DataTable Dim DtProveedores As New DataTable
Dim NoEncontrados = 0 Dim NoEncontrados As Integer = 0
Dim Encontrados As Integer = 0 Dim Encontrados As Integer = 0
DtProveedores = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) DtProveedores = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
Dim RFC As String = "" Dim RFC As String = ""
@@ -1593,7 +1604,7 @@ Partial Class General_SaldosIniciales
Dim ObjIE As New ClsBancos(ObjVentas.IniciaTransacSQL()) Dim ObjIE As New ClsBancos(ObjVentas.IniciaTransacSQL())
Dim ErrorVentas As Boolean = False Dim ErrorVentas As Boolean = False
Dim CveVenta As Integer Dim CveVenta As Integer
Dim DtClientes = New DataTable Dim DtClientes As New DataTable
'Dim ExisteVenta As Boolean = False 'Dim ExisteVenta As Boolean = False
'Dim Contador As Integer = 0 'Dim Contador As Integer = 0
DtClientes = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1) DtClientes = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1)
@@ -1644,6 +1655,18 @@ Partial Class General_SaldosIniciales
Dim Folio2 As String = "" ' Row("Folio2").ToString() Dim Folio2 As String = "" ' Row("Folio2").ToString()
Dim CodCliente As String = "" 'Row("CodCliente2").ToString() Dim CodCliente As String = "" 'Row("CodCliente2").ToString()
If dt.Columns.Contains("Cliente Sucursal") AndAlso Row("Cliente Sucursal").ToString() <> "" Then
Dim ObjCliente As New ClsClientes
If ObjCliente.GetSucursales(CveCliente) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
CveClienteSucursal = ObjCliente.DtResultados.FiltroPrimeroValor("CveClienteSucursal", "SucursalCliente = '" & Row("Cliente Sucursal").ToString().Trim & "'").ToEntero
End If
End If
ObjCliente.Dispose()
End If
'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For 'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESO", "INGRESOS", "ING"), "Ing", IIf(TipoDocto.ToUpper.Contiene("EGRESO", "EGRESOS", "EGS"), "Egs", "Rem")).ToString() TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESO", "INGRESOS", "ING"), "Ing", IIf(TipoDocto.ToUpper.Contiene("EGRESO", "EGRESOS", "EGS"), "Egs", "Rem")).ToString()
@@ -1986,7 +2009,7 @@ Partial Class General_SaldosIniciales
Exit For Exit For
End If End If
Dim IdNew = ObjConta.AddCuenta(Cuenta.Replace("-", ""), NombreCuenta, TipoCuenta, 1, 0, 1, 0, "", 0, CveCuentaPadre, AgrupadorSAT.ToEntero()) Dim IdNew As Integer = ObjConta.AddCuenta(Cuenta.Replace("-", ""), NombreCuenta, TipoCuenta, 1, 0, 1, 0, "", 0, CveCuentaPadre, AgrupadorSAT.ToEntero())
If IdNew > 0 Then If IdNew > 0 Then
ContadorUpdate = ContadorUpdate + 1 ContadorUpdate = ContadorUpdate + 1
Else Else
@@ -2059,7 +2082,7 @@ Partial Class General_SaldosIniciales
CveCuentaPadre = -2 CveCuentaPadre = -2
End If End If
Dim IdNew = ObjConta.AddCuenta(CveCuentaPadre, Cuenta.Replace("-", ""), NombreCuenta, TipoCuenta, 1, 1, CveEmpresaParam:=UsuarioActual.CveEmpresa, CveAgrupadorSAT:=CveAgrupadorSAT) Dim IdNew As Integer = ObjConta.AddCuenta(CveCuentaPadre, Cuenta.Replace("-", ""), NombreCuenta, TipoCuenta, 1, 1, CveEmpresaParam:=UsuarioActual.CveEmpresa, CveAgrupadorSAT:=CveAgrupadorSAT)
If IdNew > 0 Then If IdNew > 0 Then
ContadorUpdate = ContadorUpdate + 1 ContadorUpdate = ContadorUpdate + 1
Else Else
@@ -2471,7 +2494,7 @@ Partial Class General_SaldosIniciales
'End If 'End If
Dim CveClasificaionTemp = DTClasificaiones.FiltroPrimeroValor("CveClasificacion", $"Clasificacion='{Clasificacion}'").ToEntero() Dim CveClasificaionTemp As Integer = DTClasificaiones.FiltroPrimeroValor("CveClasificacion", $"Clasificacion='{Clasificacion}'").ToEntero()
If CveClasificaionTemp > 0 Then If CveClasificaionTemp > 0 Then
CveClasificacion = CveClasificaionTemp CveClasificacion = CveClasificaionTemp
@@ -3279,7 +3302,7 @@ Partial Class General_SaldosIniciales
If (ObjRH.TiposTrabajadorGet(-1, UsuarioActual.CveEmpresa)) Then If (ObjRH.TiposTrabajadorGet(-1, UsuarioActual.CveEmpresa)) Then
dtTipoTrabajador = ObjRH.DtResultados dtTipoTrabajador = ObjRH.DtResultados
End If End If
Dim dtpuestos = GlobalDTRHPuestos(UsuarioActual.CveEmpresa) Dim dtpuestos As DataTable = GlobalDTRHPuestos(UsuarioActual.CveEmpresa)
dtpuestos.CaseSensitive = False dtpuestos.CaseSensitive = False
If ObjRH.GetRegistrosPatronales(-1, UsuarioActual.CveEmpresa, -1) Then If ObjRH.GetRegistrosPatronales(-1, UsuarioActual.CveEmpresa, -1) Then
dtregistrospatronales = ObjRH.DtResultados dtregistrospatronales = ObjRH.DtResultados
@@ -3690,7 +3713,7 @@ Partial Class General_SaldosIniciales
End Sub End Sub
Protected Sub LnkCargaMasiva_Click(sender As Object, e As EventArgs) Protected Sub LnkCargaMasiva_Click(sender As Object, e As EventArgs)
Dim wb As ClosedXML.Excel.XLWorkbook = New ClosedXML.Excel.XLWorkbook() Dim wb As ClosedXML.Excel.XLWorkbook = New ClosedXML.Excel.XLWorkbook()
Dim libro = wb.AddWorksheet("Personal") Dim libro As IXLWorksheet = wb.AddWorksheet("Personal")
Dim crow As Integer = 1 Dim crow As Integer = 1
Dim ccol As Integer = 1 Dim ccol As Integer = 1
@@ -3698,7 +3721,7 @@ Partial Class General_SaldosIniciales
Dim rowLugarNacimiento As Integer = 1 Dim rowLugarNacimiento As Integer = 1
#Region "Regimen de contratación" #Region "Regimen de contratación"
Dim Catalogos = wb.AddWorksheet("Catalogos") Dim Catalogos As IXLWorksheet = wb.AddWorksheet("Catalogos")
crow = 1 crow = 1
ccol = 1 ccol = 1
Dim colRegimenContratacion As Integer = 1 Dim colRegimenContratacion As Integer = 1
@@ -3899,8 +3922,8 @@ Partial Class General_SaldosIniciales
#End Region #End Region
#Region "Metodo pago" #Region "Metodo pago"
Dim colmetodopago = 0 Dim colmetodopago As Integer = 0
Dim rowmetodopago = 0 Dim rowmetodopago As Integer = 0
crow = 1 crow = 1
ccol = ccol + 1 ccol = ccol + 1
Catalogos.Cell(crow, ccol).Value = "Metodo pago" Catalogos.Cell(crow, ccol).Value = "Metodo pago"
@@ -3914,12 +3937,12 @@ Partial Class General_SaldosIniciales
#End Region #End Region
#Region "subproyecto" #Region "subproyecto"
Dim colsubproyecto = 0 Dim colsubproyecto As Integer = 0
Dim rowsubproyecto = 0 Dim rowsubproyecto As Integer = 0
crow = 1 crow = 1
ccol = ccol + 1 ccol = ccol + 1
Catalogos.Cell(crow, ccol).Value = "subproyecto" Catalogos.Cell(crow, ccol).Value = "subproyecto"
Dim dtsubproyecto = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) Dim dtsubproyecto As DataTable = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1))
For Each row As DataRow In dtsubproyecto.Rows For Each row As DataRow In dtsubproyecto.Rows
crow = crow + 1 crow = crow + 1
Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveSubProyecto"), row("SubProyecto")) Catalogos.Cell(crow, ccol).Value = String.Format("{0}: {1}", row("CveSubProyecto"), row("SubProyecto"))

View File

@@ -78,6 +78,12 @@
width: 22%; width: 22%;
} }
} }
/* .trh{
max-height:31px!important;
}*/
</style> </style>
</asp:Content> </asp:Content>
@@ -195,6 +201,12 @@
</div> </div>
</div> </div>
<asp:Panel ID="pnlOrden" runat="server" CssClass="row"> <asp:Panel ID="pnlOrden" runat="server" CssClass="row">
<asp:Label runat="server" ID="Label3" Text="Producto:" class="col-md-1 truncate" />
<div class="col-md-2">
<asp:TextBox runat="server" ID="TxtPS" CssClass="form-control" Height="30px"></asp:TextBox>
</div>
<asp:Label runat="server" ID="LblOrden" class="col-md-1 truncate">Orden:</asp:Label> <asp:Label runat="server" ID="LblOrden" class="col-md-1 truncate">Orden:</asp:Label>
<div class="col-md-2"> <div class="col-md-2">
<asp:DropDownList ID="DdlOrden" runat="server" CssClass="select2me" Width="100%"> <asp:DropDownList ID="DdlOrden" runat="server" CssClass="select2me" Width="100%">
@@ -236,33 +248,43 @@
<asp:UpdatePanel ID="UpDatos" runat="server"> <asp:UpdatePanel ID="UpDatos" runat="server">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="True" data-heighterror="275"
ShowFooter="True" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Texto" CssClass="table table-striped table-hover Widthall ScrollAD" data-sort="true" GridLines="None"> <div class="row">
<div class="col-md-12">
<asp:GridView ID="GvDatos" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="True" ShowHeaderWhenEmpty="true"
CssClass="ADSCROLLER2 table table-striped table-advance table-hover " data-cols="2" data-heightmenos="300" GridLines="None" >
<Columns> <Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"> <asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="120px">
<HeaderTemplate> <HeaderTemplate>
Código Código
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<div class='truncate' style='width: 200px;'> <div class="truncate" style="min-width:120px">
<asp:Label runat="server" Text='<%# Eval("Codigo") %>' Width="100px"></asp:Label> <asp:Label runat="server" Text='<%# Eval("Codigo") %>'></asp:Label>
</div> </div>
</ItemTemplate> </ItemTemplate>
<HeaderStyle HorizontalAlign="Left" Width="120px" />
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"> <asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="250px">
<HeaderTemplate> <HeaderTemplate>
Producto Producto
</HeaderTemplate> </HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<div class='truncate' style='width: 200px;'> <div class="truncate" style="min-width:250px">
<asp:Label runat="server" Text='<%# Eval("PS") %>' Width="250px"></asp:Label> <asp:Label runat="server" Text='<%# Eval("PS") %>'></asp:Label>
</div> </div>
</ItemTemplate> </ItemTemplate>
<HeaderStyle HorizontalAlign="Left" Width="250px" />
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
<RowStyle Height="31" />
</asp:GridView> </asp:GridView>
</div>
</div>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id="DivProyeccion" class="modal ADS fade" role="dialog"> <div id="DivProyeccion" class="modal ADS fade" role="dialog">

View File

@@ -155,7 +155,7 @@ Partial Class Inventarios_KardexAlmacen
If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios, If ObjMovimientos.GetKardexAlmacenHorizontal(CvePS, FechaF, -1, DdlUnidadMedida.SelectedValue.ToEntero, CveProveedorCompra, DdlTipoAlmacen.SelectedValue.ToEntero(), IncluyeTransitorios,
DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CondicionExistencias:=DdlExistencia.SelectedValue.ToEntero,
Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO) Then Orden:=DdlOrden.SelectedValue.ToEntero(), Marcas:=Marcas, IncluyeProyectado:=DdlProyeccionFiltro.SelectedValue.ToEntero, CveAlmacenes:=CveAlmacenes, GPO:=GPO, CodigoPS:=TxtPS.Text) Then
If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then If ObjMovimientos.DtResultados IsNot Nothing AndAlso ObjMovimientos.DtResultados.Rows.Count > 0 Then
dt = ObjMovimientos.DtResultados dt = ObjMovimientos.DtResultados
Dim ListaBorrar As New List(Of DataColumn) Dim ListaBorrar As New List(Of DataColumn)
@@ -203,6 +203,9 @@ Partial Class Inventarios_KardexAlmacen
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
End If End If
'e.Row.Attributes.Add("style", " max-height:31px!important")
e.Row.HorizontalAlign = HorizontalAlign.Right e.Row.HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left

View File

@@ -232,7 +232,7 @@ Partial Class OC_CotizacionEnLinea
ElseIf objCotizacion.CveColectiva > 0 Then ElseIf objCotizacion.CveColectiva > 0 Then
Dim objColectiva As New ClsGenerales Dim objColectiva As New ClsGenerales
If objColectiva.GetColectivas(CveColectiva, "-1", "-1", "1", CveEmpresa) Then If objColectiva.GetColectivas(CveEmpresa, CveColectiva:=CveColectiva) Then
If objColectiva.DtResultados.Rows.Count > 0 Then If objColectiva.DtResultados.Rows.Count > 0 Then
lblProveedor.Text = objColectiva.DtResultados.Rows(0)("Colectiva").ToString lblProveedor.Text = objColectiva.DtResultados.Rows(0)("Colectiva").ToString
End If End If
@@ -293,7 +293,7 @@ Partial Class OC_CotizacionEnLinea
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
Dim objCotizacion As New ClsOC Dim objCotizacion As New ClsOC
objCotizacion.IniciaTransacSQL() objCotizacion.IniciaTransacSQL()
Dim TieneError = False Dim TieneError As Boolean = False
If objCotizacion.UpdateCotizacion(CveProveedor, CveColectiva, TxtFolio.Text, ClsPaginas.NowADS().ToShortDateString(), IO.Path.GetExtension(FUArchivo.FileName), ddlMoneda.SelectedValue.ToEntero, TxtDiasCredito.Text.ToEntero, 0, CveCotizacion) Then If objCotizacion.UpdateCotizacion(CveProveedor, CveColectiva, TxtFolio.Text, ClsPaginas.NowADS().ToShortDateString(), IO.Path.GetExtension(FUArchivo.FileName), ddlMoneda.SelectedValue.ToEntero, TxtDiasCredito.Text.ToEntero, 0, CveCotizacion) Then
@@ -364,7 +364,7 @@ Partial Class OC_CotizacionEnLinea
Dim strBody As New StringBuilder Dim strBody As New StringBuilder
If objCotizacion.GetOC(CveOrdenCompra, CveEmpresa) Then If objCotizacion.GetOC(CveOrdenCompra, CveEmpresa) Then
Dim Folio = "", Descripcion = "", Justificacion = "", Estatus = "", Empresa = "", FechaEstimadaEntrega = "" Dim Folio As String = "", Descripcion As String = "", Justificacion As String = "", Estatus As String = "", Empresa As String = "", FechaEstimadaEntrega As String = ""
Folio = objCotizacion.Folio.ToString Folio = objCotizacion.Folio.ToString
Descripcion = objCotizacion.Descripcion Descripcion = objCotizacion.Descripcion

View File

@@ -86,7 +86,7 @@ Partial Class OC_CotizacionEnvio
Protected Sub CargaColectivas() Protected Sub CargaColectivas()
Dim objColectiva As New ClsGenerales Dim objColectiva As New ClsGenerales
If objColectiva.GetColectivas(-1, "-1", "-1", "1", UsuarioActual.CveEmpresa) Then If objColectiva.GetColectivas(UsuarioActual.CveEmpresa, -1) Then
DtColectivas = objColectiva.DtResultados DtColectivas = objColectiva.DtResultados
ddlColectiva.DataSource = DtColectivas ddlColectiva.DataSource = DtColectivas
@@ -272,7 +272,7 @@ Partial Class OC_CotizacionEnvio
If TieneError = False Then If TieneError = False Then
Dim Body As String Dim Body As String
For i = 0 To Correo.Count - 1 For i As Integer = 0 To Correo.Count - 1
'Dim Body As String = GeneraCorreo(objCotizacion.CveCotizacion, objCotizacion) 'Dim Body As String = GeneraCorreo(objCotizacion.CveCotizacion, objCotizacion)
Body = GeneraCorreo(OrdenCotizacion(i), objCotizacion) Body = GeneraCorreo(OrdenCotizacion(i), objCotizacion)

View File

@@ -66,10 +66,10 @@ public class TareasJam : IHttpHandler
DataTable DTClientes = new DataTable(); DataTable DTClientes = new DataTable();
DataTable DTAlmacenes = new DataTable(); DataTable DTAlmacenes = new DataTable();
string RutaProductos = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Productos{NowADS().ToString("yyyyMMdd")}.xlsx"; string RutaProductos = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Productos{ClsPaginas.NowADS().ToString("yyyyMMdd")}.xlsx";
string RutaVentas = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Ventas{NowADS().ToString("yyyyMMdd")}.xlsx"; string RutaVentas = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Ventas{ClsPaginas.NowADS().ToString("yyyyMMdd")}.xlsx";
string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{NowADS().ToString("yyyyMMdd")}.xlsx"; string RutaClientes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Clientes{ClsPaginas.NowADS().ToString("yyyyMMdd")}.xlsx";
string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{NowADS().ToString("yyyyMMdd")}.xlsx"; string RutaAlmacenes = $@"{ HttpContext.Current.Server.MapPath("~") }Temp\Almacenes{ClsPaginas.NowADS().ToString("yyyyMMdd")}.xlsx";
string FormatoVentas = $@"{ HttpContext.Current.Server.MapPath("~") }\TareasProgramadas\FormatosThalamus\FormatoVentas.xlsx"; string FormatoVentas = $@"{ HttpContext.Current.Server.MapPath("~") }\TareasProgramadas\FormatosThalamus\FormatoVentas.xlsx";
@@ -543,7 +543,7 @@ public class TareasJam : IHttpHandler
ClsSisMail Correo = new ClsSisMail(); ClsSisMail Correo = new ClsSisMail();
string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx"; string Para = "julian@adssistemas.mx;rene.molina@adssistemas.mx;oscar.irigoyen@adssistemas.mx";
// string Para = "oscar.irigoyen@adssistemas.mx"; // string Para = "oscar.irigoyen@adssistemas.mx";
string Asunto = ErrorProceso ? $"Carga Layout Corteva {NowADS().ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {NowADS().ToString("yyyy-MM-dd")}"; string Asunto = ErrorProceso ? $"Carga Layout Corteva {ClsPaginas.NowADS().ToString("yyyy-MM-dd")}" : $"Carga Layout Corteva Error {ClsPaginas.NowADS().ToString("yyyy-MM-dd")}";
Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos); Correo.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Cuerpo, Archivos:ListaArchivos);
this.GuardaLog($"EjecutaThalamus: MandaCorreo() correo enviado. "); this.GuardaLog($"EjecutaThalamus: MandaCorreo() correo enviado. ");

View File

@@ -536,10 +536,11 @@
<div class="portlet-title"> <div class="portlet-title">
<div class="caption font-green"> <div class="caption font-green">
<i class="icon-briefcase font-green"></i> <i class="icon-briefcase font-green"></i>
<span class="caption-subject bold uppercase">Ecommerce</span> <span class="caption-subject bold uppercase">Ecommerce &nbsp;&nbsp;<asp:CheckBox ID="ChkActivoEcommerce" runat="server" CssClass="chksino" data-size="small" Text=" " /></span>
</div> </div>
<div class="actions"> <div class="actions">
<div class="btn-group"> <div class="btn-group">
</div> </div>
</div> </div>
</div> </div>
@@ -554,7 +555,7 @@
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtEcommerceNota" CssClass="form-control input-sm" runat="server" MaxLength="250" > <asp:TextBox ID="TxtEcommerceNota" CssClass="form-control input-sm" runat="server" MaxLength="500" Rows="2" TextMode="MultiLine" >
</asp:TextBox> </asp:TextBox>
<label for="<%= TxtEcommerceNota.ClientID.ToString()%>">Notas Adicionales:</label> <label for="<%= TxtEcommerceNota.ClientID.ToString()%>">Notas Adicionales:</label>
<i></i> <i></i>
@@ -562,11 +563,17 @@
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtEcommerceEtiquetas" CssClass="form-control input-sm" runat="server" MaxLength="200" > <asp:TextBox ID="TxtEcommerceEtiquetas" CssClass="form-control input-sm" runat="server" MaxLength="200" >
</asp:TextBox> </asp:TextBox>
<label for="<%= TxtEcommerceEtiquetas.ClientID.ToString()%>">Etiquetas:</label> <label for="<%= TxtEcommerceEtiquetas.ClientID.ToString()%>">Etiquetas:</label>
<i></i> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtEcommercePrecio" CssClass="form-control input-sm" runat="server" MaxLength="10" >
</asp:TextBox>
<label for="<%= TxtEcommercePrecio.ClientID.ToString()%>">Precio:</label>
<i></i>
</div>
</div> </div>
</div> </div>

View File

@@ -973,8 +973,11 @@ Partial Class ProductosyServicios
DdlEmpacado.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoEmpacado").ToString) DdlEmpacado.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoEmpacado").ToString)
DdlTipoOrganico.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoOrganico").ToString) DdlTipoOrganico.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoOrganico").ToString)
TxtNombreComercial.Text = ObjProductosServicios.DtResultados.Rows(0)("NombreComercial").ToString TxtNombreComercial.Text = ObjProductosServicios.DtResultados.Rows(0)("NombreComercial").ToString
ChkActivoEcommerce.Checked = ObjProductosServicios.DtResultados.Rows(0)("ActivoEcommerce").ToString = "True"
TxtEcommerceNota.Text = ObjProductosServicios.DtResultados.Rows(0)("NotasAdicionales").ToString TxtEcommerceNota.Text = ObjProductosServicios.DtResultados.Rows(0)("NotasAdicionales").ToString
TxtEcommerceEtiquetas.Text = ObjProductosServicios.DtResultados.Rows(0)("EcommerceEtiquetas").ToString TxtEcommerceEtiquetas.Text = ObjProductosServicios.DtResultados.Rows(0)("EcommerceEtiquetas").ToString
TxtEcommercePrecio.Text = ObjProductosServicios.DtResultados.Rows(0)("EcommercePrecio").ToString.ToDecimal.ToString("#,###.####")
Try Try
DdlClasificacion_SelectedIndexChanged(DdlClasificacion, Nothing) DdlClasificacion_SelectedIndexChanged(DdlClasificacion, Nothing)
@@ -1461,7 +1464,7 @@ Partial Class ProductosyServicios
CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked, CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim) > 0 Then NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim, EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal) > 0 Then
ViewState("CvePS") = ObjProductosServicios.CvePS ViewState("CvePS") = ObjProductosServicios.CvePS
For Each GVR As GridViewRow In GvImpuestosLocales.Rows For Each GVR As GridViewRow In GvImpuestosLocales.Rows
If GVR.FCCheckBox("ChkDeduccion").Checked Then If GVR.FCCheckBox("ChkDeduccion").Checked Then
@@ -1518,7 +1521,7 @@ Partial Class ProductosyServicios
If ObjProductosServicios.UpdatePS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtCodigo2.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, If ObjProductosServicios.UpdatePS(DdlClasificacion.SelectedValue.ToEntero, -1, DdlUnidadMedida.SelectedValue.ToEntero, TxtCodigo.Text.Trim, TxtCodigo2.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, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
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,
@@ -1533,7 +1536,7 @@ Partial Class ProductosyServicios
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim, CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal,
RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim) Then NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim, EcommerceEtiquetas:=TxtEcommerceEtiquetas.Text.Trim, ActivoEcommerce:=ChkActivoEcommerce.Checked, EcommercePrecio:=TxtEcommercePrecio.Text.Trim.ToDecimal) Then
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
TieneError = True TieneError = True
@@ -3131,7 +3134,7 @@ Partial Class ProductosyServicios
Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero() Dim CvePS As Integer = ObjPS.DtResultados.FiltroPrimeroValor("CvePS", String.Format(" Codigo = '{0}'", TxtCodigo.Text.Trim.ToUpper)).ToEntero()
If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtCodigo2.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, If Not ObjPS.UpdatePS(CveClasificacion, -1, CveUnidadMedida, TxtCodigo.Text.Trim, TxtCodigo2.Text.Trim, TxtCodigoBarras.Text.Trim, PSS, TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble,
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,
EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia, EsPaquete, DdlSATPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia,
AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked,
VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal,

View File

@@ -379,6 +379,11 @@
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal> <asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad AA" ItemStyle-Width="10%" Visible="false">
<ItemTemplate>
<asp:Literal ID="LtlCantidadAA" runat="server" Text='<%# Eval("CantidadAA", "{0:N0}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%"> <asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N0}") %>'></asp:Literal> <asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N0}") %>'></asp:Literal>

View File

@@ -240,6 +240,9 @@ Partial Class Ventas_RepProductosServicios
ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero) Then ServicioDomicilio:=DdlServicioDomicilio.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados
If UsuarioActual.CveEmpresa = 140 Then
GvDatos.Columns(1).Visible = True
End If
Else Else
GvDatos.DataSource = Nothing GvDatos.DataSource = Nothing
End If End If
@@ -291,13 +294,15 @@ Partial Class Ventas_RepProductosServicios
Else Else
If e.Row.DBCampo("Orden") = "" Then If e.Row.DBCampo("Orden") = "" Then
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(0).Width = Unit.Pixel(200) e.Row.Cells(0).Width = Unit.Pixel(200)
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(1).Width = Unit.Pixel(60) e.Row.Cells(1).Width = Unit.Pixel(60)
e.Row.Cells(2).Width = Unit.Pixel(90) e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(2).Width = Unit.Pixel(60)
e.Row.Cells(3).Width = Unit.Pixel(90) e.Row.Cells(3).Width = Unit.Pixel(90)
e.Row.Cells(5).Width = Unit.Pixel(80) e.Row.Cells(4).Width = Unit.Pixel(90)
e.Row.Cells(8).Width = Unit.Pixel(100) e.Row.Cells(6).Width = Unit.Pixel(80)
e.Row.Cells(9).Width = Unit.Pixel(100)
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
Css = "Totales" Css = "Totales"
ElseIf DdlGrupo.SelectedValue.Contiene("20", "21") And Not e.Row.DBCampo("CvePS").ToEntero > 0 Then ElseIf DdlGrupo.SelectedValue.Contiene("20", "21") And Not e.Row.DBCampo("CvePS").ToEntero > 0 Then
@@ -312,7 +317,7 @@ Partial Class Ventas_RepProductosServicios
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1") FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1")
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1") FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1")
Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}&EsGarantia={33}&CveCondicionesPago={34}&MostrarLitraje={35}&EsDistribuidor={36}&CveClienteSucursal={37}&CveClasificacion2={38}&ServicioDomicilio={39}", Dim Liga As String = 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}&ModalidadContable={32}&EsGarantia={33}&CveCondicionesPago={34}&MostrarLitraje={35}&EsDistribuidor={36}&CveClienteSucursal={37}&CveClasificacion2={38}&ServicioDomicilio={39}",
e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"),
e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"),
e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"), e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"),

View File

@@ -233,6 +233,7 @@
<Columns> <Columns>
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion,CveMarca,CveCategoria" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}" /> <asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion,CveMarca,CveCategoria" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" /> <asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="%" DataField="ProcentajeVentas" DataFormatString="{0:N2}" ItemStyle-Width="30px" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" /> <asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificación" DataField="Bonificacion" DataFormatString="{0:N2}" /> <asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificación" DataField="Bonificacion" DataFormatString="{0:N2}" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Costo" DataField="Costo" DataFormatString="{0:N2}" /> <asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Costo" DataField="Costo" DataFormatString="{0:N2}" />

View File

@@ -252,7 +252,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria")) e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria"))
e.Row.Cells(0).Text = String.Format("<a class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.Cells(0).Text) e.Row.Cells(0).Text = String.Format("<a class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.Cells(0).Text)
Else Else
e.Row.Cells(9).BackColor = Drawing.Color.LightGray e.Row.Cells(10).BackColor = Drawing.Color.LightGray
End If End If