This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2022-02-09 07:32:06 -07:00
39 changed files with 782 additions and 481 deletions

View File

@@ -117,7 +117,7 @@ Partial Class Acumuladores_RepEntradasUsados
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim workbook As New ExcelFile()
Dim worksheet = workbook.Worksheets.Add("Sabana de ventas")
Dim worksheet = workbook.Worksheets.Add("DATOS")
worksheet.InsertDataTable(dt, New InsertDataTableOptions() With
{
.ColumnHeaders = True,
@@ -129,6 +129,10 @@ Partial Class Acumuladores_RepEntradasUsados
Dim columnCount = worksheet.CalculateMaxUsedColumns()
For i = 0 To columnCount
'COLUMNA DE FECHA
If i = 1 Then
worksheet.Columns(i).Style.NumberFormat = "dd/MM/yyyy"
End If
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
Next

View File

@@ -530,7 +530,7 @@ Public Class ClsAF
Return Retorno
End Function
Public Function UpdateActivosFijosCompra(CveActivoFijo As Integer, CveCompraDetalle As Integer, TipoAF As Integer, ValorCompra As Double, FechaCompra As Date) As Boolean
Public Function UpdateActivosFijosCompra(CveActivoFijo As Integer, CveCompraDetalle As Integer, TipoAF As Integer, ValorCompra As Double, FechaCompra As Date, Optional Opcion As Integer = 1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_AF_ActivosFijosCompraUpdate")
@@ -541,6 +541,7 @@ Public Class ClsAF
.Add("@TipoAF", SqlDbType.Int).Value = TipoAF
.Add("@ValorCompra", SqlDbType.Float).Value = ValorCompra
.Add("@FechaCompra", SqlDbType.Date).Value = FechaCompra
.Add("@Opcion", SqlDbType.Int).Value = Opcion ' Opcion 1 es la actualiacion normal , opcion 2 Desvicula los AF en base a la CveComrpaDetalle(en tabla AF_ActivosFijos pone el campo CveComrpaDetalle en null en base a CveComrpaDetalle )
End With
Try

View File

@@ -237,6 +237,31 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function UpdatePrePolizasOrdenamiento(CvePrePoliza As Integer, CveEmpresa As Integer) As Integer
FolioPoliza = -1
Dim Retorno As Integer = -1
DataAdapter("PA_Conta_PrePolizas_Ordenamiento")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePrePoliza", SqlDbType.VarChar).Value = CvePrePoliza
.Add("@CveEmpresa", SqlDbType.Bit).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Catch ex As Exception
OnError("Ocurrió un error al actualziar el ordenamientio", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
''' <summary>
''' Actualiza la IdPoliza de una PrePoliza
''' </summary>

View File

@@ -1702,7 +1702,7 @@ Public Class ClsInventarios
#Region " INVENTARIOS - REPORTES "
Public Function RepExistenciasCostos(FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProveedores As Integer, CveConcepto As Integer, CvePS As Integer, CveEmpresa As Integer, CveAlmacen As Integer, CveUsuario As Integer, Optional CveClasificacion As Integer = -1, Optional CvePersonal As Integer = -1) As Boolean
Public Function RepExistenciasCostos(FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProveedores As Integer, CveConcepto As Integer, CvePS As Integer, CveEmpresa As Integer, CveAlmacen As String, CveUsuario As Integer, Optional CveClasificacion As Integer = -1, Optional CvePersonal As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_RepExistenciasCostosGet")
With SqlAdapter.SelectCommand.Parameters
@@ -1710,7 +1710,7 @@ Public Class ClsInventarios
.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
.Add("@CveAlmacen", SqlDbType.VarChar).Value = CveAlmacen
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF

View File

@@ -1504,7 +1504,8 @@ Public Class ClsMovimientos
Optional CveBanco As Integer = -1, Optional CveCuenta As Integer = -1,
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1,
Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = MinFecha, Optional FechaAplicadoF As Date = MaxFecha,
Optional FechaRegistroIEI As Date = MinFecha, Optional FechaRegistroIEF As Date = MaxFecha) As Boolean
Optional FechaRegistroIEI As Date = MinFecha, Optional FechaRegistroIEF As Date = MaxFecha,
Optional CveCondicionesPago As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepRecuperacion")
With SqlAdapter.SelectCommand.Parameters
@@ -1528,6 +1529,7 @@ Public Class ClsMovimientos
.Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
.Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString
.Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString

View File

@@ -2042,7 +2042,9 @@ Public Class ClsPaginas
ObjVendedores.Dispose()
End If
If CveEmpresa <> -1 Then
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows)
GlobalDTVendedores = Dv.ToTable
Dv.Dispose()
Else
@@ -6582,7 +6584,7 @@ Public Class ClsPaginas
params.Add(New CrystalParametro("LogoPath", LogoRuta))
'VENDEDOR
Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
Dim RowVendedor As DataRow = GlobalDTVendedores(-1).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
If Not IsNothing(RowVendedor) Then
params.Add(New CrystalParametro("VendedorNombre", RowVendedor("Vendedor").ToString))
params.Add(New CrystalParametro("VendedorMail", RowVendedor("Correo").ToString))
@@ -7168,7 +7170,7 @@ Public Class ClsPaginas
Dim VendedorTelefono As String = ""
Dim VendedorCelular As String = ""
Dim RowVendedor As DataRow = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
Dim RowVendedor As DataRow = GlobalDTVendedores(-1).FiltroPrimero(String.Format("CveVendedor = {0}", Vta.CveVendedor.ToString))
If Not IsNothing(RowVendedor) Then
VendedorNombre = RowVendedor("Vendedor").ToString

View File

@@ -144,13 +144,14 @@ Public Class ClsVentas
End Sub
#End Region
Public Function GetVenta(CveVenta As Integer, CveEmpresa As Integer) As Boolean
Public Function GetVenta(CveVenta As Integer, CveEmpresa As Integer, Optional VerificaAlmacen As Boolean = True) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@VerificaAlmacen", SqlDbType.Bit).Value = If(VerificaAlmacen, 1, 0)
End With
Try
@@ -1630,7 +1631,7 @@ Public Class ClsVentas
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1,
Optional TipoDocto As String = "-1", Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1,
Optional CveMarca As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False,
Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1) As Boolean
Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CveClasificacion2 As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_GetRepPS")
@@ -1664,6 +1665,7 @@ Public Class ClsVentas
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
.Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
End With
@@ -1683,7 +1685,7 @@ Public Class ClsVentas
Optional TipoDocto As String = "-1", Optional GPO As Integer = -1, Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1,
Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1, Optional CveProveedorCompra As Integer = -1, Optional CveMarca As Integer = -1,
Optional CveClasificacionDetalle As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False,
Optional EsGarantia As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1) As Boolean
Optional EsGarantia As Integer = -1, Optional MostrarLitraje As Boolean = False, Optional CveCondicionesPago As Integer = -1, Optional EsDistribuidor As Integer = -1, Optional CveClasificacion2 As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_GetRepPSDetalle")
@@ -1715,11 +1717,13 @@ Public Class ClsVentas
.Add("@CveProveedorCompra", SqlDbType.Int).Value = CveProveedorCompra
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveClasificacionDetalle", SqlDbType.Int).Value = CveClasificacionDetalle
.Add("@MostrarLitraje", SqlDbType.Bit).Value = MostrarLitraje
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
.Add("@EsGarantia", SqlDbType.Int).Value = EsGarantia
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
.Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
End With
Try
@@ -1783,7 +1787,7 @@ Public Class ClsVentas
End With
Try
Dataset = New DataSet()
Dataset = New DataSet()
SqlAdapter.Fill(Dataset)
Retorno = True
Catch ex As Exception
@@ -3141,7 +3145,7 @@ Public Class ClsVentas
Else
If showalert Then
Alert("No se encontraron cancelaciones pendientes", ModExtensiones.TipoMensaje.MsgError)
Alert("No se encontraron cancelaciones pendientes", ModExtensiones.TipoMensaje.MsgAdvertencia)
End If
End If
Else
@@ -3932,48 +3936,48 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function GetRepComisionesServec(CveVendedor As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ReporteComisionesServecGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el Reporte de Comisiones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
Public Function GetRepComisionesServec(CveVendedor As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ReporteComisionesServecGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el Reporte de Comisiones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetRepComisionesServecDetalle(CveVendedor As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ReporteComisionesServecDetalleGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el Reporte de Comisiones Detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
Public Function GetRepComisionesServecDetalle(CveVendedor As Integer, FechaI As Date, FechaF As Date, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ReporteComisionesServecDetalleGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el Reporte de Comisiones Detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#End Region
@@ -4809,7 +4813,7 @@ Public Class ClsVentas
End Try
Return retorno
End Function
Public Function AddMetasVendedores(CveVendedor As Integer, MesAño As Date, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal, CveClasificacion As Integer, CveClasificacionSup As Integer) As Boolean
Public Function AddMetasVendedores(CveVendedor As Integer, MesAño As Date, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal, CveClasificacion As Integer, CveClasificacionSup As Integer, CveEmpresa As Integer) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Vta_MetasVendedoresAdd", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
@@ -4820,6 +4824,7 @@ Public Class ClsVentas
.Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveClasificacionSup", SqlDbType.Int).Value = CveClasificacionSup
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
@@ -5013,19 +5018,19 @@ Public Class ClsVentas
Return retorno
End Function
Public Function GetVentasNoEnviadas(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasNoEnviadas")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las ventas no enviadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
Public Function GetVentasNoEnviadas(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasNoEnviadas")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las ventas no enviadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#Region "Conciliación emitidas SAT"
@@ -5113,7 +5118,7 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function GetVentasGarantiaPendiente(CveVenta As Integer, CveSubProyecto As Integer, Fecha As DateTime, CveEmpresa As Integer, Optional ServicioDomicilio As Boolean = False) As Boolean
Public Function GetVentasGarantiaPendiente(CveVenta As Integer, Fecha As DateTime, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasGarantiasPendienteGet", CommandType.StoredProcedure)
@@ -5173,24 +5178,24 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function AddVentaDetalleRNCFacturada(CveVentaDetalleRNC As Integer, CveVentaDetalle As Integer, CantidadFacturada As Decimal) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentaDetalleRNCFacturadaAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVentaDetalleRNC", SqlDbType.Int).Value = CveVentaDetalleRNC
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
.Add("@CantidadFacturada", SqlDbType.Float).Value = CantidadFacturada
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un error al agregar lo facturado de la RNC.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
Public Function AddVentaDetalleRNCFacturada(CveVentaDetalleRNC As Integer, CveVentaDetalle As Integer, CantidadFacturada As Decimal) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentaDetalleRNCFacturadaAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVentaDetalleRNC", SqlDbType.Int).Value = CveVentaDetalleRNC
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
.Add("@CantidadFacturada", SqlDbType.Float).Value = CantidadFacturada
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un error al agregar lo facturado de la RNC.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetRNCRelacionadas(CveVenta As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -5298,140 +5303,140 @@ Public Class ClsVentas
#End Region
Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@Importe", SqlDbType.Money).Value = Importe
Public Function AddAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, Importe As Decimal, CveEstatus As Integer, CveUsuario As Integer, TipoAutorizacion As Integer, TipoDocumento As String, Optional DiasVencidos As Integer = 0) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@Importe", SqlDbType.Money).Value = Importe
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@TipoAutorizacion", SqlDbType.Int).Value = TipoAutorizacion
.Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento
.Add("@DiasVencidos", SqlDbType.Int).Value = DiasVencidos
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
.Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento
.Add("@DiasVencidos", SqlDbType.Int).Value = DiasVencidos
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
Public Function GetAutorizacionLimite(CveEmpresa As Integer, CveCliente As Integer, CveVendedor As Integer, TipoDocumento As String, Optional CveEstatus As Integer = -1, Optional FechaI As DateTime = MinFecha, Optional FechaF As DateTime = MaxFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@TipoDocumento", SqlDbType.VarChar).Value = TipoDocumento
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function UpdateAutorizacionLimite(CveAutorizacion As Integer, CveCliente As Integer, CveVenta As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionlimitesEstatusUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
Public Function UpdateAutorizacionLimite(CveAutorizacion As Integer, CveCliente As Integer, CveVenta As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionlimitesEstatusUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function RemoveAutorizacionLimite(CveAutorizacion As Integer, CveCliente As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
Public Function RemoveAutorizacionLimite(CveAutorizacion As Integer, CveCliente As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_AutorizacionLimitesRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveAutorizacion", SqlDbType.Int).Value = CveAutorizacion
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar los limites.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#Region "C L I E N T E S V E N D E D O R E S S U B P R O Y E C T O S"
Public Function GetClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ClientesVendedoresSubProyectosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
Public Function GetClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ClientesVendedoresSubProyectosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los vendedores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los vendedores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function AddClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ClientesVendedoresSubProyectosAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar el vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
Public Function AddClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ClientesVendedoresSubProyectosAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al agregar el vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function RemoveClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ClientesVendedoresSubProyectosRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
Public Function RemoveClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ClientesVendedoresSubProyectosRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar el vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al eliminar el vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region

View File

@@ -3920,7 +3920,7 @@ Public Class Timbrado
#Region "Timbra"
If ArchivoGenerado Then
cfdi.TimbrarCfdi(UsuarioServicio, ClaveServicio, UrlServicio, TimbraProduccion)
cfdi.TimbrarCfdi(UsuarioServicio, ClaveServicio, TimbraProduccion)
sw.Stop()
swTiempo.AppendFormat("Timbrado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)

View File

@@ -2614,7 +2614,7 @@ Partial Class Bancos_IE
End If
End If
If Opcion = "DevDinC" Then
CvePlantillaPoliza = 2
CvePlantillaPoliza = 40
End If
'Cuando es Egreso sin factura, se registra una compra tipo anticipo
@@ -3068,6 +3068,7 @@ Partial Class Bancos_IE
Dim ImporteAplicarMN = 0.0D
Dim ImporteAplicarME = 0.0D
Dim ReferenciaAplicar = ObjIE.Folio
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveSubProyecto).FiltroPrimeroValor("CveSubProyecto").ToEntero
Dim ConceptoAplicar = $"Devolución de Proveedor {PagueseA} {TxtImporte.Text} NC:{SerieFolioDeCDin}"
@@ -3398,7 +3399,7 @@ Partial Class Bancos_IE
End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, TipoCambio:=TCDocumento) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, Impo, ReferenciaAplicar, CveConcIE, ConceptoAplicar, Now, IdCtaContableAplicar, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=Impo, ImporteME:=0, TipoCambio:=TCDocumento, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
Exit Select
End If

View File

@@ -1523,7 +1523,7 @@ Partial Class Bancos_PopIEVentas
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
If UltimaFluctuacion.FechaFluctuacion < tFecha Then
If UltimaFluctuacion.FechaFluctuacion <= tFecha Then
FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion
End If

View File

@@ -929,7 +929,7 @@ Partial Class Bancos_ProveedoresAbonar
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
If UltimaFluctuacion.FechaFluctuacion < tFecha Then
If UltimaFluctuacion.FechaFluctuacion <= tFecha Then
FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion
End If

View File

@@ -233,14 +233,14 @@ Partial Class Bancos_RepEgresosSinComprobante
CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now,
"Saldo de ExC por Sistema", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, -1, -1,
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, gr.DataKey("Saldo").ToDecimal, "", CveConceptoContable, "Saldo de ExC por Sistema", Now, IdCtaContable, -1,
gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, -1, -1, gr.DataKey("CveIE").ToEntero,
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoOtIngresos, gr.DataKey("Saldo").ToDecimal, "", 78, "Saldo de ExC por Sistema", Now, UsuarioActual.Empresa.IdCuentaOtrosIngresos, -1, gr.DataKey("CveIE").ToEntero,
ImporteMX:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero) Then
MsgError = "Ocurrio un error al saldar el movimiento"
Exit For

Binary file not shown.

View File

@@ -734,7 +734,7 @@
</asp:Panel>
<asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible,DifPSSat" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn" >
<asp:GridView ID="GvPS" ShowHeader="false" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS,Cantidad,CveUM,UM,PU,Descuento,OtrosGastos,CvePresupuestoEgreso,PS,Clasificacion,CveClasificacion,CveOrdenCompraDetalle,IVA,IVAPorcentaje,RetIVAPorcentaje,RetISRPorcentaje,IEPSPSPorcentaje,Obs,Total,CveProyecto,CveSubProyecto,Proyecto,SubProyecto,Consec,CveTipoGasto,NoDeducible,DifPSSat,TipoAF" GridLines="none" BorderWidth="0" EmptyDataText="Sin Productos o Servicios agregados" CssClass="table GvPS table-striped table-hover table-advance Widthall ScrollAD mysmallbtn" >
<Columns>
<%-- 0 --%>
<asp:TemplateField ItemStyle-Width="15px">
@@ -4476,6 +4476,13 @@
<label for="<%= TxtIEPSModal.ClientID.ToString()%>">% IEPS:</label>
</div>
</div>
<div class="col-md-3" runat="server" id="DVModalAddPSChkDesvincularAF" visible="false">
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox runat="server" ID="ChkModalDesvincularAF" CssClass="form-control " />
<label for="<%= ChkModalDesvincularAF.ClientID.ToString()%>">Desvicnular A.F.:</label>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -1778,6 +1778,7 @@ Partial Class Compras_Compras
If ObjeFacturas.GetFacturasComparacionXML(Version, Xml.ToString, UsuarioActual.CveEmpresa) Then
TmpDT = ObjeFacturas.DtResultados
TmpDT.Columns.Add("CveSATPSActualizado")
'TmpDT.Columns.Add("RetIVAPorcentaje")
'TmpDT.Columns.Add("RetISRPorcentaje")
'TmpDT.Columns.Add("IEPSPSPorcentaje")
@@ -6899,7 +6900,7 @@ Partial Class Compras_Compras
Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacion69}").ToString.ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaDevolucion, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable69, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69, CveClasificacion:=CveClasificacion69) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaDevolucion, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable69, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=DiferenciaDevolucion, ImporteME:=If(tipoCambioActual = 1, 0, DiferenciaDevolucion), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69, CveClasificacion:=CveClasificacion69) Then
ErrorPrepoliza = True
End If
End If
@@ -9929,6 +9930,22 @@ Partial Class Compras_Compras
If Not TmpDT.Columns.Contains("DesvicularAF") Then
TmpDT.Columns.Add("DesvicularAF", GetType(Boolean))
End If
For Each drowAF As DataRow In TmpDT.Rows
If drowAF("DesvicularAF").ToString <> "" AndAlso Boolean.Parse(drowAF("DesvicularAF").ToString) Then
If Not ObjAF.UpdateActivosFijosCompra(-1, drowAF("CveCompraDetalle").ToString.ToEntero, -1, 0, Now, Opcion:=2) Then
Retorno = False
End If
End If
Next
'If UsuarioActual.Empresa.Funcionalidad(207) = "1" Then
If Not ActualizarPrePoliza(ObjContabilidad, ObjCompra) Then
Retorno = False
@@ -10513,6 +10530,9 @@ Partial Class Compras_Compras
tipoCambioPago = 1
End If
If ObjConta.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPrePoliza) Then
For Each Row As DataRow In ObjConta.DtResultados.Rows
@@ -17900,6 +17920,17 @@ Partial Class Compras_Compras
ChkAgregar.Checked = False
divagregrarotrops.Visible = False
DVModalAddPSChkDesvincularAF.Visible = False
Dim TipoAF As Integer = GvRow.DataKey("TipoAF").ToEntero
ChkModalDesvincularAF.Checked = False
If CveCompra > 0 AndAlso TipoAF = 2 Then
DVModalAddPSChkDesvincularAF.Visible = True
End If
UpPSS.Update()
RegistraScript("$('#divAddProducto').modal('show');")
End Sub
@@ -18297,6 +18328,38 @@ Partial Class Compras_Compras
GuardaAC()
End If
If CveCompra > 0 AndAlso ChkModalDesvincularAF.Checked Then
If Not TmpDT.Columns.Contains("DesvicularAF") Then
TmpDT.Columns.Add("DesvicularAF", GetType(Boolean))
End If
Dim CveCompraDetalleDesvicnualarAF As Integer = TmpDT.FiltroPrimeroValor("CveCompraDetalle", $"Consec={Index}").ToEntero
'If ObjAF.UpdateActivosFijosCompra(-1, CveCompraDetalleDesvicnualarAF, -1, 0, Now, Opcion:=2) Then
For Each dRow As DataRow In TmpDT.Rows
If dRow("CveCompraDetalle").ToString.ToEntero = CveCompraDetalleDesvicnualarAF Then
dRow("TipoAF") = 0
dRow("CveActivoFijo") = 0
dRow("DesvicularAF") = True
End If
Next
TmpDT.AcceptChanges()
'Else
' Retorno = False
'End If
End If
UpPS.Update()
CargaGvPersonal()

View File

@@ -981,7 +981,7 @@ Partial Class PopUpVerFactura
Dim EnvioContacto As String = ""
Dim EnvioDireccion As String = ""
Dim Guia As String = ""
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, False) Then
If ObjVentas.DtResultados.Rows.Count > 0 Then
SerieFolio = ObjVentas.DtResultados.Rows(0)("SerieFolio").ToString
PedidoContrato = ObjVentas.DtResultados.Rows(0)("PedidoContrato").ToString
@@ -1867,7 +1867,7 @@ Partial Class PopUpVerFactura
TmpDTImpuestosIVAIEPS.Columns.Add("Importe", GetType(Double))
TmpDTImpuestosIVAIEPS.Columns.Add("Orden", GetType(Integer))
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, False) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
Dim dtVentas As DataTable = ObjVentas.DtResultados
' se rellenan los campos de la factura
@@ -4878,7 +4878,7 @@ Partial Class PopUpVerFactura
Dim drv As DataRow = Nothing
Dim ObjVentas As New ClsVentas
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, False) AndAlso ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
drv = ObjVentas.DtResultados.FiltroPrimero("")
End If
ObjVentas.Dispose()

View File

@@ -1107,7 +1107,7 @@ Partial Class Compras_ReembolsosComprobaciones
'Otros Ingresos
If ChkAjusteOI.Checked Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 78, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, UsuarioActual.Empresa.IdCuentaOtrosIngresos, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If
End If

View File

@@ -493,7 +493,12 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
'DtMovimientos.DefaultView.Sort = "OrdenPP"
'DtMovimientos = DtMovimientos.DefaultView.ToTable
GvPrePoliza.DataSource = DtMovimientos
@@ -2971,23 +2976,28 @@ Partial Class ContabilidadC_RegPrePolizaS
End If
Catch ex As Exception
MsgError = "Error"
End Try
End Try
If MsgError = "" Then
If Not ObjMov.UpdatePrePolizasOrdenamiento(CvePrePoliza, UsuarioActual.CveEmpresa) Then
MsgError = "Orror al ordenar polzia"
End If
End If
If MsgError = "" Then
Alert(If(MensajeAlert.ToString = "", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")}", $"Se registro con exito. {If(FolioPoliza > 0, " Folio " & FolioPoliza & ".", "")} <br>" & MensajeAlert.ToString), TipoMensaje.MsgInformacion, $"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={CvePrePoliza}""")
ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit()
UPPDocumento.Update()
TxtConcepto.Text = ""
GvMov.DataBind()
ObjIE.Commit()
If Conta IsNot Nothing Then Conta.Commit()
UPPDocumento.Update()
TxtConcepto.Text = ""
GvMov.DataBind()
TxtFechaDocumento.Text = ""
Else

View File

@@ -2620,7 +2620,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox42</rd:DefaultName>
<Top>5.91303in</Top>
<Top>5.61303in</Top>
<Left>7.16224in</Left>
<Height>0.17708in</Height>
<Width>0.98426in</Width>
@@ -2655,7 +2655,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox42</rd:DefaultName>
<Top>6.1055in</Top>
<Top>5.8055in</Top>
<Left>7.16224in</Left>
<Height>0.17966in</Height>
<Width>0.98425in</Width>
@@ -2690,7 +2690,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox42</rd:DefaultName>
<Top>6.30449in</Top>
<Top>6.00449in</Top>
<Left>7.17266in</Left>
<Height>0.18819in</Height>
<Width>0.98425in</Width>
@@ -2726,7 +2726,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox42</rd:DefaultName>
<Top>6.51074in</Top>
<Top>6.21074in</Top>
<Left>7.17266in</Left>
<Height>0.17119in</Height>
<Width>0.98425in</Width>
@@ -2762,7 +2762,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox42</rd:DefaultName>
<Top>6.70137in</Top>
<Top>6.40137in</Top>
<Left>7.18308in</Left>
<Height>0.19596in</Height>
<Width>0.98425in</Width>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition">
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSet1">
@@ -1185,7 +1185,7 @@
<TextRun>
<Value>=Fields!Fecha.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<Format>d</Format>
<Language>es-MX</Language>
</Style>
@@ -1222,7 +1222,7 @@
<TextRun>
<Value>=Parameters!TipoPoliza.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1256,7 +1256,7 @@
<TextRun>
<Value>=Parameters!Numero.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1292,7 +1292,7 @@
<TextRun>
<Value>=Fields!ConceptoPoliza.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1331,7 +1331,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1368,7 +1368,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1405,7 +1405,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1442,7 +1442,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1482,7 +1482,7 @@
<TextRun>
<Value>=RowNumber("Fecha")</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1514,7 +1514,7 @@
<TextRun>
<Value>=Fields!Referencia.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1544,7 +1544,7 @@
<TextRun>
<Value>=Fields!Codigo.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
<Format>#-####</Format>
</Style>
</TextRun>
@@ -1575,7 +1575,7 @@
<TextRun>
<Value>=Fields!CodigoCuenta.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1611,7 +1611,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1643,7 +1643,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1673,6 +1673,7 @@
<TextRun>
<Value>=Fields!Cargo.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00;(#,0.00);''</Format>
<Language>es-MX</Language>
</Style>
@@ -1704,6 +1705,7 @@
<TextRun>
<Value>=Fields!Abono.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<Format>#,0.00;(#,0.00);''</Format>
<Language>es-MX</Language>
</Style>
@@ -1742,7 +1744,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1774,7 +1776,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1806,7 +1808,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1836,7 +1838,7 @@
<TextRun>
<Value>=Fields!Concepto.Value</Value>
<Style>
<FontSize>9pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1870,7 +1872,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1902,7 +1904,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
@@ -1934,7 +1936,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
<Language>es-MX</Language>
</Style>
</TextRun>
@@ -1967,7 +1969,7 @@
<Value />
<Style>
<FontFamily>Arial Narrow</FontFamily>
<FontSize>7pt</FontSize>
<FontSize>8pt</FontSize>
<Language>es-MX</Language>
</Style>
</TextRun>

View File

@@ -2306,7 +2306,7 @@ Partial Class Inventarios_EntregaAlmacen
' COMIENZA: GARANTIAS
If Not ErrorMovInv AndAlso TipoDocto.Contiene("Ing", "Rem") AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoMovimiento = 1 Then
Dim CveAlmacenGarantia As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
Dim CveAlmacenGarantia As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
Dim DtGarantias As DataTable = Nothing
If ObjAcumuladores.GetGarantiasDetalle(CveVentaSurtir) Then
@@ -2314,7 +2314,7 @@ Partial Class Inventarios_EntregaAlmacen
End If
If DtGarantias IsNot Nothing AndAlso DtGarantias.Rows.Count > 0 AndAlso CveAlmacenGarantia > 0 Then
CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 2, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="RE/G5")
CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 2, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="EA/G5")
FolioGarantia = ObjInventario.Folio
For Each RowGarantia As DataRow In DtGarantias.Rows
@@ -2916,7 +2916,8 @@ Partial Class Inventarios_EntregaAlmacen
Msg.AppendFormat("<br/><br/>Se agregó una guía de paquetería interna")
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDocto = "Rem" Then
'SI NO ES GARANTIA MANDA A RECIBIR AL USADO
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDocto = "Rem" AndAlso CveMovimientoGarantia <= 0 Then
Msg.AppendFormat("<br/><br/>Recibir Usado: <b><a href=""/Inventarios/RecepcionUsados.aspx?CveRemision={0}"" target=""_blank"" class=""Texto"">Ir a Recepción de Usados</a></b>", CveVentaSurtir)
End If

View File

@@ -4874,10 +4874,9 @@ Partial Class Inventarios_RecepcionAlmacen
Dim Cantidad As Double = RowExcel("Cantidad").ToString().ToDecimal()
Dim Serie As String = RowExcel("Serie").ToString()
Dim Lote As String '= RowExcel("Lote").ToString()
Dim FechaCaducidad As Date '= If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate)
Dim Observaciones As String '= If(dt.Columns.Contains("Observaciones"), RowExcel("Observaciones").ToString, "").ToString
Dim Lote As String = "" '= RowExcel("Lote").ToString()
Dim FechaCaducidad As Date = MinFecha '= If(RowExcel("FechaCaducidad").ToString = "", MinFecha, RowExcel("FechaCaducidad").ToString.ToDate)
Dim Observaciones As String = "" '= If(dt.Columns.Contains("Observaciones"), RowExcel("Observaciones").ToString, "").ToString
Dim Valido As Boolean = True

View File

@@ -240,6 +240,15 @@ Partial Class Inventarios_RecepcionUsados
ViewState("CveRemisionRecibida") = value
End Set
End Property
Private Property CargoRemisionDesdeURL As Boolean
Get
Return CBool(IfNull(ViewState("CargoRemisionDesdeURL"), False, CBool(ViewState("CargoRemisionDesdeURL"))))
End Get
Set(value As Boolean)
ViewState("CargoRemisionDesdeURL") = value
End Set
End Property
Private Property EsDistribuidor As Boolean
Get
Return CBool(IfNull(ViewState("EsDistribuidor"), False, CBool(ViewState("EsDistribuidor"))))
@@ -348,6 +357,7 @@ Partial Class Inventarios_RecepcionUsados
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
CargoRemisionDesdeURL = False
CargaInicial()
CargaRemisionFromURL()
GeneraRNCFromURL()
@@ -431,6 +441,7 @@ Partial Class Inventarios_RecepcionUsados
Dim CveRemision As Integer = IfNull(Request("CveRemision"), "-1").ToString().ToEntero()
If CveRemision > 0 Then
Me.CargoRemisionDesdeURL = True
Me.CveRemisionRecibida = CveRemision
RecibirRemision()
End If
@@ -591,14 +602,7 @@ Partial Class Inventarios_RecepcionUsados
DdlMoneda.DataSource = GlobalDTMonedas
DdlMoneda.DataBind()
Dim dtt As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen IN (22)") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
'Llenar el dropdownlist de almacén
DdlAlmacen.DataSource = dtt
'DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
'DdlAlmacen.SelectedValue = "-1"
DdlAlmacen.DataBind()
CargaAlmacen()
If IsNothing(Request("CveMovimiento")) Then
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
@@ -607,6 +611,33 @@ Partial Class Inventarios_RecepcionUsados
CargaPS()
End Sub
Private Sub CargaAlmacen(Optional CveSubProyecto As Integer = -1, Optional TipoAlmacen As Integer = 22)
DdlAlmacen.Items.Clear()
'Llenar el dropdownlist de almacén
Dim dt As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=TipoAlmacen)
If CveSubProyecto > 0 Then
dt = dt.FiltraParametros($"CveSubProyecto = {CveSubProyecto}")
End If
DdlAlmacen.DataSource = dt
DdlAlmacen.DataBind()
If Not DdlAlmacen.Items.Contains(New ListItem("Seleccione", "-1")) Then
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
If CveSubProyecto > 0 Then
Dim CveAlmacen As Integer = dt.FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto = {CveSubProyecto}").ToEntero()
If CveAlmacen > 0 Then
DdlAlmacen.SelectedValueExist(CveAlmacen)
End If
End If
dt.Dispose()
End Sub
Private Sub CargaPS()
Dim ObjAcum As New ClsAcumuladores
Dim lista As New List(Of String)
@@ -723,6 +754,8 @@ Partial Class Inventarios_RecepcionUsados
ObjFactura = Nothing
End If
DivRemisionRecibida.Visible = False
If ObjRemisionNC IsNot Nothing Then
ObjRemisionNC.Dispose()
ObjRemisionNC = Nothing
@@ -753,9 +786,7 @@ Partial Class Inventarios_RecepcionUsados
DivRegistro.Visible = False
DivTipoCambio.Visible = False
If Not DdlAlmacen.Items.Contains(New ListItem("Seleccione", "-1")) Then
DdlAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
End If
CargaAlmacen()
DdlAlmacen.SelectedValue = "-1"
If Not EsConsumoInterno Then
@@ -785,6 +816,7 @@ Partial Class Inventarios_RecepcionUsados
'CargaInicial()
UpGenerales.Update()
UpRegistroTipoCambio.Update()
UPDatos.Update()
End Sub
@@ -1162,7 +1194,7 @@ Partial Class Inventarios_RecepcionUsados
Guardar(True)
End Sub
Protected Sub Guardar(Optional GenerarRNC As Boolean = False)
Protected Sub Guardar(Optional GenerarRNC As Boolean = False, Optional RecargarPagina As Boolean = False)
If GvM.Rows.Count > 0 Then
Dim Msg As New StringBuilder()
Dim Resp As Modelos.Factura.MMensajeFactura = Nothing
@@ -1350,7 +1382,13 @@ Partial Class Inventarios_RecepcionUsados
ObjVentas.Dispose()
If Not ErrorMovInv Then
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
Dim Liga As String = ""
If RecargarPagina Then
Liga = "document.location.href=""/Inventarios/RecepcionUsados.aspx"";"
End If
Alert(Msg.ToString, TipoMensaje.MsgInformacion, JSBtnAceptar:=Liga, ShowCloseButton:=False)
End If
Else
@@ -2206,19 +2244,6 @@ Partial Class Inventarios_RecepcionUsados
Private Sub RecibirRemision()
DtMovimientos.Rows.Clear()
Dim DtUsados As DataTable = Nothing
Dim CveCliente As Integer = -1
Dim ObjVentas As New ClsVentas
If ObjVentas.GetVenta(CveRemisionRecibida, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
EsDistribuidor = CBool(ObjVentas.DtResultados.Rows(0)("EsDistribuidor").ToString())
CveCliente = ObjVentas.DtResultados.Rows(0)("CveCliente").ToString().ToEntero()
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveCliente = {0}", CveCliente))
DdlClientes.DataBind()
DdlClientes.SelectedValueExist(CveCliente)
End If
If Me.ObjFactura IsNot Nothing Then
Me.ObjFactura.Dispose()
Me.ObjFactura = Nothing
@@ -2226,54 +2251,95 @@ Partial Class Inventarios_RecepcionUsados
Me.ObjFactura = New Modelos.Factura(UsuarioActual, CveRemisionRecibida, UsuarioActual.CveEmpresa, DirectorioServidor:=ModExtensiones.DirectorioBaseEmpresas)
TxtRemisionRecibida.Text = Me.ObjFactura.SerieFolio
DivRemisionRecibida.Visible = True
If Me.ObjFactura IsNot Nothing Then
'SI ES DISTRIBUIDOR VAMOS A GENERAR LA REMISION DE NOTA DE CREDITO
If EsDistribuidor Then
DivCliente.Visible = True
DdlClientes.SelectedValueExist(CveCliente)
DdlClientes_SelectedIndexChanged(DdlClientes, EventArgs.Empty)
TxtRemisionRecibida.Text = Me.ObjFactura.SerieFolio
DivRemisionRecibida.Visible = True
If Me.ObjRemisionNC IsNot Nothing Then
Me.ObjRemisionNC.Dispose()
Me.ObjRemisionNC = Nothing
Dim DtUsados As DataTable = Nothing
Dim CveCliente As Integer = -1
Dim ObjVentas As New ClsVentas
If ObjVentas.GetVenta(CveRemisionRecibida, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
EsDistribuidor = CBool(ObjVentas.DtResultados.Rows(0)("EsDistribuidor").ToString())
CveCliente = ObjVentas.DtResultados.Rows(0)("CveCliente").ToString().ToEntero()
End If
If Me.ObjFactura IsNot Nothing Then
'CreaRemisionNC(ObjFactura.CveCliente, ObjFactura.CveSubProyecto, ObjFactura.CveMoneda)
DivTotal.Visible = True
If ObjVentas.GetVentasUsadosDetalle(CveRemisionRecibida) Then
DtUsados = ObjVentas.DtResultados.Copy()
End If
Dim RecepcionValida As Boolean = True
If ObjVentas.GetVentasUsados(ObjFactura.CveVenta, ObjFactura.CveSubProyecto, ObjFactura.Fecha, UsuarioActual.CveEmpresa, ServicioDomicilio:=ObjFactura.ServicioDomicilio) Then
If ObjVentas.DtResultados.Rows.Count = 0 Then
RecepcionValida = False
End If
End If
ObjVentas.Dispose()
If Not RecepcionValida Then
Dim Liga As String = ""
If CargoRemisionDesdeURL Then
Liga = "document.location.href=""/Inventarios/RecepcionUsados.aspx"";"
End If
Alert("La recepción del usado ya se realizó", TipoMensaje.MsgAdvertencia, JSBtnAceptar:=Liga, ShowCloseButton:=False)
Exit Sub
End If
If ObjFactura.CveSubProyecto > 0 Then
CargaAlmacen(CveSubProyecto:=ObjFactura.CveSubProyecto)
End If
If CveCliente > 0 Then
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveCliente = {0}", CveCliente))
DdlClientes.DataBind()
DdlClientes.SelectedValueExist(CveCliente)
End If
'SI ES DISTRIBUIDOR VAMOS A GENERAR LA REMISION DE NOTA DE CREDITO
If EsDistribuidor Then
DivCliente.Visible = True
DdlClientes.SelectedValueExist(CveCliente)
DdlClientes_SelectedIndexChanged(DdlClientes, EventArgs.Empty)
If Me.ObjRemisionNC IsNot Nothing Then
Me.ObjRemisionNC.Dispose()
Me.ObjRemisionNC = Nothing
End If
If Me.ObjFactura IsNot Nothing Then
'CreaRemisionNC(ObjFactura.CveCliente, ObjFactura.CveSubProyecto, ObjFactura.CveMoneda)
DivTotal.Visible = True
End If
Else
'DivCliente.Visible = False
'DivFactura.Visible = False
End If
If DtUsados IsNot Nothing Then
'DivRecepcionApartado.Visible = True
For Each RowUsado As DataRow In DtUsados.Rows
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
Dim RowPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).Rows(0)
Dim CveTamaño As Integer = RowPS("CveTamaño").ToString().ToEntero()
Dim PS As String = RowPS("PS").ToString()
Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
Dim UM As String = RowPS("UnidadMedida").ToString()
Dim Cantidad As Double = RowUsado("Cantidad").ToString().ToEntero()
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
AddNew(CvePS, PS, CveUM, UM, Cantidad, PU, "", "-1", "-1", "-1", "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", CveTamaño)
Next
End If
Else
'DivCliente.Visible = False
'DivFactura.Visible = False
End If
If ObjVentas.GetVentasUsadosDetalle(CveRemisionRecibida) Then
DtUsados = ObjVentas.DtResultados.Copy()
End If
ObjVentas.Dispose()
If DtUsados IsNot Nothing Then
'DivRecepcionApartado.Visible = True
For Each RowUsado As DataRow In DtUsados.Rows
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
Dim RowPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).Rows(0)
Dim CveTamaño As Integer = RowPS("CveTamaño").ToString().ToEntero()
Dim PS As String = RowPS("PS").ToString()
Dim CveUM As Integer = RowPS("CveUnidadMedida").ToString().ToEntero()
Dim UM As String = RowPS("UnidadMedida").ToString()
Dim Cantidad As Double = RowUsado("Cantidad").ToString().ToEntero()
Dim PU As Double = RowUsado("PU").ToString().ToDouble()
AddNew(CvePS, PS, CveUM, UM, Cantidad, PU, "", "-1", "-1", "-1", "", "", DdlAlmacen.SelectedValue.ToEntero, DdlAlmacen.SelectedItem.Text, "", CveTamaño)
Next
Alert("No se pudo recibir la remisión", TipoMensaje.MsgAdvertencia)
End If
UpGenerales.Update()
@@ -2801,8 +2867,9 @@ Partial Class Inventarios_RecepcionUsados
If DdlClientes.SelectedValue <> "-1" Then
CargaAjuste()
DivAjuste.Visible = True
DivRecepcionUsados.Visible = False
'Llenar el dropdownlist de almacén
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6)
CargaAlmacen(TipoAlmacen:=6)
CargarDescuento()
LnkAgregarUsado.Visible = False
UppAcciones.Update()
@@ -2812,8 +2879,9 @@ Partial Class Inventarios_RecepcionUsados
End If
Else
DivAjuste.Visible = False
DivRecepcionUsados.Visible = True
'Llenar el dropdownlist de almacén
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 22)
CargaAlmacen(TipoAlmacen:=22)
LnkAgregarUsado.Visible = True
UppAcciones.Update()
End If
@@ -3384,7 +3452,7 @@ Partial Class Inventarios_RecepcionUsados
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}//{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim DtDatos As New DataTable
Dim DtDatos As New DataTable
Dim params As New List(Of ReportParameter)

View File

@@ -208,7 +208,9 @@
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall ScrollAD" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall ScrollAD"
DataKeyNames="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal,Codigo,Codigo2,PS"
ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Codigo" />
<asp:HyperLinkField DataNavigateUrlFields="CvePS,CveMoneda,CveProveedor,CveConcepto,FechaI,FechaF,CveAlmacen,CvePersonal" DataNavigateUrlFormatString="~/Inventarios/RepExistenciasCostos.aspx?CvePS={0}&CveMoneda={1}&CveProveedor={2}&CveConcepto={3}&FechaI={4}&FechaF={5}&CveAlmacen={6}&CvePersonal={7}" Target="_blank" ItemStyle-Width="10%" HeaderText="Código2" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" Visible="False" DataTextField="Codigo2" />

View File

@@ -293,7 +293,13 @@ Partial Class Inventarios_ReporteEntradasSalidas
Protected Sub gvMovimientos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CvePS").ToEntero <= 0 Then
e.Row.CssClass = "Totales"
Dim Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
'e.Row.Cells(0).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={e.Row.DataKey("CvePS")}&CveMoneda={e.Row.DataKey("CveMoneda")}&CveProveedor={e.Row.DataKey("CveProveedor")}&CveConcepto={e.Row.DataKey("CveConcepto")}&FechaI={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&FechaF={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CvePersonal={e.Row.DataKey("CvePersonal")}'>{e.Row.DataKey("Codigo")}</a>"
e.Row.Cells(4).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={DdlPS.txtValue.Value}&CveMoneda={DdlMoneda.SelectedValue}&CveProveedor={DdlProveedor.txtValue.Value}&CveConcepto={DdlTipoMovimiento.SelectedValue}&FechaI={TxtFechaI.Text}&FechaF={TxtFechaF.Text}&CveAlmacen={Almacenes}&CvePersonal={DdlPersonal.SelectedValue}'>{e.Row.DataKey("PS")}</a>"
'e.Row.Cells(4).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={e.Row.DataKey("CvePS")}&CveMoneda={e.Row.DataKey("CveMoneda")}&CveProveedor={e.Row.DataKey("CveProveedor")}&CveConcepto={e.Row.DataKey("CveConcepto")}&FechaI={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&FechaF={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CvePersonal={e.Row.DataKey("CvePersonal")}'>{e.Row.DataKey("PS")}</a>"
Else
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
e.Row.Cells(13).BackColor = Drawing.Color.LightGray
@@ -306,6 +312,14 @@ Partial Class Inventarios_ReporteEntradasSalidas
e.Row.FCLabel("lbEntradaImp").Text = If(e.Row.DBCampo("EntradaImp").ToString().ToDecimal = 0, "-", e.Row.DBCampo("EntradaImp").ToDouble.ToString("N2"))
e.Row.FCLabel("lbSalidaImp").Text = If(e.Row.DBCampo("SalidaImp").ToString().ToDecimal = 0, "-", e.Row.DBCampo("SalidaImp").ToDouble.ToString("N2"))
e.Row.FCLabel("lbSaldoF2").Text = If(e.Row.DBCampo("SaldoFImp").ToString().ToDecimal = 0, "-", e.Row.DBCampo("SaldoFImp").ToDouble.ToString("N2"))
'0,1,4
End If
End If

View File

@@ -99,7 +99,7 @@
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GVDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:GridView ID="GVDatos" runat="server"
DataKeyNames="CveEntregaAlmacen,Estatus,CveCliente,CveDireccionOrigen,CveDireccionDestino,CveCamion,CveChofer,FechaEntrega,CveAlmacen,Tipo,AplicaCP,RFCReceptor,RFCEmisor,CveTimbre,CvePAC,FolioFiscal, TimbreTipoDocto,CveMovimiento,FechaLlegada,CveCamionRemolque1,CveCamionRemolque2,Distancia,ConfigCartaPorte,SerieFolio,DireccionOrigen,Direccion"
DataKeyNames="CveEntregaAlmacen,Estatus,CveCliente,CveDireccionOrigen,CveDireccionDestino,CveCamion,CveChofer,FechaEntrega,CveAlmacen,Tipo,AplicaCP,RFCReceptor,RFCEmisor,CveTimbre,CvePAC,FolioFiscal,TimbreTipoDocto,CveMovimiento,FechaLlegada,CveCamionRemolque1,CveCamionRemolque2,Distancia,ConfigCartaPorte,SerieFolio,DireccionOrigen,Direccion"
AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros con los filtros especificados" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn ScrollAD" data-sort="true" GridLines="None"
EmptyDataRowStyle-HorizontalAlign="Center" OnRowDataBound="GVDatos_RowDataBound">
<Columns>
@@ -108,17 +108,42 @@
<ItemTemplate>
<asp:Label ID="LtTipo" runat="server" Text='<%# Eval("TipoDescripcion") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="CP">
<ItemTemplate>
<asp:Literal ID="LtCP" runat="server" Text='<%# Eval("AplicaCP").ToString()=="True"?"Si":"No" %>'></asp:Literal>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" />
</asp:TemplateField>
<asp:BoundField DataField="SubProyecto" HeaderText="Sucursal" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="SubProyecto" HeaderText="Sucursal" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" >
<ItemStyle HorizontalAlign="Left" Width="15%" />
</asp:BoundField>
<asp:BoundField DataField="SerieFolio" HeaderText="Folio" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Nombre" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Chofer" HeaderText="Operador" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Unidad" HeaderText="Unidad" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="EstatusStr" HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="SerieFolio" HeaderText="Folio" ItemStyle-HorizontalAlign="Left" >
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="Nombre" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" >
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:HyperLinkField DataTextField="FolioAlmacen" HeaderText="Folio Alm" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" DataNavigateUrlFields="CveMovimiento" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Chofer" HeaderText="Operador" ItemStyle-HorizontalAlign="Left" >
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="Unidad" HeaderText="Unidad" ItemStyle-HorizontalAlign="Left" >
<ItemStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:BoundField DataField="EstatusStr" HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" >
<asp:BoundField DataField="FechaEntrega" HeaderText="Fecha Entrega" ItemStyle-Width="4%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Left" Width="10%" />
</asp:BoundField>
<asp:BoundField DataField="FechaEntrega" HeaderText="Fecha Entrega" ItemStyle-Width="4%" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Center" >
<ItemStyle HorizontalAlign="Center" Width="4%" />
</asp:BoundField>
<asp:TemplateField ItemStyle-Width="75px" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderText="Opciones">
<ItemTemplate>
@@ -126,6 +151,8 @@
<asp:LinkButton ID="LnkTimbrar" runat="server" OnClick="LnkTimbrar_Click" AlternateText="Timbrar" ToolTip="Timbrar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-external-link'></i>" />
<asp:LinkButton ID="LnkCancelaTimbre" runat="server" OnClick="LnkCancelaTimbre_Click" AlternateText="Cancelar timbre" ToolTip="Cancelar timbre" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar cancelación?" data-btn-ok-label="si" />
</ItemTemplate>
<HeaderStyle HorizontalAlign="Left" />
<ItemStyle HorizontalAlign="Left" Width="75px" />
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Center" HeaderText="Direcciones" Visible="false">
@@ -133,13 +160,19 @@
<asp:LinkButton ID="LnkEditarDirOrigen" Visible="false" runat="server" OnClick="EditDireccionOrigen_Click" AlternateText="Editar" ToolTip="Actualzar dirección Origen" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-location-arrow'></i>" />
<asp:LinkButton ID="LnkEditarDirDestino" Visible="false" runat="server" OnClick="EditDireccionDestino_Click" AlternateText="Editar" ToolTip="Actualziar Dierccion Destino" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-location-arrow'></i>" />
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Left" Width="50px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="PDF">
<ItemTemplate>
<asp:HyperLink ID="HplPDF" Target="_blank" runat="server" ><i class='fa fa-file-pdf-o'></i></asp:HyperLink>
<asp:HyperLink ID="HplXML" Target="_blank" runat="server" ><i class='fa fa-file-code-o'></i></asp:HyperLink>
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="4%" />
</asp:TemplateField>
<asp:BoundField DataField="Estatus" HeaderText="PDF" ItemStyle-Width="4%" ItemStyle-HorizontalAlign="Center" Visible="true" />
<asp:BoundField DataField="Estatus" HeaderText="XML" ItemStyle-Width="4%" ItemStyle-HorizontalAlign="Center" Visible="true" />
</Columns>
<EmptyDataRowStyle HorizontalAlign="Center" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>

View File

@@ -324,7 +324,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
{
TxtFechaI.Text = DateTime.Now.AddDays(-1).ToString("dd/MM/yyyy");
TxtFechaF.Text = DateTime.Now.ToString("dd/MM/yyyy");
TxtFechaF.Text = DateTime.Now.AddDays(3).ToString("dd/MM/yyyy");
}
#endregion
@@ -634,23 +634,26 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
if (bool.Parse(e.Row.DataKey("AplicaCP")))
{
e.Row.Cells[10].Text = "<a CssClass='btn btn-circle btn-sm blue' target= '_blank' href=\"/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))) + "\" ><i class='fa fa-file-pdf-o'></i></a>";
if (e.Row.FCHyperLink("HplPDF") != null)
e.Row.FCHyperLink("HplPDF").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))) ;
}
else
{
e.Row.Cells[10].Text = "<a CssClass='btn btn-circle btn-sm blue' target= '_blank' href=\"/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPO&CVETIMBRE={0}", e.Row.DataKey("CveTimbre"))) + "\" ><i class='fa fa-file-pdf-o'></i></a>";
if (e.Row.FCHyperLink("HplPDF")!= null)
e.Row.FCHyperLink("HplPDF").NavigateUrl = "/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=CARPO&CVETIMBRE={0}", e.Row.DataKey("CveTimbre")));
}
string ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, e.Row.DataKey("TimbreTipoDocto"), e.Row.DataKey("SerieFolio"));
//string ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, e.Row.DataKey("TimbreTipoDocto"), e.Row.DataKey("SerieFolio"));
if (File.Exists(ArchivoXML))
{
e.Row.Cells[11].Text = "<a CssClass='btn btn-circle btn-sm blue' target= '_blank' href=\"/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", -1, "XML", e.Row.DataKey("SerieFolio"), e.Row.DataKey("TimbreTipoDocto"))) + "\" ><i class='fa fa-file-code-o'></i></a>";
}
//if (File.Exists(ArchivoXML))
//{
// e.Row.Cells[12].Text = "<a CssClass='btn btn-circle btn-sm blue' target= '_blank' href=\"/Compras/PopUpVerFactura.aspx?P=" + Extensiones.ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", -1, "XML", e.Row.DataKey("SerieFolio"), e.Row.DataKey("TimbreTipoDocto"))) + "\" ><i class='fa fa-file-code-o'></i></a>";
//}
}else
}
else
{
e.Row.Cells[10].Text = "";
e.Row.Cells[11].Text = "";
}
if (e.Row.DataKey("Estatus").ToEntero() == 2)

View File

@@ -132,7 +132,7 @@
<Columns>
<asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="75px" DataTextField="FechaMovto" ItemStyle-CssClass="Texto" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" />
<asp:BoundField HeaderText="Almacen" DataField="Almacen" />
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField="Folio" ItemStyle-CssClass="Texto" DataNavigateUrlFields="CveMovimiento" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" />
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField="Folio" ItemStyle-CssClass="Texto" DataNavigateUrlFields="CveMovimiento" ItemStyle-HorizontalAlign="Right" DataNavigateUrlFormatString="/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" />
<asp:BoundField HeaderText="Activo Fijo" DataField="CodigoAF" ItemStyle-HorizontalAlign="Left" Visible="false" />
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" Visible="false" />
<asp:BoundField HeaderText="Entradas" ItemStyle-Width="75px" DataField="Entradas" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right"/>

View File

@@ -60,7 +60,7 @@ Partial Class Inventarios_RepExistenciasCostos
Request("CveMoneda") IsNot Nothing AndAlso Request("CveConcepto") IsNot Nothing AndAlso
Request("FechaI") IsNot Nothing AndAlso Request("FechaF") IsNot Nothing Then
' Alert(Request("CvePS").ToString, TipoMensaje.MsgAdvertencia)
Dim CveAlmacen = IfNull(Request("CveAlmacen"), "-1").ToString.ToEntero
Dim CveAlmacen As String = IfNull(Request("CveAlmacen"), "-1").ToString
CargaDatos(Request("CvePS").ToString.Trim.ToEntero,
Request("CveProveedor").ToString.Trim.ToEntero,
@@ -129,6 +129,8 @@ Partial Class Inventarios_RepExistenciasCostos
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
DdlAlmacen.DataBind()
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
DdlAlmacen.SelectedValueExist(UsuarioActual.CveAlmacen)
If Not IsNothing(Request("CveAlmacen")) Then
If DdlAlmacen.Items.FindByValue(Request("CveAlmacen").ToString) Is Nothing Then
Dim CveAlmacen = Request("CveAlmacen").ToString
@@ -174,7 +176,7 @@ Partial Class Inventarios_RepExistenciasCostos
CargaDatos(CvePS, CveProveedor, CveMoneda, CveConcepto, fechaI, fechaF, CveAlmacen, CveClasificacion, DdlPersonal.SelectedValue.ToEntero)
End Sub
Protected Sub CargaDatos(CvePS As Integer, CveProveedor As Integer, CveMoneda As Integer, CveConcepto As Integer, FechaI As Date, FechaF As Date, CveAlmacen As Integer, CveClasificacion As Integer, CvePersonal As Integer)
Protected Sub CargaDatos(CvePS As Integer, CveProveedor As Integer, CveMoneda As Integer, CveConcepto As Integer, FechaI As Date, FechaF As Date, CveAlmacen As String, CveClasificacion As Integer, CvePersonal As Integer)
If CvePS > 0 Then
LnkKardex.Visible = True
LnkKardex.NavigateUrl = String.Format("/Inventarios/Kardex.aspx?CvePS={0}", CvePS)

View File

@@ -644,15 +644,6 @@ Partial Class Inventarios_TraspasoAlmacen
Dim tSerie As String = If(TxtnSerie.Visible, TxtnSerie.Text, "-1")
'If UsuarioActual.CveEmpresa = 140 Then
' Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").ToEntero
' If Not CveSubProyecto.Contiene(11791, 11793, 11993, 11994, 11794, 11797, 11795, 12010, 12011) Then
' tSerie = "-1"
' End If
'End If
Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, tSerie, tLote, tCaducidad)
If Valido Then
@@ -1476,16 +1467,6 @@ Partial Class Inventarios_TraspasoAlmacen
Dim AplicaSerie As Boolean = CBool(drP("AplicaSerie"))
''codigo temporal
'If UsuarioActual.CveEmpresa = 140 Then
' Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").ToEntero
' If Not CveSubProyecto.Contiene(11793, 11993, 11794, 11795, 12010, 12011) Then
' AplicaSerie = False
' End If
'End If
ThSerie.Visible = AplicaSerie
TdSerie.Visible = AplicaSerie
TxtnSerie.Visible = AplicaSerie

View File

@@ -196,19 +196,22 @@ Partial Class Ventas_CatAutorizacionLimites
Protected Sub LnkAutorizar_Click(sender As Object, e As EventArgs)
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
Dim TipoAutorizacion = gvRow.DataKey("TipoAutorizacion").ToEntero()
Dim CveAutorizacion = gvRow.DataKey("CveAutorizacion").ToEntero()
Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero()
Dim TipoAutorizacion = gvRow.DataKey("TipoAutorizacion").ToEntero()
Dim CveVendedor = gvRow.DataKey("CveVendedor").ToEntero()
Dim CveEstatusAutorizacion As Integer = 1
Dim Importe = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2)
Dim CveCliente = gvRow.DataKey("CveCliente").ToEntero()
Dim CveVendedor = gvRow.DataKey("CveVendedor").ToEntero()
'AUTORIZACION DE IMPORTE,
'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo)
If TipoAutorizacion = 1 Then
Dim SaldoCliente = gvRow.DataKey("Saldo").ToDecimal()
Dim LimiteCredito = gvRow.DataKey("LimiteCredito").ToDecimal()
'SI EL LIMITE ES 0, PERMITE AUTORIZAR
If LimiteCredito > 0 Then
Dim Importe = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2)
'AUTORIZACION DE IMPORTE,
'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo)
If TipoAutorizacion = 1 Then
Dim SaldoCliente = gvRow.DataKey("Saldo").ToDecimal()
Dim PorcentajeMaximoAutorizar As Decimal = 0.1
If UsuarioActual.PorcentajeMaximoAutorizacion > 0 Then

View File

@@ -623,11 +623,9 @@ Partial Class Ventas_ClientesAbonar
If RblTipoPago.SelectedValue = "1" Then
Dim ValFechaDocumento As Boolean = False
Dim FoliosFechasValFechaDocumento As New StringBuilder
FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago: <br/>")
Dim FoliosFechasValFechaDocumento As New StringBuilder
FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha de mes superior al mes del pago: <br/>")
For Each gvRowVal As GridViewRow In GvCxC.Rows
@@ -813,26 +811,12 @@ Partial Class Ventas_ClientesAbonar
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
If UltimaFluctuacion.FechaFluctuacion < tFecha Then
If UltimaFluctuacion.FechaFluctuacion <= tFecha Then
FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion
End If
End If
'If ObjIE.GetFluctuacionesBitacora(UsuarioActual.CveEmpresa) Then
' If ObjIE.DtResultados.Rows.Count > 0 Then
' Dim tFecha As Date = TxtFechaDocumento.Text.ToDate
' Dim Fecha As String = String.Format("{0}/{1}/{2}", tFecha.Year, tFecha.Month, tFecha.Day)
' Dim drr As DataRow = ObjIE.DtResultados.FiltroPrimero("Fecha < #" & Fecha & "#", "Fecha DESC")
' If drr IsNot Nothing Then
' FechaUltimaFluctuacion = drr("Fecha").ToString.ToDate
' TipoCambioFluctuacion = drr("TipoCambio").ToString.ToDecimal
' End If
' End If
'End If
If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then
dtConceptos = ObjMov.DtResultados
End If
@@ -2586,7 +2570,7 @@ Partial Class Ventas_ClientesAbonar
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
If UltimaFluctuacion.FechaFluctuacion < tFecha Then
If UltimaFluctuacion.FechaFluctuacion <= tFecha Then
FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion
End If

View File

@@ -215,15 +215,7 @@
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Frecuente" Value="1"></asp:ListItem>
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
<div class="row">
<label class="col-md-1 ">Estatus:</label>
@@ -297,6 +289,14 @@
<label title="Clasificación Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Clasif. Cli.:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList>
</div>
<label title="Tipo Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Tipo Cliente:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoCliente" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Frecuente" Value="1"></asp:ListItem>
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
<label title="Proveedor" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Proveedor:</label>
<div class="col-md-2">
@@ -306,13 +306,7 @@
<div runat="server" id="DivMarca" class="col-md-2" visible="false">
<asp:DropDownList ID="DdlMarcaPSDes" CssClass="select2me" runat="server" DataTextField="Marca" DataValueField="CveMarca" Style="width: 100%" Height="22px"></asp:DropDownList>
</div>
<label runat="server" id="LblLitraje" title="Mostrar Litraje" data-toggle="tooltip" data-placement="top" class="col-md-1" visible="false">Litraje:</label>
<div runat="server" id="DvLitraje" class="col-md-2" visible="false">
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" />
</div>
</div>
@@ -338,18 +332,30 @@
</asp:Dropdownlist>
</div>
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate">Distribuidor:</label>
<div class="col-md-2">
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" id="divdistribuidor1" runat="server" visible="false">Distribuidor:</label>
<div class="col-md-2" id="divdistribuidor2" runat="server" visible="false">
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem>
<asp:ListItem Text="No Distribuidor" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<div runat="server" id="DvLitraje" class="col-md-1" visible="false">
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" Text ="Litraje:&nbsp;&nbsp;&nbsp;" TextAlign="Left" />
</div>
</div>
<div class="row">
<label class="col-md-1 truncate">Lectura administrativa:</label>
<div class="col-md-2">
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
</div>
<label class="col-md-1 truncate" id="divClasif2texto" runat="server" visible="false">Clasificación 2:</label>
<div class="col-md-2" id="divClasif2" runat="server" visible="false">
<asp:DropDownList ID="DdlClasificacion2" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -62,13 +62,7 @@ Partial Class Ventas_RepProductosServicios
CargarMarcas()
SetValues()
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
LblLitraje.Visible = True
DvLitraje.Visible = True
'garantia
divgarantia1.Visible = True
divgarantia2.Visible = True
End If
End If
End Sub
@@ -95,7 +89,8 @@ Partial Class Ventas_RepProductosServicios
DdlGrupo.Items.Insert(15, New ListItem("Cliente - PS", "20"))
DdlGrupo.Items.Insert(16, New ListItem("Sucursal - PS", "21"))
DdlGrupo.Items.Insert(17, New ListItem("Familia - Marca - Tipo", "22"))
DdlGrupo.Items.Insert(18, New ListItem("Tipo Cliente", "23"))
DdlGrupo.Items.Insert(18, New ListItem("Tipo Cliente", "23"))
DdlGrupo.Items.Insert(18, New ListItem("Marca", "24"))
DdlGrupo.DataBind()
DdlGrupo.SelectedValueExist("8")
@@ -171,7 +166,25 @@ Partial Class Ventas_RepProductosServicios
'Cargo Clasificaciones
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacion.DataBind()
DdlClasificacion.DataBind()
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DvLitraje.Visible = True
'garantia
divgarantia1.Visible = True
divgarantia2.Visible = True
divdistribuidor1.Visible = True
divdistribuidor2.Visible = True
DdlClasificacion2.DataSource = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa)
DdlClasificacion2.DataBind()
divClasif2texto.Visible = True
divClasif2.Visible = True
DdlGrupo.Items.Add(New ListItem("Clasificacion2", "25"))
End If
'CargaSubProyectos
@@ -287,7 +300,7 @@ Partial Class Ventas_RepProductosServicios
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero) Then
CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados
DtVentas = ObjVentas.DtResultados
Else
@@ -367,11 +380,13 @@ Partial Class Ventas_RepProductosServicios
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1")
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1")
Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}",
e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"),
e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"),
e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"),
FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), If(Not ChkLecturaAdmin.Checked, 1, 0))
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}",
e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"),
e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"),
e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"),
FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca,
CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), If(Not ChkLecturaAdmin.Checked, 1, 0),
e.Row.DBCampo("EsGarantia"), e.Row.DBCampo("CveCondicionesPago"), IIf(e.Row.DBCampo("MostrarLitraje") = "True", 1, 0), e.Row.DBCampo("EsDistribuidor"))
e.Row.FCLiteral("LtlGrupo").Text = String.Format("<a target=""_blank"" Class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.DBCampo("Gpo"))

View File

@@ -323,7 +323,10 @@
<asp:ListItem Text="Contado" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-2" id="divgarantia2" runat="server" visible="false">
<div class="col-md-1 truncate" id="divgarantia1" runat="server" visible="false">
Garantía?:
</div>
<div class="col-md-1" id="divgarantia2" runat="server" visible="false">
<asp:Dropdownlist runat="server" ID="DdlGarantia" CssStyle="width: 100%;" CssClass="form-control input-small input-sm select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
@@ -331,18 +334,22 @@
</asp:Dropdownlist>
</div>
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate">Distribuidor:</label>
<div class="col-md-2">
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate" id="divdistribuidor1" runat="server" visible="false">Distribuidor:</label>
<div class="col-md-2" id="divdistribuidor2" runat="server" visible="false">
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem>
<asp:ListItem Text="No Distribuidor" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Lectura administrativa:</label>
<div class="col-md-2">
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" />
<div runat="server" id="DvLitraje" class="col-md-1" visible="false">
<asp:CheckBox runat="server" ID="ChkLitraje" CssClass="mkcheck" Text ="Litraje:&nbsp;&nbsp;&nbsp;" TextAlign="Left" />
</div>
</div>
<div class="row">
<div class="col-md-2">
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" Text="Lectura admiva:" TextAlign="Left" />
</div>
</div>
</div>
</div>

View File

@@ -316,6 +316,11 @@ Partial Class Ventas_RepProductosServiciosDetalle
CveMarca = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca").ToEntero() > 0, Request("CveMarca").ToEntero(), -1).ToString.ToEntero
CveClasificacionDetalle = If(Request("CveClasificacionDetalle") IsNot Nothing AndAlso Request("CveClasificacionDetalle").ToEntero() > 0, Request("CveClasificacionDetalle").ToEntero(), -1).ToString.ToEntero
DdlGarantia.SelectedValueExist(If(Request("EsGarantia") IsNot Nothing AndAlso Request("EsGarantia").ToEntero() > 0, Request("EsGarantia").ToEntero(), -1).ToString)
DdlCondicionesPago.SelectedValueExist(If(Request("CveCondicionesPago") IsNot Nothing AndAlso Request("CveCondicionesPago").ToEntero() > 0, Request("CveCondicionesPago").ToEntero(), -1).ToString)
DdlDistribuidor.SelectedValueExist(If(Request("EsDistribuidor") IsNot Nothing AndAlso Request("EsDistribuidor").ToEntero() > 0, Request("EsDistribuidor").ToEntero(), -1).ToString)
ChkLitraje.Checked = Request("MostrarLitraje") IsNot Nothing AndAlso Request("MostrarLitraje").ToEntero() > 0
TipoCliente = If(Request("TipoCliente") IsNot Nothing, Request("TipoCliente").ToString, "-1").ToString.ToEntero
DdlTipoCliente.SelectedValueExist(TipoCliente)
@@ -324,7 +329,11 @@ Partial Class Ventas_RepProductosServiciosDetalle
txtFechaI.Text = Fecha
txtFechaF.Text = Fecha
End If
If FechaI <> "-1" Then
txtFechaI.Text = FechaI
End If
If FechaF <> "-1" Then
txtFechaF.Text = FechaF
End If
@@ -384,6 +393,14 @@ Partial Class Ventas_RepProductosServiciosDetalle
txtFechaI.Text = If(Mes <> "-1", String.Format("01/{0}/0001", Mes), txtFechaI.Text)
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
DvLitraje.Visible = True
'garantia
divgarantia1.Visible = True
divgarantia2.Visible = True
divdistribuidor1.Visible = True
divdistribuidor2.Visible = True
End If
If FechaEjec <> "-1" Then
TxtFechaIEjec.Text = FechaEjec
@@ -468,7 +485,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, GPO:=DdlGrupo.SelectedValue.ToEntero, CveMoneda:=CveMoneda,
TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra,
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero,
ModalidadContable:=Not ChkLecturaAdmin.Checked, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero) Then
ModalidadContable:=Not ChkLecturaAdmin.Checked, MostrarLitraje:=ChkLitraje.Checked, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados
TmpDT = ObjVentas.DtResultados
Else

View File

@@ -242,6 +242,14 @@
<ajax:ValidatorCalloutExtender ID="vcoFfvFRegistroIEF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaRegistroIEF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFRegistroIEF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaRegistroIEF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate">Condiciones de Pago</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlCondicionesPago" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Crédito" Value="1"></asp:ListItem>
<asp:ListItem Text="Contado" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>

View File

@@ -138,7 +138,7 @@ Partial Class Ventas_RepRecuperacion
If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero,
EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF) Then
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjMovtos.DtResultados
DtDatos = ObjMovtos.DtResultados
Else

View File

@@ -3219,7 +3219,7 @@ Partial Class Ventas
If ObjPVenta.DtResultados.Rows.Count > 0 Then
CveCorte = ObjPVenta.CveCorte
Dim FechaICorte = ObjPVenta.FechaInicial.Date'.AddDays(-5)
Dim FechaICorte = ObjPVenta.FechaInicial.Date '.AddDays(-5)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.Date Then
DebeCerrarCorte = True
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
@@ -4254,16 +4254,8 @@ Partial Class Ventas
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Rows(0)
Dim CveCliente As Integer = DbRowVenta("CveCliente").ToString().ToEntero()
HdnCveVenta.Value = CveVenta.ToString()
Dim DtUsadosPendientes As DataTable = Nothing
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
Dim ObjUsados As New ClsVentas
If ObjUsados.GetVentasUsados(CveVenta, -1, DbRowVenta("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
DtUsadosPendientes = ObjUsados.DtResultados
End If
ObjUsados.Dispose()
End If
Me.EsGarantia = CBool(DbRowVenta("EsGarantia"))
RFCReceptorVenta = DbRowVenta("RFCReceptor").ToString()
'Adjuntar archivo
@@ -4284,7 +4276,7 @@ Partial Class Ventas
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString().ToEntero()
Me.EsGarantia = CBool(DbRowVenta("EsGarantia"))
Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString().ToEntero()
'CargaEncabezado
@@ -5198,13 +5190,47 @@ Partial Class Ventas
End If
'Si es Empresa de Acumuladores
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
'Si ya se surtió y recibió
If (DbRowVenta("SaldoAlmacen").ToString().ToDecimal > 0 And (DtUsadosPendientes Is Nothing Or DtUsadosPendientes.Rows.Count = 0)) OrElse (TmpDT.MAX("CveTipoPS") = "1") Then
BtnsFacturar.Visible = True
Else
BtnsFacturar.Visible = False
If CveVenta > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DbRowVenta("TipoDocto").ToString() = "Rem" AndAlso (GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {Me.CveEstatus}").ToEntero() <> 5) Then
BtnsFacturar.Visible = False
Dim DtUsadosPendientes As DataTable = Nothing
Dim DtGarantiasPendientes As DataTable = Nothing
Dim ObjUsados As New ClsVentas
If ObjUsados.GetVentasUsados(CveVenta, -1, DbRowVenta("Fecha").ToString().ToDateTime, UsuarioActual.CveEmpresa) Then
DtUsadosPendientes = ObjUsados.DtResultados.Copy()
End If
If ObjUsados.GetVentasGarantiaPendiente(CveVenta, Now, UsuarioActual.CveEmpresa) Then
DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
End If
'If ObjUsados.GetVentasGarantiaPendiente(CveVenta, -1, Now, UsuarioActual.CveEmpresa) Then
' DtGarantiasPendientes = ObjUsados.DtResultados.Copy()
'End If
ObjUsados.Dispose()
'Si ya se surtió y recibió
If DbRowVenta("SaldoAlmacen").ToString().ToDecimal > 0 OrElse TmpDT.MAX("CveTipoPS") = "1" Then
BtnsFacturar.Visible = True
End If
'VERIFICA SI TIENE USADOS O GARANTIAS PENDIENTES
If BtnsFacturar.Visible Then
If (Not EsGarantia AndAlso (DtUsadosPendientes IsNot Nothing AndAlso DtUsadosPendientes.Rows.Count > 0)) Then
BtnsFacturar.Visible = False
Alert("Tiene usados pendiente de recibir", TipoMensaje.MsgAdvertencia)
End If
If (EsGarantia AndAlso (DtGarantiasPendientes IsNot Nothing AndAlso DtGarantiasPendientes.Rows.Count > 0)) Then
Alert("Tiene garantías pendientes de recibir", TipoMensaje.MsgAdvertencia)
BtnsFacturar.Visible = False
End If
End If
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
End If
@@ -5335,6 +5361,14 @@ Partial Class Ventas
End If
End If
If DdlTipoComprobante.SelectedValue = "Rem" Then
If GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {Me.CveEstatus}").ToEntero() = 5 Then
BtnsFacturar.Visible = False
BtnEmitirImprimir.Visible = False
BtnPermisoEditarRemision.Visible = False
End If
End If
UpPS.Update()
UpContado.Update()
UpEstatus.Update()
@@ -6713,19 +6747,21 @@ Partial Class Ventas
Else
'VERIFICAR RESTRICCIONES DEL CLIENTE
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 AndAlso RBLPago.SelectedValue = "2" Then
Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
Vta.Dispose()
If Opcion > 0 Then
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
BtnsFacturar.Visible = False
BtnGenerarRemision.Visible = False
If Not UsuarioActual.Empresa.Funcionalidad(702).ToEntero() > 0 Then
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0 AndAlso RBLPago.SelectedValue = "2" Then
Dim Vta As New ClsVentas
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
Vta.Dispose()
If Opcion > 0 Then
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
BtnsFacturar.Visible = False
BtnGenerarRemision.Visible = False
End If
End If
End If
End If
UPPCreditoDisponible.Update()
@@ -11504,7 +11540,7 @@ Partial Class Ventas
DdlTipoComprobante.Enabled = False
End If
TAB.ActiveTab = TabGenerales
Tab.ActiveTab = TabGenerales
TabGenerales.Enabled = True
Updatetabs.Update()
UPObservaciones.Update()
@@ -11570,7 +11606,7 @@ Partial Class Ventas
ContratoDetalles.Visible = False
UPEstimaciones.Update()
TAB.ActiveTab = TabGenerales
Tab.ActiveTab = TabGenerales
TabGenerales.Enabled = True
Updatetabs.Update()
End If
@@ -14861,7 +14897,7 @@ Partial Class Ventas
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
If UltimaFluctuacion.FechaFluctuacion < tFecha Then
If UltimaFluctuacion.FechaFluctuacion <= tFecha Then
FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion
End If
@@ -15342,7 +15378,7 @@ Partial Class Ventas
ErrorConta = True
End If
If Not ErrorConta AndAlso Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
If Not ErrorConta AndAlso Not ObjConta.PrePolizaSimplificacion(CvePrepoliza, UsuarioActual.CveEmpresa) Then
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
End If
@@ -16507,7 +16543,7 @@ Partial Class Ventas
If objcompras.GetCompraDetallealmacen(0, DdlNCFactura.SelectedValue.ToEntero()) Then
GvInvNC.DataSource = objcompras.DtResultados
If objcompras.DtResultados.Rows.Count > 0 Then
TAB.ActiveTabIndex = 1
Tab.ActiveTabIndex = 1
Updatetabs.Update()
End If
Else
@@ -16787,7 +16823,7 @@ Partial Class Ventas
End If
UpParametros.Update()
TAB.ActiveTab = TabGenerales
Tab.ActiveTab = TabGenerales
Else
Alert("La empresa no contiene un producto asignado a la estimació", TipoMensaje.MsgInformacion)
End If
@@ -23621,7 +23657,7 @@ Partial Class Ventas
DdlContratosModal.Items.Insert(0, New ListItem("Seleccione", "0"))
UPEstimaciones.Update()
TAB.ActiveTab = TabE
Tab.ActiveTab = TabE
TabGenerales.Enabled = False
Updatetabs.Update()
@@ -25426,7 +25462,7 @@ Partial Class Ventas
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
If UltimaFluctuacion.FechaFluctuacion < tFecha Then
If UltimaFluctuacion.FechaFluctuacion <= tFecha Then
FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
TipoCambioFluctuacion = UltimaFluctuacion.TCFluctuacion
End If
@@ -29911,7 +29947,7 @@ Partial Class Ventas
ContratoDetalles.Visible = False
UPEstimaciones.Update()
TAB.ActiveTab = TabGenerales
Tab.ActiveTab = TabGenerales
TabGenerales.Enabled = True
Updatetabs.Update()
@@ -30472,7 +30508,7 @@ Partial Class Ventas
DdlMonedaModalPedido2.DataBind()
DdlMonedaModalPedido2.Items.Insert(0, New ListItem("Todas", "-1"))
TAB.ActiveTab = TabGenerales
Tab.ActiveTab = TabGenerales
TabGenerales.Enabled = True
Updatetabs.Update()