Merge-- RecepcionAlmacen
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
|
Imports System
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
@@ -1753,6 +1754,33 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function RepExistenciasLote(CveEmpresa As Integer, FechaI As Date, FechaF As Date, CveProveedor As Integer, Almacenes As String,
|
||||||
|
CvePS As Integer, CveClasificacion As Integer, Optional CveMarca As Integer = -1, Optional CveTipoAlmacen As String = "-1") As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Inv_RepExistenciaLote")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
.Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
|
.Add("@CveTipoAlmacen", SqlDbType.VarChar).Value = CveTipoAlmacen
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener la lista de movimientos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
'Nuevo R: 19/10/2017
|
'Nuevo R: 19/10/2017
|
||||||
Public Function RepMovimientosGen(CveEmpresa As Integer, FechaI As String, FechaF As String, CveProveedor As Integer, CveAlmacen As Integer,
|
Public Function RepMovimientosGen(CveEmpresa As Integer, FechaI As String, FechaF As String, CveProveedor As Integer, CveAlmacen As Integer,
|
||||||
CvePS As Integer, CveClasificacion As Integer, Agrupador As Integer, Optional CveClasificacion2 As Integer = -1) As Boolean
|
CvePS As Integer, CveClasificacion As Integer, Agrupador As Integer, Optional CveClasificacion2 As Integer = -1) As Boolean
|
||||||
@@ -3061,7 +3089,7 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
#Region " INVENTARIOS - COMPRAS "
|
#Region " INVENTARIOS - COMPRAS "
|
||||||
|
|
||||||
Public Function RecepcionAlmacenGet(CveCompra As Integer, TipoRecepcion As Integer, CveEmpresa As Integer, Optional CveProveedor As Integer = -1) As Boolean
|
Public Function RecepcionAlmacenGet(CveCompra As Integer, TipoRecepcion As Integer, CveProveedor As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_RecepcionAlmacenGet")
|
DataAdapter("PA_Inv_RecepcionAlmacenGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -3069,6 +3097,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@TipoRecepcion", SqlDbType.Int).Value = TipoRecepcion
|
.Add("@TipoRecepcion", SqlDbType.Int).Value = TipoRecepcion
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|||||||
@@ -4716,6 +4716,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Inventarios/CatAlmacenClasificacionSecciones.aspx".ToUpper(), 764)
|
PaginaDict.Add("/Inventarios/CatAlmacenClasificacionSecciones.aspx".ToUpper(), 764)
|
||||||
PaginaDict.Add("/Inventarios/ReconstruirCostos.aspx".ToUpper(), 764)
|
PaginaDict.Add("/Inventarios/ReconstruirCostos.aspx".ToUpper(), 764)
|
||||||
PaginaDict.Add("/Inventarios/RecepcionDevolucion.aspx".ToUpper(), 696)
|
PaginaDict.Add("/Inventarios/RecepcionDevolucion.aspx".ToUpper(), 696)
|
||||||
|
PaginaDict.Add("/Inventarios/RepExistenciaLote.aspx".ToUpper(), 109)
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -1342,7 +1342,7 @@ Public Class ClsProductosServicios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddPSAlias(PS As String, CvePS As Integer, Optional CveUsuarioModifico As Integer = -1) As Boolean
|
Public Function AddPSAlias(PS As String, CvePS As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Flexible As Boolean = False) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Gral_ProductosServiciosAliasAdd")
|
DataAdapter("PA_Gral_ProductosServiciosAliasAdd")
|
||||||
|
|
||||||
@@ -1350,6 +1350,7 @@ Public Class ClsProductosServicios
|
|||||||
.Add("@PSAlias", SqlDbType.VarChar).Value = If(PS.Length > 845, PS.Substring(0, 845), PS)
|
.Add("@PSAlias", SqlDbType.VarChar).Value = If(PS.Length > 845, PS.Substring(0, 845), PS)
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
|
.Add("@Flexible", SqlDbType.Bit).Value = If(Flexible, 1, 0)
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -3222,10 +3222,8 @@ Partial Class Bancos_IE
|
|||||||
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
|
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
|
||||||
IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2)
|
IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2)
|
||||||
|
|
||||||
Dim CveCuentaDevolucionIMPUESTOS As Integer = -1
|
|
||||||
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
|
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
|
||||||
|
|
||||||
|
|
||||||
If DdlMoneda.SelectedValue.ToEntero > 1 Then
|
If DdlMoneda.SelectedValue.ToEntero > 1 Then
|
||||||
IVADevMN = IVADev
|
IVADevMN = IVADev
|
||||||
IEPSDevMN = IEPSDev
|
IEPSDevMN = IEPSDev
|
||||||
@@ -3239,15 +3237,13 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
If IVADev > 0 Then
|
If IVADev > 0 Then
|
||||||
|
|
||||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAxAcreditarDevDinC
|
|
||||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
|
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
|
||||||
|
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev) Then
|
||||||
|
|
||||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAAcreditableDevDinC
|
|
||||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
|
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev) Then
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||||
ErrorDevolucionImpuestos = True
|
ErrorDevolucionImpuestos = True
|
||||||
End If
|
End If
|
||||||
@@ -3263,22 +3259,19 @@ Partial Class Bancos_IE
|
|||||||
'Dim ObjContabilidad As New ClsContabilidad
|
'Dim ObjContabilidad As New ClsContabilidad
|
||||||
If ObjMov.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
|
If ObjMov.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
|
||||||
Try
|
Try
|
||||||
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
|
|
||||||
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||||
|
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, ReferenciaAplicar, 25, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, ReferenciaAplicar, 25, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev) Then
|
||||||
|
|
||||||
If ObjMov.GetRetCuenta(26, UsuarioActual.CveEmpresa) Then
|
If ObjMov.GetRetCuenta(26, UsuarioActual.CveEmpresa) Then
|
||||||
Try
|
Try
|
||||||
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
|
|
||||||
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, ReferenciaAplicar, 26, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, ReferenciaAplicar, 26, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev) Then
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||||
ErrorDevolucionImpuestos = True
|
ErrorDevolucionImpuestos = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Alert("Se presento un error al obtener las cuentas de IEPS acreditable.")
|
Alert("Se presento un error al obtener las cuentas de IEPS acreditable.")
|
||||||
ErrorDevolucionImpuestos = True
|
ErrorDevolucionImpuestos = True
|
||||||
@@ -3456,7 +3449,6 @@ Partial Class Bancos_IE
|
|||||||
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
|
IVADev = Math.Round(IVADev * PorcentajeDevolucion, 2)
|
||||||
IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2)
|
IEPSDev = Math.Round(IEPSDev * PorcentajeDevolucion, 2)
|
||||||
|
|
||||||
Dim CveCuentaDevolucionIMPUESTOS As Integer = -1
|
|
||||||
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
|
Dim IdCtaIVADevolucionIMPUESTOS As Integer = -1
|
||||||
|
|
||||||
|
|
||||||
@@ -3473,15 +3465,13 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
If IVADev > 0 Then
|
If IVADev > 0 Then
|
||||||
|
|
||||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAxAcreditarDevDinC
|
|
||||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
|
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAXAcreditarDevDinC
|
||||||
|
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IVADev, ReferenciaAplicar, 14, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev) Then
|
||||||
|
|
||||||
CveCuentaDevolucionIMPUESTOS = CveCuentaIVAAcreditableDevDinC
|
|
||||||
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
|
IdCtaIVADevolucionIMPUESTOS = IdCtaIVAAcreditableDevDinC
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IVADev, ReferenciaAplicar, 19, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IVADevMN, ImporteME:=-IVADev) Then
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||||
ErrorDevolucionImpuestos = True
|
ErrorDevolucionImpuestos = True
|
||||||
End If
|
End If
|
||||||
@@ -3497,17 +3487,15 @@ Partial Class Bancos_IE
|
|||||||
'Dim ObjContabilidad As New ClsContabilidad
|
'Dim ObjContabilidad As New ClsContabilidad
|
||||||
If ObjMov.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
|
If ObjMov.GetRetCuenta(25, UsuarioActual.CveEmpresa) Then
|
||||||
Try
|
Try
|
||||||
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditarSIG").ToString.ToEntero
|
|
||||||
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||||
|
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, ReferenciaAplicar, 25, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -IEPSDev, ReferenciaAplicar, 25, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev) Then
|
||||||
|
|
||||||
If ObjMov.GetRetCuenta(26, UsuarioActual.CveEmpresa) Then
|
If ObjMov.GetRetCuenta(26, UsuarioActual.CveEmpresa) Then
|
||||||
Try
|
Try
|
||||||
CveCuentaDevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditableSIG").ToString.ToEntero
|
|
||||||
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
IdCtaIVADevolucionIMPUESTOS = ObjMov.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||||
|
|
||||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, ReferenciaAplicar, 26, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev, CveCuenta:=CveCuentaDevolucionIMPUESTOS) Then
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -IEPSDev, ReferenciaAplicar, 26, ConceptoAplicar, Now, IdCtaIVADevolucionIMPUESTOS, -1, CveIE, CveCompra:=CveCompraDeCDin, CveProveedor:=CveProveedor, ImporteMX:=-IEPSDevMN, ImporteME:=-IEPSDev) Then
|
||||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución "
|
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución "
|
||||||
ErrorDevolucionImpuestos = True
|
ErrorDevolucionImpuestos = True
|
||||||
End If
|
End If
|
||||||
@@ -6476,10 +6464,10 @@ Partial Class Bancos_IE
|
|||||||
|
|
||||||
Protected Sub LnkCancelarComplemetno_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkCancelarComplemetno_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
If ChkConciliado.Checked Then
|
'If ChkConciliado.Checked Then
|
||||||
Alert("El documento se encuentra conciliado, no se puede cancelar.", TipoMensaje.MsgAdvertencia)
|
' Alert("El documento se encuentra conciliado, no se puede cancelar.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
<asp:Label ID="LblTitulo" runat="server" Text="Catálogo de Ingreso / Egreso"></asp:Label>
|
<asp:Label ID="LblTitulo" runat="server" Text="Reporteador Ingresos - Egresos"></asp:Label>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -1649,7 +1649,7 @@ Partial Class Compras_Compras
|
|||||||
Private Function CargaFactura(CveFactura As Integer) As String
|
Private Function CargaFactura(CveFactura As Integer) As String
|
||||||
Dim ObjeFacturas As New ClsCompras
|
Dim ObjeFacturas As New ClsCompras
|
||||||
Dim RFC As String = ""
|
Dim RFC As String = ""
|
||||||
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-3), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then
|
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-4), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then
|
||||||
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
|
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
|
||||||
|
|
||||||
Dim XMLDoc As New XmlDocument
|
Dim XMLDoc As New XmlDocument
|
||||||
|
|||||||
@@ -1441,7 +1441,7 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCompra > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCompra > 0 Then
|
||||||
If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
If ObjInventarios.RecepcionAlmacenGet(CveCompra, -1, -1, UsuarioActual.CveEmpresa, -1) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||||
Dim DtFaltante As DataTable = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0")
|
Dim DtFaltante As DataTable = ObjInventarios.DtResultados.FiltraParametros("CantidadF > 0")
|
||||||
If DtFaltante.Rows.Count > 0 Then
|
If DtFaltante.Rows.Count > 0 Then
|
||||||
Dim SbPendientes As New StringBuilder
|
Dim SbPendientes As New StringBuilder
|
||||||
@@ -2920,9 +2920,11 @@ Partial Class PopUpVerFactura
|
|||||||
Case 24 'SALIDA POR RESGUARDO
|
Case 24 'SALIDA POR RESGUARDO
|
||||||
If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then
|
If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
Dim ArchivoRuta As New System.IO.FileInfo(String.Format("{0}Formatos/Entradas.rdlc", UsuarioActual.Empresa.Ruta))
|
|
||||||
Dim Archivo As String = String.Format("{0}Formatos/EntradaSalidaUniforme.rdlc", UsuarioActual.Empresa.Ruta)
|
Dim ArchivoRuta As New System.IO.FileInfo(String.Format("{0}Formatos/EntradaSalidaUniforme.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
|
Dim Archivo As String = String.Format("{0}Formatos/EntradaSalidaUniforme.rdlc", UsuarioActual.Empresa.Ruta)
|
||||||
|
|
||||||
If Not ArchivoRuta.Exists Then
|
If Not ArchivoRuta.Exists Then
|
||||||
Archivo = "Empresas/Grales/Formatos/EntradaSalidaUniforme.rdlc"
|
Archivo = "Empresas/Grales/Formatos/EntradaSalidaUniforme.rdlc"
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -316,7 +316,7 @@
|
|||||||
|
|
||||||
<asp:GridView ID="GvCompara" runat="server" GridLines="None" AutoGenerateColumns="False" EmptyDataText="" CssClass="table table-striped table-hover table-advance Widthall" OnRowDataBound="GvCompara_RowDataBound">
|
<asp:GridView ID="GvCompara" runat="server" GridLines="None" AutoGenerateColumns="False" EmptyDataText="" CssClass="table table-striped table-hover table-advance Widthall" OnRowDataBound="GvCompara_RowDataBound">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Msg" HeaderText="Mensaje" />
|
<asp:BoundField DataField="Msg" HeaderText="Mensaje" ItemStyle-Width="200px" />
|
||||||
<asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" />
|
<asp:BoundField DataField="FueConciliado" HeaderText="Conciliado" />
|
||||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
|
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
|
||||||
<asp:BoundField DataField="ImporteMN" HeaderText="Importe" DataFormatString="{0:N2}" />
|
<asp:BoundField DataField="ImporteMN" HeaderText="Importe" DataFormatString="{0:N2}" />
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT";
|
LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT";
|
||||||
}
|
}
|
||||||
|
|
||||||
GvA.Columns[11].Visible = DtIVAAcreditable.SUM("IvaExentoImpo") > 0; // sino tiene valor la columna de importación de oculta
|
GvA.Columns[10].Visible = DtIVAAcreditable.SUM("IvaExentoImpo") > 0; // sino tiene valor la columna de importación de oculta
|
||||||
|
|
||||||
|
|
||||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
|
|||||||
@@ -133,15 +133,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
|||||||
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GvIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
'If e.Row.DBCampo("Id").ToEntero = IdCuenta Then
|
If e.Row.DBCampo("CtaMayor") = "1" OrElse e.Row.DBCampo("CtaMayor") = "3" OrElse e.Row.DBCampo("CtaMayor") = "4" Then
|
||||||
' e.Row.ControlStyle.Font.Bold = True
|
|
||||||
' 'e.Row.ControlStyle.Font.Size = 9
|
|
||||||
' 'e.Row.ControlStyle.Height = 30
|
|
||||||
'Else
|
|
||||||
' e.Row.ControlStyle.Font.Bold = False
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If e.Row.DBCampo("CtaMayor") = "1" Or e.Row.DBCampo("CtaMayor") = "1" Then
|
|
||||||
e.Row.ControlStyle.Font.Bold = True
|
e.Row.ControlStyle.Font.Bold = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -167,8 +159,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
|||||||
|
|
||||||
'Total general
|
'Total general
|
||||||
If e.Row.DBCampo("Id") = "" Then
|
If e.Row.DBCampo("Id") = "" Then
|
||||||
'e.Row.Cells(2).HorizontalAlign = HorizontalAlign.NotSet
|
|
||||||
'Dim TotSaldoID, TotSaldoIA As Double
|
|
||||||
e.Row.ControlStyle.Font.Bold = True
|
e.Row.ControlStyle.Font.Bold = True
|
||||||
e.Row.ControlStyle.Font.Size = 9
|
e.Row.ControlStyle.Font.Size = 9
|
||||||
e.Row.ControlStyle.Height = 30
|
e.Row.ControlStyle.Height = 30
|
||||||
@@ -192,33 +183,6 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
|||||||
|
|
||||||
ImprimirReporte()
|
ImprimirReporte()
|
||||||
|
|
||||||
'Using sw As New StringWriter()
|
|
||||||
' Using hw As New HtmlTextWriter(sw)
|
|
||||||
|
|
||||||
' Dim style As StringBuilder = New StringBuilder()
|
|
||||||
' style.Append("<style> ")
|
|
||||||
' style.Append(File.ReadAllText(ModExtensiones.DirectorioBaseEmpresas & "Styles\EstilosExcel.css"))
|
|
||||||
' style.Append(" </style> ")
|
|
||||||
' 'To Export all pages
|
|
||||||
' 'Gv.AllowPaging = False
|
|
||||||
' 'Gv.DataBind()
|
|
||||||
' Tbl.RenderControl(hw)
|
|
||||||
' Dim sr As New StringReader(sw.ToString())
|
|
||||||
' Dim pdfDoc As New Document(PageSize.A2, 10.0F, 10.0F, 10.0F, 0.0F)
|
|
||||||
' Dim htmlparser As New HTMLWorker(pdfDoc)
|
|
||||||
' PdfWriter.GetInstance(pdfDoc, Response.OutputStream)
|
|
||||||
' pdfDoc.Open()
|
|
||||||
' htmlparser.Parse(sr)
|
|
||||||
' pdfDoc.Close()
|
|
||||||
|
|
||||||
' Response.ContentType = "application/pdf"
|
|
||||||
' Response.AddHeader("content-disposition", "attachment;filename=BalanzaComprobacion.pdf")
|
|
||||||
' Response.Cache.SetCacheability(HttpCacheability.NoCache)
|
|
||||||
' Response.Write(style.ToString)
|
|
||||||
' Response.Write(pdfDoc)
|
|
||||||
' Response.[End]()
|
|
||||||
' End Using
|
|
||||||
'End Using
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
'No quitar porque no funciona el exporta PDF
|
'No quitar porque no funciona el exporta PDF
|
||||||
@@ -228,7 +192,7 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
|||||||
|
|
||||||
|
|
||||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||||
'GvDatos.ExportToExcel("BalanzaComprobacion")
|
|
||||||
ImprimirReporte("Excel")
|
ImprimirReporte("Excel")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -4580,7 +4580,7 @@ Partial Class Contratos_ContratoObra
|
|||||||
CveUnidadMedida = GlobalDTUnidadesMedida(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveUnidadMedida").ToString.ToEntero
|
CveUnidadMedida = GlobalDTUnidadesMedida(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveUnidadMedida").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, DrowPS("Codigo").ToString.Trim, "", "", DrowPS("Producto").ToString, DrowPS("PU").ToString.ToDouble, 0, 0, False, 0, False, If(TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas, True, False),
|
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, DrowPS("Codigo").ToString.Trim, "", "", DrowPS("Producto").ToString, DrowPS("PU").ToString.ToDouble, -1, 0, False, 0, False, If(TipoCargaPresupuesto = EnumTipoCargaPresupuesto.Ventas, True, False),
|
||||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, CveTipoPS:=2, CveSATPS:=-1, CveMarca:=-1, CveTamaño:=-1, CveMedida:=-1, CveRinTamaño:=-1, CveModelo:=-1, Litraje:=-1, IEPSPorcentaje:=-1, CveClasificacion2:=-1, CveClasificacionDetalle:=-1) > 0 Then
|
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1, CveTipoPS:=2, CveSATPS:=-1, CveMarca:=-1, CveTamaño:=-1, CveMedida:=-1, CveRinTamaño:=-1, CveModelo:=-1, Litraje:=-1, IEPSPorcentaje:=-1, CveClasificacion2:=-1, CveClasificacionDetalle:=-1) > 0 Then
|
||||||
CvePS = ObjPS.CvePS
|
CvePS = ObjPS.CvePS
|
||||||
Else
|
Else
|
||||||
@@ -4656,17 +4656,12 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Not DTCargaPresupuestoManoObra Is Nothing And Not ErrorProceso Then
|
If Not DTCargaPresupuestoManoObra Is Nothing And Not ErrorProceso Then
|
||||||
|
|
||||||
|
|
||||||
For Each DrowPS As DataRow In DTCargaPresupuestoManoObra.Rows
|
For Each DrowPS As DataRow In DTCargaPresupuestoManoObra.Rows
|
||||||
|
|
||||||
Dim CveActividad As Integer = 0
|
Dim CveActividad As Integer = 0
|
||||||
Dim Actividad As String
|
Dim Actividad As String
|
||||||
|
|
||||||
|
|
||||||
If DrowPS("Actividad").ToString.Trim.Length > 0 Then
|
If DrowPS("Actividad").ToString.Trim.Length > 0 Then
|
||||||
GlobalDTRHActividades(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTRHActividades(UsuarioActual.CveEmpresa) = Nothing
|
||||||
CveActividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveActividad", $" Actividad = '{ DrowPS("Actividad").ToString.Trim }'").ToEntero
|
CveActividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveActividad", $" Actividad = '{ DrowPS("Actividad").ToString.Trim }'").ToEntero
|
||||||
@@ -4691,14 +4686,11 @@ Partial Class Contratos_ContratoObra
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjRH.Dispose()
|
ObjRH.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If CveActividad > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 And Not ErrorProceso Then
|
If CveActividad > 0 And DrowPS("Cantidad").ToString.ToDouble > 0 And Not ErrorProceso Then
|
||||||
|
|
||||||
Actividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Actividad", $" CveActividad = {CveActividad}")
|
Actividad = GlobalDTRHActividades(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Actividad", $" CveActividad = {CveActividad}")
|
||||||
|
|
||||||
Dim Row As DataRow = DTPS.NewRow()
|
Dim Row As DataRow = DTPS.NewRow()
|
||||||
Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble
|
Row("Cantidad") = DrowPS("Cantidad").ToString.ToDouble
|
||||||
Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble
|
Row("CantidadContratada") = DrowPS("Cantidad").ToString.ToDouble
|
||||||
@@ -4717,7 +4709,6 @@ Partial Class Contratos_ContratoObra
|
|||||||
Row("CveActividad") = CveActividad
|
Row("CveActividad") = CveActividad
|
||||||
Row("CveSubTipoActivoFijo") = -1
|
Row("CveSubTipoActivoFijo") = -1
|
||||||
Row("Dias") = DrowPS("Dias").ToString.ToEntero
|
Row("Dias") = DrowPS("Dias").ToString.ToEntero
|
||||||
|
|
||||||
Row("NoIdentificacion") = ""
|
Row("NoIdentificacion") = ""
|
||||||
Row("OCInterna") = ""
|
Row("OCInterna") = ""
|
||||||
Row("LimitarCantidad") = 0
|
Row("LimitarCantidad") = 0
|
||||||
@@ -4905,7 +4896,6 @@ Partial Class Contratos_ContratoObra
|
|||||||
|
|
||||||
Dim NrowTmpDT As DataRow = TmpDT.NewRow
|
Dim NrowTmpDT As DataRow = TmpDT.NewRow
|
||||||
|
|
||||||
|
|
||||||
NrowTmpDT("Cantidad") = Row("Cantidad")
|
NrowTmpDT("Cantidad") = Row("Cantidad")
|
||||||
NrowTmpDT("CantidadContratada") = Row("CantidadContratada")
|
NrowTmpDT("CantidadContratada") = Row("CantidadContratada")
|
||||||
NrowTmpDT("CveUM") = Row("CveUM")
|
NrowTmpDT("CveUM") = Row("CveUM")
|
||||||
@@ -4933,7 +4923,6 @@ Partial Class Contratos_ContratoObra
|
|||||||
NrowTmpDT("SubTipoActivoFijo") = Row("SubTipoActivoFijo")
|
NrowTmpDT("SubTipoActivoFijo") = Row("SubTipoActivoFijo")
|
||||||
NrowTmpDT("Dias") = Row("Dias")
|
NrowTmpDT("Dias") = Row("Dias")
|
||||||
|
|
||||||
|
|
||||||
NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
NrowTmpDT("CveContratoDetalle") = ObjContratos.DtResultados.Rows(0)("CveContratoDetalle")
|
||||||
|
|
||||||
TmpDT.Rows.Add(NrowTmpDT)
|
TmpDT.Rows.Add(NrowTmpDT)
|
||||||
@@ -4946,7 +4935,6 @@ Partial Class Contratos_ContratoObra
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
If ErrorProceso Then
|
If ErrorProceso Then
|
||||||
ObjContratos.RollBack()
|
ObjContratos.RollBack()
|
||||||
Alert("Se presento un error al cargar el presupuesto.", TipoMensaje.MsgError)
|
Alert("Se presento un error al cargar el presupuesto.", TipoMensaje.MsgError)
|
||||||
|
|||||||
@@ -220,6 +220,8 @@ Partial Class Inventarios_Kardex
|
|||||||
If AplicaSerie Then GvM.Columns(9).Visible = True
|
If AplicaSerie Then GvM.Columns(9).Visible = True
|
||||||
If AplicaLote Then GvM.Columns(10).Visible = True
|
If AplicaLote Then GvM.Columns(10).Visible = True
|
||||||
If AplicaCaducidad Then GvM.Columns(11).Visible = True
|
If AplicaCaducidad Then GvM.Columns(11).Visible = True
|
||||||
|
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvM.Columns(11).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
|
|
||||||
|
|
||||||
Dim Drp As datarow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("")
|
Dim Drp As datarow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimero("")
|
||||||
Dim AuxAplicaSerie As Boolean
|
Dim AuxAplicaSerie As Boolean
|
||||||
@@ -232,6 +234,7 @@ Partial Class Inventarios_Kardex
|
|||||||
LnkSeries.Visible = AuxAplicaSerie
|
LnkSeries.Visible = AuxAplicaSerie
|
||||||
LnkCaducidad.Visible = AuxAplicaCad
|
LnkCaducidad.Visible = AuxAplicaCad
|
||||||
'CARGA INDICADORES
|
'CARGA INDICADORES
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(201) Then
|
If UsuarioActual.TienePermisoProceso(201) Then
|
||||||
DivIndicadores.Visible = True
|
DivIndicadores.Visible = True
|
||||||
|
|
||||||
@@ -363,7 +366,9 @@ Partial Class Inventarios_Kardex
|
|||||||
GvProductoCaducidad.DataSource = ObjInventarios.DtResultados
|
GvProductoCaducidad.DataSource = ObjInventarios.DtResultados
|
||||||
GvProductoCaducidad.columns(2).visible = ObjInventarios.DtResultados.max("Serie") <> ""
|
GvProductoCaducidad.columns(2).visible = ObjInventarios.DtResultados.max("Serie") <> ""
|
||||||
GvProductoCaducidad.columns(3).visible = ObjInventarios.DtResultados.max("Lote") <> ""
|
GvProductoCaducidad.columns(3).visible = ObjInventarios.DtResultados.max("Lote") <> ""
|
||||||
GvProductoCaducidad.columns(4).visible = ObjInventarios.DtResultados.max("FechaCaducidad").todate > minfecha
|
GvProductoCaducidad.Columns(4).Visible = ObjInventarios.DtResultados.MAX("FechaCaducidad").ToDate > MinFecha
|
||||||
|
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvProductoCaducidad.Columns(4).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
GvProductoCaducidad.DataBind()
|
GvProductoCaducidad.DataBind()
|
||||||
|
|||||||
@@ -991,7 +991,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
Dim CargaSoloUsados As Boolean = False
|
Dim CargaSoloUsados As Boolean = False
|
||||||
|
|
||||||
If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
Dim DtRecepcion As DataTable = ObjInventario.DtResultados.Copy()
|
Dim DtRecepcion As DataTable = ObjInventario.DtResultados.Copy()
|
||||||
Dim NumUsados = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = True").ToEntero()
|
Dim NumUsados = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = True").ToEntero()
|
||||||
Dim NumProductos = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = False").ToEntero()
|
Dim NumProductos = ObjInventario.DtResultados.COUNT("EsUsado", "EsUsado = False").ToEntero()
|
||||||
@@ -1016,7 +1016,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||||
|
|
||||||
@@ -2117,7 +2116,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim VariableCampo = If(TipoMovimiento.Contiene(1, 3), "CantidadF", "CantidadS")
|
Dim VariableCampo = If(TipoMovimiento.Contiene(1, 3), "CantidadF", "CantidadS")
|
||||||
Dim ObjComprasDif As New ClsInventarios
|
Dim ObjComprasDif As New ClsInventarios
|
||||||
Dim DtDatosCompra As New DataTable
|
Dim DtDatosCompra As New DataTable
|
||||||
If ObjComprasDif.RecepcionAlmacenGet(CveCompraSurtir, BuscaEntregaDirecta, UsuarioActual.CveEmpresa) Then
|
If ObjComprasDif.RecepcionAlmacenGet(CveCompraSurtir, BuscaEntregaDirecta, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
DtDatosCompra = ObjComprasDif.DtResultados
|
DtDatosCompra = ObjComprasDif.DtResultados
|
||||||
End If
|
End If
|
||||||
Dim CantidadGV = GvInv.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("CantidadF").ToDecimal)
|
Dim CantidadGV = GvInv.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("CantidadF").ToDecimal)
|
||||||
@@ -2868,7 +2867,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'VERIFICA SI TIENE ALMACEN VIRTUAL
|
'VERIFICA SI TIENE ALMACEN VIRTUAL
|
||||||
If CveAlmacenVirtual > 0 Then
|
If CveAlmacenVirtual > 0 Then
|
||||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=ValidarRecepcionUsados) Then
|
ValidarRecepcionUsados = RecibidaCompleta
|
||||||
|
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=ValidarRecepcionUsados) Then 'ValidarRecepcionUsados
|
||||||
DtPSVirtual = ObjInventario.DtResultados
|
DtPSVirtual = ObjInventario.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3135,7 +3135,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'VERIFICA SI TIENE PENDIENTE POR SURTIR
|
'VERIFICA SI TIENE PENDIENTE POR SURTIR
|
||||||
If UsuarioActual.CveEmpresa = 140 AndAlso TipoMovimiento = 3 Then
|
If UsuarioActual.CveEmpresa = 140 AndAlso TipoMovimiento = 3 Then
|
||||||
If ObjInventario.RecepcionAlmacenGet(CveCompraSurtir, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.RecepcionAlmacenGet(CveCompraSurtir, -1, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
Dim DtFaltante As DataTable = ObjInventario.DtResultados.FiltraParametros("CantidadF > 0")
|
Dim DtFaltante As DataTable = ObjInventario.DtResultados.FiltraParametros("CantidadF > 0")
|
||||||
If DtFaltante.Rows.Count = 0 Then
|
If DtFaltante.Rows.Count = 0 Then
|
||||||
If Not ObjCompras.UpdateEstatusAlmacen(CveCompraSurtir, 2, UsuarioActual.CveUsuario) Then
|
If Not ObjCompras.UpdateEstatusAlmacen(CveCompraSurtir, 2, UsuarioActual.CveUsuario) Then
|
||||||
@@ -3652,7 +3652,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
Alert(Msg.ToString, TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
If ObjInventario.RecepcionAlmacenGet(CveCompraSurtir, -1, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.RecepcionAlmacenGet(CveCompraSurtir, -1, -1, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
CreaDTInv(ObjInventario.DtResultados)
|
CreaDTInv(ObjInventario.DtResultados)
|
||||||
CargaGVInv()
|
CargaGVInv()
|
||||||
BtnGuardar.Visible = True
|
BtnGuardar.Visible = True
|
||||||
@@ -4788,6 +4788,4 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
' Return Retorno
|
' Return Retorno
|
||||||
'End Function
|
'End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
164
Inventarios/RepExistenciaLote.aspx
Normal file
164
Inventarios/RepExistenciaLote.aspx
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepExistenciaLote.aspx.vb" Inherits="Inventarios_RepExistenciaLote" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkImprimir" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.dataTables_scrollHead{
|
||||||
|
background-color:#95A5A6;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
.table-scrollable{
|
||||||
|
margin-top:0px!important;
|
||||||
|
margin-bottom:0px!important;
|
||||||
|
}
|
||||||
|
.dataTables_scroll{
|
||||||
|
padding-top:0px;
|
||||||
|
}
|
||||||
|
.Totales a{
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Reporte de Existencia Lote
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
<%--Tabla con los campos para filtrar--%>
|
||||||
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
|
||||||
|
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||||
|
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption magindate">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1 truncate">Almacén</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:ListBox ID="DdlAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="Almacen" DataValueField="CveAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">Fecha Inicio</div>
|
||||||
|
<div class="col-md-2 col-sm-2">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVInicio" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="CVInicio" runat="server" ControlToValidate="TxtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicio''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsultar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="CVEIncio1" runat="server" HighlightCssClass="vco" TargetControlID="RFVInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="CVEIncio2" runat="server" HighlightCssClass="vco" TargetControlID="CVInicio" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">Fecha Fin</div>
|
||||||
|
<div class="col-md-2 col-sm-2">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFin" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpConsultar"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="CVFin" runat="server" ControlToValidate="TxtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Fin''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpConsultar"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="CVEFin1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="CVEFin2" runat="server" HighlightCssClass="vco" TargetControlID="CVFin" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1 truncate">Proveedor</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlProveedor" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveProveedor" DataTextField="RazonSocial"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">Clasificación</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate" style="width:50px !important" >PS</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||||
|
<%--<asp:DropDownList ID="DdlPS" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="PS" DataValueField="CvePS"></asp:DropDownList>--%>
|
||||||
|
</div>
|
||||||
|
<div runat="Server" id="DivMarca">
|
||||||
|
<div class="col-md-1 truncate" style="width:50px !important" >Marca</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlMarca" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveMarca" DataTextField="Marca"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">Personal</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlPersonal" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CvePersonal" DataTextField="CodigoNombreCompleto"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">Tipo Almacén:</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:ListBox ID="DdlTipoAlmacen" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" DataTextField="TipoAlmacen" DataValueField="CveTipoAlmacen" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<div class="row" >
|
||||||
|
<div class="row col-md-12" align="right">
|
||||||
|
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvM.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" >
|
||||||
|
<asp:UpdatePanel ID="UPPMov" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvM" Width="100%" runat="server" data-sort="false" GridLines="None" CssClass="table table-smallpadding table-striped table-hover Widthall ScrollAD" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField DataField="Codigo" HeaderText="Codigo" />
|
||||||
|
<asp:BoundField DataField="PS" HeaderText="PS" />
|
||||||
|
<asp:BoundField DataField="Cantidad" HeaderText="Existencia" />
|
||||||
|
<asp:BoundField DataField="Lote" HeaderText="Lote" />
|
||||||
|
<asp:BoundField DataField="FechaCaducidad" HeaderText="Fecha Caducidad" DataFormatString = "{0:dd/MM/yyyy}" ItemStyle-Width="100px" />
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
514
Inventarios/RepExistenciaLote.aspx.vb
Normal file
514
Inventarios/RepExistenciaLote.aspx.vb
Normal file
@@ -0,0 +1,514 @@
|
|||||||
|
Imports System.Data
|
||||||
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
|
Partial Class Inventarios_RepExistenciaLote
|
||||||
|
Inherits ClsPaginas
|
||||||
|
#Region "propiedades"
|
||||||
|
'Private ReadOnly Property reporteador As Microsoft.Reporting.WebForms.ReportViewer
|
||||||
|
' Get
|
||||||
|
' Return CType(Master.FindControl("ReportMaster"), Microsoft.Reporting.WebForms.ReportViewer)
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
Private Property dt As DataTable
|
||||||
|
Get
|
||||||
|
Try
|
||||||
|
dt = DirectCast(ViewState("dt"), DataTable)
|
||||||
|
Return DirectCast(ViewState("dt"), DataTable)
|
||||||
|
Catch ex As Exception
|
||||||
|
Return Nothing
|
||||||
|
End Try
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("dt") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Property DtEquivalencias() As DataTable
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("dtReporte"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("dtReporte") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Property FechaInicial As String
|
||||||
|
Get
|
||||||
|
Return ViewState("FechaInicial").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("FechaInicial") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Public Property FechaFinal As String
|
||||||
|
Get
|
||||||
|
Return ViewState("FechaFinal").ToString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("FechaFinal") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private ReadOnly Property PermiteClasificacion2 As Boolean
|
||||||
|
Get
|
||||||
|
Return (UsuarioActual.CveEmpresa.Contiene(72, 80))
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
|
||||||
|
TxtFechaI.Text = Now.AddMonths(-1).ToShortDateString
|
||||||
|
TxtFechaF.Text = Now
|
||||||
|
FechaInicial = "-1"
|
||||||
|
FechaFinal = "-1"
|
||||||
|
|
||||||
|
CargaCombos()
|
||||||
|
|
||||||
|
GvM.DataBind()
|
||||||
|
If Not IsNothing(Request("CveAlmacen")) Then
|
||||||
|
DdlAlmacen.SelectedValue = Request("CveAlmacen").ToString()
|
||||||
|
TxtFechaI.Text = "01/01/2000"
|
||||||
|
If Not IsNothing(Request("FechaCorte")) Then
|
||||||
|
TxtFechaF.Text = Request("FechaCorte")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not IsNothing(Request("FechaInicio")) And IsDate(Request("FechaInicio")) Then
|
||||||
|
TxtFechaI.Text = Request("FechaInicio")
|
||||||
|
End If
|
||||||
|
|
||||||
|
btConsultar_Click(Nothing, Nothing)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub CargaCombos()
|
||||||
|
|
||||||
|
|
||||||
|
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("") 'GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||||
|
DdlAlmacen.DataBind()
|
||||||
|
DdlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
If Not IsNothing(Request("CveAlmacen")) Then
|
||||||
|
If DdlAlmacen.Items.FindByValue(Request("CveAlmacen").ToString) Is Nothing Then
|
||||||
|
Dim CveAlmacen = Request("CveAlmacen").ToString
|
||||||
|
Dim Almacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {Request("CveAlmacen").ToString}")
|
||||||
|
DdlAlmacen.Items.Insert(0, New ListItem(Almacen, CveAlmacen))
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
DdlAlmacen.SelectedValuesIfExistM("-1")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Llenar dropdownlist de proveedores
|
||||||
|
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||||
|
DdlProveedor.DataBind()
|
||||||
|
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
'CARGA CLASIFICACIONES
|
||||||
|
Dim ObjClasificaciones As New ClsClasificaciones
|
||||||
|
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||||
|
End If
|
||||||
|
ObjClasificaciones.Dispose()
|
||||||
|
DdlClasificacion.DataBind()
|
||||||
|
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'Carga Productos
|
||||||
|
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||||
|
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||||
|
DdlPS.SelectedText = ""
|
||||||
|
DdlPS.SelectedValue = "-1"
|
||||||
|
Else
|
||||||
|
DdlPS.ddl.Items.Clear()
|
||||||
|
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||||
|
DdlPS.ddl.DataBind()
|
||||||
|
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'Llenar dropdownlist de personal
|
||||||
|
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||||
|
DdlPersonal.DataBind()
|
||||||
|
DdlPersonal.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
CargarMarcas()
|
||||||
|
|
||||||
|
DdlTipoAlmacen.DataSource = GlobalDTTipoAlmacen(1)
|
||||||
|
DdlTipoAlmacen.DataBind()
|
||||||
|
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
Dim Reporte As New ClsInventarios
|
||||||
|
Dim rpt As DataTable = Nothing
|
||||||
|
Dim CveMarca As Integer = -1
|
||||||
|
|
||||||
|
'Dim fechaI As String = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||||
|
'Dim fechaF As String = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||||
|
FechaInicial = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text, "-1")
|
||||||
|
FechaFinal = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text, "-1")
|
||||||
|
Dim TipoAlmacen As String = If(DdlTipoAlmacen.GetSelectedValuesM = "", "-1", DdlTipoAlmacen.GetSelectedValuesM)
|
||||||
|
Dim Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
|
||||||
|
CveMarca = DdlMarca.SelectedValue.ToEntero
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Reporte.RepExistenciasLote(UsuarioActual.CveEmpresa, FechaInicial.ToDate, FechaFinal.ToDate, DdlProveedor.SelectedValue.ToEntero, Almacenes, DdlPS.SelectedValue.ToEntero,
|
||||||
|
DdlClasificacion.SelectedValue.ToEntero, CveMarca, TipoAlmacen) Then
|
||||||
|
If Reporte.DtResultados.Rows.Count > 0 Then
|
||||||
|
GvM.DataSource = Reporte.DtResultados
|
||||||
|
GvM.DataBind()
|
||||||
|
ViewState("dtReporte") = Reporte.DtResultados
|
||||||
|
dt = Reporte.DtResultados
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
Reporte.Dispose()
|
||||||
|
UPPMov.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||||
|
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||||
|
DdlPS.SelectedText = ""
|
||||||
|
DdlPS.SelectedValue = "-1"
|
||||||
|
Else
|
||||||
|
DdlPS.ddl.Items.Clear()
|
||||||
|
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||||
|
DdlPS.ddl.DataBind()
|
||||||
|
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub GvM_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowCreated
|
||||||
|
|
||||||
|
'If e.Row.RowType = DataControlRowType.Header Then
|
||||||
|
' 'GENERO ENCABEZADO
|
||||||
|
' Dim FC As New SortedList
|
||||||
|
' FC.Add(0, "Código,1,2,Titulos")
|
||||||
|
|
||||||
|
' If ChkCodigoAlterno.Checked Then
|
||||||
|
' FC.Add(1, "Código Alterno,1,2,Titulos")
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' FC.Add(10, "Descripción,1,2,Titulos")
|
||||||
|
' FC.Add(20, "CANTIDAD,4,1,Titulos")
|
||||||
|
' FC.Add(30, "IMPORTE,4,1,Titulos")
|
||||||
|
|
||||||
|
' Dim FC2 As New SortedList
|
||||||
|
' FC2.Add(0, "Exist. inicial,1,1,Titulos")
|
||||||
|
' FC2.Add(1, "Entradas,1,1S,Titulos")
|
||||||
|
' FC2.Add(2, "Salidas,1,1,Titulos")
|
||||||
|
' FC2.Add(3, "Exist. final,1,1,Titulos")
|
||||||
|
' FC2.Add(4, "Saldo inicial,1,1,Titulos")
|
||||||
|
' FC2.Add(5, "Entradas,1,1,Titulos")
|
||||||
|
' FC2.Add(6, "Salidas,1,1,Titulos")
|
||||||
|
' FC2.Add(7, "Saldo final,1,1,Titulos")
|
||||||
|
|
||||||
|
' GetMultiRowHeader(DirectCast(sender, GridView), e, FC2, "Titulosfijos")
|
||||||
|
' GetMultiRowHeader(DirectCast(sender, GridView), e, FC, "Titulosfijos")
|
||||||
|
|
||||||
|
''End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub gvMovimientos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvM.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#Region "MARCA"
|
||||||
|
Protected Sub CargarMarcas()
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
|
||||||
|
DivMarca.Visible = True
|
||||||
|
|
||||||
|
Dim ObjMarcas As New ClsProductosServicios
|
||||||
|
ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa)
|
||||||
|
DdlMarca.DataSource = ObjMarcas.DtResultados
|
||||||
|
ObjMarcas.Dispose()
|
||||||
|
DdlMarca.DataBind()
|
||||||
|
End If
|
||||||
|
|
||||||
|
DdlMarca.Items.Insert(0, New ListItem(" Todas ", "-1"))
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region " EXPORTAR - PDF - EXCEL "
|
||||||
|
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||||
|
' GvM.ExportToExcel("Reporte de Entradas y Salidas")
|
||||||
|
ImprimiReporte("EXCEL")
|
||||||
|
End Sub
|
||||||
|
Private Sub LnkImprimir_Click(sender As Object, e As EventArgs) Handles LnkImprimir.Click
|
||||||
|
ImprimiReporte()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub ImprimiReporte(Optional Formato As String = "PDF", Optional FormatoInventario As Boolean = False)
|
||||||
|
|
||||||
|
Dim RutaPDF As String
|
||||||
|
Dim NombreArchivoDescarga = "ReporteExistenciaLotes"
|
||||||
|
|
||||||
|
RutaPDF = "Empresas/Grales/Formatos/RepExistenciaLotes.rdlc"
|
||||||
|
|
||||||
|
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
|
params.Add(New ReportParameter("LogoPath", New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Logo.png", UsuarioActual.CveEmpresa))).AbsoluteUri))
|
||||||
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
|
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||||
|
|
||||||
|
ImprimirPDF(RutaPDF, dt, params, NombreArchivoDescarga, Formato)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub Lnkcompuxlsinventarios_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim continuar = True
|
||||||
|
Try
|
||||||
|
|
||||||
|
Dim wb As New ClosedXML.Excel.XLWorkbook()
|
||||||
|
Dim libro As ClosedXML.Excel.IXLWorksheet = wb.AddWorksheet("Reporte de inventarios")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim Fila As Integer = 0
|
||||||
|
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||||
|
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 7)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||||
|
libro.Cell(Fila + 3, 5).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
||||||
|
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||||
|
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 7)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||||
|
libro.Column(1).Width = 34.43
|
||||||
|
libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
||||||
|
libro.Cell(Fila + 2, 1).Value = "RECORD Type"
|
||||||
|
libro.Cell(Fila + 3, 1).Value = "OBLIGATORIO"
|
||||||
|
|
||||||
|
libro.Column(2).Width = 24
|
||||||
|
libro.Cell(Fila + 1, 2).Value = "Codigo del Partner"
|
||||||
|
libro.Cell(Fila + 2, 2).Value = "Reporter_id "
|
||||||
|
libro.Cell(Fila + 3, 2).Value = "OBLIGATORIO"
|
||||||
|
|
||||||
|
libro.Column(3).Width = 28.71
|
||||||
|
libro.Cell(Fila + 1, 3).Value = "Nombre de la Empresa"
|
||||||
|
libro.Cell(Fila + 2, 3).Value = "Reporter Company Name"
|
||||||
|
libro.Cell(Fila + 3, 3).Value = "OBLIGATORIO"
|
||||||
|
|
||||||
|
libro.Column(4).Width = 23.57
|
||||||
|
libro.Cell(Fila + 1, 4).Value = "CÓDIGO DEL PAÍS"
|
||||||
|
libro.Cell(Fila + 2, 4).Value = "COUNTRY CD"
|
||||||
|
libro.Cell(Fila + 3, 4).Value = "OBLIGATORIO"
|
||||||
|
|
||||||
|
libro.Column(5).Width = 17.57
|
||||||
|
libro.Cell(Fila + 1, 5).Value = "Ubicación"
|
||||||
|
libro.Cell(Fila + 2, 5).Value = "LOCATION"
|
||||||
|
libro.Cell(Fila + 3, 5).Value = "OPCIONAL"
|
||||||
|
|
||||||
|
libro.Column(6).Width = 35.29
|
||||||
|
libro.Cell(Fila + 1, 6).Value = "FECHA DEL INVENTARIO"
|
||||||
|
libro.Cell(Fila + 2, 6).Value = "Period End Date"
|
||||||
|
libro.Cell(Fila + 3, 6).Value = "OBLIGATORIO"
|
||||||
|
|
||||||
|
libro.Column(7).Width = 23.43
|
||||||
|
libro.Cell(Fila + 1, 7).Value = "REENVIO"
|
||||||
|
libro.Cell(Fila + 2, 7).Value = "RESUBMIT"
|
||||||
|
libro.Cell(Fila + 3, 7).Value = "OBLIGATORIO"
|
||||||
|
|
||||||
|
libro.Column(8).Width = 29.29
|
||||||
|
libro.Column(9).Width = 25
|
||||||
|
libro.Column(10).Width = 18.14
|
||||||
|
libro.Column(11).Width = 32.71
|
||||||
|
libro.Column(12).Width = 13.57
|
||||||
|
libro.Column(13).Width = 13
|
||||||
|
libro.Column(14).Width = 32
|
||||||
|
libro.Column(15).Width = 12.71
|
||||||
|
libro.Column(16).Width = 13
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Fila = Fila + 3
|
||||||
|
|
||||||
|
libro.Cell(Fila + 1, 1).Value = "IH"
|
||||||
|
libro.Cell(Fila + 1, 2).Value = "10245068"
|
||||||
|
libro.Cell(Fila + 1, 3).Value = "COMPUPROVEEDORES SA DE CV"
|
||||||
|
libro.Cell(Fila + 1, 4).Value = "MX"
|
||||||
|
libro.Cell(Fila + 1, 5).Value = ""
|
||||||
|
libro.Cell(Fila + 1, 6).Value = String.Format("{0:yyyyMMdd}", TxtFechaF.Text.ToDate())
|
||||||
|
libro.Cell(Fila + 1, 7).Value = "N"
|
||||||
|
|
||||||
|
|
||||||
|
Fila = Fila + 1
|
||||||
|
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||||
|
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 16)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||||
|
libro.Range(libro.Cell(Fila + 3, 3), libro.Cell(Fila + 3, 15)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166))
|
||||||
|
libro.Cell(Fila + 3, 7).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||||
|
libro.Cell(Fila + 3, 10).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||||
|
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||||
|
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 16)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||||
|
libro.Cell(Fila + 1, 1).Value = "TIPO DO REGISTRO"
|
||||||
|
libro.Cell(Fila + 1, 2).Value = "NÚMERO DEL PRODUCTO"
|
||||||
|
libro.Cell(Fila + 1, 3).Value = "OPCION DEL PRODUCTO"
|
||||||
|
libro.Cell(Fila + 1, 4).Value = "UPC"
|
||||||
|
libro.Cell(Fila + 1, 5).Value = "CODIGO SKU"
|
||||||
|
libro.Cell(Fila + 1, 6).Value = "ORDENES DE COMPRAS EN ABIERTO "
|
||||||
|
libro.Cell(Fila + 1, 7).Value = "INVENTARIO DISPONIBLE"
|
||||||
|
libro.Cell(Fila + 1, 8).Value = "DEVOLUCIONES"
|
||||||
|
libro.Cell(Fila + 1, 9).Value = "INVENTARIO RESERVADO"
|
||||||
|
libro.Cell(Fila + 1, 10).Value = "INVENTARIO TOTAL"
|
||||||
|
libro.Cell(Fila + 1, 11).Value = "EN TRANSITO"
|
||||||
|
libro.Cell(Fila + 1, 12).Value = "VALOR UNITARIO DEL PRODUCTO HP"
|
||||||
|
libro.Cell(Fila + 1, 13).Value = "VALOR TOTAL DEL INVENTARIO"
|
||||||
|
libro.Cell(Fila + 1, 14).Value = "NOMBRE DE LA TIENDA"
|
||||||
|
libro.Cell(Fila + 1, 15).Value = "Codigo de la tienda"
|
||||||
|
libro.Cell(Fila + 1, 16).Value = "MONEDA"
|
||||||
|
|
||||||
|
Fila = Fila + 1
|
||||||
|
libro.Cell(Fila + 1, 1).Value = "RECORD TYPE "
|
||||||
|
libro.Cell(Fila + 1, 2).Value = "Partner Reported Product ID"
|
||||||
|
libro.Cell(Fila + 1, 3).Value = "PROD_OPTION"
|
||||||
|
libro.Cell(Fila + 1, 4).Value = "UPC"
|
||||||
|
libro.Cell(Fila + 1, 5).Value = "Reseller product number "
|
||||||
|
libro.Cell(Fila + 1, 6).Value = "Quantity on Order"
|
||||||
|
libro.Cell(Fila + 1, 7).Value = "Quantity on Hand"
|
||||||
|
libro.Cell(Fila + 1, 8).Value = "Quantity in stock allocated to be returned to supplier"
|
||||||
|
libro.Cell(Fila + 1, 9).Value = "Reserved Inventory"
|
||||||
|
libro.Cell(Fila + 1, 10).Value = "Quantity avail. for sale"
|
||||||
|
libro.Cell(Fila + 1, 11).Value = "Quantity in float (In transit between partner warehouses)"
|
||||||
|
libro.Cell(Fila + 1, 12).Value = "INVENTORY UNIT VALUE"
|
||||||
|
libro.Cell(Fila + 1, 13).Value = "INVENTORY VALUATION"
|
||||||
|
libro.Cell(Fila + 1, 14).Value = "Sell from name (For retailers, ""Store Name / Site Name"")"
|
||||||
|
libro.Cell(Fila + 1, 15).Value = "Sell From Location ID"
|
||||||
|
libro.Cell(Fila + 1, 16).Value = "CURRENCY"
|
||||||
|
|
||||||
|
Fila = Fila + 1
|
||||||
|
libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
||||||
|
libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
||||||
|
libro.Cell(Fila + 1, 3).Value = "OPCIONAL"
|
||||||
|
libro.Cell(Fila + 1, 4).Value = "OPCIONAL"
|
||||||
|
libro.Cell(Fila + 1, 5).Value = "OPCIONAL"
|
||||||
|
libro.Cell(Fila + 1, 6).Value = "OPCIONAL"
|
||||||
|
libro.Cell(Fila + 1, 7).Value = "OBLIGATORIO"
|
||||||
|
libro.Cell(Fila + 1, 8).Value = "OPCIONAL"
|
||||||
|
libro.Cell(Fila + 1, 9).Value = "OPCIONAL"
|
||||||
|
libro.Cell(Fila + 1, 10).Value = "OBLIGATORIO"
|
||||||
|
libro.Cell(Fila + 1, 11).Value = "OPCIONAL"
|
||||||
|
libro.Cell(Fila + 1, 12).Value = "OPCIONAL"
|
||||||
|
libro.Cell(Fila + 1, 13).Value = "OPCIONAL"
|
||||||
|
libro.Cell(Fila + 1, 14).Value = "OPCIONAL"
|
||||||
|
libro.Cell(Fila + 1, 15).Value = "OPCIONAL"
|
||||||
|
libro.Cell(Fila + 1, 16).Value = "OBLIGATORIO"
|
||||||
|
|
||||||
|
|
||||||
|
If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
For Each row As DataRow In dt.Select("CvePS>0 AND SaldoFCant >0")
|
||||||
|
|
||||||
|
Fila = Fila + 1
|
||||||
|
libro.Cell(Fila + 1, 1).Value = "ID" ' "TIPO DO REGISTRO"
|
||||||
|
libro.Cell(Fila + 1, 2).Value = String.Format("'{0}", row("Codigo")) ' "NÚMERO DEL PRODUCTO"
|
||||||
|
libro.Cell(Fila + 1, 3).Value = "" ' "OPCION DEL PRODUCTO"
|
||||||
|
libro.Cell(Fila + 1, 4).Value = "" ' "UPC"
|
||||||
|
libro.Cell(Fila + 1, 5).Value = "" ' "CODIGO SKU"
|
||||||
|
libro.Cell(Fila + 1, 6).Value = "" ' "ORDENES DE COMPRAS EN ABIERTO "
|
||||||
|
libro.Cell(Fila + 1, 7).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO DISPONIBLE"
|
||||||
|
'libro.Cell(Fila + 1, 7).Style.NumberFormat.Format = "N2"
|
||||||
|
libro.Cell(Fila + 1, 8).Value = "" ' "DEVOLUCIONES"
|
||||||
|
libro.Cell(Fila + 1, 9).Value = "" ' "INVENTARIO RESERVADO"
|
||||||
|
libro.Cell(Fila + 1, 10).Value = String.Format("{0}", row("SaldoFCant")) ' "INVENTARIO TOTAL"
|
||||||
|
'libro.Cell(Fila + 1, 10).Style.NumberFormat.Format = "$ #,##0.00"
|
||||||
|
libro.Cell(Fila + 1, 11).Value = "" ' "EN TRANSITO"
|
||||||
|
libro.Cell(Fila + 1, 12).Value = "" ' "VALOR UNITARIO DEL PRODUCTO HP"
|
||||||
|
libro.Cell(Fila + 1, 13).Value = "" ' "VALOR TOTAL DEL INVENTARIO"
|
||||||
|
libro.Cell(Fila + 1, 14).Value = "" ' "NOMBRE DE LA TIENDA"
|
||||||
|
libro.Cell(Fila + 1, 15).Value = "" ' "Codigo de la tienda"
|
||||||
|
libro.Cell(Fila + 1, 16).Value = "MXN" ' "MONEDA"
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
Fila = Fila + 1
|
||||||
|
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 2, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(217, 225, 242))
|
||||||
|
libro.Range(libro.Cell(Fila + 3, 1), libro.Cell(Fila + 3, 4)).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 80))
|
||||||
|
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.InsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||||
|
libro.Range(libro.Cell(Fila + 1, 1), libro.Cell(Fila + 3, 4)).Style.Border.OutsideBorder = ClosedXML.Excel.XLBorderStyleValues.Thin
|
||||||
|
libro.Cell(Fila + 1, 1).Value = "TIPO DEL REGISTRO"
|
||||||
|
libro.Cell(Fila + 1, 2).Value = "TOTAL DE REGISTROS"
|
||||||
|
libro.Cell(Fila + 1, 3).Value = "Suma del Inventario Disponible"
|
||||||
|
libro.Cell(Fila + 1, 4).Value = "Suma del Inventario Total"
|
||||||
|
|
||||||
|
Fila = Fila + 1
|
||||||
|
libro.Cell(Fila + 1, 1).Value = "RECORD TYPE"
|
||||||
|
libro.Cell(Fila + 1, 2).Value = "COUNT OF RECORDS"
|
||||||
|
libro.Cell(Fila + 1, 3).Value = "SUM OF “"On Hand”""
|
||||||
|
libro.Cell(Fila + 1, 4).Value = "SUM OF “"Total Inventory"”"
|
||||||
|
|
||||||
|
|
||||||
|
Fila = Fila + 1
|
||||||
|
libro.Cell(Fila + 1, 1).Value = "OBLIGATORIO"
|
||||||
|
libro.Cell(Fila + 1, 2).Value = "OBLIGATORIO"
|
||||||
|
libro.Cell(Fila + 1, 3).Value = "OBLIGATORIO"
|
||||||
|
libro.Cell(Fila + 1, 4).Value = "OBLIGATORIO"
|
||||||
|
|
||||||
|
Dim Codigo As Double = 0
|
||||||
|
Dim SaldoFCant As Double = 0
|
||||||
|
Dim SaldoFImp As Double = 0
|
||||||
|
If Not IsNothing(dt) AndAlso dt.Rows.Count > 0 Then
|
||||||
|
Codigo = dt.COUNT("Codigo", "CvePS>0")
|
||||||
|
SaldoFCant = dt.SUM("SaldoFCant", "CvePS>0")
|
||||||
|
SaldoFImp = dt.SUM("SaldoFImp", "CvePS>0")
|
||||||
|
End If
|
||||||
|
Fila = Fila + 1
|
||||||
|
libro.Cell(Fila + 1, 1).Value = "IT"
|
||||||
|
libro.Cell(Fila + 1, 2).Value = String.Format("{0}", Codigo)
|
||||||
|
'libro.Cell(Fila + 1, 2).Style.NumberFormat.Format = "N2"
|
||||||
|
libro.Cell(Fila + 1, 3).Value = String.Format("{0}", SaldoFCant)
|
||||||
|
'libro.Cell(Fila + 1, 3).Style.NumberFormat.Format = "N2"
|
||||||
|
libro.Cell(Fila + 1, 4).Value = String.Format("{0}", SaldoFCant)
|
||||||
|
'libro.Cell(Fila + 1, 4).Style.NumberFormat.Format = "$ #,##0.00"
|
||||||
|
|
||||||
|
|
||||||
|
''Guarda streem y descarga
|
||||||
|
Dim fs As Stream = New MemoryStream()
|
||||||
|
wb.SaveAs(fs)
|
||||||
|
fs.Position = 0
|
||||||
|
Dim memoryStream As New MemoryStream()
|
||||||
|
Using input As Stream = fs
|
||||||
|
input.CopyTo(memoryStream)
|
||||||
|
End Using
|
||||||
|
memoryStream.Position = 0
|
||||||
|
|
||||||
|
Response.Clear()
|
||||||
|
Response.Buffer = True
|
||||||
|
|
||||||
|
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||||
|
Response.AddHeader("content-disposition", String.Format("attachment;filename={0}.xlsx", "Reporte de Inventarios HP"))
|
||||||
|
Response.BinaryWrite(memoryStream.ToArray())
|
||||||
|
Response.End()
|
||||||
|
|
||||||
|
''endGuarda streem y descarga
|
||||||
|
Catch
|
||||||
|
|
||||||
|
continuar = False
|
||||||
|
End Try
|
||||||
|
If Not continuar Then
|
||||||
|
Alert("Ocurrió un error al gener el excel", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -615,7 +615,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
End If
|
End If
|
||||||
'Existencia= Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), PendientePorSurtir:=1)
|
'Existencia= Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), PendientePorSurtir:=1)
|
||||||
|
|
||||||
If Existencia > Cantidad Then
|
If Existencia >= Cantidad Then
|
||||||
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
|
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
|
||||||
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
||||||
If (FechaCaducidad > MinFecha OrElse Not Serie.Contiene("", "-1") OrElse Not Lote.Contiene("", "-1")) Then
|
If (FechaCaducidad > MinFecha OrElse Not Serie.Contiene("", "-1") OrElse Not Lote.Contiene("", "-1")) Then
|
||||||
@@ -647,6 +647,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Else
|
Else
|
||||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||||
|
Retorno = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Inv.Dispose()
|
Inv.Dispose()
|
||||||
@@ -863,7 +864,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
||||||
If FechaCaducidad > MinFecha OrElse (Lote <> "-1" AndAlso Lote <> "") Then
|
If FechaCaducidad > MinFecha OrElse (Lote <> "-1" AndAlso Lote <> "") Then
|
||||||
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||||
ExistenciaEspecificada = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
ExistenciaEspecificada = ObjInventario.DtResultados.FiltroPrimeroValor("Existencia", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'ExistenciaEspecificada = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
'ExistenciaEspecificada = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ Partial Class OC_CatEstatus
|
|||||||
Dim ObjEstatus As New ClsOC
|
Dim ObjEstatus As New ClsOC
|
||||||
If ObjEstatus.GetEstatus() Then
|
If ObjEstatus.GetEstatus() Then
|
||||||
ViewState("DTOCEstatus") = ObjEstatus.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
ViewState("DTOCEstatus") = ObjEstatus.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||||
GlobalDTOCEstatus(-1) = ObjEstatus.DtResultados
|
GlobalDTOCEstatus(UsuarioActual.CveEmpresa) = ObjEstatus.DtResultados
|
||||||
Else
|
Else
|
||||||
GvDatos.DataSource = Nothing
|
GvDatos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1102,7 +1102,7 @@
|
|||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<%--<i class="fa fa-users font-green"></i>--%>
|
<%--<i class="fa fa-users font-green"></i>--%>
|
||||||
<span class="caption-subject bold uppercase">Cotizaciones Rapidas</span>
|
<span class="caption-subject bold uppercase">Cotizaciones Rápidas</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
|
|||||||
@@ -954,7 +954,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpUniformesResguardo" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpUniformesResguardo" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvUniformesResguardo" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" DataKeyNames="CveAlmacen,CodigoPS,PU,CveUM,CveMovimiento,CveMovimientoDetalle,CvePS,AplicaSeccion,AplicaSerie,CveSeccionAlmacen,Cantidad,Serie" ToolTip=""
|
<asp:GridView ID="GvUniformesResguardo" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" DataKeyNames="CveAlmacen,CodigoPS,PU,CveUM,CveMovimiento,CveMovimientoDetalle,CvePS,AplicaSeccion,AplicaSerie,CveSeccionAlmacen,Cantidad,Serie,Saldo" ToolTip=""
|
||||||
CssClass="table table-hover table-advance Widthall" GridLines="None">
|
CssClass="table table-hover table-advance Widthall" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField DataNavigateUrlFields="CveMovimiento" Target="_blank" HeaderText="Folio" DataNavigateUrlFormatString="../Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" DataTextField="Folio" />
|
<asp:HyperLinkField DataNavigateUrlFields="CveMovimiento" Target="_blank" HeaderText="Folio" DataNavigateUrlFormatString="../Inventarios/EntradasSalidas.aspx?CveMovimiento={0}" DataTextField="Folio" />
|
||||||
@@ -979,7 +979,7 @@
|
|||||||
<asp:Literal ID="LtlObserbacion" runat="server" Text='<%# If(Eval("Observaciones").ToString = "", "ND", Eval("Observaciones")) %>'>></asp:Literal>
|
<asp:Literal ID="LtlObserbacion" runat="server" Text='<%# If(Eval("Observaciones").ToString = "", "ND", Eval("Observaciones")) %>'>></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>--%>
|
</asp:TemplateField>--%>
|
||||||
<asp:BoundField runat="server" DataField="Cantidad" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###}" />
|
<asp:BoundField runat="server" DataField="Saldo" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###}" />
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Opciones">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Opciones">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="LnkLiberar" runat="server" Enabled='<%# If(CInt(Eval("LiberadoConfirm")) > 0, False, True)%>' OnClick="LbLiberarUniforme" Style=' <%# If(CInt(Eval("LiberadoConfirm")) > 0, "color:red", "color:#337ab7")%>' Text='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "Devuelto", "Liberar")%>' data-toggle='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "collapse", "confirmation")%>' data-popout="true" data-original-title="¿Esta seguro que desea liberar el Resguardo?" data-btn-ok-label="si"></asp:LinkButton>
|
<asp:LinkButton ID="LnkLiberar" runat="server" Enabled='<%# If(CInt(Eval("LiberadoConfirm")) > 0, False, True)%>' OnClick="LbLiberarUniforme" Style=' <%# If(CInt(Eval("LiberadoConfirm")) > 0, "color:red", "color:#337ab7")%>' Text='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "Devuelto", "Liberar")%>' data-toggle='<%# If(CInt(Eval("LiberadoConfirm")) > 0, "collapse", "confirmation")%>' data-popout="true" data-original-title="¿Esta seguro que desea liberar el Resguardo?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
|
|||||||
@@ -5285,7 +5285,7 @@ Partial Class RH_Personal
|
|||||||
CvePS = row.DataKey("CvePS").ToString().ToEntero
|
CvePS = row.DataKey("CvePS").ToString().ToEntero
|
||||||
CveMovimientoUniforme = row.DataKey("CveMovimiento").ToString().ToEntero
|
CveMovimientoUniforme = row.DataKey("CveMovimiento").ToString().ToEntero
|
||||||
CveMovimientoDetalleUniforme = row.DataKey("CveMovimientoDetalle").ToString().ToEntero
|
CveMovimientoDetalleUniforme = row.DataKey("CveMovimientoDetalle").ToString().ToEntero
|
||||||
Dim Cantidad As Integer = row.DataKey("Cantidad").ToString().ToEntero
|
Dim Cantidad As Integer = row.DataKey("Saldo").ToString().ToEntero
|
||||||
TxtCantidadResguardo.Text = Cantidad.ToString
|
TxtCantidadResguardo.Text = Cantidad.ToString
|
||||||
RvTxtCantidadResguardo.MaximumValue = Cantidad.ToString
|
RvTxtCantidadResguardo.MaximumValue = Cantidad.ToString
|
||||||
If row.DataKey("AplicaSeccion").ToString = "True" Then
|
If row.DataKey("AplicaSeccion").ToString = "True" Then
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
<td class="text-right"><b>Sucursal:</b></td>
|
<td class="text-right"><b>Sucursal:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-sm" Width="200px">
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-sm" Width="200px">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right"><b>Estatus:</b></td>
|
<td class="text-right"><b>Estatus:</b></td>
|
||||||
|
|||||||
@@ -18797,7 +18797,8 @@ Partial Class Ventas
|
|||||||
If ConSalida AndAlso Not OcurrioError Then
|
If ConSalida AndAlso Not OcurrioError Then
|
||||||
|
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
GeneroMovimientoAlmacen = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenParaSalida, CveConceptoSalidaAlmacen, CveMoneda, ObjFactura.CveVenta, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta) > 0
|
Dim CveMovimientoSalidaAlmacen As Integer = GenerarMovimientoAlmacen(ObjInventario, MovDetalle, CveAlmacenParaSalida, CveConceptoSalidaAlmacen, CveMoneda, ObjFactura.CveVenta, AplicaMovimientoDetalleEntrada:=AplicaMovimientoDetalleEntrada, MovimientoPrePoliza:=True, ObjConta:=ObjConta)
|
||||||
|
GeneroMovimientoAlmacen = CveMovimientoSalidaAlmacen > 0
|
||||||
|
|
||||||
If Not GeneroMovimientoAlmacen Then
|
If Not GeneroMovimientoAlmacen Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
@@ -18805,7 +18806,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Not OcurrioError AndAlso UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
If Not OcurrioError AndAlso UsuarioActual.Empresa.Funcionalidad(573) = "1" Then
|
||||||
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveRemision, ObjInventario, ObjFactura, ObjConta:=ObjConta)
|
OcurrioError = Not GenerarMovimientoAlmacenVirtual(CveMovimientoSalidaAlmacen, CveAlmacenParaSalida, ObjInventario, ObjConta:=ObjConta)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -19171,7 +19172,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Return Not OcurrioError
|
Return Not OcurrioError
|
||||||
End Function
|
End Function
|
||||||
Private Function GenerarMovimientoAlmacenVirtual(CveRemision As Integer, ByRef ObjInventario As ClsInventarios, ObjFactura As Modelos.Factura, Optional ByRef ObjConta As ClsContabilidad = Nothing) As Boolean
|
Private Function GenerarMovimientoAlmacenVirtual(CveMovimientoSalidaAlmacen As Integer, CveAlmacen As Integer, ByRef ObjInventario As ClsInventarios, Optional ByRef ObjConta As ClsContabilidad = Nothing) As Boolean
|
||||||
Dim OcurrioError As Boolean = False
|
Dim OcurrioError As Boolean = False
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -19179,46 +19180,47 @@ Partial Class Ventas
|
|||||||
Dim CveAlmacenVirtual As Integer = -1
|
Dim CveAlmacenVirtual As Integer = -1
|
||||||
Dim CveConceptoMovimientoVirtual As Integer = 37
|
Dim CveConceptoMovimientoVirtual As Integer = 37
|
||||||
Dim DtPSVirtual As DataTable = Nothing
|
Dim DtPSVirtual As DataTable = Nothing
|
||||||
Dim DtTamanios As DataTable = Nothing
|
'Dim DtTamanios As DataTable = Nothing
|
||||||
Dim CveMovimientoReferencia As Integer = -1
|
' Dim CveMovimientoReferencia As Integer = -1
|
||||||
|
|
||||||
'SI LA REMISION SE SURTIO CON USADOS UTILIZAR ESTE MOVIMIENTO
|
''SI LA REMISION SE SURTIO CON USADOS UTILIZAR ESTE MOVIMIENTO
|
||||||
If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
'If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then
|
||||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND (CveTipoAlmacen = 1 AND CveConcepto IN (3,8)) AND CveVenta > 0")
|
' Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND (CveTipoAlmacen = 1 AND CveConcepto IN (3,8)) AND CveVenta > 0")
|
||||||
|
|
||||||
If RowMovimiento IsNot Nothing Then
|
' If RowMovimiento IsNot Nothing Then
|
||||||
CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
' CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||||
Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
' Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
||||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
' CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Else
|
'Else
|
||||||
OcurrioError = True
|
' OcurrioError = True
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
'SI NO SE SURTIO LA REMSION CON USADOS, UTILIZAR EL MOVIMIENTO DE SALIDA DEL INGRESO
|
''SI NO SE SURTIO LA REMSION CON USADOS, UTILIZAR EL MOVIMIENTO DE SALIDA DEL INGRESO
|
||||||
If CveMovimientoReferencia <= 0 Then
|
'If CveMovimientoReferencia <= 0 Then
|
||||||
If ObjInventario.GetInv_Mov(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
|
' If ObjInventario.GetInv_Mov(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ( (CveTipoAlmacen = 1 AND CveConcepto IN (3,8)) OR (CveTipoAlmacen = 10 AND CveConcepto = 40) ) AND CveVenta > 0")
|
' Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ( (CveTipoAlmacen = 1 AND CveConcepto IN (3,8)) OR (CveTipoAlmacen = 10 AND CveConcepto = 40) ) AND CveVenta > 0")
|
||||||
|
|
||||||
If RowMovimiento IsNot Nothing Then
|
' If RowMovimiento IsNot Nothing Then
|
||||||
CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
' CveMovimientoReferencia = RowMovimiento("CveMovimiento").ToString().ToEntero()
|
||||||
Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
' Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero()
|
||||||
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
' CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||||
|
|
||||||
Else
|
' Else
|
||||||
OcurrioError = True
|
' OcurrioError = True
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Else
|
' Else
|
||||||
OcurrioError = True
|
' OcurrioError = True
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||||
|
|
||||||
'SI TIENE ALMACEN VIRTUAL ASIGNADO GENERA EL MOVIMIENTO VIRTUAL
|
'SI TIENE ALMACEN VIRTUAL ASIGNADO GENERA EL MOVIMIENTO VIRTUAL
|
||||||
If CveAlmacenVirtual > 0 Then
|
If CveAlmacenVirtual > 0 Then
|
||||||
|
|
||||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoReferencia, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoSalidaAlmacen, UsuarioActual.CveEmpresa) Then
|
||||||
DtPSVirtual = ObjInventario.DtResultados.Copy()
|
DtPSVirtual = ObjInventario.DtResultados.Copy()
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
@@ -19226,7 +19228,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
|
If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||||
|
|
||||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoReferencia)
|
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoSalidaAlmacen)
|
||||||
|
|
||||||
If CveMovimientoVirtual > 0 Then
|
If CveMovimientoVirtual > 0 Then
|
||||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||||
|
|||||||
Reference in New Issue
Block a user