Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Sección Actual" DataField="SeccionAlmacen" ItemStyle-Width="15%" />
|
||||
<%--<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" />--%>
|
||||
<asp:TemplateField ItemStyle-Width="7%">
|
||||
@@ -91,7 +91,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nuevo Lote" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtLote" Text='<%# Eval("Lote").ToString()%>' CssClass="form-control" ClientIDMode="Static" />
|
||||
<asp:TextBox runat="server" ID="TxtLote" Text='<%# Eval("Lote").ToString()%>' CssClass="form-control input-sm" ClientIDMode="Static" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -102,8 +102,8 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nueva Fecha Cad." ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox runat="server" ID="TxtFechaCadNueva" Text='<%# Eval("FechaCaducidad").ToString()%>' CssClass="form-control" ClientIDMode="Static" />
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 113px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox runat="server" ID="TxtFechaCadNueva" Text='<%# Eval("FechaCaducidad", "{0:d}").ToString()%>' CssClass="form-control input-sm" ClientIDMode="Static" />
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFecha" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
|
||||
@@ -595,9 +595,9 @@ Partial Class Inventarios_Consignaciones
|
||||
|
||||
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)
|
||||
Dim Serie As String = If(TxtSerie.Text = "", "", TxtSerie.Text)
|
||||
Dim Lote As String = If(TxtLote.Text = "", "", TxtLote.Text)
|
||||
Dim Caducidad As String = If(TxtCaducidad.Text = "", MinFecha.ToShortDateString, TxtCaducidad.Text)
|
||||
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=PSSelected).FiltroPrimero("")
|
||||
|
||||
@@ -634,6 +634,15 @@ Partial Class Inventarios_Consignaciones
|
||||
GvDatos.DataSource = DtMovimientos
|
||||
GvDatos.DataBind()
|
||||
|
||||
|
||||
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
|
||||
GvDatos.Columns(7).Visible = DtMovimientos.MAX("CveSeccionAlmacen").ToEntero > 0
|
||||
GvDatos.Columns(8).Visible = DtMovimientos.MAX("Serie") <> ""
|
||||
GvDatos.Columns(9).Visible = DtMovimientos.MAX("Lote") <> ""
|
||||
GvDatos.Columns(10).Visible = DtMovimientos.MAX("FechaCaducidad").ToDate > MinFecha
|
||||
|
||||
End If
|
||||
|
||||
TxtCantidad.Text = ""
|
||||
TxtPU.Text = ""
|
||||
LbTotal.Text = ""
|
||||
@@ -849,7 +858,7 @@ Partial Class Inventarios_Consignaciones
|
||||
'AGREGAMOS MOVIMIENTO
|
||||
If MovtoNew Then
|
||||
Folio = ObjInventario.GetFolioSiguiente(ConceptoDevolucion, UsuarioActual.CveEmpresa)
|
||||
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, ConceptoDevolucion, DdlMoneda.SelectedValue.ToEntero, Fecha, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveConsignacion:=CveConsignacion, Observaciones:=TxtObservacionesDevolucion.Text.Trim)
|
||||
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, ConceptoDevolucion, DdlMoneda.SelectedValue.ToEntero, Fecha, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveConsignacion:=CveConsignacion, Observaciones:=TxtObservacionesDevolucion.Text.Trim, Modulo:="Consig")
|
||||
End If
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
|
||||
@@ -1259,6 +1259,13 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Alert("El producto requiere Serie", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If RowPS("VentaMinima").ToString.ToDecimal > 0 Then
|
||||
If Cantidad Mod RowPS("VentaMinima").ToString().ToDecimal <> 0 Then
|
||||
Alert(String.Format("El producto se vende solo en cantidades de {0}", RowPS("VentaMinima").ToString()))
|
||||
Valido = False
|
||||
End If
|
||||
End If
|
||||
|
||||
'salida
|
||||
If Valido AndAlso DdlConcepto.SelectedValue.Contiene({"3", "5", "7", "8", "11", "12", "13", "15", "16", "17", "20", "21", "30", "31"}) Then ' salida de almacen
|
||||
|
||||
|
||||
@@ -516,7 +516,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>'></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="F.Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||
|
||||
@@ -851,6 +851,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If AplicaCaducidad Then GvDatos.Columns(9).Visible = True
|
||||
GvDatos.Columns(9).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
|
||||
SugerirFechaLote()
|
||||
End If
|
||||
GvDatos.DataSource = DtDatos
|
||||
|
||||
@@ -2466,25 +2467,34 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestino, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato,
|
||||
CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G8")
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
Dim ImporteAlmacen As Decimal = 0
|
||||
|
||||
If CveMovimientoEntrada <= 0 Then
|
||||
TextoError.AppendFormat("No se pudo generar el movimiento de entrada correctamente")
|
||||
ErrorMovInv = True
|
||||
Else
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
ImporteAlmacen = ObjInventario.DtResultados.SUMD("Total")
|
||||
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString().ToDouble, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), Dr("PU").ToString().ToDecimal, CveAF:=Dr("CveAF").ToString().ToEntero(), CveSeccionAlmacen:=-3, Serie:=Dr("Serie").ToString(), Lote:=Dr("Lote").ToString(), FechaCaducidad:=Dr("FechaCaducidad").ToString().ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), EsInterno:=EsInterno, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero()) Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de entrada")
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al guardar los movimientos de entrada")
|
||||
End If
|
||||
End If
|
||||
|
||||
'se registra
|
||||
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True) <= 0 Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
Else 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN - SALIDA ALMACEN
|
||||
ErrorMovInv = Not GenerarPrePoliza(ObjInventario, ObjVentas, ObjConta, CveMovimiento, TextoError)
|
||||
End If
|
||||
@@ -3810,5 +3820,85 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "sugerir caducidad"
|
||||
Private Sub SugerirFechaLote()
|
||||
Dim ObjInventarios As New ClsInventarios()
|
||||
Dim FechasExcluidas As New List(Of String)
|
||||
FechasExcluidas.Add(MinFecha.ToDate.ToString)
|
||||
Dim MaxRows As Integer = DtDatos.Rows.Count - 1
|
||||
|
||||
For contador As Integer = 0 To MaxRows
|
||||
Dim DtRow As DataRow = DtDatos.Rows(contador)
|
||||
Dim AplicaCaducidad As Boolean = DtRow.Item("AplicaCaducidad").ToString = "True"
|
||||
Dim AplicaLote As Boolean = DtRow.Item("AplicaLote").ToString = "True"
|
||||
Dim Cantidad As Integer = DtRow.Item("CantidadC").ToString.ToEntero
|
||||
Dim FechasExcluidasFiltro As String = String.Format("FechaCaducidad NOT IN('{0}')", String.Join("','", FechasExcluidas))
|
||||
If AplicaCaducidad Or AplicaLote Then
|
||||
Dim CvePS As Integer = DtRow.Item("CvePS").ToString.ToEntero
|
||||
If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim MinimumRow As DataRow = ObjInventarios.DtResultados.FiltroPrimero(FechasExcluidasFiltro, "FechaCaducidad")
|
||||
DtRow.Item("FechaCaducidad") = MinimumRow.Item("FechaCaducidad").ToString
|
||||
DtRow.Item("Lote") = MinimumRow.Item("Lote").ToString
|
||||
Dim CantidadDisponible As Integer = MinimumRow.Item("Cantidad").ToString.ToEntero
|
||||
DtRow.Item("CantidadF") = CantidadDisponible
|
||||
DtRow.Item("CantidadS") = CantidadDisponible
|
||||
|
||||
If Cantidad > CantidadDisponible Then
|
||||
Dim RowFaltante As DataRow = DtDatos.NewRow()
|
||||
Dim CantidadFaltante As Integer = (Cantidad - CantidadDisponible)
|
||||
RowFaltante.Item("CantidadC") = CantidadFaltante
|
||||
RowFaltante.Item("CantidadF") = CantidadFaltante
|
||||
RowFaltante.Item("CantidadS") = CantidadFaltante
|
||||
DtRow.Item("CantidadC") = CantidadDisponible
|
||||
For Each Column As DataColumn In DtDatos.Columns
|
||||
If Not Column.ColumnName.Contiene("CantidadC", "CantidadF", "CantidadS") Then
|
||||
RowFaltante.Item(Column.ColumnName) = DtRow.Item(Column.ColumnName)
|
||||
End If
|
||||
Next
|
||||
FechasExcluidas.Add(MinimumRow.Item("FechaCaducidad").ToString)
|
||||
DtDatos.Rows.Add(RowFaltante)
|
||||
MaxRows += 1
|
||||
Else
|
||||
DtRow.Item("CantidadF") = Cantidad
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
'For Each DtRow As DataRow In DtDatos.Rows
|
||||
' Dim AplicaCaducidad As Boolean = DtRow.Item("AplicaCaducidad").ToString = "True"
|
||||
' Dim AplicaLote As Boolean = DtRow.Item("AplicaLote").ToString = "True"
|
||||
' Dim Cantidad As Integer = DtRow.Item("CantidadC").ToString.ToEntero
|
||||
' Dim FechasExcluidasFiltro As String = String.Format("FechaCaducidad NOT IN('{0}')", String.Join("','", FechasExcluidas))
|
||||
' If AplicaCaducidad Or AplicaLote Then
|
||||
' Dim CvePS As Integer = DtRow.Item("CvePS").ToString.ToEntero
|
||||
' If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' Dim MinimumRow As DataRow = ObjInventarios.DtResultados.FiltroPrimero(FechasExcluidasFiltro, "FechaCaducidad")
|
||||
' DtRow.Item("FechaCaducidad") = MinimumRow.Item("FechaCaducidad").ToString
|
||||
' DtRow.Item("Lote") = MinimumRow.Item("Lote").ToString
|
||||
' Dim CantidadDisponible As Integer = MinimumRow.Item("Cantidad").ToString.ToEntero
|
||||
' DtRow.Item("CantidadF") = CantidadDisponible
|
||||
|
||||
' If Cantidad > CantidadDisponible Then
|
||||
' Dim RowFaltante As DataRow = DtDatos.NewRow()
|
||||
' RowFaltante.Item("CantidadC") = (Cantidad - CantidadDisponible)
|
||||
' RowFaltante.Item("CantidadF") = (Cantidad - CantidadDisponible)
|
||||
' RowFaltante.Item("CantidadS") = (Cantidad - CantidadDisponible)
|
||||
' For Each Column As DataColumn In DtDatos.Columns
|
||||
' If Not Column.ColumnName.Contiene("CantidadC", "CantidadF", "CantidadS") Then
|
||||
' RowFaltante.Item(Column.ColumnName) = DtRow.Item(Column.ColumnName)
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' DtDatos.Rows.Add(RowFaltante)
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
'Next
|
||||
ObjInventarios.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.select2-selection__rendered {
|
||||
margin-top: 0px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
@@ -119,10 +124,10 @@
|
||||
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkSeries" Visible="false" runat="server"><i class="fa fa-list"></i> Series Disponibles</asp:LinkButton>
|
||||
@@ -131,9 +136,18 @@
|
||||
<asp:LinkButton ID="LnkCaducidad" Visible="false" runat="server"><i class="fa fa-list"></i> Caducidad de producto</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#Kardex"> </a>
|
||||
<asp:HyperLink runat="server" ID="HlAyuda" NavigateUrl="/Documentacion/DocumentacionInventarios.aspx#Kardex"><i class="fa fa-question-circle"></i> Ayuda</asp:HyperLink>
|
||||
<%--<div>
|
||||
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#Kardex"> </a>
|
||||
</div>--%>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgImprimir" />
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
|
||||
</Triggers>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
@@ -159,8 +173,7 @@
|
||||
<label class="col-md-1 truncate" style="max-width: 80px;">Almacén:</label>
|
||||
<div class="col-md-2">
|
||||
<%--<asp:DropDownList ID="ddlAlmacen" runat="server" CssClass="select2me " Style="width: 175px !important;" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>--%>
|
||||
<asp:ListBox ID="ddlAlmacen" SelectionMode="Multiple" data-text="Todos" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"
|
||||
DataTextField="Almacen" DataValueField="CveAlmacen"></asp:ListBox>
|
||||
<asp:ListBox ID="ddlAlmacen" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:ListBox>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -370,7 +383,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Concepto" ItemStyle-Width="170px" HeaderText="Movimiento" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Almacen" ItemStyle-Width="140px" HeaderText="Almacen" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Almacen" ItemStyle-Width="140px" HeaderText="Almacén" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="70px" HeaderText="Folio">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="hlFolio" runat="server" Text='<%# Eval("Folio")%>' CssClass="Texto" NavigateUrl='<%# Eval("CveMovimiento", "/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}")%>' Target="_blank" />
|
||||
|
||||
@@ -236,10 +236,10 @@ Partial Class Inventarios_Kardex
|
||||
LtIndicador_UCPesos.Text = Dr("UltimoCosto").ToString.FormatoNumero()
|
||||
LtIndicador_UCDolares.Text = Dr("UltimoCostoUSD").ToString.FormatoNumero()
|
||||
|
||||
LtIndicador_Mensaje.Text = $"* Importes calculados con el tipo de cambio del dia <b> $ {TC.FormatoNumero(4)} </b>"
|
||||
LtIndicador_Mensaje.Text = $"* Importes calculados con el tipo de cambio del día <b> $ {TC.FormatoNumero(4)} </b>"
|
||||
|
||||
If TxtSerie.Text <> "" Then
|
||||
LtIndicador_MensajeSerie.Text = $"* Existencia y costos calculada por numero de serie: <b> {TxtSerie.Text} </b>"
|
||||
LtIndicador_MensajeSerie.Text = $"* Existencia y costos calculada por número de serie: <b> {TxtSerie.Text} </b>"
|
||||
Else
|
||||
LtIndicador_MensajeSerie.Text = ""
|
||||
End If
|
||||
|
||||
@@ -393,6 +393,7 @@ Partial Class Inventarios_KardexAlmacen
|
||||
|
||||
Private Sub AgregarProyeccion(dt As DataTable)
|
||||
Dim TieneError As Boolean = False
|
||||
Dim StrCodigo As New StringBuilder
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
ObjInventarios.IniciaTransacSQL()
|
||||
|
||||
@@ -400,25 +401,36 @@ Partial Class Inventarios_KardexAlmacen
|
||||
Dim DtProductosEmpresas As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
For Each dtRow As DataRow In dt.Rows
|
||||
Dim Codigo As String = dtRow("Código").ToString
|
||||
Dim CvePS As Integer = DtProductosEmpresas.FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", Codigo))
|
||||
Dim Cantidad As Decimal = dtRow("Cantidad").ToString.ToDecimal
|
||||
If Not ObjInventarios.AddMovimientosProyectados(CvePS, Cantidad, RblProyeccionOpcion.SelectedValue.ToEntero()) Then
|
||||
TieneError = True
|
||||
Exit For
|
||||
|
||||
If Codigo <> "" Then
|
||||
Dim CvePS As Integer = DtProductosEmpresas.FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", Codigo)).ToEntero
|
||||
Dim Cantidad As Decimal = dtRow("Cantidad").ToString.ToDecimal
|
||||
If CvePS <= 0 Then
|
||||
TieneError = True
|
||||
StrCodigo.AppendFormat(" {0}<br/>", Codigo)
|
||||
Exit For
|
||||
ElseIf Not ObjInventarios.AddMovimientosProyectados(CvePS, Cantidad, RblProyeccionOpcion.SelectedValue.ToEntero()) Then
|
||||
TieneError = True
|
||||
StrCodigo.Append("Ocurrio un error al registrar")
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
If TieneError Then
|
||||
Alert("Ocurrio un error al registrar el Código no encontrado: " & StrCodigo.ToString, TipoMensaje.MsgError)
|
||||
ObjInventarios.RollBack()
|
||||
Else
|
||||
ObjInventarios.Commit()
|
||||
Alert("Se ha agregado la proyección de productos correctamente")
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivProyeccion"))
|
||||
Alert("Se ha agregado la proyección de productos correctamente")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||
|
||||
@@ -2621,7 +2621,13 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
MovtosSalidaDirecta.Add(MovSalidaExA.CveMovimiento)
|
||||
FoliosSalidaDirecta.Add(MovSalidaExA.Folio)
|
||||
|
||||
Dim MovEntradaExA = GenerarMovimientoAlmacenVenta(ObjFactura.CveAlmacenTraspasoDestino, 9, ObjFactura.CveVenta, MovSalidaExA.CveMovimiento, DtDetalleMovimiento, ObjInventario, ObjConta, ObjContaContPAQ, False, "RA/G2R2")
|
||||
Dim dttexa As DataTable = DtDetalleMovimiento.Copy
|
||||
'se limpia la seccion, para que lo tome automaticamente
|
||||
For Each drr As DataRow In dttexa.Rows
|
||||
drr("CveSeccionAlmacen") = -3
|
||||
Next
|
||||
|
||||
Dim MovEntradaExA = GenerarMovimientoAlmacenVenta(ObjFactura.CveAlmacenTraspasoDestino, 9, ObjFactura.CveVenta, MovSalidaExA.CveMovimiento, dttexa, ObjInventario, ObjConta, ObjContaContPAQ, False, "RA/G2R2")
|
||||
|
||||
ErrorMovInv = MovEntradaExA.CveMovimiento <= 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user