commi tlocal

This commit is contained in:
Rakcsle Supertramp
2020-06-19 20:42:09 -07:00
17 changed files with 226 additions and 127 deletions

View File

@@ -6,8 +6,8 @@ Imports System.Data.SqlClient
Imports Extensiones
Public Class ClsGenerales
Implements IDisposable
Implements IDisposable
#Region "Campos"
Private _CveColectiva As Integer
@@ -48,9 +48,9 @@ Public Class ClsGenerales
Get
DtResultados = Data
End Get
End Property
End Property
#End Region
Public Function IniciaTransacSQL() As SqlTransaction
If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction()
Return SqlTransacc
@@ -89,9 +89,9 @@ Public Class ClsGenerales
End With
Data = New DataTable
If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc
End Sub
End Sub
#Region "Conexiones"
Private Sub ConexionAdd()
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
Try
@@ -124,9 +124,9 @@ Public Class ClsGenerales
CveConexion = 0
End If
End Sub
End Sub
#End Region
Private Sub DataCommand(ByVal pStrSQL As String, Optional ByVal TipoComando As CommandType = CommandType.StoredProcedure)
With SqlCommand
.Parameters.Clear()
@@ -209,7 +209,7 @@ Public Class ClsGenerales
OnError("Ocurrió un error al obtener los registros de solicitudes CFDI SAT.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
End Function
#Region " I N D I C A D O R E S Y G R A F I C A S"
Public Function GetIndicadores(CveEmpresa As Integer) As DataSet
'Dim Retorno As Boolean = False
@@ -231,10 +231,10 @@ Public Class ClsGenerales
End Try
Return ds
End Function
End Function
#End Region
#Region " D I A S I N H A B I L E S "
Public Function DiasInhabiles_Add(CveEmpresa As Integer, CveUsuario As Integer, DiaInhabil As String, Descripcion As String, Estatus As Integer, FechaInhabil As Date) As Boolean
Dim Retorno As Boolean = False
@@ -317,9 +317,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region " P A Q U E T E R I A S"
Public Function GetGralPaqueterias(Optional CveEmpresa As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -453,11 +453,11 @@ Public Class ClsGenerales
OnError("Ocurrió un error al actualizar en el Catálogo de Paqueterias Guias Tipos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
End Function
#End Region
#Region "P L A N T I L L A S C O N T R A T O S"
Public Function ContratoPlantillaAdd(CveEmpresa As Integer, CveUsuario As Integer, NombrePlantilla As String, URL As String, Tipo As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_ContratoPlantillaAdd")
@@ -534,10 +534,10 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region " E S T A D O S"
Public Function GetGralEstados() As Boolean
Dim Retorno As Boolean = False
@@ -550,9 +550,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region " M U N I C I P I O S"
Public Function GetGralMunicipios() As Boolean
Dim Retorno As Boolean = False
@@ -565,9 +565,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region " P A I S E S"
Public Function GetGralPaises() As Boolean
Dim Retorno As Boolean = False
@@ -580,9 +580,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region " P O B L A C I O N E S"
Public Function GetGralPoblaciones() As Boolean
Dim Retorno As Boolean = False
@@ -595,9 +595,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "E S C O L A R I D A D"
Public Function GetEscolaridades() As Boolean
Dim Retorno As Boolean = False
@@ -687,9 +687,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "C A T E G O R I A S"
Public Function GetCategorias(Optional CveEmpresa As Integer = -1, Optional Tipo As Integer = 1) As Boolean
Dim Retorno As Boolean = False
@@ -786,9 +786,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "M O D E L O S"
Public Function GetModelos(CveEmpresa As Integer, Optional CveModelo As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -882,9 +882,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "R I M T A M A N I O S"
Public Function GetRimTamanios(CveEmpresa As Integer, Optional CveRinTamaño As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -976,9 +976,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "M E D I D A S"
Public Function GetMedidas(CveEmpresa As Integer, Optional CveMedida As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -1058,9 +1058,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "C O L E C T I V A S"
Public Function GetColectivas(CveColectiva As Integer, Colectiva As String, Codigo As String, Tipo As String, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -1216,10 +1216,10 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "C O L E C T I V A S - D E T A L L E S"
Public Function GetColectivasDetalles(CveColectiva As Integer, Tipo As String, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -1337,9 +1337,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "S u b i r I m a g e n e s"
Public Function ImagenUpload(pCveOpcion As Integer, pCveClave As Integer, pCveUsuario As Integer, IMEI As String, pCveEmpresa As Integer) As Integer
Dim Retorno As Integer = -1
@@ -1368,8 +1368,7 @@ Public Class ClsGenerales
' IDisposable
#Region "G E N E R A L E S - C U E N T A S B A N C A R I A S "
Public Function GetCuentasDepositos(Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCuentaDeposito As Integer = -1, Optional CveEmpresa As Integer = -1) As Boolean
Public Function GetCuentasDepositos(Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCuentaDeposito As Integer = -1, Optional CveEmpresa As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_CuentasDepositosGet")
@@ -1378,7 +1377,7 @@ Public Class ClsGenerales
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
.Add("@CveCuentaDeposito", SqlDbType.Int).Value = CveCuentaDeposito
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
@@ -1642,11 +1641,11 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "C l a s i f i c a c i o n e s C a r a c t e r i s t i c a s"
Public Function AddClasificacionesCaracteristicas(CaracteristicaClasificacion As String, Orden As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_CaracteristicasClasificacionesAdd")
@@ -1727,12 +1726,12 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "C a r a c t e r í s t i c a s"
Public Function GetCaracteristicasModulos() As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_CaracteristicasModuloGet")
@@ -1986,9 +1985,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "O p c i o n e s"
Public Function AddCaracteristicasOpciones(CaracteristicaOpcion As String, CveCaracteristica As Integer, Orden As Integer, Estatus As Boolean, CveUsuario As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -2089,9 +2088,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "T I P O C U E N T A S E Q U I P O S"
Public Function AddTipoCuentaEquipo(TipoCuentaEquipo As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -2178,9 +2177,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "C U E N T A S E Q U I P O S"
Public Function AddCuentaEquipo(CveCliente As Integer, CveTipoCuentaEquipo As Integer, CuentaEquipo As String, NoSerie As String, CveClienteSucursal As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveCuentaEquipo As Integer = -1, Optional CveCuentaEquipoRelacionado As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -2353,11 +2352,11 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "Bitacora"
Public Function GetHistorialBitacora(CveAcarreo As Integer, CveOrdenCompra As Integer, CveActivoFijo As Integer,
CveOS As Integer, CvePS As Integer, CveCompra As Integer, CveIE As Integer,
@@ -2451,9 +2450,9 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "SAT PRODUCTOS SERVICIOS Y UNIDAD DE MEDIDA"
Public Function GetSATProductosServicios() As Boolean
Dim Retorno As Boolean = False
@@ -2509,10 +2508,10 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "SAT CFDI COMERCIO EXTERIOR"
Public Function GetSATClavePedimento() As Boolean
Dim Retorno As Boolean = False
@@ -2654,10 +2653,10 @@ Public Class ClsGenerales
OnError("Ocurrió un error al obtener las colonias del SAT", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
End Function
#End Region
Public Function JAMComparativo(Opcion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_JAM_Comparativo")
@@ -3007,11 +3006,11 @@ Public Class ClsGenerales
End Try
Return Retorno
End Function
End Function
#End Region
#Region "CLASIFICACIONES PORCENTAJE"
Public Function GetClasificacionPorcentaje(CveEmpresa As Integer, Optional CveClasificacionPorcentaje As Integer = -1,
Optional CveClasificacion As Integer = -1, Optional PorcentajeIVA As Double = -1,
Optional Opcion As Integer = 1) As Boolean
@@ -3087,11 +3086,11 @@ Public Class ClsGenerales
OnError("Ocurrió un error al eliminar la clasificacion del porcentaje.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
End Function
#End Region
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
If Not disposedValue Then
If disposing Then
@@ -3107,9 +3106,9 @@ Public Class ClsGenerales
' TODO: Establecer campos grandes como Null.
End If
disposedValue = True
End Sub
End Sub
#Region "CRUD_Edoc_DocumentacionTipo"
Public Function GetEdoc_DocumentacionTipo(CveDocumentacionTipo As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional EsCatalogo As Integer = 0, Optional Modulo As Integer = 1) As Boolean
@@ -3190,21 +3189,21 @@ Public Class ClsGenerales
Return retorno
End Function
End Function
#End Region
#Region " IDisposable Support "
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
' Visual Basic agregó este código para implementar correctamente el modelo descartable.
Public Sub Dispose() Implements IDisposable.Dispose
' No cambie este código. Coloque el código de limpieza en Dispose (ByVal que se dispone como Boolean).
ConexionClose()
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
End Sub
#End Region
#Region " P O L I Z A V I R T U A L "
Public Function ModelosAutosGet(CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -3264,7 +3263,7 @@ Public Class ClsGenerales
OnError("Ocurrió un error al obtener los BCI de Usados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
End Function
#End Region
End Class

View File

@@ -2421,7 +2421,8 @@ Public Class ClsInventarios
Return Retorno
End Function
Public Function AddInventarioFisicoDetalle(CveInventarioFisico As Integer, CvePS As Integer, CveUM As Integer, Cantidad As Double, Serie As String, CveUsuario As Integer) As Boolean
Public Function AddInventarioFisicoDetalle(CveInventarioFisico As Integer, CvePS As Integer, CveUM As Integer, Cantidad As Double, Serie As String, CveUsuario As Integer,
Optional CveSeccionAlmacen As Integer = -1, Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_InventarioFisicoDetalleAdd")
@@ -2433,6 +2434,9 @@ Public Class ClsInventarios
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@Serie", SqlDbType.VarChar).Value = Serie
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
.Add("@Lote", SqlDbType.NVarChar).Value = Lote
.Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad
.Add("@Estatus", SqlDbType.Int).Direction = ParameterDirection.Output
End With

View File

@@ -442,6 +442,34 @@ Public Class ClsPaginas
Application("GlobalDTProveedoresCuentas") = value
End Set
End Property
Property GlobalDTCuentasDepositosClientes(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional Estatus As Boolean = True) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTCuentasDepositosClientes-{0}", CveEmpresa)
'sino existe, recarga los datos
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
Dim P As New ClsGenerales
If P.GetCuentasDepositos(CveEmpresa:=CveEmpresa, CveCliente:=-2) Then Application(AppNombre) = P.DtResultados
P.Dispose()
End If
Dim Str As New StringBuilder
Str.AppendFormat("CveEmpresa = {0}", CveEmpresa)
If CveCliente <> -1 Then Str.AppendFormat(" AND CveCliente = {0}", CveCliente)
If Estatus = True Then Str.AppendFormat(" AND Estatus = 1 ")
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows)
GlobalDTCuentasDepositosClientes = Dv.ToTable
Dv.Dispose()
End Get
Set(value As DataTable)
Dim AppNombre As String = String.Format("GlobalDTCuentasDepositosClientes-{0}", CveEmpresa)
Application(AppNombre) = value
End Set
End Property
Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTProveedorClasificacion-{0}", CveEmpresa)
@@ -7254,7 +7282,7 @@ Public Class ClsPaginas
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
Dim ObjCuentasBancos As New ClsGenerales()
If ObjCuentasBancos.GetCuentasDepositos(ObjOC.CveProveedor) Then
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=ObjOC.CveProveedor) Then
Dim CuentasActivas As DataTable = ObjCuentasBancos.DtResultados.FiltraParametros("EstatusTexto = 'Activo'")
Dim CuentasStr As New StringBuilder("")
For Each CuentasBancarios As DataRow In CuentasActivas.Rows

View File

@@ -4743,7 +4743,7 @@ Partial Class Bancos_IE
If CveProveedor > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.GetCuentasDepositos() Then
If ObjCuentasBancos.GetCuentasDepositos(CveEmpresa:=UsuarioActual.CveEmpresa) Then
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
End If
ObjCuentasBancos.Dispose()

View File

@@ -151,7 +151,7 @@ Partial Class Bancos_MovimientosBancarios
If GvProveedores.Rows(i).FCCheckBox("CheckAgregar").Checked = True Then
DTProveedorActual = DTProveedores.FiltraParametros(String.Format("CveProveedor = {0}", GvProveedores.Rows(i).DataKey("CveProveedor")))
If ObjCuentasBancos.GetCuentasDepositos(21109) Then
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=21109) Then
DTProveedorBancos = ObjCuentasBancos.DtResultados
RowBanco = DTProveedorBancos.Rows(0)
Else
@@ -319,7 +319,7 @@ Partial Class Bancos_MovimientosBancarios
DTProveedorActual = DTProveedores.FiltraParametros(String.Format("CveProveedor = 21114"))
If ObjCuentasBancos.GetCuentasDepositos(21114) Then
If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=21114) Then
DTProveedorBancos = ObjCuentasBancos.DtResultados
RowBanco = DTProveedorBancos.Rows(0)
Else

View File

@@ -3976,7 +3976,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("CajaChica", "Caja chica: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString))
params.Add(New ReportParameter("observaciones", "Observaciones: " & ParamComprobacion.Rows(0)("Observaciones").ToString))
params.Add(New ReportParameter("folio", ParamComprobacion.Rows(0)("Folio").ToString))
params.Add(New ReportParameter("fecha", ParamComprobacion.Rows(0)("FechaDocumento").ToString))
params.Add(New ReportParameter("fecha", ParamComprobacion.Rows(0)("FechaDocumento").ToString.ToDate.ToShortDateString))
params.Add(New ReportParameter("importe", ParamComprobacion.Rows(0)("Importe").ToString))
params.Add(New ReportParameter("TotAbono", DtComprobacion.SUM("Abonado").ToString))

View File

@@ -122,7 +122,7 @@ Partial Class Contabilidad_CatPeriodosBloqueo
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarPeriodosBloqueo"), "jsHideModalPeriodosBloqueo")
UpGral.Update()
Ejercicio = -1
Alert("Bloqueo Agregado Correctamente", TipoMensaje.MsgInformacion)
Else
Alert("Ocurrió un error al guardar el Periodo de Bloqueo", TipoMensaje.MsgError)
@@ -138,15 +138,14 @@ Partial Class Contabilidad_CatPeriodosBloqueo
UpGral.Update()
Alert("Bloqueo Actualizado Correctamente", TipoMensaje.MsgInformacion)
Ejercicio = -1
Actualizar = False
Else
Dim mensajeAlerta As String = AplicarBloqueso.Replace(";", Environment.NewLine)
Alert(String.Format("No se puede bloquear el periodo por: <br/>{0} ", mensajeAlerta), TipoMensaje.MsgError)
End If
End If
Ejercicio = -1
Actualizar = False
ObjConta.Dispose()
End Sub

View File

@@ -114,10 +114,11 @@
<td>
<asp:DropDownList ID="DdlEstatus" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px">
<%-- <asp:ListItem Selected="False" Text="Seleccione" Value="-1"></asp:ListItem>--%>
<asp:ListItem Selected="True" Text="En Proceso" Value="1"></asp:ListItem>
<asp:ListItem Selected="False" Text="Confirmado por Proveedor" Value="2"></asp:ListItem>
<asp:ListItem Selected="True" Text="Pendiente" Value="1"></asp:ListItem>
<asp:ListItem Selected="False" Text="En Proceso" Value="2"></asp:ListItem>
<asp:ListItem Selected="False" Text="Entregado" Value="3"></asp:ListItem>
<asp:ListItem Selected="False" Text="Confirmado por Cliente" Value="4"></asp:ListItem>
<asp:ListItem Selected="False" Text="Reasignar Nueva Entrega" Value="4"></asp:ListItem>
<asp:ListItem Selected="False" Text="Directo a Clientes" Value="5"></asp:ListItem>
</asp:DropDownList>
<%-- <asp:RequiredFieldValidator ID="RFVDdlEstatus" runat="server" ControlToValidate="DdlEstatus" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Estatus''</b> es necesario." InitialValue="-1" ValidationGroup="GrpCrearGuia"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEDdlEstatus" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlEstatus" Width="250px"></ajax:ValidatorCalloutExtender>--%>
@@ -200,7 +201,7 @@
</tr>
<tr runat="server" id="TrTipo" align="left" visible ="false">
<tr runat="server" id="TrTipo" align="left" visible="false">
<td class="text-right" align="left" valign="top" style="width: 140px; padding-top: 4px;"><b>Tipo:</b></td>
<td align="left" valign="top" style="width: 200px;">
<asp:DropDownList ID="DdlPaqueteriaGuiaTipo" runat="server" AppendDataBoundItems="true" DataTextField="PaqueteriaGuiaTipo" DataValueField="CvePaqueteriaGuiaTipo" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"></asp:DropDownList>

View File

@@ -431,7 +431,7 @@
</tr>
</table>
<asp:GridView ID="GvDatos" DataKeyNames="No,CveUM,CvePS,PU,CveMovimientoDetalle,CveAlmacen" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="tabla_correcto grides Widthall ScrollAD" data-height="400" data-freezerows="-1" GridLines="None">
<asp:GridView ID="GvDatos" DataKeyNames="No,CveUM,CvePS,PU,CveMovimientoDetalle,CveAlmacen,SeccionAlmacen,Serie,Lote,FechaCaducidad,CveSeccionAlmacen" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de Movimientos" CssClass="tabla_correcto grides Widthall ScrollAD" data-height="400" data-freezerows="-1" GridLines="None">
<Columns>
<asp:BoundField ItemStyle-Width="150px" DataField="Almacen" />
<asp:TemplateField HeaderText="Cantidad Devolucion" Visible="false">

View File

@@ -100,6 +100,7 @@ Partial Class Inventarios_Consignaciones
dt.Columns.Add("EstatusExistencia")
dt.Columns.Add("CveMovimientoDetalle")
dt.Columns.Add("CveSeccionAlmacen", Type.GetType("System.Int32"))
dt.Columns.Add("SeccionAlmacen")
dt.Columns.Add("Serie", Type.GetType("System.String"))
dt.Columns.Add("Lote", Type.GetType("System.String"))
@@ -158,6 +159,9 @@ Partial Class Inventarios_Consignaciones
Else
DdlProducto.Visible = False
End If
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
DdlSeccionAlmacen.DataBind()
End Sub
#End Region
@@ -590,6 +594,7 @@ Partial Class Inventarios_Consignaciones
Dim PSCodigo = ""
Dim CveSeccionAlmacen As Integer = DdlSeccionAlmacen.SelectedValue.ToEntero
Dim SeccionAlmacen As String = DdlSeccionAlmacen.SelectedItem.Text
Dim Serie As String = If(TxtSerie.Text = "", "-1", TxtSerie.Text)
Dim Lote As String = If(TxtLote.Text = "", "-1", TxtLote.Text)
Dim Caducidad As String = If(TxtCaducidad.Text = "", "-1", TxtCaducidad.Text)
@@ -617,6 +622,7 @@ Partial Class Inventarios_Consignaciones
registro.Item("PU") = TxtPU.Text.ToDouble
registro.Item("PUExtranjero") = TxtPU.Text.ToDouble
registro.Item("CveSeccionAlmacen") = CveSeccionAlmacen
registro.Item("SeccionAlmacen") = SeccionAlmacen
registro.Item("Serie") = Serie
registro.Item("Lote") = Lote
registro.Item("FechaCaducidad") = Caducidad
@@ -711,7 +717,7 @@ Partial Class Inventarios_Consignaciones
'AGREGAMOS MOVTOS DETALLE
If CveMovimiento > 0 Then
For Each Dr As DataRow In DtMovimientos.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, PUTC:=If(DdlMoneda.SelectedValue.ToEntero <> 1, Dr("PUExtranjero").ToString.ToDecimal, -1)) Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=TxtSerie.Text, Lote:=TxtLote.Text, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, PUTC:=If(DdlMoneda.SelectedValue.ToEntero <> 1, Dr("PUExtranjero").ToString.ToDecimal, -1)) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos"
Exit For

View File

@@ -89,7 +89,7 @@
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Estatus" DataField="Estatus" HeaderStyle-Width="25px" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Estatus" DataField="Estatus" HeaderStyle-Width="150px" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
<ItemTemplate>
&nbsp;<asp:Literal ID="LblFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:dd/MM/yyyy}") %>'></asp:Literal>

View File

@@ -229,7 +229,7 @@
<div class="row" style="margin-top: 5px;">
<label class="col-md-4">Código.Barras</label>
<div class="col-md-8">
<asp:TextBox runat="server" ID="TxtCodigoBarras"></asp:TextBox>
<asp:TextBox runat="server" ID="TxtCodigoBarras" OnTextChanged="TxtCodigoBarras_Change" AutoPostBack="true"></asp:TextBox>
</div>
</div>
<div class="row" style="margin-top: 5px;">
@@ -241,6 +241,24 @@
</div>
</div>
<div class="row" style="margin-top: 5px;" runat="server" id="divSeccionAlmacen" visible="false">
<label class="col-md-4">Sección Almacén</label>
<div class="col-md-8">
<asp:DropDownList ID="DdlSeccionAlmacen" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" ></asp:DropDownList>
</div>
</div>
<div class="row" style="margin-top: 5px;" runat="server" id="divLote" visible="false">
<label class="col-md-4">Lote</label>
<div class="col-md-8">
<asp:TextBox runat="server" ID="TxtLote"></asp:TextBox>
</div>
</div>
<div class="row" style="margin-top: 5px;" runat="server" id="divFechaCaducidad" visible="false">
<label class="col-md-4">Fecha Caducidad</label>
<div class="col-md-8">
<asp:TextBox runat="server" ID="TxtFechaCaducidad"></asp:TextBox>
</div>
</div>
<div class="row" style="margin-top: 5px;">
<div class="col-md-12" style="text-align: center;">
<asp:Button ID="BtnGuardar" runat="server" ValidationGroup="GrpIngresar" Text="Ingresar" class="btn btn-primary" Enabled="false" />
@@ -304,7 +322,10 @@
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
<asp:BoundField HeaderText="Serie/Lote" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
</Columns>
</asp:GridView>
@@ -325,7 +346,10 @@
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Sección Almacén" DataField="SeccionAlmacen" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
<asp:BoundField HeaderText="Serie/Lote" DataField="SerieLote" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-HorizontalAlign="Left" Visible="false"></asp:BoundField>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>

View File

@@ -89,6 +89,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
Private Sub CargaDatos(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1)
Dim ObjInventario As New ClsInventarios
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
DdlSeccionAlmacen.DataBind()
DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
If ObjInventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
Dim CveEstatus = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus")
Select Case CveEstatus
@@ -181,7 +184,11 @@ Partial Class Inventarios_InventarioFisicoDetalle
If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, CveUsuario) Then
If ObjInventario.DtResultados.Rows.Count > 0 Then
GvIFDUltimoRegistrado.DataSource = ObjInventario.DtResultados.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(1).CopyToDataTable
GvIFDUltimoRegistrado.DataSource = ObjInventario.DtResultados.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(1).CopyToDataTable
GvIFDUltimoRegistrado.Columns(4).Visible = ObjInventario.DtResultados.Rows(0)("CveSeccionAlmacen").ToString.ToEntero > 0
GvIFDUltimoRegistrado.Columns(6).Visible = ObjInventario.DtResultados.Rows(0)("Lote").ToString <> ""
GvIFDUltimoRegistrado.Columns(7).Visible = ObjInventario.DtResultados.Rows(0)("FechaCaducidad").ToString.ToDate > MinFecha
Else
GvIFDUltimoRegistrado.DataSource = Nothing
End If
@@ -223,6 +230,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
Dim Inventario As New ClsInventarios
If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then
If Inventario.DtResultados.Rows.Count > 0 Then
GvIFD.Columns(4).Visible = Inventario.DtResultados.MAX("CveSeccionAlmacen") > 0
GvIFD.Columns(6).Visible = Inventario.DtResultados.MAX("Lote") <> ""
GvIFD.Columns(7).Visible = Inventario.DtResultados.MAX("FechaCaducidad").ToDate > MinFecha
GvIFD.DataSource = Inventario.DtResultados '.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(500).CopyToDataTable
Else
GvIFD.DataSource = Nothing
@@ -248,8 +258,12 @@ Partial Class Inventarios_InventarioFisicoDetalle
Dim CveProducto As Integer = -1
Dim CveUnidadMedida As Integer
Dim Codigo As String = If(TxtCodigo.Text.Trim <> "", TxtCodigo.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes
Dim CodigoBarras As String = If(TxtCodigoBarras.Text.Trim <> "", TxtCodigoBarras.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes
Dim CodigoBarras As String = If(TxtCodigoBarras.Text.Trim <> "", TxtCodigoBarras.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes
Dim SeccionAlmacen As String = If(DdlSeccionAlmacen.SelectedValue.ToEntero > -1, DdlSeccionAlmacen.SelectedItem.Text, "")
Dim CveSeccionAlmacen As Integer = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedValue.ToEntero, -1)
Dim SerieLote As String = TxtCodigoSerie.Text.Trim
Dim Lote As String = If(TxtLote.Text.Length > 0, TxtLote.Text, "-1")
Dim FechaCaducidad As String = If(TxtFechaCaducidad.Text.Length > 0, TxtFechaCaducidad.Text, MinFecha.ToString)
Dim CveMetodoInv As Integer = -1
Dim Cantidad = TxtCantidadProducto.Text.ToDouble
@@ -283,14 +297,22 @@ Partial Class Inventarios_InventarioFisicoDetalle
Dim Consulto As Boolean = False
Using Inventarios As New ClsInventarios
If Inventarios.AddInventarioFisicoDetalle(CveInventarioFisico, CveProducto, CveUnidadMedida, If(CveMetodoInv = 5, 1, Cantidad), SerieLote, UsuarioActual.CveUsuario) Then
If Inventarios.AddInventarioFisicoDetalle(CveInventarioFisico, CveProducto, CveUnidadMedida, If(CveMetodoInv = 5, 1, Cantidad), SerieLote, UsuarioActual.CveUsuario,
CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then
If GvIFDUltimoRegistrado.Rows.Count > 0 Then
GvIFDUltimoRegistrado.Columns(4).Visible = CveSeccionAlmacen > 0
GvIFDUltimoRegistrado.Columns(6).Visible = Lote <> "-1"
GvIFDUltimoRegistrado.Columns(7).Visible = FechaCaducidad <> "01/01/1900"
GvIFDUltimoRegistrado.Rows(0).Cells(0).Text = Now
GvIFDUltimoRegistrado.Rows(0).Cells(1).Text = dr("CodigoBarras").ToString
GvIFDUltimoRegistrado.Rows(0).Cells(2).Text = dr("Codigo").ToString
GvIFDUltimoRegistrado.Rows(0).Cells(3).Text = dr("PS").ToString
GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = TxtCodigoSerie.Text.Trim
GvIFDUltimoRegistrado.Rows(0).Cells(5).Text = TxtCantidadProducto.Text.Trim
GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = SeccionAlmacen
GvIFDUltimoRegistrado.Rows(0).Cells(5).Text = TxtCodigoSerie.Text.Trim
GvIFDUltimoRegistrado.Rows(0).Cells(6).Text = Lote
GvIFDUltimoRegistrado.Rows(0).Cells(7).Text = FechaCaducidad
GvIFDUltimoRegistrado.Rows(0).Cells(8).Text = TxtCantidadProducto.Text.Trim
Else
Consulto = True
If Inventarios.GetInventarioFisicoDetalle(CveInventarioFisico, UsuarioActual.CveUsuario) Then
@@ -308,6 +330,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
TxtCodigoSerie.Text = ""
TxtCodigo.Text = ""
TxtCantidadProducto.Text = "1"
DdlSeccionAlmacen.SelectedValue = "-1"
TxtLote.Text = ""
TxtFechaCaducidad.Text = ""
RegistraScript("playsonidito('beep-07.wav')")
Else
TxtCodigoSerie.Text = ""
@@ -320,6 +345,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
TxtCodigoBarras.Text = ""
TxtCodigoSerie.Text = ""
TxtCodigo.Text = ""
DdlSeccionAlmacen.SelectedValue = "-1"
TxtLote.Text = ""
TxtFechaCaducidad.Text = ""
Alert("No se encontró el producto, favor de escribirlo correctamente.", TipoMensaje.MsgError)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
End If
@@ -491,4 +519,17 @@ Partial Class Inventarios_InventarioFisicoDetalle
' UsuarioActual.CveUsuario
'
End Sub
Protected Sub TxtCodigoBarras_Change(sender As Object, e As EventArgs)
Dim Producto As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoBarras.Text}'")
Dim AplicaSeccion As Boolean = Producto("AplicaSeccion") = "1"
Dim AplicaCaducidad As Boolean = Producto("AplicaCaducidad") = "1"
Dim AplicaLote As Boolean = Producto("AplicaLote") = "1"
divSeccionAlmacen.Visible = AplicaSeccion
divLote.Visible = AplicaLote
divFechaCaducidad.Visible = AplicaCaducidad
UPAgregarPro.Update()
End Sub
End Class

View File

@@ -77,11 +77,12 @@ Partial Class RepTraspasoAlmacen
If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjInventarios.DtResultados
DtInventarios = ObjInventarios.DtResultados
GvDatos.DataBind()
UPDatos.Update()
End If
ObjInventarios.Dispose()
GvDatos.DataBind()
UPDatos.Update()
End Sub
#End Region

View File

@@ -5983,7 +5983,7 @@ Partial Class Clientes
#Region "C U E N T A S - B A N C A R I A S"
Private Sub CargaCuentasBancarias()
Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False)
If CveCliente <= 0 Then Exit Sub
@@ -6004,9 +6004,8 @@ Partial Class Clientes
End If
ObjCuentasBancos.Dispose()
CargaPSGridCuentasBancos()
RecargaGlobalCuentasBancarias()
CargaPSGridCuentasBancos()
CargaMonedas()
End Sub
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
@@ -6208,13 +6207,10 @@ Partial Class Clientes
RecargaGlobalCuentasBancarias()
End Sub
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveCliente > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.GetCuentasDepositos() Then
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
End If
ObjCuentasBancos.Dispose()
If CveCliente > 0 Then
GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing
End If
End Sub

View File

@@ -3313,7 +3313,7 @@
<tr align="left" id="trPaqueteriaOpciones" runat="server" visible="false">
<td colspan="2">
<asp:RadioButtonList runat="server" ID="RblPaqueteria">
<asp:ListItem Value="1" Text="Entrega En Mostrador" />
<asp:ListItem Value="1" Selected="True" Text="Entrega En Mostrador" />
<asp:ListItem Value="2" Text="Entrega Interna" />
<asp:ListItem Value="3" Text="Entrega Externa" />
</asp:RadioButtonList>

View File

@@ -25708,7 +25708,7 @@ Partial Class Ventas
End Sub
Private Sub MostrarOpcioensPaqueteria()
Dim mostrarOpcionesPaq As Boolean = DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped")
Dim mostrarOpcionesPaq As Boolean = DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Ped") And UsuarioActual.Empresa.Funcionalidad(280) = "1"
trPaqueteriaOpciones.Visible = mostrarOpcionesPaq
trPaqueteriOpcionesLabel.Visible = mostrarOpcionesPaq
End Sub