-
This commit is contained in:
@@ -852,13 +852,14 @@ Public Class ClsOS
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetDetalleMateriales(CveOSDetalle As Integer, CveOS As Integer) As Boolean
|
||||
Public Function GetDetalleMateriales(CveOSDetalle As Integer, CveOS As Integer, Optional FiltraTipoAlamacen As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OS_OrdenesServicioDetallesMaterialesGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle
|
||||
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||
.Add("@FiltraTipoAlamacen", SqlDbType.Bit).Value = FiltraTipoAlamacen
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -6342,7 +6342,7 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetProcedimientoProducto(CveProcedimiento As Integer, Estatus As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetProcedimientoProducto(CveProcedimiento As Integer, Estatus As Integer, CveEmpresa As Integer, CveCliente As Integer, CveSubProyecto As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProcedimientosProductosGet")
|
||||
@@ -6351,6 +6351,8 @@ Public Class ClsVentas
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@Estatus", SqlDbType.Int).Value = Estatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -1701,8 +1701,22 @@ Namespace Extensiones
|
||||
Return DirectCast(Row.FindControl(Control), MaskedEditExtender)
|
||||
End Function
|
||||
|
||||
'AjaxControlToolkit
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function FCHtmlGenericControl(ByVal Row As GridViewRow, ByVal Control As String) As HtmlGenericControl
|
||||
Return DirectCast(Row.FindControl(Control), HtmlGenericControl)
|
||||
End Function
|
||||
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function FCValidatorCalloutExtender(ByVal Row As GridViewRow, ByVal Control As String) As ValidatorCalloutExtender
|
||||
Return DirectCast(Row.FindControl(Control), ValidatorCalloutExtender)
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
'AjaxControlToolkit
|
||||
|
||||
<Runtime.CompilerServices.Extension()>
|
||||
Public Function FCRangeValidator(ByVal Row As GridViewRow, ByVal Control As String) As RangeValidator
|
||||
Return DirectCast(Row.FindControl(Control), RangeValidator)
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvMateriales" CssClass="table table-striped table-hover Widthall mysmallbtn" GridLines="None" runat="server" AutoGenerateColumns="False" DataKeyNames="CvePS" EmptyDataText="Sin Materiales en la Orden de Servicio" ToolTip="Listado de Materiales de Orden de Servicio">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" ItemStyle-Width="60px" />
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" ItemStyle-Width="60px" DataFormatString="{0:N3}" />
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" />
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
@@ -1277,8 +1277,8 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvSolicitarDevolucion" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado Historial"
|
||||
DataKeyNames="CveVentaDetalle,Cantidad,CveAlmacenActual,CvePS,CveUM,PU,CveMovimientoDetalle,Lote,Serie,FechaCaducidad"
|
||||
<asp:GridView ID="GvSolicitarDevolucion" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado Historial"
|
||||
DataKeyNames="CveVentaDetalle,Cantidad,CveAlmacenActual,CvePS,CveUM,PU,CveMovimientoDetalle,Lote,Serie,FechaCaducidad,AplicaSerie,AplicaLote,AplicaCaducidad,CodigoPS"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" OnRowDataBound="GvSolicitarDevolucion_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -1297,9 +1297,44 @@
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Concepto</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlcodigoPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlcodigoPS" runat="server" Text='<%# Eval("CodigoPS") %>' ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Lote</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" runat="server" Width="50px" Text='<%# Eval("Lote") %>' Visible="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Serie</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtSerie" runat="server" Width="50px" Text='<%# Eval("Serie") %>' Visible="false" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha Cad.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
|
||||
<div runat="server" id="DVFechaCaducidad" visible="false">
|
||||
|
||||
<asp:TextBox ID="TxtFechaCaducidad" runat="server" Width="70px" Text='<%# Eval("FechaCaducidad") %>' ></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="METxtFechaCaducidad" runat="server" TargetControlID="TxtFechaCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CCTxtFechaCaducidad" TargetControlID="TxtFechaCaducidad" PopupButtonID="TxtFechaCaducidad" PopupPosition="BottomLeft" ></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVTxtFechaCaducidad" runat="server" ControlToValidate="TxtFechaCaducidad" Display="None"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Caducidad''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."
|
||||
Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpDevolucion">
|
||||
</asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTxtFechaCaducidad" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaCaducidad" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -1311,7 +1346,7 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:LinkButton ID="LnkModalSolicitarDevolucion" runat="server" CssClass="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si"
|
||||
<asp:LinkButton ID="LnkModalSolicitarDevolucion" runat="server" CssClass="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" ValidationGroup="GrpDevolucion"
|
||||
OnClick="LnkModalSolicitarDevolucion_Click" >Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
@@ -1320,8 +1355,9 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
<%--MODAL FINALIZAR ORDEN INICIO --%>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="content7" ContentPlaceHolderID="JS" runat="server">
|
||||
|
||||
@@ -875,7 +875,7 @@ Partial Class OS_OrdenesServicios
|
||||
Private Sub CargaMateriales()
|
||||
Dim objOS As New ClsOS
|
||||
|
||||
If objOS.GetDetalleMateriales(-1, CveOS) Then
|
||||
If objOS.GetDetalleMateriales(-1, CveOS, True) Then
|
||||
GvMateriales.DataSource = objOS.DtResultados
|
||||
End If
|
||||
objOS.Dispose()
|
||||
@@ -3083,7 +3083,31 @@ Partial Class OS_OrdenesServicios
|
||||
Protected Sub GvSolicitarDevolucion_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.FCTextBox("TxtDev").Attributes.Add("onblur", String.Format("ValidarCantidad(this, {0})", e.Row.DataKey("Cantidad")))
|
||||
|
||||
'AplicaSerie, AplicaLote, AplicaCaducidad
|
||||
If Boolean.Parse(e.Row.DataKey("AplicaSerie")) Then
|
||||
e.Row.FCTextBox("TxtSerie").Visible = True
|
||||
End If
|
||||
|
||||
If Boolean.Parse(e.Row.DataKey("AplicaLote")) Then
|
||||
e.Row.FCTextBox("TxtLote").Visible = True
|
||||
End If
|
||||
|
||||
If Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
|
||||
|
||||
e.Row.FCHtmlGenericControl("DVFechaCaducidad").Visible = True
|
||||
'e.Row.FCTextBox("TxtFechaCaducidad").Visible = True
|
||||
'e.Row.FCMaskedEditExtender("METxtFechaCaducidad").Visible = True
|
||||
'e.Row.FCCalendarExtender("CCTxtFechaCaducidad").Visible = True
|
||||
'e.Row.FCCompareValidator("CVTxtFechaCaducidad").Visible = True
|
||||
'e.Row.FCValidatorCalloutExtender("VCTxtFechaCaducidad").Visible = True
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -3101,6 +3125,58 @@ Partial Class OS_OrdenesServicios
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim SbErroresDev As New StringBuilder
|
||||
|
||||
For Each GvRow As GridViewRow In GvSolicitarDevolucion.Rows
|
||||
|
||||
|
||||
If GvRow.DataKey("Cantidad").ToDecimal > 0 Then
|
||||
|
||||
Dim sbTemperror As New StringBuilder
|
||||
Dim ErrorCountDev As Integer = 0
|
||||
|
||||
sbTemperror.Append($"Producto: {GvRow.DataKey("CodigoPS") } requiere: ")
|
||||
|
||||
|
||||
If Boolean.Parse(GvRow.DataKey("AplicaSerie")) Then
|
||||
If GvRow.FCTextBox("TxtSerie").Text.Trim = String.Empty Then
|
||||
sbTemperror.Append($" Serie, ")
|
||||
ErrorCountDev = ErrorCountDev + 1
|
||||
End If
|
||||
End If
|
||||
|
||||
If Boolean.Parse(GvRow.DataKey("AplicaLote")) Then
|
||||
If GvRow.FCTextBox("TxtLote").Text = String.Empty Then
|
||||
sbTemperror.Append($" Lote, ")
|
||||
ErrorCountDev = ErrorCountDev + 1
|
||||
End If
|
||||
End If
|
||||
|
||||
If Boolean.Parse(GvRow.DataKey("AplicaCaducidad")) Then
|
||||
If Not IsDate(GvRow.FCTextBox("TxtFechaCaducidad").Text) Then
|
||||
sbTemperror.Append($" Fecha de caducidad")
|
||||
ErrorCountDev = ErrorCountDev + 1
|
||||
End If
|
||||
End If
|
||||
|
||||
If ErrorCountDev > 0 Then
|
||||
sbTemperror.Append($"<br/>")
|
||||
SbErroresDev.AppendLine(sbTemperror.ToString)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
If SbErroresDev.ToString.Length > 0 Then
|
||||
Alert($"Se encontraron los siguientes errores: <br> {SbErroresDev.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim PropcesoOK As Boolean = True
|
||||
Dim ObjV As New ClsVentas
|
||||
ObjV.IniciaTransacSQL()
|
||||
@@ -3130,6 +3206,7 @@ Partial Class OS_OrdenesServicios
|
||||
Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL())
|
||||
|
||||
Dim CveMovimiento As Integer = ObjInventario.AddMovimiento(CveAlmacenActual, 8, CveMoneda, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaPedido, CveSubProyectoPedido, -1, CveOS:=CveOS, CveAlmacenDestino:=CveAlmacenDestino)
|
||||
Dim Folio As Integer = ObjInventario.Folio
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
|
||||
@@ -3143,9 +3220,12 @@ Partial Class OS_OrdenesServicios
|
||||
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
|
||||
Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero
|
||||
Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||
Dim Lote As String = GvRow.DataKey("Lote")
|
||||
Dim Serie As String = GvRow.DataKey("Serie")
|
||||
Dim FechaCaducidad As DateTime = GvRow.DataKey("FechaCaducidad").ToDateTime
|
||||
|
||||
Dim Lote As String = GvRow.FCTextBox("TxtLote").Text.Trim
|
||||
Dim Serie As String = GvRow.FCTextBox("TxtSerie").Text.Trim
|
||||
Dim FechaCaducidad As DateTime = GvRow.FCTextBox("TxtFechaCaducidad").Text.ToDate
|
||||
|
||||
|
||||
|
||||
If CantidadRegistro > 0 Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadRegistro, CveUM, CvePS, PU, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalle, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad) Then
|
||||
@@ -3171,6 +3251,7 @@ Partial Class OS_OrdenesServicios
|
||||
Dim PU As Decimal = dRow("PU").ToString.ToDecimal
|
||||
Dim CveVentaDetalle As Integer = dRow("CveVentaDetalle").ToString.ToEntero
|
||||
Dim CveMovimientoDetalle As Integer = dRow("CveMovimientoDetalle").ToString.ToEntero
|
||||
|
||||
Dim Lote As String = dRow("Lote").ToString
|
||||
Dim Serie As String = dRow("Serie").ToString
|
||||
Dim FechaCaducidad As DateTime = dRow("FechaCaducidad").ToString.ToDateTime
|
||||
@@ -3183,6 +3264,18 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
Next
|
||||
|
||||
If PropcesoOK Then
|
||||
|
||||
Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL)
|
||||
Dim LigaVenta As String = String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, Folio, "Material utilizado")
|
||||
|
||||
If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaPedido, CveOS:=CveOS) Then
|
||||
PropcesoOK = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
PropcesoOK = False
|
||||
End If
|
||||
|
||||
@@ -240,7 +240,7 @@ Partial Class Ventas_CatProcedimientoDetalle
|
||||
|
||||
Dim objVenta As New ClsVentas
|
||||
|
||||
If objVenta.GetProcedimientoProducto(CveProcedimiento, -1, UsuarioActual.CveEmpresa) Then
|
||||
If objVenta.GetProcedimientoProducto(CveProcedimiento, -1, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
GvProductos.DataSource = objVenta.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
@@ -4098,7 +4098,7 @@
|
||||
</tr>
|
||||
<tr align="left" id="TrObsMedico2" visible="false" runat="server">
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlMedicoObservaciones" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" >
|
||||
<asp:DropDownList ID="DdlMedicoObservaciones" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Enabled="false" >
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
@@ -4110,8 +4110,7 @@
|
||||
</tr>
|
||||
<tr align="left" id="TrObsProcedimiento2" visible="false" runat="server">
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlProcedimientoObservaciones" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento"
|
||||
OnSelectedIndexChanged="DdlProcedimientoModal_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:DropDownList ID="DdlProcedimientoObservaciones" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Enabled="false" >
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
@@ -8422,7 +8421,7 @@
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlClientesWS">Cliente:</asp:Label>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" ></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" Onselectedindexchange="DdlClientesWS_selectedindexchange" ></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -8473,17 +8472,16 @@
|
||||
<div class="col-md-12">
|
||||
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%"
|
||||
DataKeyNames="CveProcedimientoProducto,CveProcedimiento,CvePS,CodigoPS,Autogenerado,Estatus,CveVenta,CveUnidadMedida,Abreviatura,CveClasificacion,Clasificacion" GridLines="None">
|
||||
DataKeyNames="CveProcedimientoProducto,CveProcedimiento,Cantidad,CvePS,CodigoPS,Autogenerado,Estatus,CveVenta,CveUnidadMedida,Abreviatura,CveClasificacion,Clasificacion" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20px">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" runat="server" ></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Cant." DataFormatString="{0:N3}" ItemStyle-Width="30px" >
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Cant." ItemStyle-Width="30px">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Cant." ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text="0" Width="30px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text="0" Width="40px" style="text-align:right!important"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
@@ -8498,9 +8496,9 @@
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:BoundField> --%>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="P.U." ItemStyle-Width="30px">
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="P.U." ItemStyle-Width="50px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio") %>' Width="30px"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio") %>' Width="50px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtPrecio" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -35976,36 +35976,12 @@ Partial Class Ventas
|
||||
UpDvModalTipoVenta.Update()
|
||||
End Sub
|
||||
|
||||
'Protected Sub DdlClientesWS_selectedindexchange(sender As Object, e As EventArgs)
|
||||
|
||||
' If DdlClientesWS.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
' DvModalTipoVentaPasoCliente.Visible = False
|
||||
' DvModalTipoVentaPasoRequiereOS.Visible = True
|
||||
Protected Sub DdlClientesWS_selectedindexchange(sender As Object, e As EventArgs)
|
||||
CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClientesWS.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
' 'si es A - Vista o ,Fuera De Linea requiere tecnico
|
||||
' If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
|
||||
' ChkRequiereTecnicoModal.Checked = True
|
||||
' ChkRequiereTecnicoModal.Enabled = False
|
||||
' DvModalRequiereOSFecha.Visible = True
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
' UpDvModalTipoVenta.Update()
|
||||
|
||||
'End Sub
|
||||
|
||||
'Protected Sub DdlMedicoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' ModalValidaMedicoProcedimiento()
|
||||
'End Sub
|
||||
|
||||
'Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' ModalValidaMedicoProcedimiento()
|
||||
'End Sub
|
||||
|
||||
Protected Sub ModalValidaMedicoProcedimiento()
|
||||
|
||||
If DdlMedicoModal.SelectedValue.ToEntero > 0 AndAlso DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then
|
||||
@@ -36109,26 +36085,21 @@ Partial Class Ventas
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
|
||||
Dim Chk As CheckBox = GvRow.FCCheckBox("Chk")
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
|
||||
If Chk.Checked AndAlso Cantidad > 0 Then
|
||||
|
||||
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.FCTextBox("TxtPrecio").Text.ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
|
||||
If Cantidad > 0 Then
|
||||
If AgregarProductoServicio(Cantidad, CveUnidadMedida, Abreviatura, CveClasificacion, Clasificacion,
|
||||
CvePS, "", TxtObsPS.Text.TrimEnd, PU, 0,
|
||||
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
|
||||
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=-1,
|
||||
ImporteProntoPago:=0, ObjDescuento:=Nothing, CvePrecioLista:=-1, PrecioLista:="", NumTurnos:=0) Then
|
||||
CvePS, "", TxtObsPS.Text.TrimEnd, PU, 0,
|
||||
DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text,
|
||||
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=-1,
|
||||
ImporteProntoPago:=0, ObjDescuento:=Nothing, CvePrecioLista:=-1, PrecioLista:="", NumTurnos:=0) Then
|
||||
CountPsAgregados = CountPsAgregados + 1
|
||||
Else
|
||||
Exit For
|
||||
@@ -36153,12 +36124,14 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClientesWS.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaPSProcedimiento(CveProcedimiento As Integer, CveClienteL As Integer, CveSubProyectoL As Integer)
|
||||
If DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then
|
||||
Dim objVenta As New ClsVentas
|
||||
|
||||
If objVenta.GetProcedimientoProducto(DdlProcedimientoModal.SelectedValue.ToEntero, 1, UsuarioActual.CveEmpresa) Then
|
||||
If objVenta.GetProcedimientoProducto(CveProcedimiento, 1, UsuarioActual.CveEmpresa, CveClienteL, CveSubProyectoL) Then
|
||||
GvProductosProcedimiento.DataSource = objVenta.DtResultados
|
||||
End If
|
||||
|
||||
@@ -36172,9 +36145,9 @@ Partial Class Ventas
|
||||
DVGvProductosProcedimiento.Visible = True
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function GeneraOS(ByRef TransacSQL As SqlTransaction, ByRef errorList As List(Of String)) As Boolean
|
||||
|
||||
|
||||
@@ -36268,10 +36241,5 @@ Partial Class Ventas
|
||||
RblRNCTipo_SelectedIndexChanged(RblRNCTipo, EventArgs.Empty)
|
||||
RegistraScript("$('#ModalAplicarNC').modal('show');", "ModalNC")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkTabContabilidad_Click(sender As Object, e As EventArgs)
|
||||
Tab.ActiveTabIndex = 6
|
||||
CargarSaldoAuxiliar(CveCliente)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user