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

@@ -1369,7 +1369,6 @@ Public Class ClsGenerales
#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 " #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 Dim Retorno As Boolean = False
DataAdapter("PA_Gral_CuentasDepositosGet") DataAdapter("PA_Gral_CuentasDepositosGet")

View File

@@ -2421,7 +2421,8 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function 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 Dim Retorno As Boolean = False
DataAdapter("PA_Inv_InventarioFisicoDetalleAdd") DataAdapter("PA_Inv_InventarioFisicoDetalleAdd")
@@ -2433,6 +2434,9 @@ Public Class ClsInventarios
.Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@Serie", SqlDbType.VarChar).Value = Serie .Add("@Serie", SqlDbType.VarChar).Value = Serie
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .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 .Add("@Estatus", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With

View File

@@ -442,6 +442,34 @@ Public Class ClsPaginas
Application("GlobalDTProveedoresCuentas") = value Application("GlobalDTProveedoresCuentas") = value
End Set End Set
End Property 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 Property GlobalDTProveedorClasificacion(CveEmpresa As Integer) As DataTable
Get Get
Dim AppNombre As String = String.Format("GlobalDTProveedorClasificacion-{0}", CveEmpresa) Dim AppNombre As String = String.Format("GlobalDTProveedorClasificacion-{0}", CveEmpresa)
@@ -7254,7 +7282,7 @@ Public Class ClsPaginas
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
Dim ObjCuentasBancos As New ClsGenerales() 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 CuentasActivas As DataTable = ObjCuentasBancos.DtResultados.FiltraParametros("EstatusTexto = 'Activo'")
Dim CuentasStr As New StringBuilder("") Dim CuentasStr As New StringBuilder("")
For Each CuentasBancarios As DataRow In CuentasActivas.Rows For Each CuentasBancarios As DataRow In CuentasActivas.Rows

View File

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

View File

@@ -151,7 +151,7 @@ Partial Class Bancos_MovimientosBancarios
If GvProveedores.Rows(i).FCCheckBox("CheckAgregar").Checked = True Then If GvProveedores.Rows(i).FCCheckBox("CheckAgregar").Checked = True Then
DTProveedorActual = DTProveedores.FiltraParametros(String.Format("CveProveedor = {0}", GvProveedores.Rows(i).DataKey("CveProveedor"))) 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 DTProveedorBancos = ObjCuentasBancos.DtResultados
RowBanco = DTProveedorBancos.Rows(0) RowBanco = DTProveedorBancos.Rows(0)
Else Else
@@ -319,7 +319,7 @@ Partial Class Bancos_MovimientosBancarios
DTProveedorActual = DTProveedores.FiltraParametros(String.Format("CveProveedor = 21114")) DTProveedorActual = DTProveedores.FiltraParametros(String.Format("CveProveedor = 21114"))
If ObjCuentasBancos.GetCuentasDepositos(21114) Then If ObjCuentasBancos.GetCuentasDepositos(CveProveedor:=21114) Then
DTProveedorBancos = ObjCuentasBancos.DtResultados DTProveedorBancos = ObjCuentasBancos.DtResultados
RowBanco = DTProveedorBancos.Rows(0) RowBanco = DTProveedorBancos.Rows(0)
Else 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("CajaChica", "Caja chica: " & ParamComprobacion.Rows(0)("BancoNumCuentaMoneda").ToString))
params.Add(New ReportParameter("observaciones", "Observaciones: " & ParamComprobacion.Rows(0)("Observaciones").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("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("importe", ParamComprobacion.Rows(0)("Importe").ToString))
params.Add(New ReportParameter("TotAbono", DtComprobacion.SUM("Abonado").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") RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarPeriodosBloqueo"), "jsHideModalPeriodosBloqueo")
UpGral.Update() UpGral.Update()
Ejercicio = -1
Alert("Bloqueo Agregado Correctamente", TipoMensaje.MsgInformacion) Alert("Bloqueo Agregado Correctamente", TipoMensaje.MsgInformacion)
Else Else
Alert("Ocurrió un error al guardar el Periodo de Bloqueo", TipoMensaje.MsgError) Alert("Ocurrió un error al guardar el Periodo de Bloqueo", TipoMensaje.MsgError)
@@ -138,15 +138,14 @@ Partial Class Contabilidad_CatPeriodosBloqueo
UpGral.Update() UpGral.Update()
Alert("Bloqueo Actualizado Correctamente", TipoMensaje.MsgInformacion) Alert("Bloqueo Actualizado Correctamente", TipoMensaje.MsgInformacion)
Ejercicio = -1
Actualizar = False
Else Else
Dim mensajeAlerta As String = AplicarBloqueso.Replace(";", Environment.NewLine) Dim mensajeAlerta As String = AplicarBloqueso.Replace(";", Environment.NewLine)
Alert(String.Format("No se puede bloquear el periodo por: <br/>{0} ", mensajeAlerta), TipoMensaje.MsgError) Alert(String.Format("No se puede bloquear el periodo por: <br/>{0} ", mensajeAlerta), TipoMensaje.MsgError)
End If End If
End If End If
Ejercicio = -1
Actualizar = False
ObjConta.Dispose() ObjConta.Dispose()
End Sub End Sub

View File

@@ -114,10 +114,11 @@
<td> <td>
<asp:DropDownList ID="DdlEstatus" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="200px"> <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="False" Text="Seleccione" Value="-1"></asp:ListItem>--%>
<asp:ListItem Selected="True" Text="En Proceso" Value="1"></asp:ListItem> <asp:ListItem Selected="True" Text="Pendiente" Value="1"></asp:ListItem>
<asp:ListItem Selected="False" Text="Confirmado por Proveedor" Value="2"></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="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: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> <%-- <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>--%> <ajax:ValidatorCalloutExtender ID="VCEDdlEstatus" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlEstatus" Width="250px"></ajax:ValidatorCalloutExtender>--%>
@@ -200,7 +201,7 @@
</tr> </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 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;"> <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> <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> </tr>
</table> </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> <Columns>
<asp:BoundField ItemStyle-Width="150px" DataField="Almacen" /> <asp:BoundField ItemStyle-Width="150px" DataField="Almacen" />
<asp:TemplateField HeaderText="Cantidad Devolucion" Visible="false"> <asp:TemplateField HeaderText="Cantidad Devolucion" Visible="false">

View File

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

View File

@@ -89,7 +89,7 @@
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </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%"> <asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" HeaderStyle-Width="10%">
<ItemTemplate> <ItemTemplate>
&nbsp;<asp:Literal ID="LblFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:dd/MM/yyyy}") %>'></asp:Literal> &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;"> <div class="row" style="margin-top: 5px;">
<label class="col-md-4">Código.Barras</label> <label class="col-md-4">Código.Barras</label>
<div class="col-md-8"> <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> </div>
<div class="row" style="margin-top: 5px;"> <div class="row" style="margin-top: 5px;">
@@ -241,6 +241,24 @@
</div> </div>
</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="row" style="margin-top: 5px;">
<div class="col-md-12" style="text-align: center;"> <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" /> <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 Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Código" DataField="Codigo" 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="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="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:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
@@ -325,7 +346,10 @@
<asp:BoundField HeaderText="Código Barras" DataField="CodigoBarras" ItemStyle-HorizontalAlign="Left"></asp:BoundField> <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="Código" DataField="Codigo" ItemStyle-HorizontalAlign="Left"></asp:BoundField>
<asp:BoundField HeaderText="Producto" DataField="PS" 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="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:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right"></asp:BoundField>
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <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) Private Sub CargaDatos(CveInventarioFisico As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1)
Dim ObjInventario As New ClsInventarios 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 If ObjInventario.GetInventarioFisico(CveInventarioFisico, CveEmpresa, -1, -1) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
Dim CveEstatus = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus") Dim CveEstatus = ObjInventario.DtResultados.FiltroPrimeroValor("CveEstatus")
Select Case CveEstatus Select Case CveEstatus
@@ -182,6 +185,10 @@ Partial Class Inventarios_InventarioFisicoDetalle
If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, CveUsuario) Then If ObjInventario.GetInventarioFisicoDetalle(CveInventarioFisico, CveUsuario) Then
If ObjInventario.DtResultados.Rows.Count > 0 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 Else
GvIFDUltimoRegistrado.DataSource = Nothing GvIFDUltimoRegistrado.DataSource = Nothing
End If End If
@@ -223,6 +230,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
Dim Inventario As New ClsInventarios Dim Inventario As New ClsInventarios
If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then
If Inventario.DtResultados.Rows.Count > 0 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 GvIFD.DataSource = Inventario.DtResultados '.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(500).CopyToDataTable
Else Else
GvIFD.DataSource = Nothing GvIFD.DataSource = Nothing
@@ -249,7 +259,11 @@ Partial Class Inventarios_InventarioFisicoDetalle
Dim CveUnidadMedida As Integer Dim CveUnidadMedida As Integer
Dim Codigo As String = If(TxtCodigo.Text.Trim <> "", TxtCodigo.Text.Trim, "-1").Replace("'", "''") ' scanner cambian los guiones por apostrofes 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 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 CveMetodoInv As Integer = -1
Dim Cantidad = TxtCantidadProducto.Text.ToDouble Dim Cantidad = TxtCantidadProducto.Text.ToDouble
@@ -283,14 +297,22 @@ Partial Class Inventarios_InventarioFisicoDetalle
Dim Consulto As Boolean = False Dim Consulto As Boolean = False
Using Inventarios As New ClsInventarios 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 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(0).Text = Now
GvIFDUltimoRegistrado.Rows(0).Cells(1).Text = dr("CodigoBarras").ToString GvIFDUltimoRegistrado.Rows(0).Cells(1).Text = dr("CodigoBarras").ToString
GvIFDUltimoRegistrado.Rows(0).Cells(2).Text = dr("Codigo").ToString GvIFDUltimoRegistrado.Rows(0).Cells(2).Text = dr("Codigo").ToString
GvIFDUltimoRegistrado.Rows(0).Cells(3).Text = dr("PS").ToString GvIFDUltimoRegistrado.Rows(0).Cells(3).Text = dr("PS").ToString
GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = TxtCodigoSerie.Text.Trim GvIFDUltimoRegistrado.Rows(0).Cells(4).Text = SeccionAlmacen
GvIFDUltimoRegistrado.Rows(0).Cells(5).Text = TxtCantidadProducto.Text.Trim 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 Else
Consulto = True Consulto = True
If Inventarios.GetInventarioFisicoDetalle(CveInventarioFisico, UsuarioActual.CveUsuario) Then If Inventarios.GetInventarioFisicoDetalle(CveInventarioFisico, UsuarioActual.CveUsuario) Then
@@ -308,6 +330,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
TxtCodigoSerie.Text = "" TxtCodigoSerie.Text = ""
TxtCodigo.Text = "" TxtCodigo.Text = ""
TxtCantidadProducto.Text = "1" TxtCantidadProducto.Text = "1"
DdlSeccionAlmacen.SelectedValue = "-1"
TxtLote.Text = ""
TxtFechaCaducidad.Text = ""
RegistraScript("playsonidito('beep-07.wav')") RegistraScript("playsonidito('beep-07.wav')")
Else Else
TxtCodigoSerie.Text = "" TxtCodigoSerie.Text = ""
@@ -320,6 +345,9 @@ Partial Class Inventarios_InventarioFisicoDetalle
TxtCodigoBarras.Text = "" TxtCodigoBarras.Text = ""
TxtCodigoSerie.Text = "" TxtCodigoSerie.Text = ""
TxtCodigo.Text = "" TxtCodigo.Text = ""
DdlSeccionAlmacen.SelectedValue = "-1"
TxtLote.Text = ""
TxtFechaCaducidad.Text = ""
Alert("No se encontró el producto, favor de escribirlo correctamente.", TipoMensaje.MsgError) Alert("No se encontró el producto, favor de escribirlo correctamente.", TipoMensaje.MsgError)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
End If End If
@@ -491,4 +519,17 @@ Partial Class Inventarios_InventarioFisicoDetalle
' UsuarioActual.CveUsuario ' UsuarioActual.CveUsuario
' '
End Sub 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 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 If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjInventarios.DtResultados GvDatos.DataSource = ObjInventarios.DtResultados
DtInventarios = ObjInventarios.DtResultados DtInventarios = ObjInventarios.DtResultados
GvDatos.DataBind()
UPDatos.Update()
End If End If
ObjInventarios.Dispose() ObjInventarios.Dispose()
GvDatos.DataBind()
UPDatos.Update()
End Sub End Sub
#End Region #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" #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 If CveCliente <= 0 Then Exit Sub
@@ -6006,7 +6006,6 @@ Partial Class Clientes
ObjCuentasBancos.Dispose() ObjCuentasBancos.Dispose()
CargaPSGridCuentasBancos() CargaPSGridCuentasBancos()
RecargaGlobalCuentasBancarias()
CargaMonedas() CargaMonedas()
End Sub End Sub
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs) Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
@@ -6209,12 +6208,9 @@ Partial Class Clientes
End Sub End Sub
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1) Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
If CveCliente > 0 Then If CveCliente > 0 Then
Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.GetCuentasDepositos() Then GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1, True) = Nothing
GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
End If
ObjCuentasBancos.Dispose()
End If End If
End Sub End Sub

View File

@@ -3313,7 +3313,7 @@
<tr align="left" id="trPaqueteriaOpciones" runat="server" visible="false"> <tr align="left" id="trPaqueteriaOpciones" runat="server" visible="false">
<td colspan="2"> <td colspan="2">
<asp:RadioButtonList runat="server" ID="RblPaqueteria"> <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="2" Text="Entrega Interna" />
<asp:ListItem Value="3" Text="Entrega Externa" /> <asp:ListItem Value="3" Text="Entrega Externa" />
</asp:RadioButtonList> </asp:RadioButtonList>

View File

@@ -25708,7 +25708,7 @@ Partial Class Ventas
End Sub End Sub
Private Sub MostrarOpcioensPaqueteria() 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 trPaqueteriaOpciones.Visible = mostrarOpcionesPaq
trPaqueteriOpcionesLabel.Visible = mostrarOpcionesPaq trPaqueteriOpcionesLabel.Visible = mostrarOpcionesPaq
End Sub End Sub