Merge branch 'master' of http://192.168.10.111:8383/SIG into nuevo_cat_almacen_clasif_secciones
This commit is contained in:
10
AF/AF.aspx
10
AF/AF.aspx
@@ -2903,6 +2903,16 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCEAFInvSerie" runat="server" HighlightCssClass="vco" TargetControlID="RFVAFInvSerie" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div id="DivSeccion" runat="server" visible="false" class="row">
|
||||
<div class="col-md-2">Sección:</div>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="TxtAFInvSerie" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor seleccione uno." InitialValue="" ValidationGroup="GrpAFInv"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender27" runat="server" HighlightCssClass="vco" TargetControlID="RFVAFInvSerie" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button Text="Cargar Producto" ID="BtnAFInv" CssClass="btn btn-primary" ValidationGroup="GrpAFInv" OnClick="BtnAFInv_Click" runat="server" />
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.IO
|
||||
Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
@@ -3048,18 +3047,22 @@ Partial Class AF_AF
|
||||
Alert("Seleccione un producto.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
AFInvSerie = ""
|
||||
AFInvCvePS = -1
|
||||
AFInvCveAlmacen = -1
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlAFInvPS.SelectedValue.ToEntero).Rows(0)
|
||||
Dim Inv_CveMetodoInventario As Integer = DrPS("Inv_CveMetodoInventario").ToString().ToEntero()
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then Exit Sub
|
||||
|
||||
Dim Inv_CveMetodoInventario As Integer = If(DrPS("AplicaSerie").ToString() = "True", 5, 1)
|
||||
If CBool(DrPS("AplicaSeccion")) Then CveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero
|
||||
|
||||
AFInvSerie = If(Inv_CveMetodoInventario = 5, TxtAFInvSerie.Text.Trim, "-1")
|
||||
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
Dim Existencia = ObjInventario.GetExistenciasPS(DdlAFInvPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, FechaMovto:=Now.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=AFInvSerie)
|
||||
Dim Existencia = ObjInventario.GetExistenciasPS(DdlAFInvPS.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, FechaMovto:=Now.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=AFInvSerie)
|
||||
Dim Costo As Decimal = 0
|
||||
If Inv_CveMetodoInventario = 5 Then
|
||||
Costo = ObjInventario.GetCostoPSSerie(DdlAFInvPS.SelectedValue.ToEntero, AFInvSerie, DdlAFInvAlmacen.SelectedValue.ToEntero, CveEmpresaActual)
|
||||
@@ -3643,7 +3646,22 @@ Partial Class AF_AF
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub DdlAFInvPS_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DivSerie.Visible = CBool(GlobalDTPS(UsuarioActual.CveEmpresa, DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimeroValor("AplicaSerie"))
|
||||
Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlAFInvPS.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If drr IsNot Nothing Then
|
||||
DivSerie.Visible = CBool(drr("AplicaSerie"))
|
||||
DivSeccion.Visible = CBool(drr("AplicaSeccion"))
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
If CBool(drr("AplicaSeccion")) Then
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAFInvAlmacen.SelectedValue.ToEntero, DdlAFInvPS.SelectedValue.ToEntero)
|
||||
DdlSeccionAlmacen.DataSource = dtt
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
|
||||
dtt.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnPDFCompras_Click(sender As Object, e As EventArgs)
|
||||
|
||||
@@ -358,7 +358,7 @@ Public Class ClsInventarios
|
||||
End Function
|
||||
|
||||
|
||||
Public Function AddAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, CveUsuario As Integer, CveEmpresa As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1) As Boolean
|
||||
Public Function AddAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, CveUsuario As Integer, CveEmpresa As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveUsuarioAutoriza As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_AlmacenesAdd")
|
||||
@@ -374,6 +374,8 @@ Public Class ClsInventarios
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@Orden", SqlDbType.SmallInt).Value = Orden
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@CveUsuarioAutoriza", SqlDbType.Int).Value = CveUsuarioAutoriza
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -392,7 +394,7 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, Estatus As Boolean, CveAlmacen As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1) As Boolean
|
||||
Public Function UpdateAlmacen(Almacen As String, CveTipoAlmacen As Integer, IdCtaContable As Integer, Modalidad As Integer, Estatus As Boolean, CveAlmacen As Integer, Inventariable As Byte, CveSubProyecto As Integer, Optional Orden As Integer = -1, Optional CveCuenta As Integer = -1, Optional CveUsuarioAutoriza As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_AlmacenesUpdate")
|
||||
@@ -408,6 +410,8 @@ Public Class ClsInventarios
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@Orden", SqlDbType.SmallInt).Value = Orden
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@CveUsuarioAutoriza", SqlDbType.Int).Value = CveUsuarioAutoriza
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3882,7 +3886,7 @@ Public Class ClsInventarios
|
||||
|
||||
#Region " INVENTARIOS - SOLICITUD DE TRASPASOS "
|
||||
Public Function AddTrasladoSolicitud(Observaciones As String, CveAlmacenOrigen As Integer, CveAlmacenDestino As Integer, CveTrasladoEstatus As Integer, CveMovimientoAlmacen As Integer, Fecha As DateTime, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Optional CveContrato As Integer = -1, Optional Guia As String = "", Optional CvePaqueteria As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional CveOS As Integer = -1) As Integer
|
||||
Optional CveContrato As Integer = -1, Optional Guia As String = "", Optional CvePaqueteria As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional CveOS As Integer = -1, Optional EstatusAlmacen As Integer = -1) As Integer
|
||||
Dim Retorno = -1
|
||||
DataAdapter("PA_Inv_TraspasoSolicitudAdd")
|
||||
|
||||
@@ -3902,6 +3906,7 @@ Public Class ClsInventarios
|
||||
.Add("@CvePaqueteria", SqlDbType.Int).Value = CvePaqueteria
|
||||
.Add("@CveDireccionEnvio", SqlDbType.Int).Value = CveDireccionEnvio
|
||||
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||
.Add("@EstatusAlmacen", SqlDbType.Int).Value = EstatusAlmacen
|
||||
|
||||
End With
|
||||
|
||||
@@ -3969,6 +3974,31 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpdateTrasladoAutorizar(CveTraspasoSolicitud As Integer, CveEmpresa As Integer, EstatusAlmacen As Integer, CveUsuarioAutoriza As Integer, FechaAutorizacion As Date) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_TraspasoAutorizar")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveTraspasoSolicitud", SqlDbType.Int).Value = CveTraspasoSolicitud
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@EstatusAlmacen", SqlDbType.Int).Value = EstatusAlmacen
|
||||
.Add("@CveUsuarioAutoriza", SqlDbType.Int).Value = CveUsuarioAutoriza
|
||||
.Add("@FechaAutorizacion", SqlDbType.Date).Value = FechaAutorizacion
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los detalles del movimiento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
Public Function RemoveTrasladoSolicitud(CveTrasladoSolicitud As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Dim CveTraspasoSolicitud As Integer = 0
|
||||
|
||||
@@ -4238,6 +4238,8 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Contabilidad2/CatCuentasAsignaciones.aspx".ToUpper(), 724)
|
||||
PaginaDict.Add("/Contabilidad2/CatContaEjercicios.aspx".ToUpper(), 725)
|
||||
PaginaDict.Add("/Contabilidad2/PolizasImpresion.aspx".ToUpper(), 726)
|
||||
PaginaDict.Add("/Contabilidad2/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
|
||||
|
||||
#End Region
|
||||
'CONTRATOS
|
||||
#Region "Contratos"
|
||||
@@ -4310,7 +4312,6 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Finanzas/RepBalanceGeneralVertical.aspx".ToUpper(), 418)
|
||||
PaginaDict.Add("/Finanzas/RepBalanceGeneralHorizontal.aspx".ToUpper(), 419)
|
||||
PaginaDict.Add("/Finanzas/RepEstadoResultados.aspx".ToUpper(), 579)
|
||||
PaginaDict.Add("/Finanzas/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
|
||||
PaginaDict.Add("/Finanzas/RepEstadoResultadosVertical.aspx".ToUpper(), 424)
|
||||
PaginaDict.Add("/Finanzas/RepOrigenAplicacion.aspx".ToUpper(), 581)
|
||||
PaginaDict.Add("/Finanzas/RazonesFinancierasCuentas.aspx".ToUpper(), -1)
|
||||
@@ -4984,7 +4985,7 @@ Public Class ClsPaginas
|
||||
|
||||
PaginaDict.Add("/Compras/RepCxPCaudillo.aspx".ToUpper(), -1)
|
||||
|
||||
PaginaDict.Add("/Contabilidad2/RepEstadoResultadosHorizontal.aspx".ToUpper(), -1)
|
||||
|
||||
PaginaDict.Add("/Contabilidad2/RepBalanceGeneralHorizontal.aspx".ToUpper(), -1)
|
||||
|
||||
|
||||
|
||||
@@ -5728,7 +5728,7 @@ Namespace Modelos
|
||||
Case "Ant"
|
||||
Return 12
|
||||
Case Else
|
||||
Return -1
|
||||
Return 25
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -9,7 +9,7 @@ Imports System.Data
|
||||
Public Class Timbrado
|
||||
|
||||
#Region "P R O P I E D A D E S"
|
||||
Public Property MensajeErrorCFDI As String
|
||||
Public Property MensajeErrorCFDI As String = ""
|
||||
Public Property UUID As String = ""
|
||||
Public Property CancelacionAcuse As String
|
||||
Public Property CancelacionState As Integer
|
||||
@@ -640,6 +640,7 @@ Public Class Timbrado
|
||||
Case 2
|
||||
'Retorno = TimbrarFacturaRealVirtual(UsuarioActual, Ventas, TmpDTConceptos, TmpDTImpuestos, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV)
|
||||
Dim Ret As String = TimbrarFacturaRealVirtualv33(Ventas, UsuarioActual)
|
||||
If Ret <> "" Then MensajeErrorCFDI = Ret
|
||||
Retorno = If(Ret = "", True, False)
|
||||
|
||||
Case 3
|
||||
@@ -648,6 +649,7 @@ Public Class Timbrado
|
||||
Case 4
|
||||
|
||||
Dim Ret As String = TimbrarFacturaGoCFDIv33(Ventas, UsuarioActual, CvePACEspecial)
|
||||
If Ret <> "" Then MensajeErrorCFDI = Ret
|
||||
Retorno = If(Ret = "", True, False)
|
||||
|
||||
End Select
|
||||
|
||||
BIN
App_WebReferences/App_WebReferences.rar
Normal file
BIN
App_WebReferences/App_WebReferences.rar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,6 +8,7 @@ using Extensiones;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Activities.Expressions;
|
||||
|
||||
public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||
{
|
||||
@@ -811,13 +812,23 @@ public partial class General_PopUpPaqueteriasGuias : ClsPaginas
|
||||
int CveVendedor = ObjVentas.DtResultados.Rows[0]["CveVendedor"].ToEntero();
|
||||
int CveCliente = ObjVentas.DtResultados.Rows[0]["CveCliente"].ToEntero();
|
||||
DataRow Vendedor = get_GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveVendedor = {0}",CveVendedor));
|
||||
DataRow Cliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(string.Format("CveCliente = {0}",CveCliente));
|
||||
DataRow Cliente = get_GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente : CveCliente).FiltroPrimero("");
|
||||
string CobranzaCorreo = "";
|
||||
string CorreoEntregaAlmacen = "";
|
||||
string CorreoEntregaCompras = "";
|
||||
string CorreoVendedor = "";
|
||||
string CorreoAdicionalNotificacionesVendedor = "";
|
||||
|
||||
string CobranzaCorreo = Cliente["CobranzaCorreo"].ToString();
|
||||
string CorreoEntregaAlmacen = Cliente["CorreoEntregaAlmacen"].ToString();
|
||||
string CorreoEntregaCompras = Cliente["CorreoEntregaCompras"].ToString();
|
||||
string CorreoVendedor = Vendedor["Correo"].ToString();
|
||||
string CorreoAdicionalNotificacionesVendedor = Vendedor["CorreoAdicionalNotificaciones"].ToString();
|
||||
if (Cliente != null) {
|
||||
CobranzaCorreo=Cliente["CobranzaCorreo"].ToString();
|
||||
CorreoEntregaAlmacen=Cliente["CorreoEntregaAlmacen"].ToString();
|
||||
CorreoEntregaCompras = Cliente["CorreoEntregaCompras"].ToString();
|
||||
}
|
||||
if (Vendedor != null)
|
||||
{
|
||||
CorreoVendedor=Vendedor["Correo"].ToString();
|
||||
CorreoAdicionalNotificacionesVendedor=Vendedor["CorreoAdicionalNotificaciones"].ToString();
|
||||
}
|
||||
|
||||
string CorreosConcat = String.Format("{0};{1};{2};{3};{4}", CobranzaCorreo, CorreoEntregaAlmacen, CorreoEntregaCompras, CorreoVendedor, CorreoAdicionalNotificacionesVendedor);
|
||||
return CorreosConcat;
|
||||
|
||||
@@ -13,7 +13,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim DtAlmacenes As DataTable = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoAlmacen:=-1).FiltraParametros("CveTipoAlmacen in (1,14)")
|
||||
|
||||
DdlAlmacen.DataSource = DtAlmacenes
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
@@ -836,7 +836,7 @@ Partial Class Inventarios_Apartados
|
||||
GvDatosDesapartado.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
||||
GvDatosDesapartado.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
||||
GvDatosDesapartado.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
GvDatosDesapartado.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
GvDatosDesapartado.Columns(8).Visible = DtTemp.MAX("AplicaSeccion") = "True"
|
||||
|
||||
GvDatosDesapartado.DataSource = DtTemp
|
||||
GvDatosDesapartado.DataBind()
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
</div>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAlmacen,IdCtaContable,Inventariable,Modalidad,CveTipoAlmacen,Almacen,Estatus,CveSubProyecto,Orden,CveCuenta" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-heighterror="300px" data-freezerows="1" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAlmacen,IdCtaContable,Inventariable,Modalidad,CveTipoAlmacen,Almacen,Estatus,CveSubProyecto,Orden,CveCuenta,CveUsuarioAutoriza" EmptyDataText="No se encontraron Almacenes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-heighterror="300px" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="15%" HeaderText="Almacen">
|
||||
<ItemTemplate>
|
||||
@@ -302,6 +302,20 @@
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
|
||||
<asp:Label AssociatedControlID="ChkEstatus" runat="server" Text="Estatus:"></asp:Label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlUsuariosAutoriza" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%" CssClass="form-control input-sm select2me">
|
||||
</asp:DropDownList>
|
||||
<asp:Label AssociatedControlID="DdlUsuariosAutoriza" runat="server" Text="Autorizá:"></asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-footer">
|
||||
|
||||
@@ -48,6 +48,7 @@ Partial Class Inventarios_CatAlmacenes
|
||||
CargaSubProyectos()
|
||||
CargaTipoAlmacen()
|
||||
CargaDatos()
|
||||
CargaUsuarios()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -83,6 +84,15 @@ Partial Class Inventarios_CatAlmacenes
|
||||
DdlTipoAlmacen.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaUsuarios()
|
||||
|
||||
DdlUsuariosAutoriza.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros(" Estatus = 1 ")
|
||||
DdlUsuariosAutoriza.DataBind()
|
||||
|
||||
DdlUsuariosAutoriza.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCuentasContables()
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
divCuentasCompac.Visible = False
|
||||
@@ -222,6 +232,7 @@ Partial Class Inventarios_CatAlmacenes
|
||||
If ChkEstatus.Checked Then Estatus = 1
|
||||
Dim CuentaContable As Integer = 0
|
||||
Dim CveCuenta As Integer = 0
|
||||
|
||||
If divddlcc.Visible Then
|
||||
If pnlCuentassig.Visible Then
|
||||
CveCuenta = DdlCuentasSig.SelectedValue.ToEntero()
|
||||
@@ -229,8 +240,9 @@ Partial Class Inventarios_CatAlmacenes
|
||||
CuentaContable = DdlCuentasContables.SelectedValue.ToEntero()
|
||||
End If
|
||||
End If
|
||||
|
||||
If HdnModalidad.Value = "A" Then
|
||||
If ObjAlmacen.AddAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta) Then
|
||||
If ObjAlmacen.AddAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero) Then
|
||||
Alert("El nuevo Almacen se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
@@ -240,7 +252,7 @@ Partial Class Inventarios_CatAlmacenes
|
||||
Else
|
||||
TieneError = True
|
||||
End If
|
||||
ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, (CByte(Estatus)), HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta) Then
|
||||
ElseIf ObjAlmacen.UpdateAlmacen(TxtAlmacen.Text.Trim, DdlTipoAlmacen.SelectedValue.ToEntero, CuentaContable, DdlModalidad.SelectedValue.ToEntero, (CByte(Estatus)), HdnID.Value.ToEntero, CByte(DdlInventariable.SelectedValue), DdlSubProyecto.SelectedValue.ToEntero, TxtOrden.Text.ToEntero, CveCuenta, CveUsuarioAutoriza:=DdlUsuariosAutoriza.SelectedValue.ToEntero) Then
|
||||
Alert("El Almacen se actualizo correctamente.", TipoMensaje.MsgInformacion)
|
||||
UpDatos.Update()
|
||||
ViewState("DTAlmacenes") = ObjAlmacen.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
@@ -268,6 +280,8 @@ Partial Class Inventarios_CatAlmacenes
|
||||
TxtOrden.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
divEstatus.Visible = False
|
||||
DdlUsuariosAutoriza.SelectedValueExist("-1")
|
||||
|
||||
UpAddAlmacen.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddAlmacen"))
|
||||
|
||||
@@ -304,11 +318,15 @@ Partial Class Inventarios_CatAlmacenes
|
||||
DdlTipoAlmacen.SelectedValueExist(GvRow.DataKey("CveTipoAlmacen"))
|
||||
TxtAlmacen.Text = GvRow.DataKey("Almacen")
|
||||
TxtOrden.Text = GvRow.DataKey("Orden")
|
||||
DdlUsuariosAutoriza.SelectedValueExist(If(GvRow.DataKey("CveUsuarioAutoriza").ToEntero > 0, GvRow.DataKey("CveUsuarioAutoriza"), "-1"))
|
||||
|
||||
|
||||
divEstatus.Visible = True
|
||||
ChkEstatus.Checked = If((GvRow.DataKey("Estatus")) = "Activo", True, False)
|
||||
UpAddAlmacen.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "divAddAlmacen"))
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub LnkAlmacen_Click(sender As Object, e As EventArgs) Handles LnkAlmacen.Click
|
||||
Agregar()
|
||||
|
||||
@@ -546,6 +546,14 @@
|
||||
<asp:Button Text="" ID="BtnSeriePSAdd" OnClick="BtnSeriePSAdd_Click" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
<td runat="server" visible="false" id="TdSeccionPSAdd">
|
||||
<asp:Panel ID="Panel3" runat="server" DefaultButton="BtnSeccionPSAdd">
|
||||
<asp:DropDownList ID="DdlSeccionPSAdd" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Button Text="" ID="BtnSeccionPSAdd" Style="display: none" runat="server" />
|
||||
</asp:Panel>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1190,7 +1190,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, SerieLote As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String)
|
||||
Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String)
|
||||
If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlProducto2.SelectedText = "" : Exit Sub
|
||||
|
||||
Dim Valido As Boolean = True
|
||||
@@ -1201,7 +1201,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Dim FechaCaducidadVal As Date = If(RowPS("AplicaCaducidad").ToString = "True", FechaCaducidad, MinFecha)
|
||||
|
||||
If CveMetodoInventario = 5 And (String.IsNullOrEmpty(SerieLote.Trim()) OrElse SerieLote = "-1") Then
|
||||
If CveMetodoInventario = 5 And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
|
||||
Valido = False
|
||||
Alert("El producto requiere Serie", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -1209,9 +1209,9 @@ 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), FechaCaducidadVal)
|
||||
Dim Existencia As Double = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, If(Serie = "", "-1", Serie), 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 - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(Serie <> "", $" AND Serie = '{Serie}'", "")}") < 0 Then
|
||||
If Existencia <= 0 Then
|
||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
@@ -1230,12 +1230,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If Valido Then
|
||||
Dim CveClasificacion As Integer
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
|
||||
If dr IsNot Nothing Then CveClasificacion = dr("CveClasificacion").ToString.ToEntero
|
||||
'Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
|
||||
If RowPS IsNot Nothing Then CveClasificacion = RowPS("CveClasificacion").ToString.ToEntero
|
||||
|
||||
'VALIDA QUE LA SERIE NO SEA IGUAL AL CODIGO O CODIGOBARRAS
|
||||
If SerieLote <> "" And (SerieLote.ToUpper = dr("Codigo").ToString.ToUpper Or SerieLote.ToUpper = dr("CodigoBarras").ToString.ToUpper) Then
|
||||
Alert($"La serie indicada <b>{SerieLote}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
If Serie <> "" And (Serie.ToUpper = RowPS("Codigo").ToString.ToUpper Or Serie.ToUpper = RowPS("CodigoBarras").ToString.ToUpper) Then
|
||||
Alert($"La serie indicada <b>{Serie}</b> coincide con el codigo o codigo de barras del producto. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -1258,7 +1258,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
registro.Item("CodigoAF") = CodigoAF
|
||||
registro.Item("Codigo") = Codigo
|
||||
registro.Item("CveAF") = CveAF
|
||||
registro.Item("Serie") = If(SerieLote <> "", SerieLote, "")
|
||||
registro.Item("Serie") = If(Serie <> "", Serie, "")
|
||||
registro.Item("Lote") = If(Lote <> "", Lote, "")
|
||||
registro.Item("FechaCaducidad") = FechaCaducidad
|
||||
registro.Item("Observaciones") = Observaciones
|
||||
@@ -2938,6 +2938,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
TdSeriePS.Visible = False
|
||||
TdSeccionPSAdd.Visible = False
|
||||
|
||||
Dim Dr = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras= '{TxtCodigoPS.Text}'")
|
||||
If Dr Is Nothing Then
|
||||
@@ -2947,7 +2948,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Dr("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
If Dr("AplicaSerie").ToString = "True" Then
|
||||
TdSeriePSAdd.Visible = True
|
||||
TxtSeriePS.Focus()
|
||||
CvePSSerieLote = Dr("CvePS").ToString.ToEntero
|
||||
@@ -2956,8 +2957,32 @@ Partial Class Inventarios_EntradasSalidas
|
||||
UMSerieLote = Dr("UnidadMedida").ToString
|
||||
Exit Sub
|
||||
End If
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
Dim SeccionAlmacen As String = ""
|
||||
|
||||
AddNew(Dr("CvePS").ToString.ToEntero, Dr("PSCodigo").ToString, Dr("CveUM").ToString.ToEntero, Dr("UnidadMedida").ToString, 1, Dr("CostoPromedio").ToString.ToDouble, "", "", "", "", "", "", MinFecha, -1, "")
|
||||
If Dr("AplicaSeccion").ToString = "True" Then
|
||||
If DdlAlmacen.SelectedValue.ToEntero <= 1 Then
|
||||
Alert("No se ha especificado el almacen para especificar la sección", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
DdlSeccionPSAdd.Items.Clear()
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero)
|
||||
DdlSeccionPSAdd.DataSource = dtt
|
||||
DdlSeccionPSAdd.DataBind()
|
||||
If dtt.Rows.Count > 1 Then
|
||||
DdlSeccionPSAdd.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
' si solo hay un movimiento, debe de agregar, sino debe de esperar a que seleccionen
|
||||
Exit Sub
|
||||
DdlSeccionPSAdd.Focus()
|
||||
TdSeccionPSAdd.Visible = True
|
||||
Else
|
||||
CveSeccionAlmacen = DdlSeccionPSAdd.SelectedValue.ToEntero
|
||||
SeccionAlmacen = DdlSeccionPSAdd.SelectedItem.Text
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
AddNew(Dr("CvePS").ToString.ToEntero, Dr("PSCodigo").ToString, Dr("CveUM").ToString.ToEntero, Dr("UnidadMedida").ToString, 1, Dr("CostoPromedio").ToString.ToDouble, "", "", "", "", "", "", MinFecha, CveSeccionAlmacen, SeccionAlmacen)
|
||||
|
||||
TxtCodigoPS.Text = ""
|
||||
TxtCodigoPS.Focus()
|
||||
@@ -2968,6 +2993,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If TxtSeriePS.Text.Trim = "" Then
|
||||
Exit Sub
|
||||
End If
|
||||
If TdSeccionPSAdd.Visible Then
|
||||
If DdlSeccionAlmacen.SelectedValue.ToEntero <= 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
AddNew(CvePSSerieLote, PSSerieLote, CveUMSerieLote, UMSerieLote, 1, 0, TxtSeriePS.Text.Trim, "", "", "", "", "", MinFecha, -1, "")
|
||||
|
||||
|
||||
@@ -21,20 +21,22 @@
|
||||
}
|
||||
|
||||
.gvInventario tr td:nth-child(4) {
|
||||
width: 18% !important;
|
||||
width: 12% !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.gvInventario tr th:nth-child(4) {
|
||||
width: 18% !important;
|
||||
width: 12% !important;
|
||||
}
|
||||
|
||||
.gvEscondeColumna tr td:nth-child(3) {
|
||||
display: none;
|
||||
width:0px;
|
||||
}
|
||||
|
||||
.gvEscondeColumna tr th:nth-child(3) {
|
||||
display: none;
|
||||
width:0px;
|
||||
}
|
||||
|
||||
.btn.default:hover {
|
||||
@@ -406,6 +408,12 @@
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
|
||||
|
||||
<div class="col-md-2 pull-right">
|
||||
<div class="btn-group" style="float: right;">
|
||||
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Secciones" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 pull-right">
|
||||
<table style="float: right;">
|
||||
<tr>
|
||||
@@ -429,40 +437,32 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="btn-group pull-right">
|
||||
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Secciones" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--GV DATOS--%>
|
||||
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
||||
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<HeaderStyle Height="58px" />
|
||||
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<HeaderStyle Height="30px" />
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cbInv" runat="server" Checked="true" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" Width="5%" />
|
||||
<ItemStyle HorizontalAlign="Center" Width="2.5%" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
||||
|
||||
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:TemplateField HeaderText="Cant. a Surtir" ItemStyle-Width="10%">
|
||||
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField HeaderText="Cant. a Surtir" >
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="60px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" style="text-align: right" Text='<%# Eval("CantidadF") %>'></asp:TextBox>
|
||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" style="text-align: right" Text='<%# Eval("CantidadF", "{0:#,##0.######}") %>'></asp:TextBox>
|
||||
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" />
|
||||
</ItemTemplate>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||
<asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="35%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
|
||||
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
|
||||
@@ -927,7 +927,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If e.Row.DBCampo("Inv_CveMetodoInventario").Contiene("5", "6") Then
|
||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||
Else
|
||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").FormatoNumero()
|
||||
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").ToDecimal.ToString("#,##0.######")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -168,9 +168,9 @@ Partial Class Inventarios_Kardex
|
||||
|
||||
TxtSerie.Text = ""
|
||||
If ddlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, ddlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
Dim Dr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=ddlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If Dr IsNot Nothing Then
|
||||
If Dr("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
|
||||
If Dr("AplicaSerie").ToString = "True" Then
|
||||
DivSerie.Visible = True
|
||||
Else
|
||||
DivSerie.Visible = False
|
||||
|
||||
@@ -2382,6 +2382,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim CveClienteActual = -1
|
||||
|
||||
Dim CveAlmacenDestino = CveAlmacenApartado
|
||||
Dim CveSeccionDestino As Integer = -1
|
||||
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
|
||||
If CveVendedorActual = -1 Or (Dr("CveVendedor").ToString.ToEntero <> CveVendedorActual Or Dr("CveCliente").ToString.ToEntero <> CveClienteActual) Then
|
||||
@@ -2391,7 +2393,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
MovtosSalida.Add(CveMovtoSalidaActual)
|
||||
FoliosSalida.Add(ObjInventario.Folio)
|
||||
|
||||
CveMovtoEntradaActual = ObjInventario.AddMovimiento(CveAlmacenDestino, 9, 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), CveAlmacenDestino:=CveAlmacenDestino, CveMovimientoRelacionado:=CveMovtoSalidaActual, CveVendedor:=Dr("CveVendedor").ToString.ToEntero, CveCliente:=Dr("CveCliente").ToString.ToEntero, Remision:=TxtRemision.Text)
|
||||
CveMovtoEntradaActual = ObjInventario.AddMovimiento(CveAlmacenDestino, 9, 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), CveAlmacenDestino:=CveAlmacenDestino, CveMovimientoRelacionado:=CveMovtoSalidaActual, CveVendedor:=Dr("CveVendedor").ToString.ToEntero, CveCliente:=Dr("CveCliente").ToString.ToEntero, Remision:=TxtRemision.Text, Modulo:="RA/G7")
|
||||
MovtosEntrada.Add(CveMovtoEntradaActual)
|
||||
FoliosEntrada.Add(ObjInventario.Folio)
|
||||
|
||||
@@ -2408,8 +2410,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionDestino = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, CveAlmacenDestino, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Else
|
||||
CveSeccionDestino = -1
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionDestino, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVUnidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</td>
|
||||
<td runat="server" id="TrSeccion" visible="false">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
|
||||
@@ -121,7 +121,6 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
EsSurtidoUniforme = If(Request.QueryString("EsSurtidoUniforme").ToString = "1", True, False)
|
||||
End If
|
||||
|
||||
|
||||
InicializaValores()
|
||||
|
||||
If Not Request.QueryString("CvePersonal") Is Nothing Then
|
||||
@@ -275,8 +274,8 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DdlAlmacenDestinoLiberacion.DataBind()
|
||||
DdlAlmacenDestinoLiberacion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
'DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
'DdlSeccionAlmacen.DataBind()
|
||||
|
||||
CargaPS()
|
||||
End Sub
|
||||
@@ -335,9 +334,11 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
End Sub
|
||||
Private Sub VerificaProducto()
|
||||
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
Dim drp As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
Dim drp As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
|
||||
If drp IsNot Nothing Then
|
||||
|
||||
|
||||
'activa Serie
|
||||
If CBool(drp("AplicaSerie")) Then
|
||||
ThSerie.Visible = True
|
||||
@@ -349,6 +350,16 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
If CBool(drp("AplicaSeccion")) Then
|
||||
ThSeccion.Visible = True
|
||||
TrSeccion.Visible = True
|
||||
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, DdlProducto2.SelectedValue.ToEntero)
|
||||
DdlSeccionAlmacen.DataSource = dtt
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
If dtt.Rows.Count > 1 Then
|
||||
DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
dtt.Dispose()
|
||||
End If
|
||||
End If
|
||||
'activa lote
|
||||
If CBool(drp("AplicaLote")) Then
|
||||
@@ -445,7 +456,7 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
registro.Item("Estatus") = ""
|
||||
registro.Item("SeccionAlmacen") = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedItem.Text, "")
|
||||
registro.Item("Serie") = TxtnSerie.Text
|
||||
registro.Item("Lote") = If(TxtLote.Text = "", "-1", TxtLote.Text)
|
||||
registro.Item("Lote") = If(TxtLote.Text = "", "", TxtLote.Text)
|
||||
registro.Item("FechaCaducidad") = If(TxtCaducidad.Text = "", MinFecha.ToString, TxtCaducidad.Text)
|
||||
registro.Item("CveSeccionAlmacen") = If(DdlSeccionAlmacen.SelectedValue.ToEntero > 0, DdlSeccionAlmacen.SelectedValue.ToEntero, -1)
|
||||
registro.Item("Observaciones") = TxtObservacionesdetalle.Text
|
||||
@@ -823,10 +834,17 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar."
|
||||
TieneError = True
|
||||
Else
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
Dim CveSeccionAlmacen As Integer = 0
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestino.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero
|
||||
Else
|
||||
CveSeccionAlmacen = -1
|
||||
End If
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, 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,
|
||||
Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen,
|
||||
Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then
|
||||
TieneError = True
|
||||
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
|
||||
@@ -153,6 +153,7 @@
|
||||
|
||||
|
||||
<div class="col-md-6" id="DivInfo" runat="server" visible="false">
|
||||
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
@@ -214,6 +215,67 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" id="DivAutoriza" runat="server" visible="false">
|
||||
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">AUTORIZACIÓN</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DVAutorizaInformacion" visible = "False" >
|
||||
|
||||
<div class="col-md-12" runat="server" >
|
||||
<table>
|
||||
|
||||
<tr><td><b>Estado : </b></td><td><asp:Label runat="server" id="LblEstatusAutorizo" ></asp:Label></td></tr>
|
||||
<tr><td><b>Usuario : </b></td><td><asp:Label runat="server" id="LblUsaurioAutorizo" ></asp:Label></td></tr>
|
||||
<tr><td><b>Fecha : </b></td><td><asp:Label runat="server" id="LblFechaAutoriza" ></asp:Label></td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" runat="server" id="DVAutorizarBotones" visible = "False" >
|
||||
|
||||
|
||||
<div class="col-md-6" style="text-align:center!important">
|
||||
<asp:LinkButton runat="server" Text ="Aceptar" id="LnkAceptarTraslado" CssClass="btn btn-success"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Confirmar autorización?" data-btn-ok-label="Si" OnClick="LnkAceptarTraslado_Click"></asp:LinkButton>
|
||||
</div>
|
||||
<div class="col-md-6" style="text-align:center!important">
|
||||
<asp:LinkButton runat="server" Text ="Rechazar" ID="LnkRechazarTraslado" CssClass="btn btn-danger"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Confirmar rechazo?" data-btn-ok-label="Si" OnClick="LnkRechazarTraslado_Click" ></asp:LinkButton>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -238,7 +300,7 @@
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS, CodigoPS, CveUM, Cantidad, Precio, Observaciones, CveContratoDetalle" EmptyDataText="No se encontraron Productos registrados" ToolTip="Listado de Productos" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS, CodigoPS, CveUM, Cantidad, Precio, Observaciones, CveContratoDetalle,UnidadMedida" EmptyDataText="No se encontraron Productos registrados" ToolTip="Listado de Productos" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cantidad" HeaderStyle-HorizontalAlign="Left" DataFormatString="{0:N}" ItemStyle-HorizontalAlign="Center" DataField="Cantidad" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="U.M" HeaderStyle-HorizontalAlign="Center" DataFormatString="{0:N}" ItemStyle-HorizontalAlign="Center" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||
|
||||
@@ -36,6 +36,21 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
ViewState("CveDireccionEnvio") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private Property CveUsuarioAutoriza As Integer
|
||||
' Get
|
||||
' If ViewState("CveUsuarioAutoriza") Is Nothing Then
|
||||
' Return -1
|
||||
' Else
|
||||
' Return CType(ViewState("CveUsuarioAutoriza"), Integer)
|
||||
' End If
|
||||
|
||||
' End Get
|
||||
' Set(value As Integer)
|
||||
' ViewState("CveUsuarioAutoriza") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -133,6 +148,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim ObjClientes As New ClsClientes
|
||||
|
||||
If ObjInventarios.AddTrasladoSolicitudGet(CveTraspasoSolicitud, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
@@ -213,6 +229,55 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
LbAgregarPS.Visible = False
|
||||
HLDesdeContrato.Visible = False
|
||||
|
||||
|
||||
Dim EstatusAlmacen As Integer = ObjInventarios.DtResultados.Rows(0)("EstatusAlmacen").ToString().ToEntero
|
||||
Dim CveUsuarioAutoriza As Integer = ObjInventarios.DtResultados.Rows(0)("CveUsuarioAutorizaDestino").ToString().ToEntero
|
||||
|
||||
If EstatusAlmacen > 0 Then
|
||||
|
||||
|
||||
If UsuarioActual.CveUsuario = CveUsuarioAutoriza Then
|
||||
|
||||
If EstatusAlmacen = 1 Then
|
||||
|
||||
|
||||
DivAutoriza.Visible = True
|
||||
DVAutorizarBotones.Visible = True
|
||||
DVAutorizaInformacion.Visible = False
|
||||
|
||||
ElseIf EstatusAlmacen.Contiene(2, 3) Then
|
||||
DivAutoriza.Visible = True
|
||||
|
||||
DVAutorizarBotones.Visible = False
|
||||
DVAutorizaInformacion.Visible = True
|
||||
|
||||
LblEstatusAutorizo.Text = If(EstatusAlmacen = 2, "Aceptado", "Rechazado")
|
||||
LblUsaurioAutorizo.Text = ObjInventarios.DtResultados.Rows(0)("NombreAutoriza").ToString()
|
||||
LblFechaAutoriza.Text = ObjInventarios.DtResultados.Rows(0)("FechaAutorizacion").ToString().ToDate().ToString("dd/MM/yyyy")
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
ElseIf EstatusAlmacen.Contiene(2, 3) Then
|
||||
|
||||
DivAutoriza.Visible = True
|
||||
|
||||
DVAutorizarBotones.Visible = False
|
||||
DVAutorizaInformacion.Visible = True
|
||||
|
||||
LblEstatusAutorizo.Text = If(EstatusAlmacen = 2, "Aceptado", "Rechazado")
|
||||
LblUsaurioAutorizo.Text = ObjInventarios.DtResultados.Rows(0)("NombreAutoriza").ToString()
|
||||
LblFechaAutoriza.Text = ObjInventarios.DtResultados.Rows(0)("FechaAutorizacion").ToString().ToDate().ToString("dd/MM/yyyy")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
DivAutoriza.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Alert("Ocurrió un error al obtener los datos del traspaso.", TipoMensaje.MsgError)
|
||||
End If
|
||||
@@ -471,6 +536,9 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim CveUsuarioAutoriza As Integer = -1
|
||||
Dim EstatusAlmacen As Integer = 2
|
||||
'VERIFICA EXISTENCIAS
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Existencia = 0.0
|
||||
@@ -478,6 +546,25 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Dim MensajeExistencia As New StringBuilder
|
||||
MensajeExistencia.Append("No hay la existencia suficiente de los siguientes productos:<br/>")
|
||||
Dim CodigoPS As String = ""
|
||||
|
||||
|
||||
If ObjInventarios.GetAlmacenes(-1, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
CveUsuarioAutoriza = If(ObjInventarios.DtResultados.FiltraParametros($"CveAlmacen = {DdlAlmacenDestino.SelectedValue}")(0)("CveUsuarioAutoriza").ToString.ToEntero > 0, ObjInventarios.DtResultados.FiltraParametros($"CveAlmacen = {DdlAlmacenDestino.SelectedValue}")(0)("CveUsuarioAutoriza").ToString.ToEntero, -1)
|
||||
If CveUsuarioAutoriza > 0 Then
|
||||
EstatusAlmacen = 1
|
||||
End If
|
||||
|
||||
Else
|
||||
CveUsuarioAutoriza = -1
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
For Each row As GridViewRow In GvDatos.Rows
|
||||
CodigoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=row.DataKey("CvePS").ToEntero).FiltroPrimeroValor("PSCodigo", "")
|
||||
Existencia = ObjInventarios.GetExistenciasPS(row.DataKey("CvePS").ToEntero, row.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"))
|
||||
@@ -509,7 +596,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Estatus = 3
|
||||
End If
|
||||
|
||||
Dim Folio = ObjInventarios.AddTrasladoSolicitud(TxtObservaciones.Text.Trim, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, Estatus, -1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato, Guia:=Guia, CvePaqueteria:=DdlPaqueteria.SelectedValue.ToEntero, CveDireccionEnvio:=CveDireccionEnvio)
|
||||
Dim Folio = ObjInventarios.AddTrasladoSolicitud(TxtObservaciones.Text.Trim, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, Estatus, -1, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveContrato:=CveContrato, Guia:=Guia, CvePaqueteria:=DdlPaqueteria.SelectedValue.ToEntero, CveDireccionEnvio:=CveDireccionEnvio, EstatusAlmacen:=EstatusAlmacen)
|
||||
|
||||
If Folio > 0 Then
|
||||
CveTraspasoSolicitud = ObjInventarios.CveTraspasoSolicitud
|
||||
@@ -537,6 +624,11 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
If TieneError = False Then
|
||||
ObjInventarios.Commit()
|
||||
Alert($"El Traspaso se guardó correctamente con el folio #: <b>{Folio}</b>.", TipoMensaje.MsgInformacion, $"document.location.href=""/Inventarios/TrasladoSolicitud.aspx?CveTraspasoSolicitud={CveTraspasoSolicitud}""")
|
||||
|
||||
If CveUsuarioAutoriza > 0 Then
|
||||
MandaCorreoAutorizacion(Folio, CveTraspasoSolicitud, CveUsuarioAutoriza)
|
||||
End If
|
||||
|
||||
Else
|
||||
ObjInventarios.RollBack()
|
||||
Alert("Ocurrió un Error al guardar el traspaso.", TipoMensaje.MsgError)
|
||||
@@ -875,5 +967,77 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
UpPS.Update()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkAceptarTraslado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjInven As New ClsInventarios
|
||||
If ObjInven.UpdateTrasladoAutorizar(CveTraspasoSolicitud, UsuarioActual.CveEmpresa, 2, UsuarioActual.CveUsuario, Now) Then
|
||||
Alert("Autorizado correctamente.")
|
||||
End If
|
||||
ObjInven.Dispose()
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkRechazarTraslado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjInven As New ClsInventarios
|
||||
If ObjInven.UpdateTrasladoAutorizar(CveTraspasoSolicitud, UsuarioActual.CveEmpresa, 3, UsuarioActual.CveUsuario, Now) Then
|
||||
Alert("Rechazado correctamente.")
|
||||
End If
|
||||
ObjInven.Dispose()
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub MandaCorreoAutorizacion(Folio As Integer, CveTraspasoSolicitud As Integer, CveUsuarioAutoriza As Integer)
|
||||
|
||||
Dim SB As New StringBuilder
|
||||
|
||||
Dim CorreoDestino As String = GlobalDTUsuarios(CveUsuarioAutoriza)(0)("Correo").ToString.Trim
|
||||
|
||||
|
||||
If CorreoDestino.Length > 0 Then
|
||||
|
||||
|
||||
|
||||
SB.AppendLine($"<p>Se ha registrado una solicitud de traspaso de {DdlAlmacenOrigen.SelectedItem.Text} a {DdlAlmacenDestino.SelectedItem.Text}, con los siguientes productos.</p>")
|
||||
|
||||
|
||||
|
||||
SB.AppendLine("<br>")
|
||||
SB.AppendLine("<table border = '0'>")
|
||||
SB.AppendLine("<tr style='color:white;background-color:#808080;' ><th>Cantidad</th> <th>U.M.</th> <th>Producto</th> <th>Observaciones</th> </tr>")
|
||||
|
||||
For Each GvRow As GridViewRow In GvDatos.Rows
|
||||
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
SB.AppendLine($"<tr style='background-color:#F2F2F0;'> <td>{GvRow.DataKey("Cantidad")}</td> <td>{GvRow.DataKey("UnidadMedida")}</td> <td>{GvRow.DataKey("CodigoPS")}</td> <td>{GvRow.DataKey("Observaciones")}</td> </tr>")
|
||||
End If
|
||||
|
||||
Next
|
||||
SB.AppendLine("</table>")
|
||||
SB.AppendLine("<br>")
|
||||
SB.AppendLine($"<strong> <a href='{Request.Url.GetLeftPart(UriPartial.Authority)}/Inventarios/TrasladoSolicitud.aspx?CveTraspasoSolicitud={CveTraspasoSolicitud}'>Ir a solicitud de traspaso para autorización</a></strong>")
|
||||
|
||||
|
||||
|
||||
Dim MandaCorre As New ClsSisMail
|
||||
MandaCorre.SendMail(ClsPaginas.EmpresaNotificaciones, CorreoDestino, $"Solicitud de Autorización de traspaso #{Folio}", SB.ToString, Displayname:="SIG Notificaciones: Solicitud de Traspaso")
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -1326,8 +1326,8 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
|
||||
|
||||
'RECARGA GLOBAL ALMACEN
|
||||
If ObjUsuarios.GetAlmacen(-1, UsuarioActual.CveEmpresa) Then Application("GlobalDTAlmacenUsuarios") = ObjUsuarios.DtResultados Else Application("GlobalDTAlmacenUsuarios") = Nothing
|
||||
|
||||
'If ObjUsuarios.GetAlmacen(-1, UsuarioActual.CveEmpresa) Then Application("GlobalDTAlmacenUsuarios") = ObjUsuarios.DtResultados Else Application("GlobalDTAlmacenUsuarios") = Nothing
|
||||
GlobalDTAlmacenUsuarios(-1, UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
'RECARGA GLOBAL EMPRESAS USUARIOS
|
||||
If ObjUsuarios.GetUsuariosEmpresas(-1) Then
|
||||
|
||||
@@ -2072,7 +2072,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlAlmacen" Width="50%" runat="server" CssClass="form-control select2me" DataValueField="CveAlmacen" DataTextField="Almacen" AppendDataBoundItems="true"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlAlmacen" Width="50%" runat="server" CssClass="form-control select2me" DataValueField="CveAlmacen" DataTextField="Almacen" AppendDataBoundItems="true" OnSelectedIndexChanged="DdlAlmacen_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvAlmacen" runat="server" ControlToValidate="DdlAlmacen" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpModalSeccionAlmacen"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceAlmacen" runat="server" HighlightCssClass="vco" TargetControlID="RfvAlmacen"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlAlmacen.ClientID.ToString()%>">Almacen:</label>
|
||||
|
||||
@@ -2558,10 +2558,6 @@ Partial Class ProductosyServicios
|
||||
DdlAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlAlmacen.DataBind()
|
||||
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
|
||||
DdlSeccionAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
|
||||
UpModalSeccionAlmacen.Update()
|
||||
End Sub
|
||||
|
||||
@@ -2661,4 +2657,13 @@ Partial Class ProductosyServicios
|
||||
|
||||
UpSeccionAlmacen.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
|
||||
DdlSeccionAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
|
||||
UpModalSeccionAlmacen.Update()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user