Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1551,6 +1551,33 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetExistenciasProductoSerie(CvePS As Integer, CveAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Inv_ExistenciaPSSeriesGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch Ex1 As SqlException
|
||||||
|
|
||||||
|
Me.OnError("Ocurrió un error al obtener el kardex de almacen.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el kardex de almacen.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " INVENTARIOS - REPORTES "
|
#Region " INVENTARIOS - REPORTES "
|
||||||
|
|||||||
@@ -3903,7 +3903,7 @@
|
|||||||
<asp:ListItem Value="3">Créditos</asp:ListItem>
|
<asp:ListItem Value="3">Créditos</asp:ListItem>
|
||||||
<asp:ListItem Value="5">Acreedores</asp:ListItem>
|
<asp:ListItem Value="5">Acreedores</asp:ListItem>
|
||||||
<asp:ListItem Value="6">Caja Chica</asp:ListItem>
|
<asp:ListItem Value="6">Caja Chica</asp:ListItem>
|
||||||
<asp:ListItem Value="2">Viaticos</asp:ListItem>
|
<asp:ListItem Value="2">Viáticos</asp:ListItem>
|
||||||
<asp:ListItem Value="4">Deudores</asp:ListItem>
|
<asp:ListItem Value="4">Deudores</asp:ListItem>
|
||||||
</asp:RadioButtonList>
|
</asp:RadioButtonList>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
@@ -3911,7 +3911,7 @@
|
|||||||
|
|
||||||
<br />
|
<br />
|
||||||
<div style="text-align:center">
|
<div style="text-align:center">
|
||||||
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text="Multiple Crédito" />
|
<asp:CheckBox runat="server" ID="ChkCreditoMultiple" AutoPostBack="true" Text=" Múltiple Crédito" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
@@ -3971,7 +3971,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div runat="server" id="DivContado">
|
<div runat="server" id="DivContado">
|
||||||
<asp:Panel ID="PnlContadoBancos" CssClass="chequesie text-small" runat="server" Width="470px" Visible="true">
|
<asp:Panel ID="PnlContadoBancos" CssClass="text-small" runat="server" Width="85%" Style="position:relative;margin:auto" Visible="true">
|
||||||
<div class="chequesie1">
|
<div class="chequesie1">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2" style="width: 25%; text-align: left">
|
<div class="col-md-2" style="width: 25%; text-align: left">
|
||||||
@@ -4000,7 +4000,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chequesie2">
|
<div class="chequesie2" style="height:100%">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2" style="width: 25%; padding-left: 20px; text-align: left">
|
<label class="col-md-2" style="width: 25%; padding-left: 20px; text-align: left">
|
||||||
<asp:Label ID="LblFolio" runat="server" Text="Número:"></asp:Label></label>
|
<asp:Label ID="LblFolio" runat="server" Text="Número:"></asp:Label></label>
|
||||||
@@ -4029,11 +4029,12 @@
|
|||||||
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="97%" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
<asp:TextBox ID="TxtDocumentoObservaciones" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="97%" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
<asp:Panel ID="PnlContadoCajaChica" CssClass="chequesie text-small" runat="server" Width="400px" Visible="False">
|
<asp:Panel ID="PnlContadoCajaChica" CssClass="text-small" runat="server" Width="85%" Style="position:relative;margin:auto" Visible="False">
|
||||||
<div class="chequesie1">
|
<div class="chequesie1">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">Movimiento:</label>
|
<label class="col-md-2">Movimiento:</label>
|
||||||
@@ -4052,7 +4053,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chequesie2">
|
<div class="chequesie2" style="height:100%">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">
|
<label class="col-md-2">
|
||||||
<asp:Label ID="Label5" runat="server" Text="Número:"></asp:Label></label>
|
<asp:Label ID="Label5" runat="server" Text="Número:"></asp:Label></label>
|
||||||
@@ -4070,16 +4071,18 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender10" runat="server" HighlightCssClass="vco" TargetControlID="RVDocumentoImporteCaja" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender10" runat="server" HighlightCssClass="vco" TargetControlID="RVDocumentoImporteCaja" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">Observaciones:</label>
|
<label class="col-md-2">Observaciones:</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:TextBox ID="TxtDocumentoObservacionesCaja" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="250px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
<asp:TextBox ID="TxtDocumentoObservacionesCaja" CssClass="form-control input-sm" runat="server" MaxLength="12" Width="326px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
<asp:Panel ID="PnlContadoFyE" CssClass="chequesie text-small" runat="server" Width="400px" Visible="False">
|
<asp:Panel ID="PnlContadoFyE" CssClass="text-small" runat="server" Width="85%" Style="position:relative;margin:auto" Visible="False">
|
||||||
<div class="chequesie1">
|
<div class="chequesie1">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">Funcionario Empleado:</label>
|
<label class="col-md-2">Funcionario Empleado:</label>
|
||||||
@@ -4105,7 +4108,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chequesie2">
|
<div class="chequesie2" style="height:100%">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2"></label>
|
<label class="col-md-2"></label>
|
||||||
@@ -4119,15 +4122,17 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCEDocumentoImporteFE" runat="server" HighlightCssClass="vco" TargetControlID="RVDocumentoImporteFE" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEDocumentoImporteFE" runat="server" HighlightCssClass="vco" TargetControlID="RVDocumentoImporteFE" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
<label class="col-md-2">Observaciones:</label>
|
<label class="col-md-2">Observaciones:</label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<asp:TextBox ID="TextBox3" runat="server" CssClass="form-control input-sm" MaxLength="12" Width="250px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
<asp:TextBox ID="TextBox3" runat="server" CssClass="form-control input-sm" MaxLength="12" Width="331px" Rows="3" TextMode="MultiLine"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
<asp:Panel ID="PnlContadoDeudores" Width="400px" runat="server" Visible="False">
|
<asp:Panel ID="PnlContadoDeudores" Width="84%" Style="position:relative;margin:auto" runat="server" Visible="False">
|
||||||
|
|
||||||
<asp:RadioButtonList ID="RBLTipoDeudor" runat="server" RepeatDirection="Horizontal" AutoPostBack="true">
|
<asp:RadioButtonList ID="RBLTipoDeudor" runat="server" RepeatDirection="Horizontal" AutoPostBack="true">
|
||||||
<asp:ListItem Value="1" Selected="True">D.D</asp:ListItem>
|
<asp:ListItem Value="1" Selected="True">D.D</asp:ListItem>
|
||||||
@@ -4235,7 +4240,7 @@
|
|||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
|
|
||||||
<asp:Panel ID="PnlContadoCreditos" CssClass="chequesie text-small" runat="server" Width="400px" Visible="true">
|
<asp:Panel ID="PnlContadoCreditos" CssClass="text-small" runat="server" Width="85%" Style="position:relative;margin:auto" Visible="true">
|
||||||
<div class="chequesie1">
|
<div class="chequesie1">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">Tipo</label>
|
<label class="col-md-2">Tipo</label>
|
||||||
@@ -4267,10 +4272,11 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCECreditoDetalle" runat="server" HighlightCssClass="vco" TargetControlID="RFVCreditoDetalle" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCECreditoDetalle" runat="server" HighlightCssClass="vco" TargetControlID="RFVCreditoDetalle" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
|
|
||||||
<asp:Panel ID="PnlContadoAcreedores" CssClass="chequesie text-small" runat="server" Width="400px" Visible="False">
|
<asp:Panel ID="PnlContadoAcreedores" CssClass="text-small" runat="server" Width="85%" Style="position:relative;margin:auto" Visible="False">
|
||||||
<div class="chequesie1">
|
<div class="chequesie1">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">Acreedor:</label>
|
<label class="col-md-2">Acreedor:</label>
|
||||||
@@ -4295,7 +4301,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="chequesie2">
|
<div class="chequesie2" style="height:100%">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2"></label>
|
<label class="col-md-2"></label>
|
||||||
<div class="col-md-4"></div>
|
<div class="col-md-4"></div>
|
||||||
@@ -4308,6 +4314,7 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RVContadoAcreedor" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RVContadoAcreedor" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1332,6 +1332,10 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue = "DEV" Then
|
||||||
|
InicializaAplicaNCFact()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
@@ -12838,6 +12842,7 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub RBLContado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLContado.SelectedIndexChanged
|
Protected Sub RBLContado_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLContado.SelectedIndexChanged
|
||||||
|
LblCheq.Text = RBLContado.SelectedItem.Text
|
||||||
CargaContado()
|
CargaContado()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub RBLTipoDeudor_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLTipoDeudor.SelectedIndexChanged
|
Private Sub RBLTipoDeudor_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RBLTipoDeudor.SelectedIndexChanged
|
||||||
@@ -16929,8 +16934,9 @@ Partial Class Compras_Compras
|
|||||||
CargaRetISRConcepto()
|
CargaRetISRConcepto()
|
||||||
|
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||||
|
InicializaAplicaNCFact()
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub OriginalesVisible(Accion As Boolean)
|
Private Sub OriginalesVisible(Accion As Boolean)
|
||||||
|
|||||||
@@ -731,6 +731,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.ModExtensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -116,15 +116,22 @@
|
|||||||
Kardex
|
Kardex
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<li>
|
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Conditional" >
|
||||||
<asp:LinkButton ID="ImgImprimir" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
<ContentTemplate>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<asp:LinkButton ID="ImgImprimir" runat="server"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||||
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#Kardex"> </a>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkSeries" Visible="false" runat="server">Series</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#Kardex"> </a>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
@@ -493,6 +500,41 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="DivModalSerie" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpdatePanel1" UpdateMode="Conditional" RenderMode="Inline" style="width:40%">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="LtlSerieTitle" Text="Series con Existencias" runat="server"> </asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row" style="width:100%">
|
||||||
|
<div style="width:95%;margin-left:2.5%;margin-right:2.5%">
|
||||||
|
<asp:UpdatePanel ID="UpGridSeries" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvSeries" Width="100%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||||
|
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover ScrollAD" GridLines="None"
|
||||||
|
DataKeyNames="CveEmpresa,CveAlmacen,Almacen,PS,CvePS,Serie,Lote,FechaCaducidad,CveSeccionAlmacen,Existencia,Valor">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField HeaderText="Almacén" DataField="Almacen"/>
|
||||||
|
<asp:BoundField HeaderText="Serie" DataField="Serie"/>
|
||||||
|
<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:N}"/>
|
||||||
|
</Columns>
|
||||||
|
|
||||||
|
</asp:GridView>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Cerrar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -203,6 +203,8 @@ Partial Class Inventarios_Kardex
|
|||||||
If AplicaLote Then GvM.Columns(9).Visible = True
|
If AplicaLote Then GvM.Columns(9).Visible = True
|
||||||
If AplicaCaducidad Then GvM.Columns(10).Visible = True
|
If AplicaCaducidad Then GvM.Columns(10).Visible = True
|
||||||
|
|
||||||
|
Dim AuxAplicaSerie As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaSerie") = "True"
|
||||||
|
LnkSeries.Visible = AuxAplicaSerie
|
||||||
'CARGA INDICADORES
|
'CARGA INDICADORES
|
||||||
If UsuarioActual.TienePermisoProceso(201) Then
|
If UsuarioActual.TienePermisoProceso(201) Then
|
||||||
DivIndicadores.Visible = True
|
DivIndicadores.Visible = True
|
||||||
@@ -238,6 +240,7 @@ Partial Class Inventarios_Kardex
|
|||||||
End If
|
End If
|
||||||
GvM.DataSource = DtTemp
|
GvM.DataSource = DtTemp
|
||||||
GvM.DataBind()
|
GvM.DataBind()
|
||||||
|
UpAcciones.Update()
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Alert("Seleccione un producto.", TipoMensaje.MsgAdvertencia)
|
Alert("Seleccione un producto.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -299,6 +302,15 @@ Partial Class Inventarios_Kardex
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargarExistenciasProductosSeries()
|
||||||
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
If ObjInventarios.GetExistenciasProductoSerie(ddlProducto2.SelectedValue.ToEntero(), ddlAlmacen.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
GvSeries.DataSource = ObjInventarios.DtResultados
|
||||||
|
End If
|
||||||
|
ObjInventarios.Dispose()
|
||||||
|
GvSeries.DataBind()
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " IMPRIMIR "
|
#Region " IMPRIMIR "
|
||||||
@@ -409,5 +421,14 @@ Partial Class Inventarios_Kardex
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
#Region "Acciones"
|
||||||
|
Protected Sub LnkSeries_OnClick(sender As Object, e As EventArgs) Handles LnkSeries.Click
|
||||||
|
CargarExistenciasProductosSeries()
|
||||||
|
UpGridSeries.Update()
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('show');", "DivModalSerie"))
|
||||||
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -418,7 +418,7 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<asp:GridView ID="GvInv" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
<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,Lote,AplicaSeccion,AplicaLote,AplicaCaducidad,AplicaSerie" 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,AplicaSeccion,AplicaLote,AplicaCaducidad,AplicaSerie,CveAlmacenDevolucionProveedor" 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" />
|
<HeaderStyle Height="58px" />
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -91,6 +91,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Return ViewState("IdPoliza").ToString.ToEntero
|
Return ViewState("IdPoliza").ToString.ToEntero
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
Private Property DtAlmacenesDevolucion As DataTable
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("DtAlmacenesDevolucion"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtAlmacenesDevolucion") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property DtDatosDetalle As DataTable
|
Private Property DtDatosDetalle As DataTable
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("DtDatosDetalle"), DataTable)
|
Return CType(ViewState("DtDatosDetalle"), DataTable)
|
||||||
@@ -245,6 +253,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ViewState("CveAlmacenApartado") = value
|
ViewState("CveAlmacenApartado") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property CveAlmacenDevolucionProveedor As Integer
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("CveAlmacenDevolucionProveedor"), Integer)
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveAlmacenDevolucionProveedor") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property TipoMovimiento As Integer
|
Private Property TipoMovimiento As Integer
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("TipoMovimiento"), Integer)
|
Return CType(ViewState("TipoMovimiento"), Integer)
|
||||||
@@ -361,6 +377,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ViewState("CveVendedor") = value
|
ViewState("CveVendedor") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property RealizarTraspasoAlmacenDevolucion() As Boolean
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("RealizarTraspasoAlmacenDevolucion")), False, CBool(ViewState("RealizarTraspasoAlmacenDevolucion")))
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
ViewState("RealizarTraspasoAlmacenDevolucion") = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -404,8 +428,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
CveFleteCompra = -1
|
CveFleteCompra = -1
|
||||||
BuscaEntregaDirecta = -1
|
BuscaEntregaDirecta = -1
|
||||||
CveAlmacenApartado = -1
|
CveAlmacenApartado = -1
|
||||||
|
CveAlmacenDevolucionProveedor = -1
|
||||||
TipoMovimiento = 1
|
TipoMovimiento = 1
|
||||||
|
RealizarTraspasoAlmacenDevolucion = False
|
||||||
CantidadTotal = 0
|
CantidadTotal = 0
|
||||||
IndexSeccionAlmacen = 0
|
IndexSeccionAlmacen = 0
|
||||||
|
|
||||||
@@ -778,6 +803,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
DivTipoCambio.Visible = False
|
DivTipoCambio.Visible = False
|
||||||
Apartado = False
|
Apartado = False
|
||||||
CveAlmacenApartado = -1
|
CveAlmacenApartado = -1
|
||||||
|
CveAlmacenDevolucionProveedor = -1
|
||||||
|
RealizarTraspasoAlmacenDevolucion = False
|
||||||
BtnGuardar.Enabled = True
|
BtnGuardar.Enabled = True
|
||||||
CargaAlmacenes(-1)
|
CargaAlmacenes(-1)
|
||||||
|
|
||||||
@@ -829,6 +856,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Private Sub CargaCompra(pCveCompra As Integer, pCveProveedor As Integer)
|
Private Sub CargaCompra(pCveCompra As Integer, pCveProveedor As Integer)
|
||||||
'CargaAlmacenes(-1)
|
'CargaAlmacenes(-1)
|
||||||
|
|
||||||
|
RealizarTraspasoAlmacenDevolucion = False
|
||||||
|
CveAlmacenDevolucionProveedor = -1
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
|
|
||||||
@@ -896,6 +926,13 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TipoMovimiento = 2 AndAlso GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=21).Rows.Count > 0 Then
|
||||||
|
RealizarTraspasoAlmacenDevolucion = True
|
||||||
|
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
|
||||||
|
'CreaDTAlmacenDevolucion()
|
||||||
|
'CargaAlmacenes(-1, "21", CveTipoCompra)
|
||||||
|
End If
|
||||||
|
|
||||||
DtDatosDetalle = Nothing
|
DtDatosDetalle = Nothing
|
||||||
CreaDtDetalle()
|
CreaDtDetalle()
|
||||||
DtDatosLoteDetalle = Nothing
|
DtDatosLoteDetalle = Nothing
|
||||||
@@ -1494,6 +1531,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CreaDTAlmacenDevolucion()
|
||||||
|
If DtAlmacenesDevolucion Is Nothing Then
|
||||||
|
DtAlmacenesDevolucion = New DataTable
|
||||||
|
DtAlmacenesDevolucion.Columns.Add("CveCompraDetalle", GetType(Integer))
|
||||||
|
DtAlmacenesDevolucion.Columns.Add("CveAlmacenOriginal", GetType(Integer))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaSerie(Tipo As Integer, Optional CerrarCompletado As Boolean = False)
|
Private Sub CargaSerie(Tipo As Integer, Optional CerrarCompletado As Boolean = False)
|
||||||
'RegistraScript("document.getElementById(""TxtSerie"").focus();")
|
'RegistraScript("document.getElementById(""TxtSerie"").focus();")
|
||||||
RegistraScript("$('#DivSerie').modal();", "ModalLote")
|
RegistraScript("$('#DivSerie').modal();", "ModalLote")
|
||||||
@@ -2206,6 +2251,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim CveMovimientoVirtual As Integer = -1
|
Dim CveMovimientoVirtual As Integer = -1
|
||||||
Dim FolioVirtual As Integer = -1
|
Dim FolioVirtual As Integer = -1
|
||||||
|
|
||||||
|
'TRASPASO DEVOLUCION
|
||||||
|
Dim CveMovimientoSalidaTraspaso As Integer = -1
|
||||||
|
Dim FolioSalidaTraspaso As String = ""
|
||||||
|
|
||||||
'CONTABILIDAD
|
'CONTABILIDAD
|
||||||
Dim CvePrePoliza = -1
|
Dim CvePrePoliza = -1
|
||||||
Dim MensajeContabilidad = ""
|
Dim MensajeContabilidad = ""
|
||||||
@@ -2218,19 +2267,26 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
If HdnTipoDocto.Value <> "Fac" Then RecibidaCompleta = False
|
If HdnTipoDocto.Value <> "Fac" Then RecibidaCompleta = False
|
||||||
|
|
||||||
|
Dim CveConceptoAlmacen As Integer = If(TipoMovimiento > 1, 13, 2)
|
||||||
|
|
||||||
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero
|
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero
|
||||||
|
|
||||||
Dim CveModalidad As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveModalidad").ToEntero()
|
Dim CveModalidad As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveModalidad").ToEntero()
|
||||||
|
|
||||||
Dim EsContabilizable As Boolean = (CveModalidad = 1)
|
Dim EsContabilizable As Boolean = (CveModalidad = 1)
|
||||||
|
|
||||||
'ENTRADA ALMACÉN
|
If RealizarTraspasoAlmacenDevolucion AndAlso TipoMovimiento = 2 Then
|
||||||
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, If(TipoMovimiento > 1, 13, 2), 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
CveConceptoAlmacen = 26
|
||||||
CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio),
|
|
||||||
MovimientoFijo:=If(TipoMovimiento = 2, True, False), Remision:=TxtRemision.Text, Modulo:="RA/G1")
|
'For Each gvr As GridViewRow In GvInv.Rows
|
||||||
If CveMovimiento > 0 Then
|
' If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||||
CveMovimientoOriginal = CveMovimiento
|
' Dim Row As DataRow = DtAlmacenesDevolucion.NewRow()
|
||||||
InvFolio = ObjInventario.Folio.ToString
|
' Row("CveCompraDetalle") = gvr.DataKey("CveCompraDetalle").ToEntero()
|
||||||
|
' Row("CveAlmacenOriginal") = gvr.DataKey("CveAlmacenOriginal").ToEntero()
|
||||||
|
' DtAlmacenesDevolucion.Rows.Add(Row)
|
||||||
|
' End If
|
||||||
|
'Next
|
||||||
|
|
||||||
Dim DtDetalle As New DataTable
|
Dim DtDetalle As New DataTable
|
||||||
Dim DtDetalleLote As New DataTable
|
Dim DtDetalleLote As New DataTable
|
||||||
Dim PU As Decimal = 0.0D
|
Dim PU As Decimal = 0.0D
|
||||||
@@ -2238,6 +2294,119 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim CostoIndirecto As Decimal = 0.0D
|
Dim CostoIndirecto As Decimal = 0.0D
|
||||||
Dim SumaTotal As Decimal = 0.0D
|
Dim SumaTotal As Decimal = 0.0D
|
||||||
Dim Cont As Integer = 0
|
Dim Cont As Integer = 0
|
||||||
|
|
||||||
|
Dim CveMovtoSalidaActual = -1
|
||||||
|
Dim CveMovtoEntradaActual = -1
|
||||||
|
Dim CveVendedorActual = -1
|
||||||
|
Dim CveClienteActual = -1
|
||||||
|
|
||||||
|
Dim CveAlmacenDestino = CveAlmacen
|
||||||
|
Dim CveSeccionDestino As Integer = -1
|
||||||
|
|
||||||
|
'For Each RowAlmacen As DataRow In DtAlmacenesDevolucion.FiltraParametros("", DistinctColumns:={"CveAlmacenOrignal"}).Rows
|
||||||
|
|
||||||
|
'SALIDA DE ALMACEN POR TRASPASO
|
||||||
|
CveMovimientoSalidaTraspaso = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
|
CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio),
|
||||||
|
MovimientoFijo:=If(TipoMovimiento = 2, True, False), CveAlmacenDestino:=CveAlmacenDestino, Remision:=TxtRemision.Text, Modulo:="RA/G1")
|
||||||
|
|
||||||
|
If CveMovimientoSalidaTraspaso > 0 Then
|
||||||
|
FolioSalidaTraspaso = ObjInventario.Folio.ToString()
|
||||||
|
|
||||||
|
For Each gvr As GridViewRow In GvInv.Rows '.Cast(Of GridViewRow).Where(Function(row) row.DataKey("CveAlmacenOrignal") = RowAlmacen("CveAlmacenOrignal").ToString())
|
||||||
|
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||||
|
|
||||||
|
PU = DtInv.Rows(gvr.RowIndex)("PU").ToString.ToDecimal
|
||||||
|
CostoIndirecto = DtInv.Rows(gvr.RowIndex)("CostoIndirecto").ToString.ToDecimal
|
||||||
|
PUExtranjero = DtInv.Rows(gvr.RowIndex)("PUExtranjero").ToString.ToDecimal
|
||||||
|
|
||||||
|
'SI FUE POR SERIE LOTE
|
||||||
|
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||||
|
DtDetalleLote = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||||
|
If DtDetalle.Rows.Count > 0 Then
|
||||||
|
Dim ContDt As Integer = 0
|
||||||
|
For Each Dr As DataRow In DtDetalle.Rows
|
||||||
|
SumaTotal += PU + CostoIndirecto
|
||||||
|
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso ContDt + 1 = DtDetalle.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> SumaTotal Then
|
||||||
|
If Not UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
PU = Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2).ToDecimal - (SumaTotal - (PU))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTraspaso, 1, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), Serie:=Dr("Serie").ToString, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario, FechaCaducidad:=If(CBool(gvr.DataKey("AplicaCaducidad")), gvr.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha), Lote:=If(CBool(gvr.DataKey("AplicaLote")), gvr.FCTextBox("TxtLote").Text, ""), CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
ContDt += 1
|
||||||
|
Next
|
||||||
|
ElseIf DtDetalleLote.Rows.Count > 0 Then
|
||||||
|
Dim ContDt As Integer = 0
|
||||||
|
For Each Dr As DataRow In DtDetalleLote.Rows
|
||||||
|
SumaTotal += Dr("Cantidad").ToString.ToDecimal * (PU + CostoIndirecto)
|
||||||
|
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso ContDt + 1 = DtDetalleLote.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> SumaTotal Then
|
||||||
|
If Not UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
PU = (Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2).ToDecimal - (SumaTotal - (Dr("Cantidad").ToString.ToDecimal * (PU)))) / Dr("Cantidad").ToString.ToDecimal
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTraspaso, Dr("Cantidad").ToString.ToDouble, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
ContDt += 1
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
SumaTotal += gvr.FCTextBox("TbCantidadF").Text.ToDecimal * (PU + CostoIndirecto) ' considerar el costo indirecto para el ajuste
|
||||||
|
If RecibidaCompleta AndAlso Cont + 1 = GvInv.Rows.Count AndAlso Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2) <> Math.Round(SumaTotal, 2) Then
|
||||||
|
Dim tTotal As Decimal = gvr.FCTextBox("TbCantidadF").Text.ToDecimal * (PU)
|
||||||
|
If Not UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
PU = (Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2).ToDecimal - (SumaTotal - tTotal)) / gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTraspaso, gvr.FCTextBox("TbCantidadF").Text.ToDouble, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario, FechaCaducidad:=If(CBool(gvr.DataKey("AplicaCaducidad")), gvr.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha), Lote:=If(CBool(gvr.DataKey("AplicaLote")), gvr.FCTextBox("TxtLote").Text, ""), CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
'If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
||||||
|
' For Each Dr As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {gvr.RowIndex}").Rows
|
||||||
|
' If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
||||||
|
' ErrorMovInv = True
|
||||||
|
' Exit For
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
'End If
|
||||||
|
Cont += 1
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Next
|
||||||
|
|
||||||
|
'MODIFICA EL CONCEPTO PARA REALIZAR LA ENTRADA
|
||||||
|
CveConceptoAlmacen = 27
|
||||||
|
CveAlmacen = CveAlmacenDevolucionProveedor
|
||||||
|
End If
|
||||||
|
|
||||||
|
'ENTRADA ALMACÉN
|
||||||
|
CveMovimiento = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, 1, FechaMovto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
|
CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio),
|
||||||
|
MovimientoFijo:=If(TipoMovimiento = 2, True, False), CveMovimientoRelacionado:=CveMovimientoSalidaTraspaso, Remision:=TxtRemision.Text, Modulo:="RA/G1")
|
||||||
|
|
||||||
|
If CveMovimiento > 0 Then
|
||||||
|
CveMovimientoOriginal = CveMovimiento
|
||||||
|
InvFolio = ObjInventario.Folio.ToString
|
||||||
|
|
||||||
|
Dim DtDetalle As New DataTable
|
||||||
|
Dim DtDetalleLote As New DataTable
|
||||||
|
Dim PU As Decimal = 0.0D
|
||||||
|
Dim PUExtranjero As Decimal = 0.0D
|
||||||
|
Dim CostoIndirecto As Decimal = 0.0D
|
||||||
|
Dim SumaTotal As Decimal = 0.0D
|
||||||
|
Dim Cont As Integer = 0
|
||||||
|
|
||||||
For Each gvr As GridViewRow In GvInv.Rows
|
For Each gvr As GridViewRow In GvInv.Rows
|
||||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||||
|
|
||||||
@@ -2858,6 +3027,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
MensajeError = "Error al obtener movimientos"
|
MensajeError = "Error al obtener movimientos"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'PREPOLIZA - NC
|
'PREPOLIZA - NC
|
||||||
If TipoMovimiento = 3 AndAlso Not ErrorMovInv Then
|
If TipoMovimiento = 3 AndAlso Not ErrorMovInv Then
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -2983,6 +3153,75 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ErrorMovInv AndAlso TipoMovimiento = 2 AndAlso CveMovimientoSalidaTraspaso > 0 Then
|
||||||
|
|
||||||
|
'VARIABLES
|
||||||
|
Dim Fecha As Date = Now
|
||||||
|
Dim CveProveedor As Integer = -1
|
||||||
|
Dim ProveedorNombre As String = ""
|
||||||
|
Dim SerieFolio As String = ""
|
||||||
|
|
||||||
|
'Dim DrAlmO, DrAlmD As DataRow
|
||||||
|
'Dim CveSucursalOrigen, CveSucursalDestino As Integer
|
||||||
|
'Dim TipoAlmacenOrigen, TipoAlmacenDestino As Integer
|
||||||
|
'Dim CveSubProyectoOrigen, CveSubProyectoDestino As Integer
|
||||||
|
Dim IdCtaContableOrigen, IdCtaContableDestino As Integer
|
||||||
|
|
||||||
|
If ObjCompras.GetCompras(CveCompraSurtir, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
|
'Fecha = ObjCompras.DtResultados(0)("Fecha").ToString.ToDate
|
||||||
|
Fecha = TxtFecha.Text.ToDate
|
||||||
|
CveProveedor = ObjCompras.DtResultados(0)("CveProveedor").ToString.ToEntero
|
||||||
|
ProveedorNombre = ObjCompras.DtResultados(0)("RazonSocial").ToString
|
||||||
|
SerieFolio = $"Compra: {ObjCompras.DtResultados(0)("SerieFolio").ToString}"
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'DrAlmO = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
|
'DrAlmD = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenDevolucionProveedor).FiltroPrimero("")
|
||||||
|
|
||||||
|
'If Not ErrorMovInv AndAlso DrAlmO IsNot Nothing AndAlso DrAlmD IsNot Nothing Then
|
||||||
|
' CveSucursalOrigen = DrAlmO("CveSubProyecto").ToString.ToEntero
|
||||||
|
' TipoAlmacenOrigen = DrAlmO("CveTipoAlmacen").ToString.ToEntero
|
||||||
|
' CveSubProyectoOrigen = DrAlmO("CveSubProyecto").ToString.ToEntero
|
||||||
|
' IdCtaContableOrigen = DrAlmO("IdCtaContable").ToString.ToEntero
|
||||||
|
|
||||||
|
' CveSucursalDestino = DrAlmD("CveSubProyecto").ToString.ToEntero
|
||||||
|
' TipoAlmacenDestino = DrAlmD("CveTipoAlmacen").ToString.ToEntero
|
||||||
|
' CveSubProyectoDestino = DrAlmD("CveSubProyecto").ToString.ToEntero
|
||||||
|
' IdCtaContableDestino = DrAlmO("IdCtaContable").ToString.ToEntero
|
||||||
|
'Else
|
||||||
|
' ErrorMovInv = True
|
||||||
|
'End If
|
||||||
|
|
||||||
|
Dim resultado As DataTable = Nothing
|
||||||
|
|
||||||
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaTraspaso, UsuarioActual.CveEmpresa) Then
|
||||||
|
resultado = ObjInventario.DtResultados.Copy()
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {CveAlmacenDevolucionProveedor}").ToEntero()
|
||||||
|
|
||||||
|
'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO:
|
||||||
|
Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("RecepcionAlmacen/TraspasoAlmacen", 53, 0, 0, 1, Now, ProveedorNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CvePrePolizaTraspaso > 0 AndAlso ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaTraspaso, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableOrigen, -1, CveMovimientoAlmacen:=CveMovimientoSalidaTraspaso, Contabilizable:=False, ImporteMX:=importe) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContableDestino, -1, CveMovimientoAlmacen:=CveMovimiento, Contabilizable:=False, ImporteMX:=importe) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
'AGREGA SALDOS A OC SURTIDAS
|
'AGREGA SALDOS A OC SURTIDAS
|
||||||
If Not ErrorMovInv And CveOCSurtir > 0 Then
|
If Not ErrorMovInv And CveOCSurtir > 0 Then
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -3013,8 +3252,19 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
Dim Msg As New StringBuilder
|
Dim Msg As New StringBuilder
|
||||||
Dim link As String = String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, InvFolio)
|
Dim link As String = String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, InvFolio)
|
||||||
Msg.AppendFormat("Movimiento Registrado: Folio: <b>{0}</b>", link)
|
'SI LO SOLO GENERO EL MOVIMIENTO DE ENTRADA O SALIDA
|
||||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
If CveMovimiento > 0 AndAlso CveMovimientoSalidaTraspaso <= 0 Then
|
||||||
|
Msg.AppendFormat("Movimiento Registrado: Folio: <b>{0}</b>", link)
|
||||||
|
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||||
|
'SI GENERO UN TRASPASO AL ALMACEN DE DEVOLUCION
|
||||||
|
ElseIf CveMovimiento > 0 AndAlso CveMovimientoSalidaTraspaso > 0 Then
|
||||||
|
Msg.AppendFormat("Movimiento de Salida: Folio: <b>{0}</b>", String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoSalidaTraspaso, FolioSalidaTraspaso))
|
||||||
|
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalidaTraspaso)))
|
||||||
|
|
||||||
|
Msg.AppendFormat("<br/>Movimiento de Entrada: Folio: <b>{0}</b>", link)
|
||||||
|
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'If CveMovtoSalidaDirecta > 0 Then
|
'If CveMovtoSalidaDirecta > 0 Then
|
||||||
' Msg.AppendFormat("<br/><br/> Movimientos de control:<br/>")
|
' Msg.AppendFormat("<br/><br/> Movimientos de control:<br/>")
|
||||||
@@ -3047,7 +3297,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
link = String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoVirtual, FolioVirtual)
|
link = String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoVirtual, FolioVirtual)
|
||||||
Msg.AppendFormat("<br/>Movimiento de Entrada al Almacen Virtual: Folio: <b>{0}</b>", link)
|
Msg.AppendFormat("<br/>Movimiento de Entrada al Almacen Virtual: Folio: <b>{0}</b>", link)
|
||||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtual)))
|
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtual)))
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CONTABILIDAD
|
'CONTABILIDAD
|
||||||
|
|||||||
@@ -5390,11 +5390,11 @@ Partial Class OC
|
|||||||
If CveConfianzaProveedor <= 0 Then
|
If CveConfianzaProveedor <= 0 Then
|
||||||
CveConfianzaProveedor = 2
|
CveConfianzaProveedor = 2
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ChkCotizacion.Checked = CveConfianzaProveedor > 0
|
|
||||||
ChkCotizacion.Enabled = CveConfianzaProveedor <= 0
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
ChkCotizacion.Checked = CveConfianzaProveedor > 0
|
||||||
|
ChkCotizacion.Enabled = CveConfianzaProveedor <= 0
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -701,7 +701,7 @@ Partial Class Ventas_PortalCliente
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If EstatusPagoProsepago = 0 Then
|
If EstatusPagoProsepago = 0 Then
|
||||||
Alert("Ocurrió un error al procesar el pago, no se a realizadó ningun cargo. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("La transacción no se pudo realizar, no se aplicó ningun cargo. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1131,7 +1131,7 @@ Partial Class Ventas_PortalCliente
|
|||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
ObjConta.Commit()
|
ObjConta.Commit()
|
||||||
Alert($"Se realizó el pago exitoso de las siguientes facturas:<br><br> {MensajeAlert.ToString}", TipoMensaje.MsgInformacion)
|
Alert($"La transacción se realizó correctamente y el pago se aplicó en las siguientes facturas:<br><br> {MensajeAlert.ToString}", TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
ObjConta.RollBack()
|
ObjConta.RollBack()
|
||||||
Alert(MensajeError.ToString, TipoMensaje.MsgError)
|
Alert(MensajeError.ToString, TipoMensaje.MsgError)
|
||||||
|
|||||||
@@ -74,32 +74,32 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
DDlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
DDlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub CargaPreciosLista()
|
Public Sub CargaPreciosLista()
|
||||||
|
|
||||||
DdlPrecioLista.Items.Clear()
|
DdlPrecioLista.Items.Clear()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'si manneja precios de lista
|
If UsuarioActual.Empresa.Funcionalidad(404).ToEntero > 0 Then 'si manneja precios de lista
|
||||||
Dim ObjVta As New ClsVentas
|
Dim ObjVta As New ClsVentas
|
||||||
Dim primerItem As String = ""
|
Dim primerItem As String = ""
|
||||||
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
|
If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
|
||||||
DdlPrecioLista.DataSource = ObjVta.DtResultados.Copy()
|
DdlPrecioLista.DataSource = ObjVta.DtResultados.Copy()
|
||||||
DdlPrecioListaCarga.DataSource = ObjVta.DtResultados.Copy()
|
DdlPrecioListaCarga.DataSource = ObjVta.DtResultados.Copy()
|
||||||
primerItem = ObjVta.DtResultados.FiltroPrimeroValor("CvePrecioLista")
|
primerItem = ObjVta.DtResultados.FiltroPrimeroValor("CvePrecioLista")
|
||||||
End If
|
End If
|
||||||
ObjVta.Dispose()
|
ObjVta.Dispose()
|
||||||
|
|
||||||
|
|
||||||
DdlPrecioLista.DataBind()
|
DdlPrecioLista.DataBind()
|
||||||
DdlPrecioListaCarga.DataBind()
|
DdlPrecioListaCarga.DataBind()
|
||||||
|
|
||||||
If (DdlPrecioLista.Items.Count = 1) Then
|
If (DdlPrecioLista.Items.Count = 1) Then
|
||||||
DdlPrecioLista.Items.FindByValue(primerItem).Selected = True
|
DdlPrecioLista.Items.FindByValue(primerItem).Selected = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
DdlPrecioLista.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
DdlPrecioLista.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
||||||
DdlPrecioListaCarga.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
DdlPrecioListaCarga.Items.Insert(0, New ListItem("Sin Precio Lista", "-2"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub CargaPS()
|
Public Sub CargaPS()
|
||||||
@@ -142,19 +142,19 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
|
|
||||||
DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlMarca.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargarModelos()
|
Private Sub CargarModelos()
|
||||||
If UsuarioActual.Empresa.Funcionalidad(558).ToString = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(558).ToString = "1" Then
|
||||||
lblModelo.visible = True
|
lblModelo.visible = True
|
||||||
DdlModelo.Visible = True
|
DdlModelo.Visible = True
|
||||||
Dim ObjGeneral As New ClsGenerales
|
Dim ObjGeneral As New ClsGenerales
|
||||||
If ObjGeneral.GetModelos(UsuarioActual.CveEmpresa) Then
|
If ObjGeneral.GetModelos(UsuarioActual.CveEmpresa) Then
|
||||||
DdlModelo.DataSource = ObjGeneral.DtResultados
|
DdlModelo.DataSource = ObjGeneral.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjGeneral.Dispose()
|
ObjGeneral.Dispose()
|
||||||
DdlModelo.DataBind()
|
DdlModelo.DataBind()
|
||||||
End If
|
End If
|
||||||
DdlModelo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlModelo.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
Dim objPS As New ClsProductosServicios
|
Dim objPS As New ClsProductosServicios
|
||||||
@@ -223,7 +223,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
|
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
BtnConsultar_Click(Nothing, Nothing)
|
BtnConsultar_Click(Nothing, Nothing)
|
||||||
RegistraScript("$('#divAgregar').modal('hide')")
|
RegistraScript("$('#divAgregar').modal('hide')")
|
||||||
TxtImporte.Text = ""
|
TxtImporte.Text = ""
|
||||||
TxtPrecio.Text = ""
|
TxtPrecio.Text = ""
|
||||||
TxtPorcentaje.Text = ""
|
TxtPorcentaje.Text = ""
|
||||||
@@ -410,26 +410,26 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
Dim Correcto As Boolean = False
|
Dim Correcto As Boolean = False
|
||||||
Dim CvePS As Integer = DtPS.FiltroPrimeroValor("CvePS", String.Format("Codigo='{0}' AND CveEmpresa={1}", row(0).ToString(), UsuarioActual.CveEmpresa))
|
Dim CvePS As Integer = DtPS.FiltroPrimeroValor("CvePS", String.Format("Codigo='{0}' AND CveEmpresa={1}", row(0).ToString(), UsuarioActual.CveEmpresa))
|
||||||
Dim CvePrecioLista As Integer = DdlPrecioListaCarga.SelectedValue.ToEntero()
|
Dim CvePrecioLista As Integer = DdlPrecioListaCarga.SelectedValue.ToEntero()
|
||||||
Dim PrecioNuevo As Decimal = row("Precio").ToString().ToDecimal()
|
Dim PrecioNuevo As Decimal = row("Precio").ToString().ToDecimal()
|
||||||
Dim Porcentaje As Decimal = -1
|
Dim Porcentaje As Decimal = -1
|
||||||
|
|
||||||
If CvePS > 0 AndAlso CvePrecioLista > 0 Then
|
If CvePS > 0 AndAlso CvePrecioLista > 0 Then
|
||||||
|
|
||||||
|
|
||||||
Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
Correcto = ObjPS.UpdatePSPreciosLista(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
||||||
If Correcto Then
|
If Correcto Then
|
||||||
RowsCargados += 1
|
RowsCargados += 1
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If CvePS > 0 AndAlso CvePrecioLista = -2 Then
|
If CvePS > 0 AndAlso CvePrecioLista = -2 Then
|
||||||
Correcto = ObjPS.UpdatePSPrecios(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
Correcto = ObjPS.UpdatePSPrecios(PrecioNuevo, CvePrecioLista, Porcentaje, CvePS, UsuarioActual.CveUsuario, DateTime.Now, True)
|
||||||
If Correcto Then
|
If Correcto Then
|
||||||
RowsCargados += 1
|
RowsCargados += 1
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Correcto = False
|
Correcto = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If Not Correcto Then
|
If Not Correcto Then
|
||||||
ProductosNoCargados.AppendFormat("{0},", row("Producto / Servicio").ToString())
|
ProductosNoCargados.AppendFormat("{0},", row("Producto / Servicio").ToString())
|
||||||
@@ -508,12 +508,12 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
End While
|
End While
|
||||||
|
|
||||||
Return dataTable
|
Return dataTable
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub gvSucursal_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub gvSucursal_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
e.Row.FCTextBox("TxtPrecioMinimo").Attributes.Add("onKeyUp", String.Format("FncSeleccionaChk({0});", e.Row.FCCheckBox("chkSucursal").ClientID))
|
e.Row.FCTextBox("TxtPrecioMinimo").Attributes.Add("onKeyUp", String.Format("FncSeleccionaChk({0});", e.Row.FCCheckBox("chkSucursal").ClientID))
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user