diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index f705a3c26..f53722f3c 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -2407,7 +2407,7 @@ Partial Class AF_AF Dim filemove As String = "" For Each fileItem As Archivo In filesgral - FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "") + FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") filemove = fileItem.filename Next diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index aace420e7..d3694abd4 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -1133,7 +1133,7 @@ Public Class ClsInventarios Return Retorno End Function - Public Function GetMovimientosDetalle(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1) As Boolean + Public Function GetMovimientosDetalle(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoDetalle As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_MovimientosDetalleGet") @@ -1141,6 +1141,7 @@ Public Class ClsInventarios .Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveCompra", SqlDbType.Int).Value = CveCompra + .Add("@CveMovimientoDetalle", SqlDbType.Int).Value = CveMovimientoDetalle End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 0aec0a4c6..79134e341 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1181,11 +1181,11 @@ Public Class ClsPaginas ' Application("GlobalDTProductosServicios") = value ' End Set 'End Property - ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1) As DataTable + ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1, Optional Codigo As String = "-1") As DataTable Get Dim ObjPS As New ClsProductosServicios - If ObjPS.GetPS(CvePS, -1, CveEmpresa, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta, pEstado:=Estatus) Then + If ObjPS.GetPS(CvePS, -1, CveEmpresa, Codigo:=Codigo, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta, pEstado:=Estatus) Then GlobalDTPS = ObjPS.DtResultados Else GlobalDTPS = Nothing diff --git a/App_Code/ClsProductosServicios.vb b/App_Code/ClsProductosServicios.vb index 786b97c24..6b4c01406 100644 --- a/App_Code/ClsProductosServicios.vb +++ b/App_Code/ClsProductosServicios.vb @@ -389,7 +389,8 @@ Public Class ClsProductosServicios Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1, Optional CveFraccionArancelaria As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "", - Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False) As Integer + Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, + Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_ProductosServiciosAdd") @@ -463,6 +464,11 @@ Public Class ClsProductosServicios .Add("@ClaveCategoriaToxicidad", SqlDbType.VarChar).Value = ClaveCategoriaToxicidad .Add("@Litraje", SqlDbType.Float).Value = Litraje .Add("@EsOutSourcing", SqlDbType.Bit).Value = EsOutSourcing + + .Add("@AplicaSerie", SqlDbType.Bit).Value = AplicaSerie + .Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote + .Add("@AplicaCaducidad", SqlDbType.Bit).Value = AplicaCaducidad + .Add("@AplicaSeccion", SqlDbType.Bit).Value = AplicaSeccion End With Try @@ -608,7 +614,8 @@ Public Class ClsProductosServicios Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1, Optional CveFraccionArancelaria As Integer = -1, Optional CveUsuarioModifico As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "", - Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False) As Boolean + Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, + Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ProductosServiciosUpdate") @@ -683,6 +690,11 @@ Public Class ClsProductosServicios .Add("@ClaveCategoriaToxicidad", SqlDbType.VarChar).Value = ClaveCategoriaToxicidad .Add("@Litraje", SqlDbType.Float).Value = Litraje .Add("@EsOutSourcing", SqlDbType.Bit).Value = EsOutSourcing + + .Add("@AplicaSerie", SqlDbType.Bit).Value = AplicaSerie + .Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote + .Add("@AplicaCaducidad", SqlDbType.Bit).Value = AplicaCaducidad + .Add("@AplicaSeccion", SqlDbType.Bit).Value = AplicaSeccion End With Try diff --git a/Bancos/CreditosPagoMultiple.aspx.vb b/Bancos/CreditosPagoMultiple.aspx.vb index 615b0c0b8..70a1873b4 100644 --- a/Bancos/CreditosPagoMultiple.aspx.vb +++ b/Bancos/CreditosPagoMultiple.aspx.vb @@ -216,7 +216,7 @@ Partial Class Bancos_CreditosPagoMultiple Dim filemove As String = "" Dim Comprobante As String = "" For Each fileItem As Archivo In filesgral - Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "") + Comprobante = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") filemove = fileItem.filename Next diff --git a/Bancos/RepSaldosDetalle.aspx b/Bancos/RepSaldosDetalle.aspx index 6c2f52af6..9b1f0539e 100644 --- a/Bancos/RepSaldosDetalle.aspx +++ b/Bancos/RepSaldosDetalle.aspx @@ -6,25 +6,49 @@
  • - Generar
  • + Excel
    - Reporte de Saldos Bancarios Detalle -  + Reporte de Saldos Bancarios Detalle
  • - Imprimir + PDF

  • -
    +
    + Banco: +
    +
    + +
    +
    + Cuenta: +
    +
    + +
    +
    + Fecha Inicial: +
    +
    + +
    +
    + Fecha Fin: +
    +
    + +
    +
    - +

    diff --git a/Bancos/RepSaldosDetalle.aspx.vb b/Bancos/RepSaldosDetalle.aspx.vb index 620ae912b..3ecb33a4d 100644 --- a/Bancos/RepSaldosDetalle.aspx.vb +++ b/Bancos/RepSaldosDetalle.aspx.vb @@ -155,6 +155,9 @@ Partial Class Bancos_RepSaldosDetalle Cuenta = dr("NumCuenta").ToString CLABE = dr("CLABE").ToString Banco = dr("Banco").ToString + lbBancoNombre.Text = Banco + LblFechaI.Text = FechaInicio + LblFechaF.Text = FechaFin If CveCuenta > 0 Then LblCuenta.Text = dr("NumCuenta").ToString LblSaldoInicial.Text = dr("SaldoInicial").ToString.ToDouble.FormatoNumero @@ -174,13 +177,15 @@ Partial Class Bancos_RepSaldosDetalle End Sub Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - GvS.ExportToExcel("ReporteSaldos" & Now.ToShortDateString) + ImprimirReporte("Excel") End Sub - - #Region "P D F" Private Sub LinkPDF_Click(sender As Object, e As EventArgs) Handles LinkPDF.Click + ImprimirReporte("PDF") + End Sub + + Private Sub ImprimirReporte(formato As String) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) @@ -215,7 +220,7 @@ Partial Class Bancos_RepSaldosDetalle params.Add(New ReportParameter("LogoPath", "")) End If - ImprimirPDF("Empresas/Grales/Formatos/RepSaldosDetalle.rdlc", dt, params, "RepSaldosDetalle") + ImprimirPDF("Empresas/Grales/Formatos/RepSaldosDetalle.rdlc", dt, params, "RepSaldosDetalle", Formato:=formato) Ban.Dispose() End Sub diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 0d11cf687..6e1e76ea6 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -2625,7 +2625,7 @@ Partial Class Compras_Proveedores Dim filemove As String = "" For Each fileItem As Archivo In filesgral - FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "") + FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") filemove = fileItem.filename Next @@ -2871,7 +2871,7 @@ Partial Class Compras_Proveedores Try - FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "") + FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") Dim tempArray() As String tempArray = fileItem.filename.ToString().Split("-".ToCharArray()) diff --git a/Empresas/72/Formatos/ConsumoInterno.rdlc b/Empresas/72/Formatos/ConsumoInterno.rdlc index 4f83b35f6..cf6d31666 100644 --- a/Empresas/72/Formatos/ConsumoInterno.rdlc +++ b/Empresas/72/Formatos/ConsumoInterno.rdlc @@ -6,19 +6,22 @@ - 1.08025cm + 1.10177cm - 2.86537cm + 2.88689cm - 10.83004cm + 7.80282cm - 2.36735cm + 2.38887cm - 2.1384cm + 2.86584cm + + + 2.15992cm @@ -169,7 +172,7 @@ - Serie/Lote + Serie + + + + + + Textbox4 + + + + + 1pt + + + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + @@ -356,14 +404,14 @@ - + true true - =Fields!SerieLote.Value + =Fields!Serie.Value + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + @@ -1645,8 +1726,12 @@ Almacen System.String - - SerieLote + + Serie + System.String + + + SeccionAlmacen System.String diff --git a/Empresas/72/Formatos/DevolucionCliente.rdlc b/Empresas/72/Formatos/DevolucionCliente.rdlc index ba12d2d1f..b04d46e3c 100644 --- a/Empresas/72/Formatos/DevolucionCliente.rdlc +++ b/Empresas/72/Formatos/DevolucionCliente.rdlc @@ -6,19 +6,22 @@ - 1.4138cm + 1.08751cm 2.86537cm - 7.90885cm + 5.59405cm 2.36735cm - 2.7734cm + 2.92336cm + + + 2.35004cm @@ -169,7 +172,7 @@ - Serie/Lote + Serie + + + + + + Textbox17 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + @@ -350,14 +398,14 @@ - + true true - =Fields!SerieLote.Value + =Fields!Serie.Value @@ -366,7 +414,37 @@ + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + @@ -419,6 +497,7 @@ + @@ -435,7 +514,7 @@ 0.17639cm 0.12931cm 0.96717cm - 17.32877cm + 17.18768cm @@ -667,7 +746,7 @@ 1.28125in + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + @@ -382,14 +429,14 @@ - + true true - =Fields!SerieLote.Value + =Fields!Serie.Value @@ -400,7 +447,39 @@ - SerieLote1 + Serie + + + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "1pt", "0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + + + + SeccionAlmacen @@ -423,6 +502,7 @@ + @@ -1014,8 +1094,12 @@ Almacen System.String - - SerieLote + + Serie + System.String + + + SeccionAlmacen System.String diff --git a/Empresas/72/Formatos/EntradaGarantia.rdlc b/Empresas/72/Formatos/EntradaGarantia.rdlc index 82e7a4f82..1232b8f04 100644 --- a/Empresas/72/Formatos/EntradaGarantia.rdlc +++ b/Empresas/72/Formatos/EntradaGarantia.rdlc @@ -6,19 +6,22 @@ - 1.4138cm + 1.19235cm - 2.86537cm + 2.76934cm - 7.90885cm + 6.51065cm 2.36735cm - 2.7734cm + 2.8175cm + + + 1.6716cm @@ -169,7 +172,7 @@ - Serie/Lote + Serie + + + + + + Textbox10 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + @@ -214,7 +262,7 @@ - Unidad Medida + U. M. @@ -366,7 +414,37 @@ + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + @@ -419,6 +497,7 @@ + @@ -435,7 +514,7 @@ 0.17639cm 0.09031cm 0.96717cm - 17.32877cm + 17.32879cm @@ -458,7 +537,7 @@ 0.54167in + + + + + + Textbox17 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + @@ -214,7 +262,7 @@ - Unidad Medida + U.M. @@ -366,7 +414,37 @@ + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + @@ -419,6 +497,7 @@ + @@ -435,7 +514,7 @@ 0.17639cm 0.12931cm 0.96717cm - 17.17002cm + 17.12418cm @@ -1523,8 +1602,12 @@ Almacen System.String - - SerieLote + + Serie + System.String + + + SeccionAlmacen System.String diff --git a/Empresas/72/Formatos/Entradas.rdlc b/Empresas/72/Formatos/Entradas.rdlc index 5a9ef0bb3..beab2af56 100644 --- a/Empresas/72/Formatos/Entradas.rdlc +++ b/Empresas/72/Formatos/Entradas.rdlc @@ -12,13 +12,16 @@ 2.06688cm - 7.9493cm + 6.26873cm - 2.51129cm + 1.69187cm - 1.43594cm + 2.8175cm + + + 1.11844cm 1.56514cm @@ -175,7 +178,7 @@ - Serie/Lote + Serie + + + + + + Textbox1 + + + + + 1pt + + + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + @@ -454,14 +502,14 @@ - + true true - =Fields!SerieLote.Value + =Fields!Serie.Value + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + @@ -787,7 +868,7 @@ 1.75444in + + + + + + Textbox2 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + @@ -448,14 +496,14 @@ - + true true - =Fields!SerieLote.Value + =Fields!Serie.Value @@ -464,7 +512,37 @@ + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + @@ -589,6 +667,7 @@ + @@ -783,7 +862,7 @@ 1.83333in + + + + + + Textbox45 + + + + + + + + + Silver + 2pt + 2pt + 2pt + + + + @@ -590,7 +634,7 @@ - =Fields!SerieLote.Value + =Fields!Serie.Value + + + + + + SeccionAlmacen + + + =IIF(RowNumber(nothing) Mod 2 = 0,"LightGrey","White") + 2pt + 2pt + 2pt + 2pt + + + + @@ -737,6 +815,7 @@ + @@ -2104,8 +2183,12 @@ PS System.String - - SerieLote + + Serie + System.String + + + SeccionAlmacen System.String diff --git a/Empresas/72/Formatos/Salidas.rdlc b/Empresas/72/Formatos/Salidas.rdlc index 6d8f328e2..41362ace5 100644 --- a/Empresas/72/Formatos/Salidas.rdlc +++ b/Empresas/72/Formatos/Salidas.rdlc @@ -6,19 +6,22 @@ - 1.08025cm + 1.04906cm 2.86537cm - 10.83004cm + 8.0952cm 2.36735cm - 2.1384cm + 2.73484cm + + + 2.16959cm @@ -169,7 +172,7 @@ - Serie/Lote + Serie + + + + + + Textbox1 + + + + + 1pt + + + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + @@ -356,14 +404,14 @@ - + true true - =Fields!SerieLote.Value + =Fields!Serie.Value + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + + + + + + + Textbox3 + + + + + 1pt + + + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + @@ -348,14 +395,14 @@ - + true true - =Fields!SerieLote.Value + =Fields!Serie.Value @@ -364,7 +411,38 @@ + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + @@ -489,7 +568,7 @@ 1.76239in + + + + + + Textbox10 + + + + Black + + 1pt + + + Black + + 1pt + + White + 2pt + 2pt + 2pt + 2pt + + + + @@ -350,14 +398,14 @@ - + true true - =Fields!SerieLote.Value + =Fields!Serie.Value @@ -366,7 +414,37 @@ + + 2pt + 2pt + =IIf(RowNumber(Nothing)=1,"1pt","0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + @@ -419,6 +497,7 @@ + @@ -435,7 +514,7 @@ 0.17639cm 0.09031cm 0.96717cm - 17.32877cm + 17.32879cm @@ -458,7 +537,7 @@ 0.54167in + + + + + + Textbox10 + + + + Black + + 1pt + + + Black + + 1pt + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + @@ -401,14 +449,14 @@ - + true true - =Fields!SerieLote.Value + =Fields!Serie.Value @@ -419,7 +467,40 @@ - SerieLote + Serie + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + + + + SeccionAlmacen @@ -443,6 +524,7 @@ + @@ -459,7 +541,7 @@ 0.07056cm 0.03488cm 0.92264cm - 20.29478cm + 20.18483cm @@ -545,8 +627,8 @@ Textbox31 - 1.15947cm - 2.85732cm + 1.13431cm + 2.8926cm 0.90014cm 17.46676cm 3 @@ -1564,8 +1646,12 @@ Almacen System.String - - SerieLote + + Serie + System.String + + + SeccionAlmacen System.String diff --git a/Empresas/72/Formatos/TrasladoAlmacen.rdlc b/Empresas/72/Formatos/TrasladoAlmacen.rdlc index 00ae4fedc..1714ac257 100644 --- a/Empresas/72/Formatos/TrasladoAlmacen.rdlc +++ b/Empresas/72/Formatos/TrasladoAlmacen.rdlc @@ -6,7 +6,7 @@ - 1.37635cm + 1.03892cm 1.74824cm @@ -15,21 +15,24 @@ 1.41283cm - 8.7207cm + 7.13876cm - 2.50488cm + 2.21384cm + + + 2.51239cm 2.15376cm - 2.60235cm + 2.07958cm - 0.51314cm + 1.01502cm @@ -229,7 +232,7 @@ - Serie/Lote + Serie + + + + + + Textbox2 + + + + Black + + 1pt + + + Black + + 1pt + + #0e2455 + 2pt + 2pt + 2pt + 2pt + + + + @@ -497,14 +545,14 @@ - + true true - =Fields!SerieLote.Value + =Fields!Serie.Value @@ -515,7 +563,40 @@ - SerieLote + Serie + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!SeccionAlmacen.Value + + + + + + + SeccionAlmacen @@ -772,6 +853,40 @@ + + + + true + true + + + + + + + + + + + + Textbox15 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + @@ -1026,6 +1141,40 @@ + + + + true + true + + + + + + + + + + + + Textbox18 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + @@ -1280,6 +1429,40 @@ + + + + true + true + + + + + + + + + + + + Textbox42 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + @@ -1371,6 +1554,7 @@ + @@ -1395,8 +1579,8 @@ DsInventarios 0.07056cm 0.03488cm - 2.80201cm - 20.51911cm + 3.30389cm + 20.29832cm @@ -1504,7 +1688,7 @@ 1.68587in @@ -50,7 +50,7 @@ - 0.62012cm + 1.25512cm 0.22583cm 0cm 17.79586cm @@ -65,16 +65,16 @@ - 3.65719cm + 2.95132cm - 3.49856cm + 2.94294cm 1.44923cm - 1.99986cm + 1.5894cm 2.68423cm @@ -82,6 +82,9 @@ 2.54257cm + + 1.5217cm + 2.19006cm @@ -288,6 +291,39 @@ + + + + true + true + + + + + Estatus + + + + Textbox5 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + @@ -531,6 +567,40 @@ + + + + true + true + + + + + =iif(Fields!Estatus.Value="1","Activo","Inactivo") + + + + + + + Estatus + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -578,6 +648,7 @@ + @@ -591,9 +662,9 @@ DataSet1 - 0.79651cm + 1.43151cm 1.16648cm - 18.02169cm + 17.87145cm 2 + + true + true + + + + + Cliente: + HTML + + + + =Parameters!Cliente.Value + HTML + + + + + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + - 0.86559in + 1.13642in - Textbox11 @@ -958,6 +1079,10 @@ FechaIng System.String + + Estatus + System.String + DataSet @@ -994,6 +1119,12 @@ true ReportParameter1 + + String + true + true + ReportParameter1 + Cm 40c94aad-a12a-44fb-ab0d-ea36a9656792 diff --git a/Empresas/Grales/Formatos/RepSaldosDetalle.rdlc b/Empresas/Grales/Formatos/RepSaldosDetalle.rdlc index fdd9645ea..67c6632b2 100644 --- a/Empresas/Grales/Formatos/RepSaldosDetalle.rdlc +++ b/Empresas/Grales/Formatos/RepSaldosDetalle.rdlc @@ -5,7 +5,7 @@ 0.08792cm 0cm - 20.43968cm + 19.02093cm @@ -16,31 +16,31 @@ - 1cm + 0.99817cm - 1.7cm + 0.89235cm - 1.6439cm + 1.64207cm - 6.48678cm + 6.29065cm - 2.63648cm + 2.28597cm - 1.29cm + 1.28817cm - 1.83034cm + 1.82851cm - 1.70625cm + 1.70442cm - 2.02375cm + 2.02192cm @@ -473,7 +473,7 @@ - 0.6cm + 0.83813cm @@ -803,8 +803,8 @@ DataSet1 0.36336cm 0.06868cm - 1.06771cm - 20.3175cm + 1.30584cm + 18.95225cm 1 - 0.60091in + 0.79883in - Textbox1 @@ -979,7 +981,7 @@ Textbox13 0.11854cm - 16.8543cm + 15.48905cm 1.76352cm 3.53188cm 3 @@ -1038,7 +1040,7 @@ Textbox13 2.41272cm - 15.92826cm + 14.56301cm 0.52945cm 4.45792cm 4 @@ -1110,7 +1112,7 @@ 0.11437cm 0.10583cm 0cm - 20.33385cm + 18.9151cm @@ -1266,7 +1268,7 @@ Textbox3 0.22726cm - 18.32031cm + 16.95506cm 0.36335cm 2.06587cm 5 diff --git a/General/RepPaqueteriasGuias.aspx.cs b/General/RepPaqueteriasGuias.aspx.cs index de9a07d40..9fcbd9d2b 100644 --- a/General/RepPaqueteriasGuias.aspx.cs +++ b/General/RepPaqueteriasGuias.aspx.cs @@ -618,7 +618,7 @@ public partial class General_RepPaqueteriasGuias : ClsPaginas { try { - FileExtension = System.IO.Path.GetExtension(string.Format("{0}Temp\\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", ""); + FileExtension = System.IO.Path.GetExtension(string.Format("{0}Temp\\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", ""); string rutaDestino = UsuarioActual.Empresa.Ruta + "Documentos\\Guias\\" + CvePaqueteriaGuia + "." + FileExtension; if (!System.IO.Directory.Exists(UsuarioActual.Empresa.Ruta + "Documentos\\Guias\\")) { diff --git a/Inventarios/AjustesSeccionAlmacen.aspx b/Inventarios/AjustesSeccionAlmacen.aspx index 9efda2629..bc20d39e9 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx +++ b/Inventarios/AjustesSeccionAlmacen.aspx @@ -1,70 +1,124 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="AjustesSeccionAlmacen.aspx.vb" Inherits="Inventarios_AjustesSeccionAlmacen" %> - - - - - - - Ajustes de Productos en Secciones de Almacen - - - - - - - - - - -
    -
    -
    - -
    -
    - - -
    - -
    - - -
    - -
    - -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="AjustesSeccionAlmacen.aspx.vb" Inherits="Inventarios_AjustesSeccionAlmacen" %> + + + + + + + Ajustes de Productos en Secciones de Almacen + + + + + + +
  • + Importar Listado +
  • +
  • + Descargar Formato +
  • +
    + + + +
    +
    + + + + + +
    +
    +
    + +
    +
    + + +
    + +
    + + +
    + +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/Inventarios/AjustesSeccionAlmacen.aspx.vb b/Inventarios/AjustesSeccionAlmacen.aspx.vb index 0e11ceb67..db2791104 100644 --- a/Inventarios/AjustesSeccionAlmacen.aspx.vb +++ b/Inventarios/AjustesSeccionAlmacen.aspx.vb @@ -1,144 +1,340 @@ - -Imports System.Data -Imports Extensiones - -Partial Class Inventarios_AjustesSeccionAlmacen - Inherits ClsPaginas - - Private Sub Inventarios_AjustesSeccionAlmacen_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - CargaCombos() - End If - End Sub - - Private Sub CargaCombos() - DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - DdlAlmacen.DataBind() - - DdlClasificaciones.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) - DdlClasificaciones.DataBind() - DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1")) - End Sub - - Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click - CargaDatos() - End Sub - - Private Sub CargaDatos() - Dim ObjInv As New ClsInventarios - - If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlAlmacen.SelectedValue.ToEntero, DdlClasificaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then - GvD.DataSource = ObjInv.DtResultados - End If - - ObjInv.Dispose() - GvD.DataBind() - UppD.Update() - End Sub - - Private Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - - e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero) - e.Row.FCDropDownList("DDlS").DataBind() - - End If - End Sub - - Private Sub BtnCambiarSeccion_Click(sender As Object, e As EventArgs) Handles BtnCambiarSeccion.Click - Dim ObjInventario As New ClsInventarios - Dim ObjPS As New ClsProductosServicios(ObjInventario.IniciaTransacSQL) - Dim Dtt As DataTable = Nothing - Dim CveMovimientoEntrada As Integer = 0 - Dim Folio = 0 - Dim ErrorMovInv As Boolean = False - Dim TextoError = "" - Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero - - - - Dim Fecha As Date = DateTime.Now - 'AGREGAMOS LA ENTRADA - Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, - Observaciones:="", Modulo:="ASA/G1") - Folio = ObjInventario.Folio - - If CveMovimientoSalida <= 0 Then - TextoError = "No se pudo generar el movimiento de salida correctamente" - ErrorMovInv = True - Else - - Dim CveMovimientoDetalleEntrada As Integer = 0 - Dim Cont As Integer = 0 - For Each gvr As GridViewRow In GvD.Rows - - 'que este seleccionado y que tenga diferente seccion - If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCDropDownList("DDlS").SelectedValue.ToEntero <> gvr.DataKey("CveSeccionAlmacen").ToEntero Then - - If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then - ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True) - End If - - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.DataKey("Existencia").ToDecimal, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then - ErrorMovInv = True - TextoError = "Ocurrió un error al guardar los movimientos de salida" - Exit For - End If - - End If - - Next - - If Not ErrorMovInv Then - - If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then - - Dim resultado As DataTable = ObjInventario.DtResultados - CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 2, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ASA/G1") - Dim ind As Integer = 0 - - For Each Row As DataRow In resultado.Rows - Dim CvePS = Row("CvePS").ToString().ToEntero() - Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal() - Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal() - Dim CveUM As Integer = Row("CveUM").ToString().ToEntero() - Dim CveSeccionAlmacen As Integer = GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero() - Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal() - Dim Serie As String = Row("Serie").ToString() - Dim Lote As String = Row("Lote").ToString() - Dim FechaCaducidad As Date = IfNull(Row("FechaCaducidad"), MinFecha).ToString.ToDate - - 'actualizamos el PS, para que tenga el aplica seccion - - ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True) - - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then - ErrorMovInv = True - Exit For - End If - ind += 1 - Next - resultado.Dispose() - - Else - TextoError = "No se pudo registrar el movimiento" - ErrorMovInv = True - End If - - End If - - End If - - - If Not ErrorMovInv Then - ObjInventario.Commit() - cargadatos - Alert("El Movimiento quede registrado correctamente", TipoMensaje.MsgInformacion) - Else - ObjInventario.RollBack() - Alert("Ocurrio un error al registrar el movimiento", TipoMensaje.MsgError) - End If - - ObjInventario.Dispose() - End Sub -End Class + +Imports System.Data +Imports Extensiones + +Partial Class Inventarios_AjustesSeccionAlmacen + Inherits ClsPaginas + + Private Sub Inventarios_AjustesSeccionAlmacen_Load(sender As Object, e As EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + CargaCombos() + End If + End Sub + + Private Sub CargaCombos() + DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + DdlAlmacen.DataBind() + + DdlAlmacenExcel.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + DdlAlmacenExcel.DataBind() + + DdlClasificaciones.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlClasificaciones.DataBind() + DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1")) + End Sub + + Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click + CargaDatos() + End Sub + + Private Sub CargaDatos() + Dim ObjInv As New ClsInventarios + + If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlAlmacen.SelectedValue.ToEntero, DdlClasificaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + GvD.DataSource = ObjInv.DtResultados + End If + + ObjInv.Dispose() + GvD.DataBind() + UppD.Update() + End Sub + + Private Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + + e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero) + e.Row.FCDropDownList("DDlS").DataBind() + + End If + End Sub + + Private Sub BtnCambiarSeccion_Click(sender As Object, e As EventArgs) Handles BtnCambiarSeccion.Click + Dim ObjInventario As New ClsInventarios + Dim ObjPS As New ClsProductosServicios(ObjInventario.IniciaTransacSQL) + Dim Dtt As DataTable = Nothing + Dim CveMovimientoEntrada As Integer = 0 + Dim Folio = 0 + Dim ErrorMovInv As Boolean = False + Dim TextoError = "" + Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero + + + + Dim Fecha As Date = DateTime.Now + 'AGREGAMOS LA ENTRADA + Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, + Observaciones:="", Modulo:="ASA/G1") + Folio = ObjInventario.Folio + + If CveMovimientoSalida <= 0 Then + TextoError = "No se pudo generar el movimiento de salida correctamente" + ErrorMovInv = True + Else + + Dim CveMovimientoDetalleEntrada As Integer = 0 + Dim Cont As Integer = 0 + For Each gvr As GridViewRow In GvD.Rows + + 'que este seleccionado y que tenga diferente seccion + If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCDropDownList("DDlS").SelectedValue.ToEntero <> gvr.DataKey("CveSeccionAlmacen").ToEntero Then + + If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then + ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True) + End If + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.DataKey("Existencia").ToDecimal, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then + ErrorMovInv = True + TextoError = "Ocurrió un error al guardar los movimientos de salida" + Exit For + End If + + End If + + Next + + If Not ErrorMovInv Then + + If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then + + Dim resultado As DataTable = ObjInventario.DtResultados + CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 2, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ASA/G1") + Dim ind As Integer = 0 + + For Each Row As DataRow In resultado.Rows + Dim CvePS = Row("CvePS").ToString().ToEntero() + Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal() + Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal() + Dim CveUM As Integer = Row("CveUM").ToString().ToEntero() + Dim CveSeccionAlmacen As Integer = GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero() + Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal() + Dim Serie As String = Row("Serie").ToString() + Dim Lote As String = Row("Lote").ToString() + Dim FechaCaducidad As Date = IfNull(Row("FechaCaducidad"), MinFecha).ToString.ToDate + + 'actualizamos el PS, para que tenga el aplica seccion + + ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True) + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + ErrorMovInv = True + Exit For + End If + ind += 1 + Next + resultado.Dispose() + + Else + TextoError = "No se pudo registrar el movimiento" + ErrorMovInv = True + End If + + End If + + End If + + If Not ErrorMovInv Then + ObjInventario.Commit() + CargaDatos() + Alert("El Movimiento quede registrado correctamente", TipoMensaje.MsgInformacion) + Else + ObjInventario.RollBack() + Alert("Ocurrio un error al registrar el movimiento", TipoMensaje.MsgError) + End If + + ObjInventario.Dispose() + End Sub + + Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click, BtnDescargar.Click + Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoAjusteSecCad.xlsx" + Dim Archivo As New IO.FileInfo(Directorio) + If Archivo.Exists Then + Response.Clear() + Response.ClearHeaders() + Response.ClearContent() + Response.AddHeader("Content-Disposition", "attachment; filename=" + Archivo.Name) + Response.AddHeader("Content-Length", Archivo.Length.ToString()) + Response.ContentType = "text/plain" + Response.Flush() + Response.TransmitFile(Archivo.FullName) + Response.End() + End If + End Sub + + Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click + If TxtExcel.getfiles().Archivos.Count > 0 Then + Dim file As Archivo = TxtExcel.getfiles().Archivos(0) + Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch + Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "") + If Tipo = "EXCEL" Then + Dim CveAlmacen As Integer = DdlAlmacenExcel.SelectedValue.ToEntero() + Dim CveSubProyecto As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}") + + CargarArchivo(Directorio, file.filename, CveAlmacen, CveSubProyecto) + Else + Alert("El archivo no es de tipo excel", TipoMensaje.MsgAdvertencia) + End If + + Else + Alert("No existe el archivo. Favor de subir un archivo excel a la plataforma.", TipoMensaje.MsgError) + End If + End Sub + + Private Sub CargarArchivo(Ruta As String, FileName As String, CveAlmacen As Integer, CveSubProyecto As Integer) + Dim DtExcel As DataTable = ReadExcelFile(Ruta + FileName, True) + + Dim ErrorArchivo = False + If Not ErrorArchivo AndAlso DtExcel IsNot Nothing Then + If Not DtExcel.Columns(0).ColumnName = "Código" Then + Alert("El nombre de la segunda columna debe ser 'Código'.Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not DtExcel.Columns(1).ColumnName = "Producto/Servicio" Then + Alert("El nombre de la cuarta columna debe ser 'Producto/Servicio'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not DtExcel.Columns(2).ColumnName = "SeccionAlmacen" Then + Alert("El nombre de la quinta columna debe ser 'SeccionAlmacen'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not DtExcel.Columns(3).ColumnName = "Serie" Then + Alert("El nombre de la sexta columna debe ser 'Serie'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not DtExcel.Columns(4).ColumnName = "Lote" Then + Alert("El nombre de la séptima columna debe ser 'Lote'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not DtExcel.Columns(5).ColumnName = "FechaCaducidad" Then + Alert("El nombre de la octava columna debe ser 'FechaCaducidad'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + + DtExcel.TableName = "Datos" + + If Not ErrorArchivo Then + Dim ErrorMovInv As Boolean = False + + Dim RowNoEncontrados As New StringBuilder() + Dim NumAgregados As Integer = 0 + + Dim ObjInventario As New ClsInventarios() + Dim ObjPS As New ClsProductosServicios(ObjInventario.IniciaTransacSQL()) + + Try + Dim DtExistenciasSecciones As DataTable = Nothing + If ObjInventario.GetMovimientosDetalleSeccionesAlmacen(DdlAlmacen.SelectedValue.ToEntero, DdlClasificaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then + DtExistenciasSecciones = ObjInventario.DtResultados.Copy() + End If + + 'SALIDA ALMACÉN + Dim CveMovimientoSalida = ObjInventario.AddMovimiento(CveAlmacen, 3, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", TipoCambio:=-1, + MovimientoFijo:=False, Modulo:="ASA/SA") + + 'ENTRADA ALMACÉN + Dim CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 2, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", TipoCambio:=-1, + MovimientoFijo:=False, Modulo:="ASA/EA") + + Dim dtSecciones As DataTable = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, CveAlmacen) + dtSecciones.CaseSensitive = False + + For Each RowExcel As DataRow In DtExcel.Rows + + Dim Codigo As String = RowExcel("Código").ToString.Trim + Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, Codigo:=Codigo).Rows(0) + + If DrPS IsNot Nothing Then + If Not ErrorMovInv Then + Dim CvePS As Integer = DrPS("CvePS").ToString().ToEntero() + Dim CveUM As Integer = DrPS("CveUM").ToString().ToEntero() + Dim ProductoServicio As String = RowExcel("Producto/Servicio").ToString.Trim + + Dim SeccionAlmacen As String = RowExcel("SeccionAlmacen").ToString.Trim + Dim CveSeccionAlmacen As Integer = dtSecciones.FiltroPrimeroValor("CveSeccion", $"AlmacenSeccion='{SeccionAlmacen}'") + + Dim Serie As String = RowExcel("Serie").ToString() + Dim Lote As String = RowExcel("Lote").ToString() + Dim FechaCaducidad As Date = IfNull(RowExcel("FechaCaducidad"), MinFecha).ToString.ToDate + + Dim RowExistencia As DataRow = DtExistenciasSecciones.FiltroPrimero($"CvePS={CvePS}") + + Dim CveSeccionAlmacenSalida As Integer = RowExistencia("CveSeccionAlmacen").ToString().ToEntero() + Dim CantidadSalida As Decimal = RowExistencia("Existencia").ToString().ToDecimal() + Dim SerieSalida As String = RowExistencia("Serie").ToString() + Dim LoteSalida As String = RowExistencia("Lote").ToString() + Dim FechaCaducidadSalida As Date = IfNull(RowExistencia("FechaCaducidad"), MinFecha).ToString.ToDate + Dim PUSalida As Decimal = RowExistencia("PU").ToString() + + 'GENERA LA SALIDA DE LOS PRODUCTOS QUE VIENEN EN EL EXCEL + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadSalida, CveUM, CvePS, PUSalida, CveSeccionAlmacen:=CveSeccionAlmacenSalida, Serie:=SerieSalida, Lote:=LoteSalida, FechaCaducidad:=FechaCaducidadSalida, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + ErrorMovInv = True + Exit For + End If + + Dim CveMovimientoDetalleSalida As Integer = ObjInventario.CveMovimientoDetalle + + ErrorMovInv = CveMovimientoDetalleSalida <= 0 + + 'GENERA LA ENTRADA DE LOS PRODUCTOS QUE SE DIERON ENTRADA + If Not ErrorMovInv Then + If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa, CveMovimientoDetalle:=CveMovimientoDetalleSalida) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then + Dim RowEntrada As DataRow = ObjInventario.DtResultados.Rows(0) + + Dim CvePSEntrada = RowEntrada("CvePS").ToString().ToEntero() + Dim CantidadEntrada As Decimal = RowEntrada("Cantidad").ToString().ToDecimal() + Dim PUEntrada As Decimal = RowEntrada("PUOriginal").ToString().ToDecimal() + Dim CveUMEntrada As Integer = RowEntrada("CveUM").ToString().ToEntero() + + Dim CostoIndirecto As Decimal = RowEntrada("CostoIndirecto").ToString().ToDecimal() + + 'ACTUALIZAMOS EL PS, PARA QUE TENGA EL APLICA SECCION + ErrorMovInv = Not ObjPS.UpdateAplicaSeccionAlmacen(CvePS, UsuarioActual.CveEmpresa, True) + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, CantidadEntrada, CveUMEntrada, CvePSEntrada, PUEntrada, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + ErrorMovInv = True + Exit For + End If + + Else + ErrorMovInv = True + End If + End If + End If + Else + ErrorMovInv = True + RowNoEncontrados.AppendFormat("{0},", Codigo) + End If + + Next + dtSecciones.Dispose() + + Catch ex As Exception + ErrorMovInv = True + OnError("Ocurrió un error al agregar el inventario", ex) + End Try + + If ErrorMovInv Then + ObjInventario.RollBack() + + Dim SbError As New StringBuilder() + SbError.Append("Ocurrió un error al guardar") + If RowNoEncontrados.Length > 0 Then + SbError.Append("Los siguientes códigos no fueron encontrados en el sistema.
    ") + SbError.Append(RowNoEncontrados.ToString()) + End If + + Alert(SbError.ToString(), TipoMensaje.MsgError) + Else + ObjInventario.Commit() + Alert("Se realizó el ajuste de los productos correctamente.") + End If + + ObjInventario.Dispose() + ObjPS.Dispose() + + End If + Else + Alert("Ocurrió un error al cargar el excel.", TipoMensaje.MsgError) + End If + End Sub + +End Class \ No newline at end of file diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 1145c7f0f..fc562aaa7 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -1540,7 +1540,7 @@ Partial Class Inventarios_RecepcionUsados Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos For Each fileItem As Archivo In Filesgral - FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "") + FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") Filename = fileItem.filename Next @@ -1624,7 +1624,7 @@ Partial Class Inventarios_RecepcionUsados Dim Filename As String = "" For Each fileItem As Archivo In Filesgral - FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)) '.Replace(".", "") + FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)) '.Replace(".", "") Filename = fileItem.filename Next diff --git a/OI/SoporteADS.aspx.vb b/OI/SoporteADS.aspx.vb index e91072dd1..13e589cda 100644 --- a/OI/SoporteADS.aspx.vb +++ b/OI/SoporteADS.aspx.vb @@ -2011,7 +2011,7 @@ Partial Class OI_SoporteADS For Each fileItem As Archivo In Filesgral - FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "") + FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") 'Filename = fileItem.filename Dim tempArray() As String tempArray = fileItem.filename.ToString().Split("-".ToCharArray()) @@ -2061,7 +2061,7 @@ Partial Class OI_SoporteADS For Each fileItem As Archivo In Filesgral - FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "") + FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") 'Filename = fileItem.filename Dim tempArray() As String tempArray = fileItem.filename.ToString().Split("-".ToCharArray()) diff --git a/PortalProveedor/PortalProveedor.aspx.vb b/PortalProveedor/PortalProveedor.aspx.vb index 74ae350dd..fe6e0251c 100644 --- a/PortalProveedor/PortalProveedor.aspx.vb +++ b/PortalProveedor/PortalProveedor.aspx.vb @@ -1676,7 +1676,7 @@ Partial Class Portal_PortalProveedor ' Try - ' FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "") + ' FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "") ' Dim tempArray() As String ' tempArray = fileItem.filename.ToString().Split("-".ToCharArray()) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 459603c9b..e9fc7d01e 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -283,7 +283,7 @@
  • - +
  • @@ -294,7 +294,7 @@
  • - +
  • diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index e1d3732bd..e2dd42935 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -3758,6 +3758,7 @@ Partial Class Clientes params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreUsuario", UsuarioActual.Usuario)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario)) + params.Add(New ReportParameter("Cliente", TxtNombre.Text)) Dim ObjGPS As New ClsGPS Dim tablaReporte As DataTable diff --git a/Ventas/ProductosServicios.aspx b/Ventas/ProductosServicios.aspx index 960263d11..57658e998 100644 --- a/Ventas/ProductosServicios.aspx +++ b/Ventas/ProductosServicios.aspx @@ -835,6 +835,38 @@
    +
    + +
    + + + +
    +
    +
    + +
    + + + +
    +
    +
    + +
    + + + +
    +
    +
    + +
    + + + +
    +
    diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 3bf35821a..b5807f9f5 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -821,6 +821,10 @@ Partial Class ProductosyServicios DdlProveedor.txtValue.Value = ObjProductosServicios.CveProveedorCompra.ToString ChkInventariable.Checked = ObjProductosServicios.Inventariable + ChkSerie.Checked = ObjProductosServicios.DtResultados.Rows(0)("AplicaSerie").ToString = "True" + ChkLote.Checked = ObjProductosServicios.DtResultados.Rows(0)("AplicaLote").ToString = "True" + ChkCaducidad.Checked = ObjProductosServicios.DtResultados.Rows(0)("AplicaCaducidad").ToString = "True" + ChkSeccion.Checked = ObjProductosServicios.DtResultados.Rows(0)("AplicaSeccion").ToString = "True" TxtVentaMinima.Text = ObjProductosServicios.VentaMinima.ToString DdlMoneda.SelectedValueExist(ObjProductosServicios.CveMoneda) TxtRetISR.Text = (ObjProductosServicios.RetISR * 100).ToString @@ -1163,7 +1167,8 @@ Partial Class ProductosyServicios CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(), ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, - ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked) > 0 Then + ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, + AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked) > 0 Then ViewState("CvePS") = ObjProductosServicios.CvePS For Each GVR As GridViewRow In GvImpuestosLocales.Rows If GVR.FCCheckBox("ChkDeduccion").Checked Then @@ -1208,7 +1213,8 @@ Partial Class ProductosyServicios CveUsuarioModifico:=UsuarioActual.CveUsuario, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(), ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, - ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked) Then + ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, + AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked) Then If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then TieneError = True diff --git a/asmx/WSApp.asmx b/asmx/WSApp.asmx index 461d63f35..88b6270ad 100644 --- a/asmx/WSApp.asmx +++ b/asmx/WSApp.asmx @@ -1,5 +1,5 @@ -<%@ WebService Language="VB" Class="WSApp" %> - +<%@ WebService Language="VB" Class="WSApp" %> + Option Explicit On Imports System.Data @@ -22,9 +22,9 @@ Imports Newtonsoft.Json.Linq Public Class WSApp - Inherits System.Web.Services.WebService + Inherits System.Web.Services.WebService #Region "G L O B A L - D T" - + Public ReadOnly Property UrlSitio As String Get Return ConfigurationManager.AppSettings("UrlSitio").ToString @@ -425,9 +425,34 @@ Public Class WSApp Set(value As DataTable) Application("GlobalDTMotivosHorasExtras") = value End Set - End Property + End Property + + + Public Property GlobalDTUnidadesMedida(Optional CveEmpresa As Integer = -1) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) + 'sino existe, recarga los datos + If DirectCast(Application(AppNombre), DataTable) Is Nothing Or (DirectCast(Application(AppNombre), DataTable) IsNot Nothing AndAlso DirectCast(Application(AppNombre), DataTable).Rows.Count = 0) Then + Dim ObjUnidadesMedida As New ClsUnidadesMedida() + If ObjUnidadesMedida.GetUnidadesMedida(CveEmpresa) Then Application(AppNombre) = ObjUnidadesMedida.DtResultados + ObjUnidadesMedida.Dispose() + End If + + If CveEmpresa <> -1 Then + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), " UnidadMedida", DataViewRowState.CurrentRows) + GlobalDTUnidadesMedida = Dv.ToTable + Dv.Dispose() + Else + GlobalDTUnidadesMedida = DirectCast(Application(AppNombre), DataTable) + End If + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTUnidadesMedida-{0}", CveEmpresa) + Application(AppNombre) = value + End Set + End Property #End Region - + Public Property CveEmpresa As Integer = 143 Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario) @@ -448,7 +473,7 @@ Public Class WSApp Else End If ObjEmpresa.Dispose() - End Sub + End Sub #Region "M E T O D O S - S E R V I C I O" Public Function ValidaUsuario(CveUsuario As Integer) As Usuario Dim UsuarioActual As Usuario = Nothing @@ -783,9 +808,9 @@ Public Class WSApp Retorno.Mensajes.Add("Ocurrió un error al eliminar el movimiento. Por favor vuelva a intetar.") End If ObjInv.Dispose() - End Sub + End Sub #End Region - + #Region "P E D I D O S" Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre Dim Timbre As New CFDITimbre @@ -899,9 +924,9 @@ Public Class WSApp i += 1 Next Return Timbre - End Function + End Function #End Region - + #Region "R E M I S I O N E S" Private Function CreaFactura(ByRef Retorno As Modelos.Factura.MMensajeFactura, CveCliente As Integer, CveAlmacen As Integer, CveSubProyecto As Integer, CveMoneda As Integer, UsuarioActual As Usuario, Observaciones As String, ListaPS As List(Of MVentaProductos)) As Modelos.Factura If CveSubProyecto <= 0 Then @@ -1430,9 +1455,10 @@ Public Class WSApp End Try ObjVentas.Dispose() Return strBody.ToString - End Function + End Function #End Region - + + End Class Namespace WebServiceAppModels2