Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -7222,6 +7222,30 @@ Public Class ClsVentas
|
|||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetProcedimientoProductoListaPrecio(CveProcedimiento As Integer, CveEmpresa As Integer, CveCliente As Integer, CveSubProyecto As Integer,
|
||||||
|
CveClienteSucursal As Integer, CveTipoVenta As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_ProcedimientosProductosPLGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|
||||||
|
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
|
||||||
|
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener los Productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
Public Function RemoveProcedimientoProducto(CveProcedimientoProducto As Integer, CveEmpresa As Integer) As Boolean
|
Public Function RemoveProcedimientoProducto(CveProcedimientoProducto As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
|||||||
@@ -1742,7 +1742,7 @@ Namespace Extensiones
|
|||||||
Dim TmpDr As DataRow = Nothing
|
Dim TmpDr As DataRow = Nothing
|
||||||
|
|
||||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||||
If RowFilter <> "" Then
|
If RowFilter <> "" OrElse Orderby <> "" Then
|
||||||
Dim Dv As New DataView(dt, RowFilter, Orderby, DataViewRowState.CurrentRows)
|
Dim Dv As New DataView(dt, RowFilter, Orderby, DataViewRowState.CurrentRows)
|
||||||
If Dv.ToTable.Rows.Count > 0 Then
|
If Dv.ToTable.Rows.Count > 0 Then
|
||||||
TmpDr = Dv.ToTable.Rows(Dv.ToTable.Rows.Count - 1)
|
TmpDr = Dv.ToTable.Rows(Dv.ToTable.Rows.Count - 1)
|
||||||
|
|||||||
@@ -432,7 +432,7 @@ Partial Class Inventarios_Kardex
|
|||||||
If UsuarioActual.TienePermisoProceso(201) Then
|
If UsuarioActual.TienePermisoProceso(201) Then
|
||||||
DivIndicadores.Visible = True
|
DivIndicadores.Visible = True
|
||||||
|
|
||||||
Dim Dr = dt.FiltroUltimo("")
|
Dim Dr = dt.FiltroUltimo("", "FechaMovto , CveMovimiento , CveMovimientoDetalle ")
|
||||||
Dim TC = If(GlobalTipoCambio(NowADS()) > 0, GlobalTipoCambio(NowADS()), 1)
|
Dim TC = If(GlobalTipoCambio(NowADS()) > 0, GlobalTipoCambio(NowADS()), 1)
|
||||||
|
|
||||||
LtIndicador_Existencia.Text = Dr("Existencias").ToString.ToDecimal.ToString("#,##0.####")
|
LtIndicador_Existencia.Text = Dr("Existencias").ToString.ToDecimal.ToString("#,##0.####")
|
||||||
@@ -470,7 +470,7 @@ Partial Class Inventarios_Kardex
|
|||||||
GvM.Attributes.Add("data-heighterror", "270")
|
GvM.Attributes.Add("data-heighterror", "270")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then dt = dt.FiltraParametros("", "FechaMovto DESC") ' ordenamiento descendente
|
'If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then dt = dt.FiltraParametros("", "FechaMovto DESC") ' ordenamiento descendente
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
|
|
||||||
Return dt
|
Return dt
|
||||||
@@ -728,9 +728,6 @@ Partial Class Inventarios_Kardex
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkPSAntyerior_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkPSAntyerior_Click(sender As Object, e As EventArgs)
|
||||||
NavegacionPS(Siguiente:=False)
|
NavegacionPS(Siguiente:=False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -9064,7 +9064,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%--Cliente Solo se usa para en PAgo Directo --%>
|
<%--Cliente Solo se usa para en Pago Directo --%>
|
||||||
<div runat="server" visible="False" id="DvModalTipoVentaCliente">
|
<div runat="server" visible="False" id="DvModalTipoVentaCliente">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-12 form-md-line-input input-iconright" style="margin-top: -7px!important">
|
<div class="form-group col-md-12 form-md-line-input input-iconright" style="margin-top: -7px!important">
|
||||||
@@ -9075,8 +9075,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<%--Medico Procedimiento--%>
|
<%--Medico Procedimiento--%>
|
||||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoMedicoProcedimiento">
|
<div runat="server" visible="False" id="DvModalTipoVentaPasoMedicoProcedimiento">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -9125,15 +9123,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" runat="server" id="DVGvProductosProcedimiento" visible="false">
|
<div class="row" runat="server" id="DVGvPSProced" visible="false">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<asp:CheckBox ID="ChkVerTodosPS" runat="server" Text="Ver Todos" AutoPostBack="true" OnCheckedChanged="ChkVerTodosPS_CheckedChanged" />
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4" style="text-align: right">
|
||||||
|
<input type="text" id="TxtBus" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvPSProced.ClientID) %>" style="display: inline-block; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvPSProced.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
Productos utilizados en el procedimiento
|
Productos utilizados en el procedimiento
|
||||||
<asp:GridView ID="GvProductosProcedimiento" runat="server" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" AutoGenerateColumns="False" Width="100%" OnRowDataBound="GvProductosProcedimiento_RowDataBound"
|
<asp:GridView ID="GvPSProced" runat="server" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" AutoGenerateColumns="False" Width="100%" OnRowDataBound="GvPSProced_RowDataBound"
|
||||||
DataKeyNames="CveProcedimientoProducto,CveProcedimiento,Cantidad,CvePS,CodigoPS,Autogenerado,Estatus,CveVenta,CveUnidadMedida,Abreviatura,CveClasificacion,Clasificacion,Precio" GridLines="None">
|
DataKeyNames="Cantidad,CvePS,CodigoPS,CveUnidadMedida,Abreviatura,CveClasificacion,Clasificacion,Precio" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Cant." ItemStyle-Width="40px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Cant." ItemStyle-Width="30px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtCantidad" runat="server" Text="" Width="40px" Style="text-align: right!important"></asp:TextBox>
|
<asp:TextBox ID="TxtCantidad" runat="server" Text="" Width="35px" Style="text-align: right!important"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilTxtCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="FilTxtCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -9143,18 +9150,14 @@
|
|||||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto">
|
<asp:BoundField DataField="CodigoPS" HeaderText="Producto">
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
<ItemStyle HorizontalAlign="Left" />
|
||||||
</asp:BoundField>
|
</asp:BoundField>
|
||||||
<asp:BoundField DataField="Abreviatura" HeaderText="UM">
|
|
||||||
<ItemStyle HorizontalAlign="Left" />
|
|
||||||
</asp:BoundField>
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Precio" ItemStyle-Width="30px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Precio" ItemStyle-Width="30px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:#,###.00##}") %>' Style="text-align: right!important" Width="80px" Enabled="false"></asp:TextBox>
|
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:#,###.00##}") %>' Style="text-align: right!important" Width="70px" Enabled="false"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<%--<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:#,##0.###}" HtmlEncode="False" />--%>
|
<%--<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:#,##0.###}" HtmlEncode="False" />--%>
|
||||||
</Columns>
|
</Columns>
|
||||||
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -40092,13 +40092,13 @@ Partial Class Ventas
|
|||||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||||
DvModalRequiereOSFecha.Visible = False
|
DvModalRequiereOSFecha.Visible = False
|
||||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||||
DVGvProductosProcedimiento.Visible = False
|
DVGvPSProced.Visible = False
|
||||||
Case "4" 'Consignación
|
Case "4" 'Consignación
|
||||||
ChkRequiereTecnicoModal.Checked = False
|
ChkRequiereTecnicoModal.Checked = False
|
||||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||||
DvModalRequiereOSFecha.Visible = False
|
DvModalRequiereOSFecha.Visible = False
|
||||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||||
DVGvProductosProcedimiento.Visible = False
|
DVGvPSProced.Visible = False
|
||||||
Case "99" ' Otros
|
Case "99" ' Otros
|
||||||
LnkDvModalTipoVentaAceptar.Visible = False
|
LnkDvModalTipoVentaAceptar.Visible = False
|
||||||
UpDvModalTipoVenta.Update()
|
UpDvModalTipoVenta.Update()
|
||||||
@@ -40187,9 +40187,9 @@ Partial Class Ventas
|
|||||||
DdlMedicoModal.SelectedValueExist(-1)
|
DdlMedicoModal.SelectedValueExist(-1)
|
||||||
DdlProcedimientoModal.SelectedValueExist(-1)
|
DdlProcedimientoModal.SelectedValueExist(-1)
|
||||||
|
|
||||||
GvProductosProcedimiento.DataSource = Nothing
|
GvPSProced.DataSource = Nothing
|
||||||
GvProductosProcedimiento.DataBind()
|
GvPSProced.DataBind()
|
||||||
DVGvProductosProcedimiento.Visible = False
|
DVGvPSProced.Visible = False
|
||||||
|
|
||||||
|
|
||||||
LblDvModalTipoVentaTitulo.Text = "Tipo de Venta"
|
LblDvModalTipoVentaTitulo.Text = "Tipo de Venta"
|
||||||
@@ -40239,7 +40239,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
For Each GvRow As GridViewRow In GvPSProced.Rows
|
||||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||||
@@ -40322,7 +40322,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim CountPsAgregados As Integer = 0
|
Dim CountPsAgregados As Integer = 0
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
For Each GvRow As GridViewRow In GvPSProced.Rows
|
||||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||||
@@ -40366,7 +40366,7 @@ Partial Class Ventas
|
|||||||
UpCliente.Update()
|
UpCliente.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvProductosProcedimiento_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
Protected Sub GvPSProced_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
If e.Row.DataKey("Precio").ToDecimal = 0 Then
|
If e.Row.DataKey("Precio").ToDecimal = 0 Then
|
||||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||||
@@ -40380,26 +40380,30 @@ Partial Class Ventas
|
|||||||
UpDvModalTipoVenta.Update()
|
UpDvModalTipoVenta.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
CargaPSProcedimiento(DdlProcedimientoModal.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, CveClienteSucursalL:=DdlClienteSucursalSucursal, CveTipoVentaL:=RBLTipoVenta.SelectedValue.ToEntero)
|
CargaPSProcedimiento(DdlProcedimientoModal.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, CveClienteSucursalL:=DdlClienteSucursalSucursal, CveTipoVentaL:=RBLTipoVenta.SelectedValue.ToEntero)
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub ChkVerTodosPS_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Private Sub CargaPSProcedimiento(CveProcedimiento As Integer, CveClienteL As Integer, CveSubProyectoL As Integer, Optional CveClienteSucursalL As Integer = -1, Optional CveTipoVentaL As Integer = -1)
|
CargaPSProcedimiento(DdlProcedimientoModal.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, CveClienteSucursalL:=DdlClienteSucursalSucursal, CveTipoVentaL:=RBLTipoVenta.SelectedValue.ToEntero, AplicaTodos:=ChkVerTodosPS.Checked)
|
||||||
If CveProcedimiento > 0 Then
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaPSProcedimiento(CveProcedimiento As Integer, CveClienteL As Integer, CveSubProyectoL As Integer, Optional CveClienteSucursalL As Integer = -1, Optional CveTipoVentaL As Integer = -1, Optional AplicaTodos As Boolean = False)
|
||||||
|
If CveProcedimiento > 0 OrElse AplicaTodos Then
|
||||||
|
If AplicaTodos Then CveProcedimiento = -1
|
||||||
Dim objVenta As New ClsVentas
|
Dim objVenta As New ClsVentas
|
||||||
If objVenta.GetProcedimientoProducto(CveProcedimiento, 1, UsuarioActual.CveEmpresa, CveClienteL, CveSubProyectoL, CveClienteSucursalL, CveTipoVentaL) Then
|
If objVenta.GetProcedimientoProductoListaPrecio(CveProcedimiento, UsuarioActual.CveEmpresa, CveClienteL, CveSubProyectoL, CveClienteSucursalL, CveTipoVentaL) Then
|
||||||
GvProductosProcedimiento.DataSource = objVenta.DtResultados
|
GvPSProced.DataSource = objVenta.DtResultados
|
||||||
End If
|
End If
|
||||||
objVenta.Dispose()
|
objVenta.Dispose()
|
||||||
Else
|
Else
|
||||||
GvProductosProcedimiento.DataSource = Nothing
|
GvPSProced.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
GvProductosProcedimiento.DataBind()
|
GvPSProced.DataBind()
|
||||||
DVGvProductosProcedimiento.Visible = True
|
DVGvPSProced.Visible = True
|
||||||
|
|
||||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
For Each GvRow As GridViewRow In GvPSProced.Rows
|
||||||
If RBLTipoVenta.SelectedValue = "2" Then
|
If RBLTipoVenta.SelectedValue = "2" Then
|
||||||
|
|
||||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||||
@@ -41638,5 +41642,6 @@ Partial Class Ventas
|
|||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user