Merge branch 'master' of http://jperez@adsistemasof.sytes.net:8383/SIG.git
This commit is contained in:
@@ -3155,14 +3155,15 @@ Public Class ClsBancos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetLayoutFyE(CveCuenta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetLayoutFyE(CveCuenta As Integer, CveEmpresa As Integer, Optional PorGrupos As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Banc_LayoutFyE")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@PorGrupos", SqlDbType.Bit).Value = PorGrupos
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -3173,9 +3174,9 @@ Public Class ClsBancos
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "F L U C T U A C I O N E S"
|
||||
Public Function GetFluctuacionesBitacora(CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1496,6 +1496,34 @@ Public Class ClsGenerales
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito As Integer, EstatusPagoElectronicoGrupos As Boolean) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Gral_CuentasDepositosUpdateEstatusPagoElectronicoGrupos")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveCuentaDeposito", SqlDbType.VarChar).Value = CveCuentaDeposito
|
||||
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
|
||||
End With
|
||||
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("Ya existe un registro con el mismo nombre", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar los cambios", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar los cambios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "T I P O - C A M B I O"
|
||||
|
||||
@@ -1817,7 +1817,7 @@ Public Class ClsInventarios
|
||||
CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional CveTipoAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||
Optional FechaMovto As String = "-1", Optional SerieLote As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, Optional Lote As String = "-1", Optional Batch As String = "-1",
|
||||
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Boolean
|
||||
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional Caducidad As Date = MinFecha) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_ExistenciasGet")
|
||||
|
||||
@@ -1839,6 +1839,7 @@ Public Class ClsInventarios
|
||||
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
|
||||
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
||||
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
||||
.Add("@Caducidad", SqlDbType.Date).Value = Caducidad
|
||||
.Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output
|
||||
End With
|
||||
Try
|
||||
@@ -4922,6 +4923,28 @@ Public Class ClsInventarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#Region "SUGERENCIAS SALIDA DE ALMACEN"
|
||||
|
||||
Public Function GetSugerenciasSalidaAlmacen(CveVenta As Integer, CveAlmacen As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_SugerenciasSalidasGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las sugerencias para la salida de almacen.", 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)
|
||||
|
||||
@@ -3801,6 +3801,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Bancos/Creditos.aspx".ToUpper(), 318)
|
||||
PaginaDict.Add("/Bancos/PagoElectronico.aspx".ToUpper(), 324)
|
||||
PaginaDict.Add("/Bancos/RepProgramaciones.aspx".ToUpper(), 323)
|
||||
PaginaDict.Add("/Bancos/PagoElectronicoGrupos.aspx".ToUpper(), 1318)
|
||||
|
||||
PaginaDict.Add("/Bancos/PopIE.aspx".ToUpper(), 153)
|
||||
PaginaDict.Add("/Bancos/PopIEVentas.aspx".ToUpper(), 153)
|
||||
@@ -4709,7 +4710,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/PV/PVRepCompras.aspx".ToUpper(), 272)
|
||||
PaginaDict.Add("/PV/PVRepVentasCompras.aspx".ToUpper(), 273)
|
||||
|
||||
PaginaDict.Add("/Bancos/PagoElectronicoGrupos.aspx".ToUpper(), -1)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,11 +14,7 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabGenerales" runat="server" HeaderText="Generación">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -170,7 +166,7 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<%-- <div class="col-md-6">
|
||||
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
@@ -220,7 +216,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2513,20 +2513,31 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
|
||||
|
||||
|
||||
'''Permitir pago sin cuneta deposito
|
||||
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados '.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'")
|
||||
trCuentaDeposito.Visible = True
|
||||
BtnIEGuardar.ToolTip = ""
|
||||
Else
|
||||
Alert("El proveedor no tiene cuentas deposito registradas.")
|
||||
End If
|
||||
|
||||
'If Dep.DtResultados.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||
' trCuentaDeposito.Visible = True
|
||||
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||
'Else
|
||||
' BtnIEGuardar.Enabled = False
|
||||
' Alert("El proveedor no tiene ninguna cuenta deposito registrada ", TipoMensaje.MsgAdvertencia)
|
||||
'End If
|
||||
'Alert("El proveedor no tiene cuentas deposito registradas.")
|
||||
|
||||
BtnIEGuardar.Enabled = False
|
||||
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'If Dep.DtResultados.FiltraParametros("EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||
' trCuentaDeposito.Visible = True
|
||||
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||
'Else
|
||||
' BtnIEGuardar.Enabled = False
|
||||
' Alert("El proveedor no tiene ninguna cuenta deposito registrada ", TipoMensaje.MsgAdvertencia)
|
||||
'End If
|
||||
UpGuardar.Update()
|
||||
Else
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
Almacén:
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" DataTextField="Almacen" AppendDataBoundItems="true" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="320px"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlAlmacen" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlAlmacen_SelectedIndexChanged" DataTextField="Almacen" AppendDataBoundItems="true" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="320px"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVAlmacen" runat="server" ControlToValidate="DdlAlmacen" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEAlmacen" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacen" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
@@ -418,7 +418,7 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:GridView ID="GvInv" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
||||
DataKeyNames="EntregaDirecta,Consec,CodigoBarras,CvePS,CveUM,PU,CantidadC,CantidadF,UM,PS,CveCompraDetalle,CveOrdenCompraDetalle,PUExtranjero,AplicaSerieLote,CveClasificacion,Codigo,CveVentaDetalle,CostoIndirecto,CveTamaño" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
DataKeyNames="EntregaDirecta,Consec,CodigoBarras,CvePS,CveUM,PU,CantidadC,CantidadF,UM,PS,CveCompraDetalle,CveOrdenCompraDetalle,PUExtranjero,AplicaSerieLote,CveClasificacion,Codigo,CveVentaDetalle,CostoIndirecto,CveTamaño,Lote" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
<HeaderStyle Height="58px" />
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -445,11 +445,30 @@
|
||||
<asp:BoundField HeaderText="C.I." DataField="CostoIndirecto" DataFormatString="{0:###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" DataValueField="CveSeccion" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" DataValueField="CveSeccion" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control" runat="server" Visible="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server" Visible="false"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
@@ -463,6 +482,13 @@
|
||||
<asp:Label ID="LbTotal" Text="" runat="server"></asp:Label>
|
||||
</FooterTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Dividir" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtDividir" Width="30px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:Button runat="server" ID="BtnDividir" Text="Dividir" OnClick="Dividir" Style="display: none;" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -568,7 +594,7 @@
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
|
||||
<asp:HiddenField runat="server" ClientIDMode="Static" ID="HdnCantidadMovimiento" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -685,13 +711,13 @@
|
||||
<asp:TextBox ID="TxtCantidadSeccion" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvCantidadSeccion" runat="server" ControlToValidate="TxtCantidadSeccion" 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="VgmSeccion"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoCantidadSeccion" runat="server" HighlightCssClass="vco" TargetControlID="RfvCantidadSeccion"></ajax:ValidatorCalloutExtender>
|
||||
<asp:RangeValidator ID="RVTxtCantidad" runat="server" ControlToValidate="TxtCantidadSeccion" MinimumValue="0" MaximumValue="1" Type="Double" Text="<b><span style='text-decoration: underline'>ERROR:</span></b><br />No cuenta con la cantidad suficiente." ValidationGroup="VgmSeccion" />
|
||||
<asp:RangeValidator ID="RVTxtCantidad" runat="server" ControlToValidate="TxtCantidadSeccion" MinimumValue="0" MaximumValue="1" Type="Double" Text="<b><span style='text-decoration: underline'>ERROR:</span></b><br />No cuenta con la cantidad suficiente." ValidationGroup="VgmSeccion" />
|
||||
<label for="<%= TxtCantidadSeccion.ClientID.ToString()%>">Cantidad:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacen" runat="server" ControlToValidate="DdlSeccionAlmacen" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoSeccionAlmacen" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacen"></ajax:ValidatorCalloutExtender>
|
||||
@@ -705,8 +731,8 @@
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvSeccionAlmacen" runat="server" GridLines="None" ShowHeaderWhenEmpty="true"
|
||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true"
|
||||
<asp:GridView ID="GvSeccionAlmacen" runat="server" GridLines="None" ShowHeaderWhenEmpty="true"
|
||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true"
|
||||
AutoGenerateColumns="False" EmptyDataText="No se han agregado datos"
|
||||
DataKeyNames="Consec">
|
||||
<Columns>
|
||||
@@ -1135,7 +1161,28 @@
|
||||
$("#DivCantidadEspecial").show(200);
|
||||
}
|
||||
|
||||
function Dividir(t) {
|
||||
$get("HdnCantidadMovimiento").value = $get(t).value;
|
||||
}
|
||||
|
||||
function LimitaCantidad(C, textbox, button) {
|
||||
|
||||
// var contenedor = $(textbox).parent().find("#" + buttonIdDiv);
|
||||
|
||||
if (ToDouble(textbox.value) >= C) {
|
||||
textbox.value = "";
|
||||
}
|
||||
|
||||
if (parseFloat(textbox.value) > 0) {
|
||||
$get(button).style.display = "";
|
||||
//$(contenedor).show();
|
||||
}
|
||||
else {
|
||||
$get(button).style.display = "none";
|
||||
//$(contenedor).hide();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -416,6 +416,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="btn-group pull-right">
|
||||
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Secciones" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--GV DATOS--%>
|
||||
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
||||
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||
@@ -484,11 +492,46 @@
|
||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" DataValueField="CveSeccion" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control" runat="server" Visible="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server" Visible="false"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Dividir" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtDividir" Width="30px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:Button runat="server" ID="BtnDividir" Text="Dividir" OnClick="Dividir" Style="display: none;" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<asp:HiddenField runat="server" ClientIDMode="Static" ID="HdnCantidadMovimiento" />
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -879,6 +922,35 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="ModalVerSugerencias" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpVerSugerencias" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Sugerencias</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:GridView ID="GvSugerencias" runat="server" EmptyDataText="No se encontraron registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Sección Almacen" DataField="Seccion" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Caducidad" DataField="Caducidad" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnAplicarSugerencias" OnClick="BtnAplicarSugerencias_Click" runat="server" ClientIDMode="Static" Text="Aplicar" CssClass="btn btn-primary" />
|
||||
<button id="CancelarVerSugerencias" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
||||
@@ -931,6 +1003,29 @@
|
||||
$('#TxtCantidadEspecialDiv').focus()
|
||||
}
|
||||
|
||||
function Dividir(t) {
|
||||
$get("HdnCantidadMovimiento").value = $get(t).value;
|
||||
}
|
||||
|
||||
function LimitaCantidad(C, textbox, button) {
|
||||
|
||||
// var contenedor = $(textbox).parent().find("#" + buttonIdDiv);
|
||||
|
||||
if (ToDouble(textbox.value) >= C) {
|
||||
textbox.value = "";
|
||||
}
|
||||
|
||||
if (parseFloat(textbox.value) > 0) {
|
||||
$get(button).style.display = "";
|
||||
//$(contenedor).show();
|
||||
}
|
||||
else {
|
||||
$get(button).style.display = "none";
|
||||
//$(contenedor).hide();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -34,6 +34,14 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
ViewState("DtDatosDetalle") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtDatosSugerencias As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatosSugerencias"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatosSugerencias") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtDatosDetalleLote As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatosDetalleLote"), DataTable)
|
||||
@@ -287,6 +295,9 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
CveVendedor = -1
|
||||
CveCliente = -1
|
||||
CveSubProyecto = -1
|
||||
|
||||
DtDatosSugerencias = New DataTable
|
||||
|
||||
Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2)"
|
||||
|
||||
If (UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1") Then
|
||||
@@ -621,6 +632,30 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
|
||||
End If
|
||||
|
||||
DtDatos.Columns.Add("AplicaSeccion", GetType(Boolean))
|
||||
DtDatos.Columns.Add("AplicaSerie", GetType(Boolean))
|
||||
DtDatos.Columns.Add("AplicaLote", GetType(Boolean))
|
||||
DtDatos.Columns.Add("AplicaCaducidad", GetType(Boolean))
|
||||
If Not DtDatos.Columns.Contains("Lote") Then
|
||||
DtDatos.Columns.Add("Lote", GetType(String))
|
||||
End If
|
||||
If Not DtDatos.Columns.Contains("CveSeccion") Then
|
||||
DtDatos.Columns.Add("CveSeccion", GetType(Integer))
|
||||
End If
|
||||
If Not DtDatos.Columns.Contains("Caducidad") Then
|
||||
DtDatos.Columns.Add("Caducidad", GetType(Date))
|
||||
End If
|
||||
If Not DtDatos.Columns.Contains("Seleccionado") Then
|
||||
DtDatos.Columns.Add("Seleccionado", GetType(Boolean))
|
||||
End If
|
||||
If Not DtDatos.Columns.Contains("CantidadSeleccionada") Then
|
||||
DtDatos.Columns.Add("CantidadSeleccionada", GetType(Double))
|
||||
End If
|
||||
|
||||
For Each Dr As DataRow In DtDatos.Rows
|
||||
Dr("Caducidad") = Now
|
||||
Next
|
||||
|
||||
'TxtFecha.Text = If(EsDevolucionVenta = 1, Now.ToShortDateString, DtDatos.Rows(0)("Fecha").ToString)
|
||||
End If
|
||||
|
||||
@@ -775,6 +810,23 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
Private Sub CargaGvDatos()
|
||||
|
||||
If DtDatos IsNot Nothing Then
|
||||
|
||||
For Each item As DataRow In DtDatos.Rows
|
||||
Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, item("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||
If Dr IsNot Nothing Then
|
||||
item("AplicaSeccion") = CBool(Dr("AplicaSeccion"))
|
||||
If CBool(Dr("AplicaSeccion")) Then GvDatos.Columns(9).Visible = True
|
||||
item("AplicaSerie") = CBool(Dr("AplicaSerie"))
|
||||
item("AplicaLote") = CBool(Dr("AplicaLote"))
|
||||
If CBool(Dr("AplicaLote")) Then GvDatos.Columns(10).Visible = True
|
||||
item("AplicaCaducidad") = CBool(Dr("AplicaCaducidad"))
|
||||
If CBool(Dr("AplicaCaducidad")) Then GvDatos.Columns(11).Visible = True
|
||||
If CBool(Dr("AplicaSeccion")) Or CBool(Dr("AplicaLote")) Or CBool(Dr("AplicaCaducidad")) Or CBool(Dr("AplicaSerie")) Then
|
||||
GvDatos.Columns(12).Visible = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
GvDatos.DataSource = DtDatos
|
||||
End If
|
||||
|
||||
@@ -802,7 +854,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("Inv_CveMetodoInventario").Contiene("5", "6") Then
|
||||
If CBool(e.Row.DBCampo("AplicaSerie")) Then
|
||||
e.Row.FCButton("BtnSerieLote").Visible = True
|
||||
e.Row.FCButton("BtnSerieLote").Text = If(e.Row.DBCampo("Inv_CveMetodoInventario").ToString = "5", "SerieLote", "Lote-Batch")
|
||||
e.Row.FCButton("BtnSerieLote").CommandArgument = String.Format("{0}°{1}°{2}°{3}°{4}°{5}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveUM"), e.Row.DBCampo("PS"), e.Row.DBCampo("CantidadF"), e.Row.DBCampo("Consec"), e.Row.DBCampo("Inv_CveMetodoInventario"))
|
||||
@@ -829,6 +881,32 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
End If
|
||||
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaSeccion")) Then
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
|
||||
Else
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||
End If
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||
e.Row.FCTextBox("TxtCaducidad").Text = Now.ToShortDateString
|
||||
Else
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||
End If
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||
e.Row.FCTextBox("TxtLote").Visible = True
|
||||
Else
|
||||
e.Row.FCTextBox("TxtLote").Visible = False
|
||||
End If
|
||||
|
||||
e.Row.FCButton("BtnDividir").Attributes.Add("onclick", String.Format("Dividir('{0}');", e.Row.FCTextBox("TxtDividir").ClientID))
|
||||
e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString
|
||||
e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("CantidadF"), e.Row.FCButton("BtnDividir").ClientID))
|
||||
|
||||
|
||||
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||
'NO BLOQUEA PARA ROL AD
|
||||
@@ -1562,6 +1640,9 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
For Each gvr As GridViewRow In GvDatos.Rows
|
||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||
DtDatos.Rows(Index)("CveSeccion") = gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero
|
||||
DtDatos.Rows(Index)("Caducidad") = gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
||||
DtDatos.Rows(Index)("Lote") = gvr.FCTextBox("TxtLote").Text
|
||||
End If
|
||||
Index += 1
|
||||
Next
|
||||
@@ -1610,10 +1691,10 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
StrXML.Append("<conceptos>")
|
||||
For Each Dr As DataRow In DtDatos.Rows
|
||||
If Dr("CantidadGV").ToString.ToDecimal > 0 Then
|
||||
If Dr("Inv_CveMetodoInventario").ToString = "5" Then
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
||||
For Each Dr1 As DataRow In DtDetalle.Rows
|
||||
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" Serie=""{3}"" ></concepto>", Dr1("CvePS"), Dr1("CveUM"), 1, Dr1("SerieLote"))
|
||||
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" Serie=""{3}"" Lote=""{4}"" CveSeccion=""{5}"" Caducidad=""{6}"" ></concepto>", Dr1("CvePS"), Dr1("CveUM"), 1, Dr1("SerieLote"), If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1), If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha))
|
||||
Next
|
||||
ElseIf Dr("Inv_CveMetodoInventario").ToString = "6" Then
|
||||
DtDetalle = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
||||
@@ -1621,7 +1702,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" Serie=""{3}"" ></concepto>", Dr1("CvePS"), Dr1("CveUM"), DtDatosDetalleLote.SUM("Cantidad", $"Lote = '{Dr1("Lote").ToString}' AND Batch = '{Dr1("Batch").ToString}'"), Dr1("Lote"))
|
||||
Next
|
||||
Else
|
||||
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" Serie=""{3}"" ></concepto>", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), "-1")
|
||||
StrXML.AppendFormat("<concepto CvePS=""{0}"" CveUM=""{1}"" Cantidad= ""{2}"" Serie=""{3}"" Lote=""{4}"" CveSeccion=""{5}"" Caducidad=""{6}"" ></concepto>", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), "-1", If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1), If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -1668,11 +1749,11 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
For Each Dr As DataRow In DtDatos.Rows
|
||||
If Dr("CantidadGV").ToString.ToDecimal > 0 Then
|
||||
|
||||
If Dr("Inv_CveMetodoInventario").ToString = "5" Then
|
||||
If CBool(Dr("AplicaSeccion")) Then
|
||||
|
||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
||||
For Each Dr1 As DataRow In DtDetalle.Rows
|
||||
If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=Dr1("SerieLote").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1) Then
|
||||
If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=Dr1("SerieLote").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
For Each Dr2 As DataRow In ObjInventario.DtResultados.FiltraParametros("CveAlmacen > 0 AND ExistenciaFinal > 0").Rows
|
||||
|
||||
'BUSCA SI EXISTE YA UN TRASPASO DEL ALMACEN DE APARTADO
|
||||
@@ -1701,7 +1782,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
CantidadPendiente = 1
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, SerieLote:=Dr1("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, SerieLote:=Dr1("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -1720,7 +1801,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
DtDetalle = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
||||
For Each Dr1 As DataRow In DtDetalle.Rows
|
||||
If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Dr1("Lote").ToString, Batch:=Dr1("Batch").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1) Then
|
||||
If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString.ToEntero, Dr1("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Dr1("Lote").ToString, Batch:=Dr1("Batch").ToString, CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
|
||||
CantidadSaldo = Dr("CantidadGV").ToString.ToDecimal
|
||||
|
||||
@@ -1751,7 +1832,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
CantidadPendiente = If(Dr1("Cantidad").ToString.ToDecimal > CantidadSaldo, CantidadSaldo, Dr1("Cantidad").ToString.ToDecimal)
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, Lote:=Dr1("Lote").ToString, Batch:=Dr1("Batch").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, Lote:=Dr1("Lote").ToString, Batch:=Dr1("Batch").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -1769,7 +1850,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
Else
|
||||
|
||||
If ObjInventario.GetExistenciasProducto(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1) Then
|
||||
If ObjInventario.GetExistenciasProducto(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveTipoAlmacen:=9, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=-1, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
|
||||
CantidadSaldo = Dr("CantidadGV").ToString.ToDecimal
|
||||
|
||||
@@ -1801,7 +1882,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
CantidadPendiente = If(Dr1("ExistenciaFinal").ToString.ToDecimal > CantidadSaldo, CantidadSaldo, Dr1("ExistenciaFinal").ToString.ToDecimal)
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendiente.ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, -1, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -1844,7 +1925,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, SerieLote:=Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -1942,7 +2023,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
End If
|
||||
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, SerieLote:=Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -1972,7 +2053,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero} AND SerieLote = '{Dr1("SerieLote").ToString}'").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, -1, SerieLote:=Dr1("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, -1, SerieLote:=Dr1("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -1984,7 +2065,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero} AND SerieLote = '{Dr1("SerieLote").ToString}'").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, -1, Lote:=Dr1("Lote").ToString, Batch:=Dr1("Batch").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr1("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, -1, Batch:=Dr1("Batch").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos con serie. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -1995,7 +2076,7 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString.ToEntero}").ToString.ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, -1, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, PU, -1, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("Caducidad").ToString.ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString, "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString.ToEntero, -1)) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -2806,7 +2887,92 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "DIVIDIR"
|
||||
|
||||
Protected Sub Dividir(sender As Object, e As EventArgs)
|
||||
Dim index2 As Integer = 0
|
||||
|
||||
For Each Row As DataRow In DtDatos.Rows
|
||||
Row("Seleccionado") = GvDatos.Rows(index2).FCCheckBox("cbInv").Checked
|
||||
If GvDatos.Rows(index2).FCTextBox("TbCantidadF").Text <> "" Then
|
||||
Row("CantidadSeleccionada") = GvDatos.Rows(index2).FCTextBox("TbCantidadF").Text
|
||||
End If
|
||||
If GvDatos.Rows(index2).FCTextBox("TxtLote").Text <> "" Then
|
||||
Row("Lote") = GvDatos.Rows(index2).FCTextBox("TxtLote").Text
|
||||
End If
|
||||
If GvDatos.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue <> "-1" Then
|
||||
Row("CveSeccion") = GvDatos.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero
|
||||
End If
|
||||
If GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text <> "" Then
|
||||
Row("Caducidad") = GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text.ToDate
|
||||
End If
|
||||
index2 += 1
|
||||
Next
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, Button)).NamingContainer, GridViewRow)
|
||||
Dim Index As Integer = gvRow.RowIndex
|
||||
Dim Cantidad As String = HdnCantidadMovimiento.Value
|
||||
Dim dr1 As DataRow = DtDatos.Rows(Index)
|
||||
Dim dr As DataRow = DtDatos.NewRow
|
||||
dr.ItemArray = dr1.ItemArray
|
||||
dr1("CantidadC") = (dr1("CantidadC").ToString.ToDouble - Cantidad.ToDouble)
|
||||
Dim CantidadFOriginal As Double = dr1("CantidadF").ToString.ToDouble
|
||||
dr1("CantidadF") = (dr1("CantidadF").ToString.ToDouble - Cantidad.ToDouble)
|
||||
Dim CantidadSOriginal As Double = dr1("CantidadS").ToString.ToDouble
|
||||
dr1("CantidadS") = (CantidadSOriginal * dr1("CantidadF").ToString.ToDouble) / CantidadFOriginal
|
||||
Dim CantidadSeleccionadaOriginal As Double = dr1("CantidadSeleccionada").ToString.ToDouble
|
||||
dr1("CantidadSeleccionada") = If(CantidadSeleccionadaOriginal > dr1("CantidadF").ToString.ToDouble, dr1("CantidadF").ToString.ToDouble, CantidadSeleccionadaOriginal)
|
||||
CantidadSeleccionadaOriginal = CantidadSeleccionadaOriginal - dr1("CantidadF").ToString.ToDouble
|
||||
|
||||
'Dim CostoIndirectoOriginal As Double = dr1("CostoIndirecto").ToString.ToDouble
|
||||
'dr1("CostoIndirecto") = (CostoIndirectoOriginal * dr1("CantidadF").ToString.ToDouble) / CantidadFOriginal
|
||||
'Dim CostoIndirectoExtranjeroOriginal As Double = dr1("CostoIndirectoExtranjero").ToString.ToDouble
|
||||
'dr1("CostoIndirectoExtranjero") = (CostoIndirectoExtranjeroOriginal * dr1("CantidadF").ToString.ToDouble) / CantidadFOriginal
|
||||
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
dr("CantidadC") = Cantidad.ToDouble
|
||||
dr("CantidadF") = Cantidad.ToDouble
|
||||
dr("CantidadS") = (CantidadSOriginal * dr("CantidadF").ToString.ToDouble) / CantidadFOriginal
|
||||
dr("CantidadSeleccionada") = If(CantidadSeleccionadaOriginal > 0, CantidadSeleccionadaOriginal, 0)
|
||||
dr("Seleccionado") = If(CantidadSeleccionadaOriginal > 0, True, False)
|
||||
'dr("CostoIndirecto") = (CostoIndirectoOriginal * dr("CantidadF").ToString.ToDouble) / CantidadFOriginal
|
||||
'dr("CostoIndirectoExtranjero") = (CostoIndirectoExtranjeroOriginal * dr("CantidadF").ToString.ToDouble) / CantidadFOriginal
|
||||
DtDatos.Rows.InsertAt(dr, Index)
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
index2 = 1
|
||||
For Each Row As DataRow In DtDatos.Rows
|
||||
Row("Consec") = index2
|
||||
index2 += 1
|
||||
Next
|
||||
DtDatos.AcceptChanges()
|
||||
|
||||
CargaGvDatos()
|
||||
|
||||
index2 = 0
|
||||
For Each Row As DataRow In DtDatos.Rows
|
||||
GvDatos.Rows(index2).FCCheckBox("cbInv").Checked = CBool(Row("Seleccionado"))
|
||||
If Row("CantidadSeleccionada").ToString <> "" Then
|
||||
GvDatos.Rows(index2).FCTextBox("TbCantidadF").Text = Row("CantidadSeleccionada").ToString
|
||||
End If
|
||||
If Row("Lote").ToString <> "" Then
|
||||
GvDatos.Rows(index2).FCTextBox("TxtLote").Text = Row("Lote").ToString
|
||||
End If
|
||||
If Row("CveSeccion").ToString <> "" Then
|
||||
GvDatos.Rows(index2).FCDropDownList("DdlSeccionAlmacen").SelectedValue = Row("CveSeccion").ToString
|
||||
End If
|
||||
If Row("Caducidad").ToString <> "" Then
|
||||
GvDatos.Rows(index2).FCTextBox("TxtCaducidad").Text = Row("Caducidad").ToString.ToDate.ToShortDateString
|
||||
End If
|
||||
index2 += 1
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " GUIAS - SABE QUE ES PORQUE NO VEO QUE SE UTILIZE EN ALGUNA PARTE - EN MIRAS DE ELIMINAR - IPP 24 AGOSTO 2017 "
|
||||
Private Sub BtnNumeroGuia_Click(sender As Object, e As EventArgs) Handles BtnNumeroGuia.Click
|
||||
@@ -2844,6 +3010,86 @@ Partial Class Inventarios_RecepcionEntrega
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "SUGERENCIAS"
|
||||
|
||||
Protected Sub BtnVerSugerencias_Click(sender As Object, e As EventArgs)
|
||||
If Not CveVentaSurtir > 0 Then
|
||||
Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjInv As New ClsInventarios
|
||||
If ObjInv.GetSugerenciasSalidaAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
GvSugerencias.DataSource = ObjInv.DtResultados
|
||||
|
||||
|
||||
DtDatosSugerencias = ObjInv.DtResultados
|
||||
|
||||
DtDatos.Columns.Add("Consec", GetType(Integer))
|
||||
DtDatos.Columns.Add("CantidadGV", GetType(Double))
|
||||
DtDatos.Columns.Add("CantidadTraspaso", GetType(Double))
|
||||
DtDatos.Columns.Add("AplicaSeccion", GetType(Boolean))
|
||||
DtDatos.Columns.Add("AplicaSerie", GetType(Boolean))
|
||||
DtDatos.Columns.Add("AplicaLote", GetType(Boolean))
|
||||
DtDatos.Columns.Add("AplicaCaducidad", GetType(Boolean))
|
||||
If Not DtDatos.Columns.Contains("Lote") Then
|
||||
DtDatos.Columns.Add("Lote", GetType(String))
|
||||
End If
|
||||
If Not DtDatos.Columns.Contains("CveSeccion") Then
|
||||
DtDatos.Columns.Add("CveSeccion", GetType(Integer))
|
||||
End If
|
||||
If Not DtDatos.Columns.Contains("Caducidad") Then
|
||||
DtDatos.Columns.Add("Caducidad", GetType(Date))
|
||||
End If
|
||||
If Not DtDatos.Columns.Contains("Seleccionado") Then
|
||||
DtDatos.Columns.Add("Seleccionado", GetType(Boolean))
|
||||
End If
|
||||
If Not DtDatos.Columns.Contains("CantidadSeleccionada") Then
|
||||
DtDatos.Columns.Add("CantidadSeleccionada", GetType(Double))
|
||||
End If
|
||||
|
||||
Dim Index = 1
|
||||
For Each Dr As DataRow In DtDatosSugerencias.Rows
|
||||
Dr("Consec") = Index
|
||||
Dr("Caducidad") = Now
|
||||
Index += 1
|
||||
Next
|
||||
|
||||
DtDatosSugerencias.AcceptChanges()
|
||||
|
||||
|
||||
End If
|
||||
ObjInv.Dispose()
|
||||
GvSugerencias.DataBind()
|
||||
|
||||
UpVerSugerencias.Update()
|
||||
|
||||
RegistraScript("$('#ModalVerSugerencias').modal()")
|
||||
End Sub
|
||||
Protected Sub BtnAplicarSugerencias_Click(sender As Object, e As EventArgs)
|
||||
|
||||
DtDatos = Nothing
|
||||
DtDatos = New DataTable
|
||||
DtDatos = DtDatosSugerencias
|
||||
|
||||
DtDatosDetalle = Nothing
|
||||
CreaDtDetalle()
|
||||
|
||||
DtDatosDetalleLote = Nothing
|
||||
CreaDtDetalleLote()
|
||||
|
||||
CargaGvDatos()
|
||||
|
||||
RegistraScript("$('#ModalVerSugerencias').modal('hide')")
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2362,7 +2362,7 @@ Partial Class OS_OrdenesServicios
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
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, -1, -1) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, -1) Then
|
||||
TieneError = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
Exit For
|
||||
@@ -2389,7 +2389,7 @@ Partial Class OS_OrdenesServicios
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) Then
|
||||
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada2, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDouble, -1, -1) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada2, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, -1) Then
|
||||
TieneError = True
|
||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||
Exit For
|
||||
|
||||
Reference in New Issue
Block a user