This commit is contained in:
2020-01-27 09:21:06 -07:00
12 changed files with 1339 additions and 1121 deletions

View File

@@ -4832,7 +4832,69 @@ Public Class ClsInventarios
#End Region #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 " #Region " IDisposable Support "
' IDisposable ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean) Protected Overridable Sub Dispose(ByVal disposing As Boolean)

View File

@@ -8433,8 +8433,12 @@ Partial Class Compras_Compras
If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
If sumaAmortizacion = CompraSaldo Then If sumaAmortizacion = CompraSaldo Then
ImporteMovimiento = TxtIVA.Text.ToDecimal ImporteMovimiento = TxtIVA.Text.ToDecimal
IVACompleto = True
If ImporteMovimiento > 0 Then
IVACompleto = True
End If
Else Else
ImporteMovimiento = 0 ImporteMovimiento = 0
End If End If

View File

@@ -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") 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 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 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) 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 If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri)) params.Add(New ReportParameter("LogoPath", logouri))
@@ -2433,7 +2438,7 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("LogoPath", ""))
End If 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("Concepto", "Salida por Prestamo"))
params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Almacen", Almacen))
params.Add(New ReportParameter("Fecha", Fecha)) params.Add(New ReportParameter("Fecha", Fecha))
@@ -2447,37 +2452,43 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("FacturadoA", NombreCliente)) params.Add(New ReportParameter("FacturadoA", NombreCliente))
If (UsuarioActual.CveEmpresa = 72) Then If (UsuarioActual.CveEmpresa = 72) Then
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) 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 Else
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
End If End If
If CveConcepto = 21 Then
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
params.Add(New ReportParameter("Concepto", "Entrada por Prestamo")) ElseIf CveConcepto = 22 Then
params.Add(New ReportParameter("Almacen", Almacen)) ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
params.Add(New ReportParameter("Fecha", Fecha)) End If
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("Folio", Folio)) 'Case 22 'ENTRADA POR PRESTAMO
params.Add(New ReportParameter("Descuentos", "")) ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
params.Add(New ReportParameter("IVA", "")) ' Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Total", ""))
'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) ' If Imagen.Exists Then
params.Add(New ReportParameter("FacturadoA", NombreCliente)) ' params.Add(New ReportParameter("LogoPath", logouri))
If (UsuarioActual.CveEmpresa = 72) Then ' Else
params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) ' params.Add(New ReportParameter("LogoPath", ""))
End If ' End If
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios")
' 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 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))

View File

@@ -992,6 +992,9 @@
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>1.57396cm</Width> <Width>1.57396cm</Width>
<ZIndex>9</ZIndex> <ZIndex>9</ZIndex>
<Visibility>
<Hidden>=IIF(Parameters!FacturaProveedor.Value&lt;&gt;"",False,True)</Hidden>
</Visibility>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1573,6 +1576,12 @@
<DataType>String</DataType> <DataType>String</DataType>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="NombreRecibio">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="compuproveedores"> <EmbeddedImage Name="compuproveedores">

View File

@@ -481,7 +481,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>REMITENTE O EXPEDIDOR: </Value> <Value>REMITENTE O EXPEDIDOR: </Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
@@ -661,7 +661,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>DESTINATARIO: </Value> <Value>DESTINATARIO: </Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
@@ -1214,7 +1214,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>7.61768cm</Top> <Top>8.25268cm</Top>
<Left>0.20001cm</Left> <Left>0.20001cm</Left>
<Height>0.62599cm</Height> <Height>0.62599cm</Height>
<Width>19.21855cm</Width> <Width>19.21855cm</Width>
@@ -1267,7 +1267,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>8.24367cm</Top> <Top>8.87867cm</Top>
<Left>0.20001cm</Left> <Left>0.20001cm</Left>
<Height>1.50794cm</Height> <Height>1.50794cm</Height>
<Width>19.21855cm</Width> <Width>19.21855cm</Width>
@@ -1298,143 +1298,6 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<Rectangle Name="Rectangle1">
<ReportItems>
<Textbox Name="Textbox36">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>PLACA: </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Placa.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>0.07056cm</Top>
<Left>6.54349cm</Left>
<Height>0.66127cm</Height>
<Width>4.52959cm</Width>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox39">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>CHOFER: </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ResponsableRecibio.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>0.07056cm</Top>
<Left>0.22015cm</Left>
<Height>0.66127cm</Height>
<Width>6.32334cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox43">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>ESPECIFICACIÓN DE LA UNIDAD: </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!EspecifUnidad.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName>
<Top>0.07056cm</Top>
<Left>11.07308cm</Left>
<Height>0.66127cm</Height>
<Width>8.35555cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<KeepTogether>true</KeepTogether>
<Top>9.85744cm</Top>
<Left>0cm</Left>
<Height>0.91152cm</Height>
<Width>19.6022cm</Width>
<ZIndex>13</ZIndex>
<Visibility>
<Hidden>=IIf((Parameters!Chofer.Value = "" or Parameters!Chofer.Value = "-1") And (Parameters!Placa.Value = "" Or Parameters!Placa.Value = "-1"),True,False)</Hidden>
</Visibility>
<Style>
<Border>
<Style>None</Style>
</Border>
</Style>
</Rectangle>
<Textbox Name="Textbox30"> <Textbox Name="Textbox30">
<CanGrow>true</CanGrow> <CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
@@ -1468,11 +1331,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName> <rd:DefaultName>Textbox21</rd:DefaultName>
<Top>13.24837cm</Top> <Top>13.69816cm</Top>
<Left>2.21206cm</Left> <Left>2.20199cm</Left>
<Height>1.2cm</Height> <Height>1.2cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>14</ZIndex> <ZIndex>13</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1503,11 +1366,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName> <rd:DefaultName>Textbox22</rd:DefaultName>
<Top>11.58471cm</Top> <Top>12.0345cm</Top>
<Left>2.21206cm</Left> <Left>2.20199cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>15</ZIndex> <ZIndex>14</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1551,11 +1414,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName> <rd:DefaultName>Textbox21</rd:DefaultName>
<Top>13.24837cm</Top> <Top>13.69816cm</Top>
<Left>11.60471cm</Left> <Left>11.59464cm</Left>
<Height>1.2cm</Height> <Height>1.2cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>16</ZIndex> <ZIndex>15</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1586,11 +1449,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName> <rd:DefaultName>Textbox22</rd:DefaultName>
<Top>11.58471cm</Top> <Top>12.0345cm</Top>
<Left>11.60471cm</Left> <Left>11.59464cm</Left>
<Height>0.6cm</Height> <Height>0.6cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>17</ZIndex> <ZIndex>16</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1621,11 +1484,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName> <rd:DefaultName>Textbox22</rd:DefaultName>
<Top>12.88411cm</Top> <Top>13.3339cm</Top>
<Left>2.21206cm</Left> <Left>2.20199cm</Left>
<Height>0.52062cm</Height> <Height>0.52062cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>18</ZIndex> <ZIndex>17</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1656,11 +1519,11 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName> <rd:DefaultName>Textbox22</rd:DefaultName>
<Top>12.88411cm</Top> <Top>13.3339cm</Top>
<Left>11.60471cm</Left> <Left>11.59464cm</Left>
<Height>0.52062cm</Height> <Height>0.52062cm</Height>
<Width>5.78664cm</Width> <Width>5.78664cm</Width>
<ZIndex>19</ZIndex> <ZIndex>18</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1776,7 +1639,7 @@
<Left>0.23022cm</Left> <Left>0.23022cm</Left>
<Height>2.22232cm</Height> <Height>2.22232cm</Height>
<Width>19.21855cm</Width> <Width>19.21855cm</Width>
<ZIndex>20</ZIndex> <ZIndex>19</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
@@ -1819,7 +1682,7 @@
<Left>0.23022cm</Left> <Left>0.23022cm</Left>
<Height>0.62599cm</Height> <Height>0.62599cm</Height>
<Width>19.21855cm</Width> <Width>19.21855cm</Width>
<ZIndex>21</ZIndex> <ZIndex>20</ZIndex>
<Style> <Style>
<Border> <Border>
<Style>Solid</Style> <Style>Solid</Style>
@@ -1839,11 +1702,174 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<Tablix Name="Tablix1">
<TablixBody>
<TablixColumns>
<TablixColumn>
<Width>5.06862cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.10917cm</Width>
</TablixColumn>
<TablixColumn>
<Width>10.93493cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
<TablixRow>
<Height>0.6cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox52">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>CHOFER: </Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ResponsableRecibio.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox52</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox53">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>PLACA: </Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Placa.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox53</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox54">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>ESPECIFICACION DE LA UNIDAD: </Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!EspecifUnidad.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox54</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
</TablixBody>
<TablixColumnHierarchy>
<TablixMembers>
<TablixMember />
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
<TablixMembers>
<TablixMember>
<Group Name="Details" />
<TablixMembers>
<TablixMember />
</TablixMembers>
</TablixMember>
</TablixMembers>
</TablixRowHierarchy>
<Top>7.37959cm</Top>
<Left>0.21008cm</Left>
<Height>0.6cm</Height>
<Width>19.11272cm</Width>
<ZIndex>21</ZIndex>
<Style>
<Border>
<Style>Solid</Style>
</Border>
</Style>
</Tablix>
</ReportItems> </ReportItems>
<Height>8.91698in</Height> <Height>8.91698in</Height>
<Style /> <Style />
</Body> </Body>
<Width>7.7174in</Width> <Width>7.657in</Width>
<Page> <Page>
<PageHeader> <PageHeader>
<Height>3.39287cm</Height> <Height>3.39287cm</Height>
@@ -2084,12 +2110,12 @@
</Style> </Style>
</PageHeader> </PageHeader>
<PageFooter> <PageFooter>
<Height>1.23527cm</Height> <Height>1.23526cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage> <PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage> <PrintOnLastPage>true</PrintOnLastPage>
<ReportItems> <ReportItems>
<Line Name="Line1"> <Line Name="Line1">
<Top>0.03528cm</Top> <Top>0.03527cm</Top>
<Left>0.22015cm</Left> <Left>0.22015cm</Left>
<Height>0cm</Height> <Height>0cm</Height>
<Width>19.22862cm</Width> <Width>19.22862cm</Width>
@@ -2119,7 +2145,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox13</rd:DefaultName> <rd:DefaultName>Textbox13</rd:DefaultName>
<Top>0.14111cm</Top> <Top>0.1411cm</Top>
<Left>0.22015cm</Left> <Left>0.22015cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>1.55632cm</Width> <Width>1.55632cm</Width>
@@ -2153,7 +2179,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox14</rd:DefaultName> <rd:DefaultName>Textbox14</rd:DefaultName>
<Top>0.14111cm</Top> <Top>0.1411cm</Top>
<Left>1.77647cm</Left> <Left>1.77647cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>4.96223cm</Width> <Width>4.96223cm</Width>
@@ -2188,7 +2214,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox13</rd:DefaultName> <rd:DefaultName>Textbox13</rd:DefaultName>
<Top>0.14111cm</Top> <Top>0.1411cm</Top>
<Left>6.84454cm</Left> <Left>6.84454cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>2.84562cm</Width> <Width>2.84562cm</Width>
@@ -2223,7 +2249,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox14</rd:DefaultName> <rd:DefaultName>Textbox14</rd:DefaultName>
<Top>0.14111cm</Top> <Top>0.1411cm</Top>
<Left>9.69015cm</Left> <Left>9.69015cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>4.68641cm</Width> <Width>4.68641cm</Width>
@@ -2257,7 +2283,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox14</rd:DefaultName> <rd:DefaultName>Textbox14</rd:DefaultName>
<Top>0.17639cm</Top> <Top>0.17638cm</Top>
<Left>14.62633cm</Left> <Left>14.62633cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>4.8023cm</Width> <Width>4.8023cm</Width>
@@ -2289,7 +2315,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox14</rd:DefaultName> <rd:DefaultName>Textbox14</rd:DefaultName>
<Top>0.68819cm</Top> <Top>0.68818cm</Top>
<Left>0.22015cm</Left> <Left>0.22015cm</Left>
<Height>0.54708cm</Height> <Height>0.54708cm</Height>
<Width>6.21751cm</Width> <Width>6.21751cm</Width>

View File

@@ -57,12 +57,12 @@
Recepción/Entrega de Usados Recepción/Entrega de Usados
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UppAcciones" UpdateMode="Conditional" > <asp:UpdatePanel runat="server" ID="UppAcciones" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:HyperLink ID="HplImprimir" runat="server" Visible="false"><i class="fa fa-print"></i> Imprimir</asp:HyperLink> <asp:HyperLink ID="HplImprimir" runat="server" Visible="false"><i class="fa fa-print"></i> Imprimir</asp:HyperLink>
</li> </li>
<li> <li>
<asp:LinkButton runat="server" ID="LnkAgregarUsado" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkAgregarUsado_Click" <asp:LinkButton runat="server" ID="LnkAgregarUsado" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkAgregarUsado_Click"
Text="<i class='fa fa-plus'></i> Agregar Usado"></asp:LinkButton> Text="<i class='fa fa-plus'></i> Agregar Usado"></asp:LinkButton>
@@ -347,7 +347,7 @@
</div> </div>
<div class="portlet-body"> <div class="portlet-body">
<div class="row"> <div class="row">
<div class="col-md-9"> <div class="col-md-9">
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<ADS:Dropdownlost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm ddlps" data-metodo="getps" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" causesvalidation="true" DataTextField="pscodigo" DataValueField="cveps" Onselectedindexchange="ddlpsajuste_selectedindexchange"></ADS:Dropdownlost> <ADS:Dropdownlost ID="DdlPSAjuste" CssStyle="width: 100%;" CssClass=" form-control input-sm ddlps" data-metodo="getps" IncluyeTodos="false" CssClassDdl="select2me form-control" runat="server" causesvalidation="true" DataTextField="pscodigo" DataValueField="cveps" Onselectedindexchange="ddlpsajuste_selectedindexchange"></ADS:Dropdownlost>
@@ -969,16 +969,22 @@
<div class="modal-body"> <div class="modal-body">
<div class="form-group form-md-line-input "> <div class="form-group form-md-line-input ">
<div class="row">
<label for='<%= txtCantidad.ClientID %>'>Cantidad:</label> <div class="col-md-2" style="width:50%">
<asp:TextBox ID="txtCantidad" CssClass="form-control input-sm" Width="55px" MaxLength="15" runat="server" ValidationGroup="GprAgregarUsado"></asp:TextBox> <label for='<%= txtCantidad.ClientID %>'>Cantidad:</label>
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidad" runat="server" TargetControlID="txtCantidad" FilterType=" Numbers" /> <asp:TextBox ID="txtCantidad" CssClass="form-control input-sm" Width="100%" MaxLength="15" runat="server" ValidationGroup="GprAgregarUsado"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="txtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregarUsado"></asp:RequiredFieldValidator> <ajax:FilteredTextBoxExtender ID="SoloNumerosCantidad" runat="server" TargetControlID="txtCantidad" FilterType=" Numbers" />
<ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender> <asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="txtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregarUsado"></asp:RequiredFieldValidator>
<asp:CustomValidator ID="CVCantidad" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto (6 decimales). Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregarUsado"></asp:CustomValidator> <ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidad" Width="300px"></ajax:ValidatorCalloutExtender> <asp:CustomValidator ID="CVCantidad" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto (6 decimales). Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregarUsado"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-2" style="width:50%">
<asp:CheckBox runat="server" ID="ChkSeguirAgregando" />
<label for="ChkSeguirAgregando">Seguir Registrando</label>
</div>
</div>
<i></i> <i></i>
</div> </div>
<%--<div class="form-group form-md-line-input "> <%--<div class="form-group form-md-line-input ">
<label for='<%= DdlClasificacion.ClientID %>'>Clasificación:</label> <label for='<%= DdlClasificacion.ClientID %>'>Clasificación:</label>

View File

@@ -675,6 +675,8 @@ Partial Class Inventarios_RecepcionUsados
txtCantidad.Text = "" txtCantidad.Text = ""
TxtObservacionesdetalle.Text = "" TxtObservacionesdetalle.Text = ""
UpModalAgregar.Update()
End Sub End Sub
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs) Handles BtnEliminar.Click
@@ -970,7 +972,9 @@ Partial Class Inventarios_RecepcionUsados
' RegistraScript("playsonidito('beep-07.wav')") ' RegistraScript("playsonidito('beep-07.wav')")
'asdasdasdasdasdad 'asdasdasdasdasdad
RegistraScript("$('#DivModalAgregar').modal('hide')", "hidemodal") If Not ChkSeguirAgregando.Checked Then
RegistraScript("$('#DivModalAgregar').modal('hide')", "hidemodal")
End If
Else Else
@@ -1004,7 +1008,9 @@ Partial Class Inventarios_RecepcionUsados
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' ")) CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
RegistraScript("$('#DivModalAgregar').modal('hide')", "hidemodal") If Not ChkSeguirAgregando.Checked Then
RegistraScript("$('#DivModalAgregar').modal('hide')", "hidemodal")
End If
End If End If
End Sub End Sub
@@ -1093,7 +1099,6 @@ Partial Class Inventarios_RecepcionUsados
Dim Resp = ObjRemisionNC.EmitirFactura(False, ObjInventario.IniciaTransacSQL) Dim Resp = ObjRemisionNC.EmitirFactura(False, ObjInventario.IniciaTransacSQL)
For Each mensaje2 As String In Resp.Mensajes For Each mensaje2 As String In Resp.Mensajes
Msg.AppendFormat("<br>{0}", mensaje2) Msg.AppendFormat("<br>{0}", mensaje2)
Next Next
If Resp.TieneError Then ErrorMovInv = True If Resp.TieneError Then ErrorMovInv = True
Alert(Msg.ToString, If(Resp.CveVenta > 0, TipoMensaje.MsgInformacion, TipoMensaje.MsgAdvertencia)) Alert(Msg.ToString, If(Resp.CveVenta > 0, TipoMensaje.MsgInformacion, TipoMensaje.MsgAdvertencia))
@@ -1106,13 +1111,13 @@ Partial Class Inventarios_RecepcionUsados
ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate) ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate)
Else Else
ImporteConcepto = Dr("PU").ToString.ToDouble ImporteConcepto = Dr("PU").ToString.ToDouble
End If End If
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
Mensaje = "Error al guardar los movimientos" Mensaje = "Error al guardar los movimientos"
ErrorMovInv = True ErrorMovInv = True
Exit For Exit For
End If End If
If CveVenta > 0 AndAlso Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True) Then If CveVenta > 0 AndAlso Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True) Then
Mensaje = "Error al actualizar el recibo de los usados" Mensaje = "Error al actualizar el recibo de los usados"
@@ -1134,34 +1139,34 @@ Partial Class Inventarios_RecepcionUsados
End If End If
Next Next
If Not ErrorMovInv Then If Not ErrorMovInv Then
Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio) Msg.AppendFormat("<br/>El Movimiento se registro con el Folio: <b>{0}</b>", ObjInventario.Folio)
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza) If IDPoliza > 0 Then Msg = Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza)
ObjInventario.Commit() ' aplica los movimientos insertados ObjInventario.Commit() ' aplica los movimientos insertados
'Limpia Valores cuando inserta de campos especiales 'Limpia Valores cuando inserta de campos especiales
If UsuarioActual.CveEmpresa = 66 Then If UsuarioActual.CveEmpresa = 66 Then
DdlSubProyecto.SelectedValueExist("-1") DdlSubProyecto.SelectedValueExist("-1")
End If
EnvioCorreo()
CargaPendientesRecibir()
UPDatos.Update()
Else
ObjInventario.RollBack() 'deshace lo insertado
CveMovimiento = 0
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
End If End If
EnvioCorreo()
CargaPendientesRecibir()
UPDatos.Update()
Else
ObjInventario.RollBack() 'deshace lo insertado
CveMovimiento = 0
Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError)
End If End If
End If End If
End If
Catch ex As Exception Catch ex As Exception
ObjInventario.RollBack() 'deshace lo insertado ObjInventario.RollBack() 'deshace lo insertado
CveMovimiento = 0 CveMovimiento = 0
@@ -2028,8 +2033,8 @@ Partial Class Inventarios_RecepcionUsados
Dim Serie As String = "" Dim Serie As String = ""
'Dim ObjFolios As New ClsGralFolios() 'Dim ObjFolios As New ClsGralFolios()
'If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyecto) Then 'If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then
' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo' ")) ' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo' AND CveSubProyecto = {0}", CveSubProyecto))
' If DT.Rows.Count > 0 Then ' If DT.Rows.Count > 0 Then
' Serie = DT.Rows(0)("Serie").ToString() ' Serie = DT.Rows(0)("Serie").ToString()
' Folio = DT.Rows(0)("FActual").ToString() ' Folio = DT.Rows(0)("FActual").ToString()

View File

@@ -24,6 +24,9 @@
Préstamo de Productos Préstamo de Productos
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
<li>
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server"> <asp:UpdatePanel runat="server">

View File

@@ -3,6 +3,7 @@ Option Strict On
Imports System.Data Imports System.Data
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Inventarios_ResguardoMaterial Partial Class Inventarios_ResguardoMaterial
Inherits ClsPaginas Inherits ClsPaginas
@@ -1210,7 +1211,20 @@ Partial Class Inventarios_ResguardoMaterial
#End Region #End Region
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
Imprime("Excel")
End Sub
Private Sub Imprime(Formato As String)
If DtMovimientosLiberacion IsNot Nothing Then
Dim params As New List(Of ReportParameter)
ImprimirPDF("Empresas/Grales/Formatos/ResguardoMaterial.rdlc", DtMovimientosLiberacion, params, String.Format("RepResguardoMaterial-{0}", Now.ToDateTime.ToShortDateString), Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
End Sub
End Class End Class

File diff suppressed because it is too large Load Diff

View File

@@ -422,7 +422,7 @@ Partial Class Inventarios_TraspasoAlmacen
SiguienteFolio(If(ChkTransitorio.Checked, 9, 8)) SiguienteFolio(If(ChkTransitorio.Checked, 9, 8))
'DdlProducto.DataBind() 'DdlProducto.DataBind()
CargarCamiones()
End Sub End Sub
Private Sub CargaAlmacenOrigen() Private Sub CargaAlmacenOrigen()
DdlAlmacenOrigen.Enabled = True DdlAlmacenOrigen.Enabled = True
@@ -2779,4 +2779,22 @@ Partial Class Inventarios_TraspasoAlmacen
Return dataTable Return dataTable
End Function End Function
Public Sub CargarCamiones()
Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
DdlUnidadCamion.DataSource = ObjInventarios.DtResultados
End If
ObjInventarios.Dispose()
DdlUnidadCamion.DataBind()
End Sub
Public Sub BtnAgregarCamion_Click(sender As Object, e As EventArgs) Handles BtnAgregarCamion.Click
Dim ObjInventarios As New ClsInventarios
If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa) Then
RegistraScript("$('#DivAgregarNuevoCamion').modal('hide');")
CargarCamiones()
TxtPlacaNuevo.Text = ""
TxtEspecificacionNuevo.Text = ""
End If
ObjInventarios.Dispose()
End Sub
End Class End Class

View File

@@ -21240,20 +21240,24 @@ Partial Class Ventas
Dim ImporteReferencia As Decimal = If(DdlNCNivelImporte.SelectedValue.ToEntero = 1, Total, SubTotal) Dim ImporteReferencia As Decimal = If(DdlNCNivelImporte.SelectedValue.ToEntero = 1, Total, SubTotal)
Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100 Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100
Dim FiltroStr As String = "" Dim FiltroStr As String = ""
Dim importePuTemp As Decimal = 0
For Each Dr As DataRow In DtImpuestosLocal.Rows For Each Dr As DataRow In DtImpuestosLocal.Rows
FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("CveSubProyecto")) FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("CveSubProyecto"))
Dr("ImporteTotal") = Math.Round(Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr) - TmpDT.SUM("Descuento", FiltroStr)), 2) importePuTemp = (Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr) - TmpDT.SUM("Descuento", FiltroStr))).ToDecimal
Dr("ImporteTotal") = importePuTemp.RoundSQL()
'Dr("ImporteIVA") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeIVA").ToString().ToDecimal()).RoundSQL(2)
'Dr("ImporteRetIVA") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2)
'Dr("ImporteRetISR") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2)
'Dr("ImporteIEPS") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2)
Dr("ImporteIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIVA", FiltroStr), 2) Dr("ImporteIEPS") = (importePuTemp * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2)
Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2) Dr("ImporteIVA") = ((importePuTemp + Dr("ImporteIEPS").ToString.ToDecimal) * Dr("PorcentajeIVA").ToString.ToDecimal)
Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2) Dr("ImporteRetIVA") = (importePuTemp * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2)
Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", FiltroStr), 2) Dr("ImporteRetISR") = (importePuTemp * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2)
Dr("ImportePU") = Dr("ImporteTotal").ToString.ToDecimal '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal)
'Dr("ImporteIVA") = (Porcentaje * TmpDT.SUM("ImporteIVA", FiltroStr)).RoundSQL(2)
'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2)
'Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2)
'Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", FiltroStr), 2)
Dr("ImportePU") = Dr("ImporteTotal").ToString.ToDecimal.RoundSQL(2) '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal)
Next Next
'codigo para ajuste de centavo, si el importe total no cuadra con los totales 'codigo para ajuste de centavo, si el importe total no cuadra con los totales
Dim difTmp As Decimal = Importe - (DtImpuestosLocal.SUMD("ImporteTotal") + DtImpuestosLocal.SUMD("ImporteIVA") + DtImpuestosLocal.SUMD("ImporteIEPS") - DtImpuestosLocal.SUMD("ImporteRetIVA") - DtImpuestosLocal.SUMD("ImporteRetISR")) Dim difTmp As Decimal = Importe - (DtImpuestosLocal.SUMD("ImporteTotal") + DtImpuestosLocal.SUMD("ImporteIVA") + DtImpuestosLocal.SUMD("ImporteIEPS") - DtImpuestosLocal.SUMD("ImporteRetIVA") - DtImpuestosLocal.SUMD("ImporteRetISR"))
@@ -24101,39 +24105,45 @@ Partial Class Ventas
#End Region #End Region
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then If CveVenta <= 0 Then
For Each RowServicio As DataRow In TmpDT.Rows If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
Dim tClienteRetIVA = ClienteRetIVA If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then
If tClienteRetIVA <= 0 Then For Each RowServicio As DataRow In TmpDT.Rows
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then Dim tClienteRetIVA = ClienteRetIVA
tClienteRetIVA = 0.106667D If tClienteRetIVA <= 0 Then
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
tClienteRetIVA = 0.04D tClienteRetIVA = 0.106667D
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
tClienteRetIVA = 0.06D tClienteRetIVA = 0.04D
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then
tClienteRetIVA = 0.06D
End If
ViewState("ClienteRetIVA") = tClienteRetIVA
End If End If
ViewState("ClienteRetIVA") = tClienteRetIVA
Dim TotalCalculableImpuestos As Decimal = (RowServicio("Cantidad").ToString().ToDecimal() * RowServicio("PU").ToString().ToDecimal()) - RowServicio("Descuento").ToString().ToDecimal()
RowServicio("ImporteRetIVA") = (TotalCalculableImpuestos * ClienteRetIVA).RoundSQL()
RowServicio("PorcentajeRetIVA") = ClienteRetIVA
Next
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2)
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
If PorcentajeRetIVA > 0 Then
DdlTipoRetencion.Visible = True
End If End If
Dim TotalCalculableImpuestos As Decimal = (RowServicio("Cantidad").ToString().ToDecimal() * RowServicio("PU").ToString().ToDecimal()) - RowServicio("Descuento").ToString().ToDecimal() GvPS.DataSource = TmpDT
RowServicio("ImporteRetIVA") = (TotalCalculableImpuestos * ClienteRetIVA).RoundSQL() GvPS.DataBind()
RowServicio("PorcentajeRetIVA") = ClienteRetIVA
Next UpPS.Update()
TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2)
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
If PorcentajeRetIVA > 0 Then
DdlTipoRetencion.Visible = True
End If End If
GvPS.DataSource = TmpDT
GvPS.DataBind()
UpPS.Update()
End If End If
End If End If
End Sub End Sub