Cambios de formatos de traspaso, carta porte,etc

This commit is contained in:
janeth arvizu
2019-09-06 12:52:53 -07:00
parent 4cd6edf2e8
commit ed4a6edab1
7 changed files with 235 additions and 71 deletions

View File

@@ -6247,9 +6247,38 @@ Public Class ClsPaginas
Dim AlmOrigen As String = ""
Dim AlmDestino As String = ""
Dim SBDireccionO As New StringBuilder()
Dim SBDireccionD As New StringBuilder()
If ObjInv.GetMovimientos(Vta.Inv_CveMovimiento.ToEntero, -1, -1, UsuarioActual.CveEmpresa) Then
AlmOrigen = ObjInv.DtResultados.FiltroPrimeroValor("AlmacenOrigen")
AlmDestino = ObjInv.DtResultados.FiltroPrimeroValor("AlmacenDestino")
If ObjInv.DtResultados.Rows.Count > 0 Then
Dim Dr As DataRow = ObjInv.DtResultados.Rows(0)
If Dr IsNot Nothing Then
AlmOrigen = Dr("AlmacenOrigen").ToString
AlmDestino = Dr("AlmacenDestino").ToString
If Dr("CalleOrigen").ToString.Length > 0 Then
SBDireccionO.AppendFormat("{0}", Dr("CalleOrigen").ToString)
If Dr("NoExtOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", No.Ext: {0}", Dr("NoExtOrigen").ToString)
If Dr("ColoniaOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Col: {0}", Dr("ColoniaOrigen").ToString)
If Dr("CPOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", CP: {0}", Dr("CPOrigen").ToString)
If Dr("LocalidadOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Loc: {0}", Dr("LocalidadOrigen").ToString)
If Dr("MunicipioOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Cd: {0}", Dr("MunicipioOrigen").ToString)
If Dr("EstadoOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Edo: {0}", Dr("EstadoOrigen").ToString)
If Dr("PaisOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", País: {0}", Dr("PaisOrigen").ToString)
End If
If Dr("CalleDestino").ToString.Length > 0 Then
SBDireccionD.AppendFormat("{0}", Dr("CalleDestino").ToString)
If Dr("NoExtDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", No.Ext: {0}", Dr("NoExtDestino").ToString)
If Dr("ColoniaDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Col: {0}", Dr("ColoniaDestino").ToString)
If Dr("CPDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", CP: {0}", Dr("CPDestino").ToString)
If Dr("LocalidadDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Loc: {0}", Dr("LocalidadDestino").ToString)
If Dr("MunicipioDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Cd: {0}", Dr("MunicipioDestino").ToString)
If Dr("EstadoDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Edo: {0}", Dr("EstadoDestino").ToString)
If Dr("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString)
End If
End If
End If
End If
'GENERAL
@@ -6259,6 +6288,8 @@ Public Class ClsPaginas
params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
params.Add(New ReportParameter("AlmOrigen", AlmOrigen))
params.Add(New ReportParameter("AlmDestino", AlmDestino))
params.Add(New ReportParameter("DireccionOrigen", SBDireccionO.ToString))
params.Add(New ReportParameter("DireccionDestino", SBDireccionD.ToString))
RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)

View File

@@ -654,8 +654,6 @@ Partial Class PopUpVerFactura
Dim LugarFecha As String = ""
Dim Origen As String = ""
Dim Destino As String = ""
Dim Domicilio As String = ""
Dim DomicilioDestino As String = ""
Dim Observaciones As String = ""
Dim Chofer As String = ""
Dim CveChofer As String
@@ -663,6 +661,10 @@ Partial Class PopUpVerFactura
Dim Recibio As String = ""
Dim FechaEntrega As String = ""
Dim EspecifUnidad As String = ""
Dim SBDireccionO As New StringBuilder()
Dim SBDireccionD As New StringBuilder()
If ObjInv.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) Then
If ObjInv.DtResultados.Rows.Count > 0 Then
Dim Dr As DataRow = ObjInv.DtResultados.Rows(0)
@@ -672,8 +674,6 @@ Partial Class PopUpVerFactura
LugarFecha = $"{Dr("MunicipioOrigen").ToString}, {Dr("EstadoOrigen").ToString} {Dr("FechaMovto").ToString.ToDate.ToShortDateString}"
Origen = Dr("AlmacenOrigen").ToString
Destino = Dr("AlmacenDestino").ToString
Domicilio = DomicilioSucursal
DomicilioDestino = $"{Dr("CalleDestino").ToString} #{Dr("NoExtDestino").ToString}, {Dr("ColoniaDestino").ToString} "
Observaciones = Dr("Observaciones").ToString
CveChofer = Dr("CveChofer").ToString
If ObjAcar.GetChofer(CveChofer.ToEntero, UsuarioActual.CveEmpresa, -1, -1) Then
@@ -683,6 +683,27 @@ Partial Class PopUpVerFactura
Recibio = Dr("Recibio").ToString
FechaEntrega = Dr("FechaEntrega").ToString
EspecifUnidad = Dr("EspecificacionUnidad").ToString
If Dr("CalleOrigen").ToString.Length > 0 Then
SBDireccionO.AppendFormat("{0}", Dr("CalleOrigen").ToString)
If Dr("NoExtOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", No.Ext: {0}", Dr("NoExtOrigen").ToString)
If Dr("ColoniaOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Col: {0}", Dr("ColoniaOrigen").ToString)
If Dr("CPOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", CP: {0}", Dr("CPOrigen").ToString)
If Dr("LocalidadOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Loc: {0}", Dr("LocalidadOrigen").ToString)
If Dr("MunicipioOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Cd: {0}", Dr("MunicipioOrigen").ToString)
If Dr("EstadoOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Edo: {0}", Dr("EstadoOrigen").ToString)
If Dr("PaisOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", País: {0}", Dr("PaisOrigen").ToString)
End If
If Dr("CalleDestino").ToString.Length > 0 Then
SBDireccionD.AppendFormat("{0}", Dr("CalleDestino").ToString)
If Dr("NoExtDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", No.Ext: {0}", Dr("NoExtDestino").ToString)
If Dr("ColoniaDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Col: {0}", Dr("ColoniaDestino").ToString)
If Dr("CPDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", CP: {0}", Dr("CPDestino").ToString)
If Dr("LocalidadDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Loc: {0}", Dr("LocalidadDestino").ToString)
If Dr("MunicipioDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Cd: {0}", Dr("MunicipioDestino").ToString)
If Dr("EstadoDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Edo: {0}", Dr("EstadoDestino").ToString)
If Dr("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString)
End If
End If
End If
End If
@@ -712,8 +733,6 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("LugarFecha", LugarFecha))
params.Add(New ReportParameter("Origen", Origen))
params.Add(New ReportParameter("Destino", Destino))
params.Add(New ReportParameter("Domicilio", Domicilio))
params.Add(New ReportParameter("DomicilioDestino", DomicilioDestino))
params.Add(New ReportParameter("Remitente", ""))
params.Add(New ReportParameter("Destinatario", ""))
params.Add(New ReportParameter("Observaciones", Observaciones))
@@ -722,6 +741,8 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("Recibio", Recibio))
params.Add(New ReportParameter("FechaEntrega", FechaEntrega))
params.Add(New ReportParameter("EspecifUnidad", EspecifUnidad))
params.Add(New ReportParameter("DireccionOrigen", SBDireccionO.ToString))
params.Add(New ReportParameter("DireccionDestino", SBDireccionD.ToString))
ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
End If
End If

View File

@@ -12,13 +12,16 @@
<Width>2.37101cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.34246cm</Width>
<Width>2.03347cm</Width>
</TablixColumn>
<TablixColumn>
<Width>11.61627cm</Width>
<Width>8.84221cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.6186cm</Width>
<Width>2.24818cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.35602cm</Width>
</TablixColumn>
</TablixColumns>
<TablixRows>
@@ -261,6 +264,52 @@
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox12">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Observaciones</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox12</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<TopBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>1pt</Width>
</BottomBorder>
<BackgroundColor>#008204</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
@@ -434,6 +483,39 @@
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Observaciones">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!Observaciones.Value</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Observaciones</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<VerticalAlign>Bottom</VerticalAlign>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
</TablixRows>
@@ -445,6 +527,7 @@
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
@@ -461,7 +544,7 @@
<Top>0.14111cm</Top>
<Left>0.10068cm</Left>
<Height>0.84327cm</Height>
<Width>20.32469cm</Width>
<Width>20.22724cm</Width>
<Style>
<Border>
<Style>None</Style>
@@ -1631,6 +1714,10 @@ Hermosillo, Sonora, Mexico</Value>
<DataField>SerieLote</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Observaciones">
<DataField>Observaciones</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
<rd:DataSetInfo>
<rd:DataSetName>DsInventarios</rd:DataSetName>

View File

@@ -1067,30 +1067,33 @@
</Border>
</Style>
</Image>
<Textbox Name="Textbox2">
<Textbox Name="Textbox39">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Almacen Origen:</Value>
<Value>Almacén Origen: </Value>
<Style>
<FontSize>9pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!AlmOrigen.Value</Value>
<Style>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>2.84726cm</Top>
<Left>6.37328cm</Left>
<Height>0.6cm</Height>
<Width>2.84396cm</Width>
<rd:DefaultName>Textbox39</rd:DefaultName>
<Top>3.26512cm</Top>
<Left>4.27242cm</Left>
<Height>0.45889cm</Height>
<Width>8.13969cm</Width>
<ZIndex>9</ZIndex>
<Style>
<Border>
@@ -1102,31 +1105,37 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox3">
<Textbox Name="Textbox37">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Almacen Destino:</Value>
<Value>Almacén Destino: </Value>
<Style>
<FontSize>9pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!AlmDestino.Value</Value>
<Style>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>3.44726cm</Top>
<Left>6.37328cm</Left>
<Height>0.6cm</Height>
<Width>2.84396cm</Width>
<rd:DefaultName>Textbox37</rd:DefaultName>
<Top>3.25808cm</Top>
<Left>12.46426cm</Left>
<Height>0.46593cm</Height>
<Width>8.38415cm</Width>
<ZIndex>10</ZIndex>
<Visibility>
<Hidden>=Microsoft.VisualBasic.Interaction.IIF(Parameters!AlmDestino.Value = "", True, False)</Hidden>
</Visibility>
<Style>
<Border>
<Style>None</Style>
@@ -1137,29 +1146,27 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox4">
<Textbox Name="Textbox10">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!AlmOrigen.Value</Value>
<Value>=Parameters!DireccionOrigen.Value</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Top>2.84726cm</Top>
<Left>9.21724cm</Left>
<Height>0.6cm</Height>
<Width>5.66209cm</Width>
<rd:DefaultName>Textbox9</rd:DefaultName>
<Top>3.75929cm</Top>
<Left>4.27242cm</Left>
<Height>0.99688cm</Height>
<Width>8.13969cm</Width>
<ZIndex>11</ZIndex>
<Style>
<Border>
@@ -1171,29 +1178,27 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox5">
<Textbox Name="Textbox11">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!AlmDestino.Value</Value>
<Value>=Parameters!DireccionDestino.Value</Value>
<Style>
<FontSize>9pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Left</TextAlign>
</Style>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox4</rd:DefaultName>
<Top>3.44726cm</Top>
<Left>9.21724cm</Left>
<Height>0.6cm</Height>
<Width>5.66209cm</Width>
<rd:DefaultName>Textbox11</rd:DefaultName>
<Top>3.75929cm</Top>
<Left>12.46913cm</Left>
<Height>0.99688cm</Height>
<Width>8.38415cm</Width>
<ZIndex>12</ZIndex>
<Style>
<Border>
@@ -2010,6 +2015,18 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="DireccionOrigen">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="DireccionDestino">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="Logo119">

View File

@@ -488,7 +488,7 @@
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Remitente.Value</Value>
<Value>=Parameters!NombreEmpresa.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
@@ -528,7 +528,7 @@
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Domicilio.Value</Value>
<Value>=Parameters!DireccionOrigen.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
@@ -668,7 +668,7 @@
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Destinatario.Value</Value>
<Value>=Parameters!NombreEmpresa.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
@@ -708,7 +708,7 @@
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!DomicilioDestino.Value</Value>
<Value>=Parameters!DireccionDestino.Value</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8pt</FontSize>
@@ -2189,13 +2189,13 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Domicilio">
<ReportParameter Name="DireccionOrigen">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="DomicilioDestino">
<ReportParameter Name="DireccionDestino">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>

View File

@@ -294,7 +294,8 @@
<th width="500px">Clasificación
<br />
Producto
</th>
</th>
<th width="100px">Observaciones</th>
<th style="width: 88px" runat="server" id="ThSerieLote" visible="false">Serie - Lote </th>
<th style="width: 88px" runat="server" id="ThLote" visible="false">Lote</th>
<th style="width: 88px" runat="server" id="ThBatch" visible="false">Batch</th>
@@ -330,6 +331,9 @@
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td>
<asp:TextBox ID="TxtnObservaciones" CssClass="form-control input-sm" runat="server" Width="100px"></asp:TextBox>
</td>
<td runat="server" id="TdSerieLote" visible="false">
<asp:Panel runat="server" DefaultButton="BtnSerieAddNew">
<asp:TextBox ID="TxtnSerieLote" Visible="false" runat="server" Width="80px"></asp:TextBox>
@@ -363,6 +367,7 @@
<%-- <asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-Width="100px" />--%>
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="86px" />
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="500px" />
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="90px" />
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="90px" />
<asp:BoundField HeaderText="Batch" DataField="Batch" ItemStyle-Width="90px" />

View File

@@ -240,6 +240,7 @@ Partial Class Inventarios_TraspasoAlmacen
dt.Columns.Add("CvePS", Type.GetType("System.Int32"))
dt.Columns.Add("CveAF", Type.GetType("System.Int32"))
dt.Columns.Add("PS")
dt.Columns.Add("Observaciones")
dt.Columns.Add("SerieLote")
dt.Columns.Add("Lote")
dt.Columns.Add("Batch")
@@ -512,7 +513,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, "-1"), If(TxtnLote.Visible, TxtnLote.Text, "-1"), If(TxtnBatch.Visible, TxtnBatch.Text, "-1"))
If Valido Then
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, ""), If(TxtnLote.Visible, TxtnLote.Text, ""), If(TxtnBatch.Visible, TxtnBatch.Text, ""), FuncionalidadSinSerie)
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, If(TxtnSerieLote.Visible, TxtnSerieLote.Text, ""), If(TxtnLote.Visible, TxtnLote.Text, ""), If(TxtnBatch.Visible, TxtnBatch.Text, ""), FuncionalidadSinSerie)
End If
End If
@@ -537,7 +538,7 @@ Partial Class Inventarios_TraspasoAlmacen
Return Retorno
End Function
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional SerieLote As String = "", Optional Lote As String = "", Optional Batch As String = "", Optional Limpia As Boolean = True)
Private Sub AgregarPS(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional Observaciones As String = "", Optional SerieLote As String = "", Optional Lote As String = "", Optional Batch As String = "", Optional Limpia As Boolean = True)
If Cantidad <= 0 Then
Alert("La cantidad debe ser mayor a cero (0). Por favor verifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
@@ -557,6 +558,7 @@ Partial Class Inventarios_TraspasoAlmacen
registro.Item("UnidadMedida") = DrUM("UnidadMedida")
registro.Item("CvePS") = CvePS
registro.Item("PS") = DrPS("PSCodigo")
registro.Item("Observaciones") = Observaciones
registro.Item("SerieLote") = SerieLote
registro.Item("Lote") = Lote
registro.Item("Batch") = Batch
@@ -593,6 +595,7 @@ Partial Class Inventarios_TraspasoAlmacen
DdlClasificacion.SelectedValue = "-1"
DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty)
txtCantidad.Text = ""
TxtnObservaciones.Text = ""
TxtnSerieLote.Text = ""
TxtnSerieLote.Visible = False
TxtnLote.Text = ""
@@ -759,7 +762,7 @@ Partial Class Inventarios_TraspasoAlmacen
Else
Dim Cont As Integer = 0
For Each Dr As DataRow In DtMovimientos.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, Observaciones:=Dr("Observaciones").ToString) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de salida"
Exit For
@@ -794,7 +797,7 @@ Partial Class Inventarios_TraspasoAlmacen
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
Dim Cont As Integer = 0
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, Observaciones:=Dr("Observaciones").ToString) Then
ErrorMovInv = True
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
Exit For
@@ -1089,34 +1092,34 @@ Partial Class Inventarios_TraspasoAlmacen
TxtnSerieLote.Visible = False
ThSerieLote.Visible = False
TdSerieLote.Visible = False
GvDatos.Columns(4).Visible = False
GvDatos.Columns(5).Visible = False
TxtnLote.Visible = False
ThLote.Visible = False
TdLote.Visible = False
GvDatos.Columns(5).Visible = False
GvDatos.Columns(6).Visible = False
TxtnBatch.Visible = False
ThBatch.Visible = False
TdBatch.Visible = False
GvDatos.Columns(6).Visible = False
GvDatos.Columns(7).Visible = False
If DtTemp.MAX("SerieLote").ToString <> "" Then
TxtnSerieLote.Visible = True
ThSerieLote.Visible = True
TdSerieLote.Visible = True
GvDatos.Columns(4).Visible = True
GvDatos.Columns(5).Visible = True
End If
If DtTemp.MAX("Lote").ToString <> "" Then
TxtnLote.Visible = True
ThLote.Visible = True
TdLote.Visible = True
GvDatos.Columns(5).Visible = True
GvDatos.Columns(6).Visible = True
TxtnBatch.Visible = True
ThBatch.Visible = True
TdBatch.Visible = True
GvDatos.Columns(6).Visible = True
GvDatos.Columns(7).Visible = True
End If
End Sub