Merge branch 'master' of http://agonzalez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" />
|
||||
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" Checked="true" runat="server"></asp:CheckBox>
|
||||
<asp:CheckBox ID="Chk" Checked="false" runat="server"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nueva Seccion" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
|
||||
@@ -13,10 +13,12 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlAlmacen.DataSource = DtAlmacenes
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
DdlAlmacenExcel.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
DdlAlmacenExcel.DataSource = DtAlmacenes
|
||||
DdlAlmacenExcel.DataBind()
|
||||
|
||||
DdlClasificaciones.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
@@ -216,7 +218,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "")
|
||||
If Tipo = "EXCEL" Then
|
||||
Dim CveAlmacen As Integer = DdlAlmacenExcel.SelectedValue.ToEntero()
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}")
|
||||
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}")
|
||||
|
||||
CargarArchivo(Directorio, file.filename, CveAlmacen, CveSubProyecto)
|
||||
Else
|
||||
@@ -267,7 +269,10 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
If Not ErrorArchivo Then
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
|
||||
Dim RowNoEncontrados As New StringBuilder()
|
||||
Dim CodigosNoEncontrados As New StringBuilder()
|
||||
Dim SeccionesNoEncontradas As New StringBuilder()
|
||||
Dim ExistenciasNoEncontradas As New StringBuilder()
|
||||
|
||||
Dim NumAgregados As Integer = 0
|
||||
|
||||
Dim ObjInventario As New ClsInventarios()
|
||||
@@ -275,7 +280,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
|
||||
Try
|
||||
Dim DtExistenciasSecciones As DataTable = Nothing
|
||||
If ObjInventario.GetMovimientosDetalleSeccionesAlmacen(DdlAlmacen.SelectedValue.ToEntero, DdlClasificaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventario.GetMovimientosDetalleSeccionesAlmacen(DdlAlmacenExcel.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
DtExistenciasSecciones = ObjInventario.DtResultados.Copy()
|
||||
End If
|
||||
|
||||
@@ -293,9 +298,9 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
For Each RowExcel As DataRow In DtExcel.Rows
|
||||
|
||||
Dim Codigo As String = RowExcel("Código").ToString.Trim()
|
||||
Dim PS As String = RowExcel("Producto/Servicio").ToString().Trim()
|
||||
'Dim PS As String = RowExcel("Producto/Servicio").ToString().Trim()
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=Codigo).FiltroPrimero($"PS='{PS}'")
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltroPrimero($"Codigo='{Codigo}'")
|
||||
|
||||
If DrPS IsNot Nothing Then
|
||||
If Not ErrorMovInv Then
|
||||
@@ -319,7 +324,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
|
||||
Dim RowExistencia As DataRow = DtExistenciasSecciones.FiltroPrimero($"CvePS={CvePS}")
|
||||
|
||||
If RowExistencia IsNot Nothing Then
|
||||
If RowExistencia IsNot Nothing AndAlso CveSeccionAlmacen > 0 Then
|
||||
Dim CveSeccionAlmacenSalida As Integer = RowExistencia("CveSeccionAlmacen").ToString().ToEntero()
|
||||
Dim CantidadSalida As Decimal = RowExistencia("Existencia").ToString().ToDecimal()
|
||||
Dim SerieSalida As String = RowExistencia("Serie").ToString()
|
||||
@@ -362,13 +367,22 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
RowNoEncontrados.AppendFormat("{0},", Codigo)
|
||||
End If
|
||||
|
||||
If RowExistencia Is Nothing Then
|
||||
ExistenciasNoEncontradas.AppendFormat("{0},", SeccionAlmacen)
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If CveSeccionAlmacen <= 0 Then
|
||||
SeccionesNoEncontradas.AppendFormat("{0},", SeccionAlmacen)
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
RowNoEncontrados.AppendFormat("{0},", Codigo)
|
||||
CodigosNoEncontrados.AppendFormat("{0},", Codigo)
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -383,10 +397,21 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
ObjInventario.RollBack()
|
||||
|
||||
Dim SbError As New StringBuilder()
|
||||
SbError.Append("Ocurrió un error al guardar")
|
||||
If RowNoEncontrados.Length > 0 Then
|
||||
SbError.Append("Los siguientes códigos no fueron encontrados en el sistema.<br/>")
|
||||
SbError.Append(RowNoEncontrados.ToString())
|
||||
SbError.Append("Ocurrió un error al guardar.<br/>")
|
||||
|
||||
If CodigosNoEncontrados.Length > 0 Then
|
||||
SbError.Append("<br/>Los siguientes códigos no fueron encontrados en el sistema.<br/>")
|
||||
SbError.Append(CodigosNoEncontrados.ToString())
|
||||
End If
|
||||
|
||||
If ExistenciasNoEncontradas.Length > 0 Then
|
||||
SbError.Append($"<br/>Los siguientes códigos no se encontraron existencias en el almacen: '{DdlAlmacenExcel.SelectedItem.Text}'.<br/>")
|
||||
SbError.Append(ExistenciasNoEncontradas.ToString())
|
||||
End If
|
||||
|
||||
If SeccionesNoEncontradas.Length > 0 Then
|
||||
SbError.Append("<br/>Las siguientes secciones de almacen no fueron encontradas en el sistema.<br/>")
|
||||
SbError.Append(SeccionesNoEncontradas.ToString())
|
||||
End If
|
||||
|
||||
Alert(SbError.ToString(), TipoMensaje.MsgError)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntradasSalidas.aspx.vb" Inherits="Inventarios_EntradasSalidas" %>
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntradasSalidas.aspx.vb" Inherits="Inventarios_EntradasSalidas" EnableEventValidation="false" %>
|
||||
|
||||
|
||||
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
|
||||
@@ -1193,6 +1193,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Dim CveMetodoInventario As Integer = RowPS("Inv_CveMetodoInventario").ToString().ToEntero()
|
||||
|
||||
Dim FechaCaducidadVal As Date = If(RowPS("AplicaCaducidad").ToString = "True", FechaCaducidad, MinFecha)
|
||||
|
||||
If CveMetodoInventario = 5 And (String.IsNullOrEmpty(SerieLote.Trim()) OrElse SerieLote = "-1") Then
|
||||
Valido = False
|
||||
Alert("El producto requiere Serie-Lote", TipoMensaje.MsgAdvertencia)
|
||||
@@ -1201,7 +1203,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
'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
|
||||
|
||||
Dim Existencia As Double = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, If(SerieLote = "", "-1", SerieLote), If(Lote = "", "-1", Lote), FechaCaducidad)
|
||||
Dim Existencia As Double = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, If(SerieLote = "", "-1", SerieLote), If(Lote = "", "-1", Lote), FechaCaducidadVal)
|
||||
' LbAgregar.ToolTip = Existencia.ToString
|
||||
If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(SerieLote <> "", $" AND Serie = '{SerieLote}'", "")}") < 0 Then
|
||||
If Existencia <= 0 Then
|
||||
@@ -3699,7 +3701,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
'VALIDA EXISTENCIAS SALIDA E INSERTA DETALLES
|
||||
For Each Dr As DataRow In DtMovimientosSalidaInvFisico.Rows
|
||||
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero) >= Dr("Cantidad").ToString.ToDouble Then
|
||||
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenInventarioFisico.SelectedValue.ToEntero, PendientePorSurtir:=1) >= Dr("Cantidad").ToString.ToDouble Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero,
|
||||
Dr("PU").ToString.ToDecimal, -1, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString,
|
||||
Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then
|
||||
|
||||
@@ -3256,11 +3256,11 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
strBody.Append(" <br/>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>")
|
||||
strBody.Append(" Gracias por su compra <br/>")
|
||||
strBody.Append(" Compuproveedores")
|
||||
'strBody.Append(" Compuproveedores")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%;text-align:center'>")
|
||||
strBody.Append(" Sigue disfrutando de nuestros productos y servicios<br/>")
|
||||
strBody.Append(" <a href='https://www.compuproveedoresti.com/'>www.compuproveedores.com</a>")
|
||||
'strBody.Append(" <a href='https://www.compuproveedoresti.com/'>www.compuproveedores.com</a>")
|
||||
strBody.Append("")
|
||||
strBody.Append(" </p>")
|
||||
strBody.Append(" </body>")
|
||||
|
||||
@@ -178,11 +178,11 @@ public partial class Inventarios_EntregasPorRealizar : ClsPaginas
|
||||
strBody.Append(" <br/>");
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%'>");
|
||||
strBody.Append(" Gracias por realizar su pedido <br/>");
|
||||
strBody.Append(" Compuproveedores");
|
||||
//strBody.Append(" Compuproveedores");
|
||||
strBody.Append(" </p>");
|
||||
strBody.Append(" <p style='font-family:Segoe UI Semibold;font-size:12pt;width:100%;text-align:center'>");
|
||||
strBody.Append(" Sigue disfrutando de nuestros productos y servicios<br/>");
|
||||
strBody.Append(" <a href='https://www.compuproveedoresti.com/'>www.compuproveedores.com</a>");
|
||||
//strBody.Append(" <a href='https://www.compuproveedoresti.com/'>www.compuproveedores.com</a>");
|
||||
strBody.Append("");
|
||||
strBody.Append(" </p>");
|
||||
strBody.Append(" </body>");
|
||||
|
||||
Reference in New Issue
Block a user