Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -105,6 +105,14 @@ Partial Class AF_AF
|
||||
Set(value As Integer)
|
||||
ViewState("AFInvCveAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property AFInvCveSeccionAlmacen As Integer
|
||||
Get
|
||||
Return If(ViewState("AFInvCveSeccionAlmacen") Is Nothing, -1, ViewState("AFInvCveSeccionAlmacen").ToString.ToEntero())
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("AFInvCveSeccionAlmacen") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property AFInvSerie As String
|
||||
Get
|
||||
@@ -2102,8 +2110,8 @@ Partial Class AF_AF
|
||||
If AFInvCvePS > 0 AndAlso AFInvCveAlmacen > 0 Then
|
||||
Dim CveUMInv = GlobalDTPS(CveEmpresaActual, CvePS:=AFInvCvePS).FiltroPrimeroValor("CveUM").ToEntero
|
||||
If CveUMInv > 0 Then
|
||||
CveMovimientoSalidaInv = ObjInventarios.AddMovimiento(AFInvCveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, CveEmpresaActual, -1, -1, -1, -1, Observaciones:=$"Salida de inventario para Activo Fijo | {TxtCodigo.Text.Trim}")
|
||||
If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, Serie:=AFInvSerie) Then
|
||||
CveMovimientoSalidaInv = ObjInventarios.AddMovimiento(AFInvCveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, CveEmpresaActual, -1, -1, -1, -1, Observaciones:=$"Salida de inventario para Activo Fijo | {TxtCodigo.Text.Trim}", Modulo:="AF1")
|
||||
If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoSalidaInv, 1, CveUMInv, AFInvCvePS, 0, -1, Serie:=AFInvSerie, CveSeccionAlmacen:=AFInvCveSeccionAlmacen) Then
|
||||
ErrorGuardar = True
|
||||
End If
|
||||
Else
|
||||
@@ -3051,6 +3059,7 @@ Partial Class AF_AF
|
||||
AFInvSerie = ""
|
||||
AFInvCvePS = -1
|
||||
AFInvCveAlmacen = -1
|
||||
AFInvCveSeccionAlmacen = -1
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then Exit Sub
|
||||
@@ -3076,6 +3085,7 @@ Partial Class AF_AF
|
||||
AFInvSerie = ""
|
||||
AFInvCvePS = -1
|
||||
AFInvCveAlmacen = -1
|
||||
AFInvCveSeccionAlmacen = -1
|
||||
|
||||
Alert("No hay existencias suficientes del producto. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
@@ -3094,7 +3104,7 @@ Partial Class AF_AF
|
||||
|
||||
AFInvCvePS = DdlAFInvPS.SelectedValue.ToEntero
|
||||
AFInvCveAlmacen = DdlAFInvAlmacen.SelectedValue.ToEntero
|
||||
|
||||
AFInvCveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero
|
||||
RegistraScript("$('#ModalAFInv').modal('hide')", "hide")
|
||||
|
||||
DivAFInvAdvertencia.Visible = True
|
||||
@@ -3652,12 +3662,12 @@ Partial Class AF_AF
|
||||
DivSeccion.Visible = CBool(drr("AplicaSeccion"))
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
If CBool(drr("AplicaSeccion")) Then
|
||||
CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero)
|
||||
'DdlSeccionAlmacen.DataSource = dtt
|
||||
'DdlSeccionAlmacen.DataBind()
|
||||
'CargaSeccionesAlmacen(DdlSeccionAlmacen, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero)
|
||||
DdlSeccionAlmacen.DataSource = dtt
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
|
||||
'dtt.Dispose()
|
||||
dtt.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
@@ -3876,6 +3876,32 @@ Public Class ClsContabilidad
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetLibroDiario(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
|
||||
'SqlAdapter.SelectCommand.t
|
||||
|
||||
DataAdapter("PA_Conta_LibroDiario")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
Me.OnError("Ocurrió un error al obtener libro diario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "I N C O N S I S T E N C I A S"
|
||||
|
||||
@@ -4257,6 +4257,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoCC.aspx".ToUpper(), 594)
|
||||
PaginaDict.Add("/Contabilidad2/RepVariacionHaciendaPublica.aspx".ToUpper(), 595)
|
||||
PaginaDict.Add("/Contabilidad2/CatCuentas.aspx".ToUpper(), 596)
|
||||
PaginaDict.Add("/Contabilidad2/RepLibroDiario.aspx".ToUpper(), 544)
|
||||
|
||||
PaginaDict.Add("/Contabilidad2/RepSituacionFinancieraSAT.aspx".ToUpper(), 615)
|
||||
PaginaDict.Add("/Contabilidad2/RepEstadoActividadesSAT.aspx".ToUpper(), 616)
|
||||
|
||||
@@ -3146,6 +3146,8 @@ Partial Class Compras_Compras
|
||||
|
||||
ViewState("CveProveedor") = ObjProveedor.CveProveedor
|
||||
ViewState("CveTipoProveedor") = ObjProveedor.CveTipoProveedor
|
||||
If ObjProveedor.CveTipoProveedor = 1 Then LblProveedor.Text = "Proveedor:" Else LblProveedor.Text = "Acreedor:"
|
||||
CveTipoConcepto = ObjProveedor.CveTipoProveedor
|
||||
|
||||
'Conta ContPAQ
|
||||
ViewState("CtaProveedor") = ObjProveedor.IdCtaContProveedores
|
||||
|
||||
104
Contabilidad2/RepLibroDiario.aspx
Normal file
104
Contabilidad2/RepLibroDiario.aspx
Normal file
@@ -0,0 +1,104 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepLibroDiario.aspx.vb" Inherits="Contabilidad2_RepLibroDiario" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Libro Diario
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" Visible="false" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="Imprimir" Visible="false" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||
<asp:PostBackTrigger ControlID="Imprimir" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" CssClass="btn btn-primary" Text="Consultar" Width="100px" OnClick="BtnConsultar_Click" Enabled="false"/>
|
||||
</div>
|
||||
<div class="titlefiltros caption ">
|
||||
<div class="row">
|
||||
<label class="col-md-1" style="width: 90px; padding-right: 2px;">Fecha Inicio:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDel" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaDel" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaDel" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVFechaDel" runat="server" ControlToValidate="TxtFechaDel" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2Del" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDel" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1" style="width: 80px; padding-right: 2px;">Fecha Fin:</label>
|
||||
<div class="col-md-2" style="width: 140px;">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 80px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaAl" runat="server" CssClass="form-control" Width="99%" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioAl" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaAl" runat="server" TargetControlID="TxtFechaAl" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioAl" runat="server" TargetControlID="TxtFechaAl" PopupButtonID="ImgCalendarioAl" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
<asp:CompareValidator ID="CVFechaAl" runat="server" ControlToValidate="TxtFechaAl" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFecha2Al" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaAl" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" style="margin-left: 15px; margin-right: 15px;">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatos" CssClass="table table-striped table-hover Widthall" GridLines="None" AutoGenerateColumns="False" runat="server">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoPoliza" />
|
||||
<asp:BoundField HeaderText="Poliza" DataField="FolioPoliza" />
|
||||
<asp:BoundField HeaderText="Concepto" DataField="Concepto" />
|
||||
<asp:BoundField HeaderText="Cuenta" DataField="Codigo" />
|
||||
<asp:BoundField HeaderText="Nombre" DataField="Nombre" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="Descripcion" />
|
||||
<asp:BoundField HeaderText="Cargos" DataField="Cargos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.00}" />
|
||||
<asp:BoundField HeaderText="Abonos" DataField="Abonos" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.00}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
144
Contabilidad2/RepLibroDiario.aspx.vb
Normal file
144
Contabilidad2/RepLibroDiario.aspx.vb
Normal file
@@ -0,0 +1,144 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Contabilidad2_RepLibroDiario
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaInicio As Date
|
||||
Get
|
||||
FechaInicio = ViewState("FechaInicio").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property FechaFin As Date
|
||||
Get
|
||||
FechaFin = ViewState("FechaFin").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
InicializaValores()
|
||||
|
||||
BtnConsultar.Enabled = True
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub InicializaValores()
|
||||
|
||||
TxtFechaDel.Text = $"01/01/{Now.Year}"
|
||||
TxtFechaAl.Text = Now.ToShortDateString
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A - D A T O S"
|
||||
Private Sub CargaDatos()
|
||||
|
||||
FechaInicio = If(IsDate(TxtFechaDel.Text), TxtFechaDel.Text.ToDate, MinFecha)
|
||||
FechaFin = If(IsDate(TxtFechaAl.Text), TxtFechaAl.Text.ToDate, MaxFecha)
|
||||
|
||||
'FechaInicio = New Date(2016, 1, 1)
|
||||
'FechaFin = New Date(2016, 1, 31)
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetLibroDiario(FechaInicio, FechaFin, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
Else
|
||||
DtDatos = Nothing
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
GvDatos.DataSource = DtDatos
|
||||
GvDatos.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
ImgExcel.Visible = True
|
||||
Imprimir.Visible = True
|
||||
|
||||
Else
|
||||
ImgExcel.Visible = False
|
||||
Imprimir.Visible = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
|
||||
''CABECERA
|
||||
'If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 1 Then
|
||||
' e.Row.Font.Bold = True
|
||||
' e.Row.Cells(4).Text = ""
|
||||
' e.Row.Cells(5).Text = ""
|
||||
' e.Row.Cells(6).Text = ""
|
||||
' e.Row.Cells(7).Text = ""
|
||||
' e.Row.Cells(8).Text = ""
|
||||
' e.Row.CssClass = "SubTotales" '
|
||||
'End If
|
||||
|
||||
'DETALLE
|
||||
If e.Row.DBCampo("Codigo") <> "" Then
|
||||
e.Row.Cells(0).Text = ""
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(3).Text = ""
|
||||
End If
|
||||
|
||||
'SUBTOTAL
|
||||
If e.Row.DBCampo("Codigo") = "" Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(0).Text = ""
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(3).Text = ""
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(5).Text = ""
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(6).Text = "Total:"
|
||||
e.Row.CssClass = "SubTotales"
|
||||
End If
|
||||
|
||||
'TOTAL
|
||||
If e.Row.DBCampo("TipoRenglon").ToString.ToEntero = 4 Then
|
||||
e.Row.Font.Bold = True
|
||||
e.Row.Cells(0).Text = ""
|
||||
e.Row.Cells(1).Text = ""
|
||||
e.Row.Cells(2).Text = ""
|
||||
e.Row.Cells(3).Text = ""
|
||||
e.Row.Cells(4).Text = ""
|
||||
e.Row.Cells(5).Text = ""
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
||||
e.Row.Cells(6).Text = "Total:"
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1408,7 +1408,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
|
||||
Else
|
||||
ErrorAC = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -216,26 +216,21 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<asp:GridView ID="GvDatosArmado" DataKeyNames="Cantidad,CvePS,CveUM,Consec,Inv_CveMetodoInventario,AplicaSeccion,AplicaSerie,AplicaCaducidad,AplicaLote" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<asp:GridView ID="GvDatosArmado" DataKeyNames="Cantidad,CvePS,CveUM,Consec,AplicaSeccion,AplicaSerie,AplicaCaducidad,AplicaLote" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cant. Necesaria" DataField="Cantidad" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Cant. Disponible" DataField="CantidadDisponible2" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="40%" />
|
||||
<asp:BoundField HeaderText="Unidad Medida" DataField="UnidadMedida" ItemStyle-Width="20%" />
|
||||
<asp:TemplateField HeaderText="Serie Paquete">
|
||||
<asp:TemplateField HeaderText="Serie">
|
||||
<ItemTemplate>
|
||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
|
||||
<asp:LinkButton Text="<i class='fa fa-star'></i>" ID="BtnSeriePaquete" OnClick="BtnSeriePaquete_Click" CssClass="btn btn-xs btn-primary" runat="server" Visible="false" Style="float: left;" data-toggle="tooltip" title="Seleccionar como serie del paquete" />
|
||||
<asp:LinkButton Text="<i class='fa fa-star'></i>" ID="BtnSeriePaquete" OnClick="BtnSeriePaquete_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" data-toggle="tooltip" title="Seleccionar como serie del paquete" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sección Almacén">
|
||||
<asp:TemplateField HeaderText="Sección">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" CssClass="select2me" runat="server"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" CssClass="select2me" runat="server"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote">
|
||||
@@ -243,11 +238,12 @@
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Serie">
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSerie" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -488,7 +484,7 @@
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<asp:GridView ID="GvDatosDesarmado" DataKeyNames="Cantidad,CvePS,CveUM,Inv_CveMetodoInventario,Consec" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<asp:GridView ID="GvDatosDesarmado" DataKeyNames="Cantidad,CvePS,CveUM, AplicaSeccion,AplicaSerie,AplicaCaducidad,AplicaLote,Consec" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
@@ -509,6 +505,11 @@
|
||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sección">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" CssClass="select2me" runat="server"/>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
|
||||
@@ -88,14 +88,16 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
ViewState("CveCliente") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveTipoPS As Integer
|
||||
|
||||
Private Property AplicaSerie As Boolean
|
||||
Get
|
||||
Return CType(ViewState("CveTipoPS"), Integer)
|
||||
Return CType(ViewState("AplicaSerie"), Boolean)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveTipoPS") = value
|
||||
Set(value As Boolean)
|
||||
ViewState("AplicaSerie") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtSeriesDesarmado As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtSeriesDesarmado"), DataTable)
|
||||
@@ -208,7 +210,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Dim ObjProductosServicios As New ClsProductosServicios
|
||||
Dim DtDatos As New DataTable
|
||||
|
||||
Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("CveUM").ToEntero
|
||||
Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
Dim AplicaSerie As Boolean = False
|
||||
Dim CveUMTemp = drP("CveUM").ToString.ToEntero
|
||||
If ObjProductosServicios.GetPaqueteDetalle(DdlPaqueteArmado.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, CveUMTemp, TxtCantidadArmado.Text.ToDouble, DdlAlmacenArmado.SelectedValue.ToEntero, TxtFechaArmado.Text.ToDate, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) Then
|
||||
DtDatos = ObjProductosServicios.DtResultados.FiltraParametros("CveTipoPS = 2").Copy
|
||||
Else
|
||||
@@ -240,15 +244,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim AplicaSerie As String = ""
|
||||
|
||||
If ErrorExistencias Then
|
||||
Alert(TextoExistencias, TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
AplicaSerie = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("AplicaSerie")
|
||||
AplicaSerie = CBool(drP("AplicaSerie"))
|
||||
BtnGuadarArmado.Visible = True
|
||||
End If
|
||||
|
||||
If AplicaSerie = "True" Then
|
||||
If AplicaSerie Then
|
||||
DivSeriesPaqueteArmado.Visible = True
|
||||
Dim Dt As New DataTable
|
||||
Dt.Columns.Add("Row", GetType(Integer))
|
||||
@@ -274,9 +278,14 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
GvDatosArmado.DataSource = DtDatos
|
||||
GvDatosArmado.DataBind()
|
||||
|
||||
If ErrorExistencias Then
|
||||
GvDatosArmado.Columns(4).Visible = False
|
||||
End If
|
||||
GvDatosArmado.Columns(5).Visible = DtDatos.MAX("AplicaSeccion") = "True"
|
||||
'GvDatosArmado.Columns(6).Visible = DtDatos.MAX("Serie", "") <> ""
|
||||
GvDatosArmado.Columns(6).Visible = False 'DtDatos.MAX("Lote", "") <> ""
|
||||
GvDatosArmado.Columns(7).Visible = False 'DtDatos.MAX("FechaCaducidad", "FechaCaducidad is not null").ToDate > MinFecha
|
||||
|
||||
'If ErrorExistencias Then
|
||||
' GvDatosArmado.Columns(4).Visible = False
|
||||
'End If
|
||||
|
||||
UpDatosArmado.Update()
|
||||
UpGeneralesArmado.Update()
|
||||
@@ -285,7 +294,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
DtDatosDetalle.Clear()
|
||||
BtnGuadarDesarmado.Visible = False
|
||||
TotalDesarmado.Visible = False
|
||||
CveTipoPS = -1
|
||||
AplicaSerie = False
|
||||
TxtSerieDesarmado.Text = ""
|
||||
CvePaqueteDesarmado = -1
|
||||
TipoMovimiento = 2
|
||||
@@ -299,7 +308,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
BtnAgregarSerieDesarmado.Enabled = True
|
||||
|
||||
|
||||
Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteDesarmado.SelectedValue.ToEntero).FiltroPrimeroValor("CveUM").ToEntero
|
||||
Dim drP As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteDesarmado.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
|
||||
Dim CveUMTemp = drP("CveUM").ToString.ToEntero
|
||||
CveVendedor = If(RowApartadosDesarmado.Visible, DdlVendedorDesarmado.SelectedValue.ToEntero, -1)
|
||||
CveCliente = If(RowClienteDesarmado.Visible, DdlClienteDesarmado.SelectedValue.ToEntero, -1)
|
||||
Dim FechaFin As String = TxtFechaDesarmado.Text.ToDateTime.ToString("yyyy/MM/dd 23:59")
|
||||
@@ -314,7 +325,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Alert($"No hay existencia suficiente del paquete <b>""{DdlPaqueteDesarmado.SelectedItem.Text}""</b> para desarmar. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
Else
|
||||
CveTipoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteDesarmado.SelectedValue.ToEntero).FiltroPrimeroValor("Inv_CveMetodoInventario").ToEntero
|
||||
AplicaSerie = CBool(drP("AplicaSerie"))
|
||||
End If
|
||||
|
||||
|
||||
@@ -343,8 +354,8 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Next
|
||||
End If
|
||||
|
||||
If CveTipoPS = 5 Then
|
||||
GvDatosDesarmado.Columns(4).Visible = True
|
||||
If AplicaSerie Then
|
||||
|
||||
DivSeriesPaqueteDesarmado.Visible = True
|
||||
CreaDtSeriesDesarmado()
|
||||
DtSeriesDesarmado.Clear()
|
||||
@@ -363,6 +374,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
GvDatosDesarmado.DataSource = DtDatos
|
||||
GvDatosDesarmado.DataBind()
|
||||
|
||||
GvDatosDesarmado.Columns(4).Visible = CBool(DtDatos.MAX("AplicaSerie"))
|
||||
GvDatosDesarmado.Columns(5).Visible = CBool(DtDatos.MAX("AplicaSeccion"))
|
||||
|
||||
BtnGuadarDesarmado.Visible = True
|
||||
|
||||
TotalDesarmado.Visible = True
|
||||
@@ -404,7 +418,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Select Case (Tipo)
|
||||
Case 1 ' ARMADO
|
||||
For Each gvr As GridViewRow In GvDatosArmado.Rows
|
||||
If gvr.DataKey("Inv_CveMetodoInventario").ToEntero = 5 Then
|
||||
If gvr.DataKey("AplicaSerie") = "True" Then
|
||||
If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then
|
||||
Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -413,7 +427,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Next
|
||||
Case 2 ' DESARMADO
|
||||
For Each gvr As GridViewRow In GvDatosDesarmado.Rows
|
||||
If gvr.DataKey("Inv_CveMetodoInventario").ToEntero = 5 Then
|
||||
If gvr.DataKey("AplicaSerie") = "True" Then
|
||||
If gvr.DataKey("Cantidad").ToEntero <> DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec"))).Rows.Count Then
|
||||
Alert("Es necesario ingresas todas las series de los componentes.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -423,7 +437,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End Select
|
||||
|
||||
'VALIDA SI EL PAQUETE ES DE SERIE QUE SE INGRESEN TODAS LAS SERIES (CANTIDAD)
|
||||
If CveTipoPS = 5 Then
|
||||
If AplicaSerie Then
|
||||
Select Case (Tipo)
|
||||
Case 1 ' ARMADO
|
||||
For Each gvr As GridViewRow In GvSeriesPaqueteArmado.Rows
|
||||
@@ -458,7 +472,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Case 1 ' ARMADO
|
||||
|
||||
'SALIDA COMPONENTES
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenArmado, 5, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesArmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenArmado, 5, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesArmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Modulo:="ARMPAQ1")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoSalida <= 0 Then
|
||||
@@ -472,7 +486,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Dim Lote As String = If(Gvr.FCTextBox("TxtLote").Text = "", "-1", Gvr.FCTextBox("TxtLote").Text)
|
||||
Dim FechaCaducidad As String = If(Gvr.FCTextBox("TxtCaducidad").Text = "", "-1", Gvr.FCTextBox("TxtCaducidad").Text)
|
||||
Dim CveSeccionAlmacen As Integer = Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
|
||||
If Gvr.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
If CBool(Gvr.DataKey("AplicaSerie")) Then
|
||||
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
||||
If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
|
||||
MensajeError = String.Format("El Producto <b>{0}</b> con Serie: <b>{1}</b> no tiene existencia suficiente", Dr("PS"), Dr("Serie"))
|
||||
@@ -506,7 +520,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
|
||||
'ENTRADA PAQUETE
|
||||
If Not TieneError Then
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenArmado, 19, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesArmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveMovimientoRelacionado:=CveMovimientoSalida)
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenArmado, 19, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesArmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ARMPAQ2")
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoEntrada <= 0 Then
|
||||
@@ -520,14 +534,22 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Next
|
||||
PUTemp = PUTemp / LbCantidadArmado.Text.ToDecimal
|
||||
Dim CvePSTemp = CvePaqueteArmado
|
||||
Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteArmado).FiltroPrimeroValor("CveUM").ToEntero
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
Dim Drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteArmado).FiltroPrimero("")
|
||||
|
||||
If CveTipoPS = 5 Then
|
||||
Dim CveUMTemp As Integer = Drp("CveUM").ToString.ToEntero
|
||||
Dim AplicaSeccion As Boolean = CBool(Drp("AplicaSeccion"))
|
||||
If AplicaSeccion Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenArmado, CvePaqueteArmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
End If
|
||||
|
||||
|
||||
If AplicaSerie Then
|
||||
Dim ContadorPaquete = 1
|
||||
Dim DtSeriesComponentes As New DataTable
|
||||
For Each Gvr As GridViewRow In GvSeriesPaqueteArmado.Rows
|
||||
'AGREGA MOVTO DETALLE DE LA ENTRADA DEL PAQUETE
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, -1, Serie:=Gvr.FCTextBox("TxtSerie").Text.Trim) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Gvr.FCTextBox("TxtSerie").Text.Trim) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada"
|
||||
Exit For
|
||||
@@ -535,7 +557,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
|
||||
'INGRESA EN TABLA DE CONTROL DE PAQUETES CON SERIE
|
||||
For Each Gvr2 As GridViewRow In GvDatosArmado.Rows
|
||||
If Gvr2.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
If CBool(Gvr2.DataKey("AplicaSerie")) Then
|
||||
DtSeriesComponentes = New DataTable
|
||||
DtSeriesComponentes = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr2.DataKey("Consec").ToEntero)).Copy
|
||||
Dim CantidadComponente = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr2.DataKey("Consec").ToEntero)).Rows.Count / LbCantidadArmado.Text.ToEntero
|
||||
@@ -552,7 +574,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
ContadorPaquete = ContadorPaquete + 1
|
||||
Next
|
||||
Else
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, LbCantidadArmado.Text.ToDouble, CveUMTemp, CvePSTemp, PUTemp, -1) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, LbCantidadArmado.Text.ToDouble, CveUMTemp, CvePSTemp, PUTemp, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de entrada"
|
||||
End If
|
||||
@@ -569,7 +591,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
|
||||
|
||||
'SALIDA PAQUETE
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenDesarmado, 20, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesDesarmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente))
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacenDesarmado, 20, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesDesarmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Modulo:="ARMPAQ3")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoSalida <= 0 Then
|
||||
@@ -579,12 +601,18 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
|
||||
Dim CvePSTemp = CvePaqueteDesarmado
|
||||
Dim CveUMTemp = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimeroValor("CveUM").ToEntero
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
Dim Drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePaqueteDesarmado).FiltroPrimero("")
|
||||
|
||||
If CveTipoPS = 5 Then
|
||||
Dim CveUMTemp As Integer = Drp("CveUM").ToString.ToEntero
|
||||
Dim AplicaSeccion As Boolean = CBool(Drp("AplicaSeccion"))
|
||||
If AplicaSeccion Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDesarmado, CvePaqueteDesarmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
End If
|
||||
If AplicaSerie Then
|
||||
For Each Gvr As GridViewRow In GvSeriesPaqueteDesarmado.Rows
|
||||
'AGREGA MOVTO DETALLE DE LA SALIDA DEL PAQUETE
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, -1, Serie:=Gvr.DataKey("Serie").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Gvr.DataKey("Serie").ToString) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida"
|
||||
Exit For
|
||||
@@ -598,7 +626,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, TxtCantidadDesarmado.Text.ToDouble, CveUMTemp, CvePSTemp, 0, -1) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, TxtCantidadDesarmado.Text.ToDouble, CveUMTemp, CvePSTemp, 0, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los movimientos de salida"
|
||||
End If
|
||||
@@ -607,7 +635,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
|
||||
'ENTRADA COMPONENTES
|
||||
If Not TieneError Then
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenDesarmado, 4, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesDesarmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveMovimientoRelacionado:=CveMovimientoSalida)
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenDesarmado, 4, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesDesarmado.Text, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ARMPAQ4")
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
|
||||
If CveMovimientoEntrada <= 0 Then
|
||||
@@ -616,16 +644,20 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Else
|
||||
For Each Gvr As GridViewRow In GvDatosDesarmado.Rows
|
||||
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
|
||||
If Gvr.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
If CBool(Gvr.DataKey("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDesarmado, CvePaqueteDesarmado).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
End If
|
||||
|
||||
If CBool(Gvr.DataKey("AplicaSerie")) Then
|
||||
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, -1, Serie:=Dr("Serie").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString) Then
|
||||
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de entrada. Por favor vuelva a intentar."
|
||||
TieneError = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, -1) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.FCTextBox("TxtCosto").Text.ToDecimal, CveSeccionAlmacen:=CveSeccionAlmacen) Then
|
||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de entrada. Por favor vuelva a intentar."
|
||||
TieneError = True
|
||||
Exit For
|
||||
@@ -662,7 +694,7 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Private Sub Limpia(Tipo As Integer)
|
||||
|
||||
DtDatosDetalle.Clear()
|
||||
CveTipoPS = -1
|
||||
AplicaSerie = False
|
||||
|
||||
|
||||
'If Tipo = 1 Then
|
||||
@@ -719,20 +751,18 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Protected Sub GvDatosArmado_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosArmado.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Inv_CveMetodoInventario") = "5" Then
|
||||
If CBool(e.Row.DBCampo("AplicaSerie")) Then
|
||||
e.Row.FCButton("BtnSerie").Visible = True
|
||||
e.Row.FCButton("BtnSerie").CommandArgument = String.Format("{0}°{1}°{2}°{3}°{4}°1", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveUM"), e.Row.DBCampo("PS"), e.Row.DBCampo("Cantidad"), e.Row.DBCampo("Consec"))
|
||||
e.Row.FCLinkButton("BtnSeriePaquete").CommandArgument = e.Row.DBCampo("Consec")
|
||||
'Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count
|
||||
'e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString
|
||||
|
||||
If CveTipoPS = 5 Then
|
||||
If AplicaSerie Then
|
||||
e.Row.FCLinkButton("BtnSeriePaquete").Visible = True
|
||||
e.Row.FCLinkButton("BtnSeriePaquete").Attributes.Add("data-toggle", "tooltip")
|
||||
End If
|
||||
|
||||
GvDatosArmado.Columns(4).Visible = True
|
||||
|
||||
Else
|
||||
e.Row.FCButton("BtnSerie").Visible = False
|
||||
End If
|
||||
@@ -740,16 +770,14 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
If e.Row.DataKey("AplicaSeccion") = "False" Then
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||
Else
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenArmado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
|
||||
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = e.Row.DataKey("AplicaCaducidad") = "True"
|
||||
|
||||
e.Row.FCTextBox("TxtLote").Visible = e.Row.DataKey("AplicaLote") = "True"
|
||||
|
||||
e.Row.FCTextBox("TxtSerie").Visible = e.Row.DataKey("AplicaSerie") = "True"
|
||||
''FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||
'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||
' e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||
@@ -763,13 +791,17 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
|
||||
Protected Sub GvDatosDesarmado_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosDesarmado.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Inv_CveMetodoInventario") = "5" Then
|
||||
If CBool(e.Row.DBCampo("AplicaSerie")) Then
|
||||
e.Row.FCButton("BtnSerie").Visible = True
|
||||
e.Row.FCButton("BtnSerie").CommandArgument = String.Format("{0}°{1}°{2}°{3}°{4}°2", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveUM"), e.Row.DBCampo("PS"), e.Row.DBCampo("Cantidad"), e.Row.DBCampo("Consec"))
|
||||
Else
|
||||
e.Row.FCButton("BtnSerie").Visible = False
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("AplicaSeccion") = "False" Then
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||
Else
|
||||
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenDesarmado.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtCosto").Attributes.Add("onkeyup", "SumaValores();")
|
||||
|
||||
|
||||
@@ -204,13 +204,13 @@
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Traspaso de Almacén"
|
||||
ToolTip="Remisiones sin Facturar"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" Style="text-align: center;" GridLines="None">
|
||||
data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Valor" DataField="Valor" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n}" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
|
||||
@@ -77,7 +77,7 @@ 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.Columns(4).Visible = DtInventarios.MAX("Serie") <> ""
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
@@ -1799,13 +1799,12 @@ Partial Class OC
|
||||
DdlProyectoContrato.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaSubProyectos()
|
||||
Dim Filtro As String = If(DdlProyecto.SelectedValue.ToEntero > 0, String.Format("CveProyecto = {0}", DdlProyecto.SelectedValue.ToEntero), "")
|
||||
Dim Filtro As String = If(DdlProyecto.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.Empresa.Tipo_CentroCosto.Contiene(4, 5), String.Format("CveProyecto = {0}", DdlProyecto.SelectedValue.ToEntero), "")
|
||||
|
||||
DdlSubProyecto.Items.Clear()
|
||||
If Filtro <> "" Or UsuarioActual.Empresa.Tipo_CentroCosto = 1 Or UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then
|
||||
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros(Filtro, "", {"CveSubProyecto", "SubProyecto"}) 'If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, CveEmpresaActual, -1, 1), GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, -1, CveEmpresaActual, 1)) 'DtEstatusUsuarios.FiltraParametros(Filtro, "", {"CveSubProyecto", "SubProyecto"}) ' GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
|
||||
End If
|
||||
DdlSubProyecto.DataSource = DtEstatusUsuarios.FiltraParametros(Filtro, "", {"CveSubProyecto", "SubProyecto"}) 'If(UsuarioActual.Empresa.Funcionalidad(102) = "1" AndAlso Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, CveEmpresaActual, -1, 1), GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, -1, CveEmpresaActual, 1)) 'DtEstatusUsuarios.FiltraParametros(Filtro, "", {"CveSubProyecto", "SubProyecto"}) ' GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero)
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
Private Sub CargaSubProyectosEdit(DdlSP As DropDownList, CveProyectoEdit As Integer)
|
||||
|
||||
@@ -10953,7 +10953,7 @@ Partial Class Ventas
|
||||
If ObjFactura.TipoDocto.Contiene("Egs") Then
|
||||
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
||||
Else
|
||||
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresos", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
||||
IdCtaContable = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaDescuento", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero()
|
||||
End If
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
Reference in New Issue
Block a user