diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb
index 18fbe3683..7b8d53ecf 100644
--- a/App_Code/ClsInventarios.vb
+++ b/App_Code/ClsInventarios.vb
@@ -4832,7 +4832,69 @@ Public Class ClsInventarios
#End Region
-
+#Region "Camiones"
+ Public Function GetCamiones(CveCamion As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Inv_CamionesGet")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveCamion", SqlDbType.Int).Value = CveCamion
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al momento de obtener el listado de camiones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+ End Function
+ Public Function AddCamiones(Placa As String, Especificacion As String, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Inv_CamionesAdd")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@Placa", SqlDbType.VarChar).Value = Placa
+ .Add("@Especificacion", SqlDbType.VarChar).Value = Especificacion
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al momento de insertar el nuevo camion", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+ End Function
+ Public Function RemoveCamiones(CveCamion As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Inv_CamionesRemove")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveCamion", SqlDbType.Int).Value = CveCamion
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al momento de eliminar un camion", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+ End Function
+ Public Function UpdateCamiones(CveCamion As Integer, Placa As String, Especificacion As String) As Boolean
+ Dim Retorno As Boolean = False
+ DataAdapter("PA_Inv_CamionesUpdate")
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveCamion", SqlDbType.Int).Value = CveCamion
+ .Add("@Placa", SqlDbType.VarChar).Value = Placa
+ .Add("@Especificacion", SqlDbType.VarChar).Value = Especificacion
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al momento de actualizar el camion", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return Retorno
+ End Function
+#End Region
#Region " IDisposable Support "
' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb
index 0f55c081a..a08826ba7 100644
--- a/Compras/Compras.aspx.vb
+++ b/Compras/Compras.aspx.vb
@@ -8433,8 +8433,12 @@ Partial Class Compras_Compras
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
If sumaAmortizacion = CompraSaldo Then
- ImporteMovimiento = TxtIVA.Text.ToDecimal
- IVACompleto = True
+ ImporteMovimiento = TxtIVA.Text.ToDecimal
+
+ If ImporteMovimiento > 0 Then
+ IVACompleto = True
+ End If
+
Else
ImporteMovimiento = 0
End If
diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb
index 636954eb7..1956cf894 100644
--- a/Compras/PopUpVerFactura.aspx.vb
+++ b/Compras/PopUpVerFactura.aspx.vb
@@ -2422,10 +2422,15 @@ Partial Class PopUpVerFactura
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Desarmado de Paquete - {0}", Folio.ToString), RDSName:="DsInventarios")
- Case 21 'SALIDA POR PRESTAMO
+ Case 21, 22 'SALIDA POR PRESTAMO
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim params As New List(Of ReportParameter)
+ Dim Archivo As String = $"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntradaSalida.rdlc"
+ If Not File.Exists($"{Server.MapPath("~")}/{Archivo}") Then
+ Archivo = "Empresas/Grales/Formatos/EntradaSalida.rdlc"
+ End If
+
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri))
@@ -2433,7 +2438,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("LogoPath", ""))
End If
- params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
+ 'params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Concepto", "Salida por Prestamo"))
params.Add(New ReportParameter("Almacen", Almacen))
params.Add(New ReportParameter("Fecha", Fecha))
@@ -2447,37 +2452,43 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("FacturadoA", NombreCliente))
If (UsuarioActual.CveEmpresa = 72) Then
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
- End If
- ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
-
- Case 22 'ENTRADA POR PRESTAMO
- Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
- Dim params As New List(Of ReportParameter)
-
- Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
- If Imagen.Exists Then
- params.Add(New ReportParameter("LogoPath", logouri))
Else
- params.Add(New ReportParameter("LogoPath", ""))
+ params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
End If
-
- params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
- params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
- params.Add(New ReportParameter("Almacen", Almacen))
- params.Add(New ReportParameter("Fecha", Fecha))
- params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
- params.Add(New ReportParameter("Folio", Folio))
- params.Add(New ReportParameter("Descuentos", ""))
- params.Add(New ReportParameter("IVA", ""))
- params.Add(New ReportParameter("Total", ""))
- 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
- params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
- params.Add(New ReportParameter("FacturadoA", NombreCliente))
- If (UsuarioActual.CveEmpresa = 72) Then
- params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
- End If
- ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
-
+ If CveConcepto = 21 Then
+ ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
+ ElseIf CveConcepto = 22 Then
+ ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
+ End If
+
+ 'Case 22 'ENTRADA POR PRESTAMO
+ ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
+ ' Dim params As New List(Of ReportParameter)
+
+ ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
+ ' If Imagen.Exists Then
+ ' params.Add(New ReportParameter("LogoPath", logouri))
+ ' Else
+ ' params.Add(New ReportParameter("LogoPath", ""))
+ ' End If
+
+ ' params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
+ ' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo"))
+ ' params.Add(New ReportParameter("Almacen", Almacen))
+ ' params.Add(New ReportParameter("Fecha", Fecha))
+ ' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
+ ' params.Add(New ReportParameter("Folio", Folio))
+ ' params.Add(New ReportParameter("Descuentos", ""))
+ ' params.Add(New ReportParameter("IVA", ""))
+ ' params.Add(New ReportParameter("Total", ""))
+ ' 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
+ ' params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
+ ' params.Add(New ReportParameter("FacturadoA", NombreCliente))
+ ' If (UsuarioActual.CveEmpresa = 72) Then
+ ' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu))
+ ' End If
+ ' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
+
Case 24 'SALIDA POR RESGUARDO
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))
diff --git a/Empresas/72/Formatos/EntradaSalida.rdlc b/Empresas/72/Formatos/EntradaSalida.rdlc
index 367195937..e490dca7f 100644
--- a/Empresas/72/Formatos/EntradaSalida.rdlc
+++ b/Empresas/72/Formatos/EntradaSalida.rdlc
@@ -992,6 +992,9 @@
0.6cm
1.57396cm
9
+
+ =IIF(Parameters!FacturaProveedor.Value<>"",False,True)
+
@@ -1573,6 +1576,12 @@
String
ReportParameter1
+
+ String
+ true
+ true
+ ReportParameter1
+
diff --git a/Empresas/Grales/Formatos/CartaPorte.rdlc b/Empresas/Grales/Formatos/CartaPorte.rdlc
index fd0a990c1..3cff0be99 100644
--- a/Empresas/Grales/Formatos/CartaPorte.rdlc
+++ b/Empresas/Grales/Formatos/CartaPorte.rdlc
@@ -481,7 +481,7 @@
- REMITENTE O EXPEDIDOR:
+ REMITENTE O EXPEDIDOR:
-
-
-
- true
- true
-
-
-
-
- PLACA:
-
-
-
- =Parameters!Placa.Value
-
-
-
-
-
-
- Textbox1
- 0.07056cm
- 6.54349cm
- 0.66127cm
- 4.52959cm
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- CHOFER:
-
-
-
- =Parameters!ResponsableRecibio.Value
-
-
-
-
-
-
- Textbox1
- 0.07056cm
- 0.22015cm
- 0.66127cm
- 6.32334cm
- 1
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- true
-
-
-
-
- ESPECIFICACIÓN DE LA UNIDAD:
-
-
-
- =Parameters!EspecifUnidad.Value
-
-
-
-
-
-
- Textbox1
- 0.07056cm
- 11.07308cm
- 0.66127cm
- 8.35555cm
- 2
-
-
- 2pt
- 2pt
- 2pt
- 2pt
-
-
-
- true
- 9.85744cm
- 0cm
- 0.91152cm
- 19.6022cm
- 13
-
- =IIf((Parameters!Chofer.Value = "" or Parameters!Chofer.Value = "-1") And (Parameters!Placa.Value = "" Or Parameters!Placa.Value = "-1"),True,False)
-
-
-
-
-
true
true
@@ -1468,11 +1331,11 @@
Textbox21
- 13.24837cm
- 2.21206cm
+ 13.69816cm
+ 2.20199cm
1.2cm
5.78664cm
- 14
+ 13
@@ -1503,11 +1366,11 @@
Textbox22
- 11.58471cm
- 2.21206cm
+ 12.0345cm
+ 2.20199cm
0.6cm
5.78664cm
- 15
+ 14
@@ -1551,11 +1414,11 @@
Textbox21
- 13.24837cm
- 11.60471cm
+ 13.69816cm
+ 11.59464cm
1.2cm
5.78664cm
- 16
+ 15
@@ -1586,11 +1449,11 @@
Textbox22
- 11.58471cm
- 11.60471cm
+ 12.0345cm
+ 11.59464cm
0.6cm
5.78664cm
- 17
+ 16
@@ -1621,11 +1484,11 @@
Textbox22
- 12.88411cm
- 2.21206cm
+ 13.3339cm
+ 2.20199cm
0.52062cm
5.78664cm
- 18
+ 17
@@ -1656,11 +1519,11 @@
Textbox22
- 12.88411cm
- 11.60471cm
+ 13.3339cm
+ 11.59464cm
0.52062cm
5.78664cm
- 19
+ 18
@@ -1776,7 +1639,7 @@
0.23022cm
2.22232cm
19.21855cm
- 20
+ 19
@@ -1819,7 +1682,7 @@
0.23022cm
0.62599cm
19.21855cm
- 21
+ 20
@@ -1839,11 +1702,174 @@
2pt
+
+
+
+
+ 5.06862cm
+
+
+ 3.10917cm
+
+
+ 10.93493cm
+
+
+
+
+ 0.6cm
+
+
+
+
+ true
+ true
+
+
+
+
+ CHOFER:
+
+
+
+ =Parameters!ResponsableRecibio.Value
+
+
+
+
+
+
+ Textbox52
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ PLACA:
+
+
+
+ =Parameters!Placa.Value
+
+
+
+
+
+
+ Textbox53
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+ true
+ true
+
+
+
+
+ ESPECIFICACION DE LA UNIDAD:
+
+
+
+ =Parameters!EspecifUnidad.Value
+
+
+
+
+
+
+ Textbox54
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 7.37959cm
+ 0.21008cm
+ 0.6cm
+ 19.11272cm
+ 21
+
+
+
+
8.91698in