This commit is contained in:
2024-02-12 05:46:08 -07:00
12 changed files with 629 additions and 227 deletions

View File

@@ -497,7 +497,7 @@ Public Class ClsOS
Public Function GetRepOrdenesServicioMedicasRep(FechaI As Date, FechaF As Date, CveCliente As Integer, CveVendedor As Integer, CveEstatusOrdenServicio As Integer, CveUsuarioAtendio As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Public Function GetRepOrdenesServicioMedicasRep(FechaI As Date, FechaF As Date, CveCliente As Integer, CveVendedor As Integer, CveEstatusOrdenServicio As Integer, CveUsuarioAtendio As Integer, CveSubProyecto As Integer, CveEmpresa As Integer,
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1) As Boolean Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveEspecialidad As Integer = -1, Optional CveClienteSucursal As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_OS_OrdenesServiciosMedicasRepGet") DataAdapter("PA_OS_OrdenesServiciosMedicasRepGet")
@@ -514,6 +514,8 @@ Public Class ClsOS
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico .Add("@CveMedico", SqlDbType.Int).Value = CveMedico
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento .Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
.Add("@CveEspecialidad", SqlDbType.Int).Value = CveEspecialidad
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
End With End With

View File

@@ -6987,7 +6987,7 @@ Public Class ClsPaginas
NombreArchivoDescarga = "FacturaUSA" NombreArchivoDescarga = "FacturaUSA"
End If End If
If UsuarioActual.Empresa.Funcionalidad(718) = "1" Then If UsuarioActual.CveEmpresa.Contiene(190, 192) Then
If EsTicket Then If EsTicket Then
NombreArchivo = "FacturaTicket" NombreArchivo = "FacturaTicket"
NombreArchivoDescarga = "FacturaTicket" NombreArchivoDescarga = "FacturaTicket"

View File

@@ -875,6 +875,33 @@ Public Class ClsProductosServicios
Return Retorno Return Retorno
End Function End Function
Public Function GetUltimoPrecioCompra(CveEmpresa As Integer, CvePS As Integer) As Double
Dim Retorno As Double = -1
DataAdapter("PA_Inv_UltimoPrecioCompraGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@PU", SqlDbType.Money).Direction = ParameterDirection.Output
End With
Try
SqlAdapter.Fill(Data)
Retorno = CDbl(SqlAdapter.SelectCommand.Parameters("@PU").Value)
Catch Ex1 As SqlException
Me.OnError("Ocurrió un error al obtener el precio unitario.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
OnError("Ocurrió un error al obtener el precio unitario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#Region "P R O D U C T O S - E Q U I V A L E N C I A S " #Region "P R O D U C T O S - E Q U I V A L E N C I A S "
Public Function GetPSEquivalencias(CvePS As Integer, CveEmpresa As Integer) As Boolean Public Function GetPSEquivalencias(CvePS As Integer, CveEmpresa As Integer) As Boolean

View File

@@ -1348,8 +1348,9 @@ Partial Class PopUpVerFactura
Dim Guardar As Boolean = UrlParametros("GUARDAR") IsNot Nothing AndAlso UrlParametros("GUARDAR").ToString() = "1" Dim Guardar As Boolean = UrlParametros("GUARDAR") IsNot Nothing AndAlso UrlParametros("GUARDAR").ToString() = "1"
Dim RegenerarPDF As Boolean = UrlParametros("REGENERAR") IsNot Nothing AndAlso UrlParametros("REGENERAR").ToString() = "1" Dim RegenerarPDF As Boolean = UrlParametros("REGENERAR") IsNot Nothing AndAlso UrlParametros("REGENERAR").ToString() = "1"
Dim STIMUL As Boolean = UrlParametros("STIMULSOFT") IsNot Nothing AndAlso UrlParametros("STIMULSOFT").ToString() = "1" Dim STIMUL As Boolean = UrlParametros("STIMULSOFT") IsNot Nothing AndAlso UrlParametros("STIMULSOFT").ToString() = "1"
Dim EsTicket As Boolean = UrlParametros("TICKET") IsNot Nothing AndAlso UrlParametros("TICKET").ToString() = "1"
GenerarPDFVenta(UrlParametros("CVEVENTA").ToString.ToEntero, AplicaPagare, GuardarPDF:=Guardar, RegenerarPDF:=RegenerarPDF, UsarStimul:=STIMUL) GenerarPDFVenta(UrlParametros("CVEVENTA").ToString.ToEntero, AplicaPagare, GuardarPDF:=Guardar, RegenerarPDF:=RegenerarPDF, UsarStimul:=STIMUL, EsTicket:=EsTicket)
End If End If
End If End If

View File

@@ -3,7 +3,7 @@
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content> </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style type="text/css"> <%-- <style type="text/css">
.gvInventario tr td:nth-child(4) { .gvInventario tr td:nth-child(4) {
width: 6% !important; width: 6% !important;
} }
@@ -42,7 +42,16 @@
.btn.default:hover { .btn.default:hover {
background-color: lightgray; background-color: lightgray;
} }
</style>--%>
<style type="text/css">
.customCalendarStyle
{
position: relative; /* Asegura que z-index funcione */
z-index: 9999;
}
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Entrega Almacén (Surtir Mercancia) Entrega Almacén (Surtir Mercancia)
@@ -472,145 +481,174 @@
</div> </div>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <div class="row">
<ContentTemplate> <div class="col-md-12">
<div class="portlet light xspadding bordered ">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Salida de Inventario</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body form-horizontal form-row-sepe formnombottom">
<%--AGREGAR POR CODIGO DE BARRAS--%> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<asp:UpdatePanel runat="server"> <ContentTemplate>
<ContentTemplate>
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
<div class="col-md-2 pull-right"> <div class="portlet light smmallpadding bordered">
<div class="btn-group" style="float: right;"> <div class="portlet-title">
<asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Sugerencias" /> <div class="caption font-green">
</div> <i class="icon-pin font-green"></i>
</div> <span class="caption-subject bold uppercase">Salida de Inventario</span>
<div class="col-md-4 pull-right"> </div>
<table style="float: right;"> <div class="actions">
<tr> <div class="btn-group">
<td><i class="fa fa-barcode" style="font-size: 1.8em; margin-top: 8px;" aria-hidden="true" data-toggle="tooltip" title="Código Barras"></i></td>
<td>
<asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
<asp:TextBox ID="TxtCodigoPS" ClientIDMode="Static" Text="" runat="server" />
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
</asp:Panel>
</td>
<td runat="server" visible="false" id="TdSeriePS">
<asp:Panel ID="PanelSerie" runat="server" DefaultButton="BtnSeriePS">
<asp:TextBox ID="TxtSeriePS" Text="" runat="server" />
<asp:Button Text="" ID="BtnSeriePS" OnClick="BtnSeriePS_Click" Style="display: none" runat="server" />
</asp:Panel>
</td>
</tr>
</table>
</div> </div>
</div> </div>
</ContentTemplate> <div class="tools">
</asp:UpdatePanel> <a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body" >
<%--AGREGAR POR CODIGO DE BARRAS--%>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div class="row" runat="server" id="DivCodigoSeriePS" visible="false">
<%--GV DATOS--%> <div class="col-md-2 pull-right">
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True" <div class="btn-group" style="float: right;">
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveCategoria,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None"> <asp:Button ID="BtnVerSugerencias" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnVerSugerencias_Click" runat="server" Text="Ver Sugerencias" />
<HeaderStyle Height="30px" /> </div>
<Columns> </div>
<asp:TemplateField> <div class="col-md-4 pull-right">
<ItemTemplate> <table style="float: right;">
<asp:CheckBox ID="cbInv" runat="server" Checked="true" /> <tr>
</ItemTemplate> <td><i class="fa fa-barcode" style="font-size: 1.8em; margin-top: 8px;" aria-hidden="true" data-toggle="tooltip" title="Código Barras"></i></td>
<ItemStyle HorizontalAlign="Center" Width="2.5%" /> <td>
</asp:TemplateField> <asp:Panel ID="PanelCodigo" runat="server" DefaultButton="BtnCodigoPS">
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" /> <asp:TextBox ID="TxtCodigoPS" ClientIDMode="Static" Text="" runat="server" />
<asp:Button Text="" ID="BtnCodigoPS" OnClick="BtnCodigoPS_Click" Style="display: none" runat="server" />
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" /> </asp:Panel>
<asp:TemplateField HeaderText="Cant. a Surtir"> </td>
<ItemTemplate> <td runat="server" visible="false" id="TdSeriePS">
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" Style="text-align: right" Text='<%# Eval("CantidadF", "{0:#,##0.######}") %>'></asp:TextBox> <asp:Panel ID="PanelSerie" runat="server" DefaultButton="BtnSeriePS">
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" /> <asp:TextBox ID="TxtSeriePS" Text="" runat="server" />
</ItemTemplate> <asp:Button Text="" ID="BtnSeriePS" OnClick="BtnSeriePS_Click" Style="display: none" runat="server" />
</asp:TemplateField> </asp:Panel>
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" /> </td>
<%-- <asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" />--%> </tr>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"> </table>
<HeaderTemplate> </div>
<asp:Literal ID="LtlHeaderPS" Text="Producto o Servicio" runat="server"></asp:Literal>
</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplPS" runat="server" Target="_blank" Text='<%# Eval("CodigoPS", "{0}") %>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
<ItemTemplate>
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Width="100px" Enabled="false"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
<ItemTemplate>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtCaducidad" Text='<%# Eval("FechaCaducidad") %>' CssClass="form-control input-sm ADSMaskDate" Style="width: 78px" runat="server" Visible="false" Enabled="false"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false" Enabled="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" Enabled="false" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
</span>
</div> </div>
</ItemTemplate> </ContentTemplate>
</asp:TemplateField> </asp:UpdatePanel>
<asp:TemplateField HeaderText="Dividir" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" Visible="True">
<ItemTemplate>
<asp:TextBox runat="server" ID="TxtDividir" Width="30px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
<asp:Button runat="server" ID="BtnDividir" Text="Dividir" OnClick="Dividir" Style="display: none;" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<asp:HiddenField runat="server" ClientIDMode="Static" ID="HdnCantidadMovimiento" />
</ContentTemplate>
</asp:UpdatePanel>
<%--BOTON GUARDAR--%>
<asp:UpdatePanel runat="server">
<ContentTemplate> <%--GV DATOS--%>
<div align="center">
<asp:Label Text="Venta totalmente Surtida" ID="LbSurtida" Font-Size="Small" Visible="false" CssClass="label label-sm label-success" runat="server" /> <asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False"
<br /> DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveCategoria,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad"
<br /> CssClass="" GridLines="None" >
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" CssClass="btn btn-primary" Text="Guardar" Width="150px" ValidationGroup="GrpGuardar" /> <Columns>
</div> <asp:TemplateField>
</ContentTemplate> <ItemTemplate>
</asp:UpdatePanel> <asp:CheckBox ID="cbInv" runat="server" Checked="true" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="2.5%" />
</asp:TemplateField>
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" />
<asp:TemplateField HeaderText="Cant. a Surtir">
<ItemTemplate>
<asp:TextBox ID="TbCantidadF" runat="server" Width="50px" Mask="9,999.99" DataFormatString="{0:#,##0.######}" Style="text-align: right" Text='<%# Eval("CantidadF", "{0:#,##0.######}") %>'></asp:TextBox>
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
<HeaderTemplate>
<asp:Literal ID="LtlHeaderPS" Text="Producto o Servicio" runat="server"></asp:Literal>
</HeaderTemplate>
<ItemTemplate>
<asp:HyperLink ID="HplPS" runat="server" Target="_blank" Text='<%# Eval("CodigoPS", "{0}") %>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
<asp:TemplateField HeaderText="Sección" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
<ItemTemplate>
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" DataValueField="CveSeccionAlmacen" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<%--8--%>
<asp:TemplateField HeaderText="Lote/caducidades" ItemStyle-HorizontalAlign="Left" Visible="false" ItemStyle-Width="150px">
<ItemTemplate>
<asp:DropDownList ID="DdlCaducidadProducto" CssClass="select2me" Width="150px" runat="server" CausesValidation="true" AutoPostBack="true" OnSelectedIndexChanged="DdlCaducidadProducto_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="-" Value="|"></asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<%--9--%>
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" Visible="false">
<ItemTemplate>
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Visible="false" Text='<%# Eval("Lote") %>' Width="100px" Enabled="false"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
<ItemTemplate>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;" runat="server" visible="false" id="DvFechaCaducidad" >
<asp:TextBox ID="TxtCaducidad" Text="" CssClass="form-control input-sm ADSMaskDate" Style="width: 87px" runat="server" ></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" > <i class="fa fa-calendar"></i> </asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="TopLeft" Format="dd/MM/yyyy"
> </ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Dividir" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" Visible="True">
<ItemTemplate>
<asp:TextBox runat="server" ID="TxtDividir" Width="30px"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
<asp:Button runat="server" ID="BtnDividir" Text="Dividir" OnClick="Dividir" Style="display: none;" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
<asp:HiddenField runat="server" ClientIDMode="Static" ID="HdnCantidadMovimiento" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="col-md-12">
<%--BOTON GUARDAR--%>
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div align="center">
<asp:Label Text="Venta totalmente Surtida" ID="LbSurtida" Font-Size="Small" Visible="false" CssClass="label label-sm label-success" runat="server" />
<br />
<br />
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" CssClass="btn btn-primary" Text="Guardar" Width="150px" ValidationGroup="GrpGuardar" />
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<%--AGREGA POR SERIE--%> <%--AGREGA POR SERIE--%>
@@ -702,8 +740,6 @@
</div> </div>
</div> </div>
<div id="DivLote" class="modal ADS fade" role="dialog"> <div id="DivLote" class="modal ADS fade" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
<asp:UpdatePanel ID="UpLoteBatch" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpLoteBatch" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">

View File

@@ -7,6 +7,8 @@ Imports System.IO
Imports System.Web.Management Imports System.Web.Management
Imports Extensiones Imports Extensiones
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports MoreLinq
Imports Telerik.Web.UI
Partial Class Inventarios_EntregaAlmacen Partial Class Inventarios_EntregaAlmacen
Inherits ClsPaginas Inherits ClsPaginas
@@ -715,9 +717,9 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
If DtDatos.SUM("CantidadS") <= 0 Then If DtDatos.SUM("CantidadS") <= 0 Then
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario gvEscondeColumna" GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario gvEscondeColumna"
Else Else
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario" GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario"
End If End If
If CveAlmacenTraspasoDestino > 0 And Not (TipoMovimiento = 2 And TipoDocto.Contiene("Rem", "Ped")) Then If CveAlmacenTraspasoDestino > 0 And Not (TipoMovimiento = 2 And TipoDocto.Contiene("Rem", "Ped")) Then
@@ -920,9 +922,9 @@ Partial Class Inventarios_EntregaAlmacen
CveVentaSurtir = -1 CveVentaSurtir = -1
CveOSSurtir = -1 CveOSSurtir = -1
If DtDatos.SUM("CantidadS") <= 0 Then If DtDatos.SUM("CantidadS") <= 0 Then
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario gvEscondeColumna" GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario gvEscondeColumna"
Else Else
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario" GvDatos.CssClass = "table table-striped table-hover Widthall gvInventario"
End If End If
If CveAlmacenTraspasoDestino > 0 Then If CveAlmacenTraspasoDestino > 0 Then
@@ -1000,9 +1002,16 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
If AplicaSeccion Then GvDatos.Columns(7).Visible = True If AplicaSeccion Then GvDatos.Columns(7).Visible = True
If AplicaLote Then GvDatos.Columns(8).Visible = True If AplicaLote Then GvDatos.Columns(9).Visible = True
If AplicaCaducidad Then GvDatos.Columns(9).Visible = True If AplicaCaducidad Then GvDatos.Columns(10).Visible = True
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvDatos.Columns(9).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
If AplicaLote Or AplicaCaducidad Then
GvDatos.Columns(8).Visible = True
End If
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then
GvDatos.Columns(10).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
End If
'GvDatos.Columns(9).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) <> "", UsuarioActual.Empresa.Funcionalidad(147), "") 'GvDatos.Columns(9).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) <> "", UsuarioActual.Empresa.Funcionalidad(147), "")
'SugerirFecha() 'SugerirFecha()
@@ -1117,24 +1126,29 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
Else Else
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
End If End If
Dim DvFechaCaducidad As HtmlGenericControl = TryCast(e.Row.FindControl("DvFechaCaducidad"), HtmlGenericControl)
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
e.Row.FCTextBox("TxtCaducidad").Visible = True DvFechaCaducidad.Visible = True
e.Row.FCLinkButton("LnkCaducidad").Visible = True ' e.Row.FCTextBox("TxtCaducidad").Visible = True
'e.Row.FCLinkButton("LnkCaducidad").Visible = True
e.Row.FCTextBox("TxtCaducidad").ReadOnly = True e.Row.FCTextBox("TxtCaducidad").ReadOnly = True
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False 'CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro 'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True 'CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
e.Row.FCTextBox("TxtCaducidad").Enabled = True 'e.Row.FCTextBox("TxtCaducidad").Enabled = True
End If End If
Else Else
e.Row.FCTextBox("TxtCaducidad").Visible = False 'e.Row.FCTextBox("TxtCaducidad").Visible = False
e.Row.FCLinkButton("LnkCaducidad").Visible = False 'e.Row.FCLinkButton("LnkCaducidad").Visible = False
e.Row.FCTextBox("TxtCaducidad").Enabled = True 'e.Row.FCTextBox("TxtCaducidad").Enabled = True
DvFechaCaducidad.Visible = False
End If End If
If CBool(e.Row.DBCampo("AplicaLote")) Then If CBool(e.Row.DBCampo("AplicaLote")) Then
@@ -1190,8 +1204,60 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"))
End If
End If End If
End Sub
Protected Sub DdlCaducidadProducto_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, DropDownList)).NamingContainer, GridViewRow)
Dim AplicaLote As Boolean = Boolean.Parse(GvRow.DataKey("AplicaLote"))
Dim AplicaCaducidad As Boolean = Boolean.Parse(GvRow.DataKey("AplicaCaducidad"))
Dim DdlCaducidadProducto As DropDownList = GvRow.FCDropDownList("DdlCaducidadProducto")
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
Dim Lote As String = ArrayCaducidad(0)
Dim FechaCaducidad As String = ArrayCaducidad(1)
If AplicaLote Then
GvRow.FCTextBox("TxtLote").Text = Lote
End If
If AplicaCaducidad Then
GvRow.FCTextBox("TxtCaducidad").Text = FechaCaducidad
End If
UpDatos.Update()
End Sub
Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList)
Dim almacenes As String = DdlAlmacen.SelectedValue
If almacenes = "" Then
almacenes = "-1"
End If
Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
For Each dr As DataRow In ObjInventarios.DtResultados.Rows
DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} - Caducidad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}"))
Next
End If
ObjInventarios.Dispose()
End Sub End Sub
Private Sub CargaDocumentos(tCveVenta As Integer) Private Sub CargaDocumentos(tCveVenta As Integer)
@@ -4458,6 +4524,8 @@ Partial Class Inventarios_EntregaAlmacen
Return Respuesta Return Respuesta
End Function End Function
End Class End Class

View File

@@ -499,7 +499,7 @@
</div>--%> </div>--%>
GvDatosDesarmado
</div> </div>

View File

@@ -98,7 +98,7 @@
<label class="col-md-1 ">Estatus:</label> <label class="col-md-1 ">Estatus:</label>
<div class="col-md-1" > <div class="col-md-1" >
<asp:DropDownList ID="DdlEstatusOS" runat="server" AppendDataBoundItems="true" Width="110px" <asp:DropDownList ID="DdlEstatusOS" runat="server" AppendDataBoundItems="true" Width="100%"
DataTextField="EstatusOrdenServicio" DataValueField="CveEstatusOrdenServicio" Class="input-sm select2me"> DataTextField="EstatusOrdenServicio" DataValueField="CveEstatusOrdenServicio" Class="input-sm select2me">
</asp:DropDownList> </asp:DropDownList>
</div> </div>
@@ -109,11 +109,11 @@
</div> </div>
</div> </div>
<div class="portlet-body" style="display: none"> <div class="portlet-body" style="display: none">
<div class="row"> <div class="row">
<label class="col-md-1 ">Técnico:</label> <label class="col-md-1 ">Técnico:</label>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlTecnico" ClientIDMode="Static" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="110px" ></asp:DropDownList> <asp:DropDownList ID="DdlTecnico" ClientIDMode="Static" CssClass="form-control input-sm select2me" runat="server" DataTextField="Nombre" DataValueField="CveUsuario" Width="110px"></asp:DropDownList>
</div> </div>
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label> <asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
<div runat="server" id="DivProyecto" class="col-md-1"> <div runat="server" id="DivProyecto" class="col-md-1">
@@ -121,38 +121,44 @@
</div> </div>
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label> <asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyecto" class="col-md-1"> <div runat="server" id="DivSubProyecto" class="col-md-1">
<asp:DropDownList ID="DdlSubProyecto" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass=" input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList> <asp:DropDownList ID="DdlSubProyecto" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass=" input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList>
</div> </div>
<label class="col-md-1 ">Médico:</label> <label class="col-md-1 ">Médico:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 ">Especialidad:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlEspecialidad" CssClass="form-control input-sm select2me" runat="server" DataTextField="Especialidad" Width="100%" DataValueField="CveMedicoEspecialidad"></asp:DropDownList>
</div>
<label class="col-md-1 ">Procedimiento:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%">
<asp:ListItem Value="-1">Todos</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-1 ">Hospital:</label>
<div class="col-md-1"> <div class="col-md-1">
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%" >
<asp:ListItem Value="-1">Todos</asp:ListItem> <asp:DropDownList ID="DdlClienteSucursal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveClienteSucursal" CausesValidation="true" Width="100%" >
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 ">Procedimiento:</label>
<div class="col-md-1">
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%" >
<asp:ListItem Value="-1">Todos</asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
<div class="row"> <div class="row">
</div> </div>
<div class="row"> <div class="row">
</div>
<div class="row">
</div> </div>
</div> </div>
</div> </div>

View File

@@ -80,6 +80,48 @@ Partial Class OS_RepOSMedicas
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ") DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
DdlProcedimiento.DataBind() DdlProcedimiento.DataBind()
Dim ObjVentas As New ClsVentas
If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
DdlEspecialidad.DataSource = ObjVentas.DtResultados
Else
DdlEspecialidad.DataSource = Nothing
End If
ObjVentas.Dispose()
DdlEspecialidad.DataBind()
DdlEspecialidad.Items.Insert(0, New ListItem("Todas", "-1"))
Dim objcliente As New ClsClientes
If objcliente.GetClienteSucursales(-1, UsuarioActual.CveEmpresa) Then
DdlClienteSucursal.DataSource = objcliente.DtResultados
Else
DdlClienteSucursal.DataSource = Nothing
End If
objcliente.Dispose()
DdlClienteSucursal.DataBind()
DdlClienteSucursal.Items.Insert(0, New ListItem("Todos", "-1"))
'Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
'If EsWS Then
' DdlCliente.setEsWebService(True)
'Else
' DdlCliente.setEsWebService(False)
' DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
' DdlCliente.DataBind()
' DdlCliente.ddl.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
'End If
End Sub End Sub
@@ -101,7 +143,8 @@ Partial Class OS_RepOSMedicas
LnkPersonalizar.Visible = False LnkPersonalizar.Visible = False
If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, DdlVendedor.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, DdlTecnico.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, DdlVendedor.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, DdlTecnico.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveEspecialidad:=DdlEspecialidad.SelectedValue.ToEntero,
CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjOS.DtResultados GvDatos.DataSource = ObjOS.DtResultados
If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then
LnkPersonalizar.Visible = True LnkPersonalizar.Visible = True

View File

@@ -337,7 +337,7 @@ Partial Class Ventas_PVCobranza
PnlContado.Visible = False PnlContado.Visible = False
ObjConta.Commit() ObjConta.Commit()
CargaDatos() CargaDatos()
Alert("Pago Registrado correctamente.<br/><br/> <a href='#' class='Texto'>Imprimir ticket</a>", TipoMensaje.MsgInformacion) Alert($"Pago Registrado correctamente.<br/><br/> <a href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1&TICKET=1&REGENERAR=1", CveVenta))}"" class='Texto'>Imprimir ticket</a>", TipoMensaje.MsgInformacion)
Else Else
ObjConta.RollBack() ObjConta.RollBack()
End If End If

View File

@@ -612,13 +612,13 @@
<b>Paciente:</b> <b>Paciente:</b>
</td> </td>
<td runat="server"> <td runat="server">
<asp:TextBox ID="TxtPaciente" runat="server" CssClass="make-switchsd" Style="width: 130px" MaxLength="50"></asp:TextBox> <asp:TextBox ID="TxtPaciente" runat="server" CssClass="make-switchsd" Style="width: 130px" MaxLength="50"></asp:TextBox>
</td> </td>
<td runat="server" id="Td9" visible="true"> <td runat="server" id="Td9" visible="true">
<b>Episodio:</b> <b>Episodio:</b>
</td> </td>
<td runat="server"> <td runat="server">
<asp:TextBox ID="TxtEpisodio" runat="server" CssClass="make-switchsd" Style="width: 130px" MaxLength="20"></asp:TextBox> <asp:TextBox ID="TxtEpisodio" runat="server" CssClass="make-switchsd" Style="width: 130px" MaxLength="20"></asp:TextBox>
</td> </td>
</tr> </tr>
</table> </table>
@@ -1183,7 +1183,7 @@
<%--</asp:Panel>--%> <%--</asp:Panel>--%>
<asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False" <asp:GridView ID="GvPS" GridLines="None" runat="server" data-tableheader="#tbps" ShowHeader="true" AutoGenerateColumns="False"
DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,Clasificacion,CveUM,UM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,CantidadInventario,CantidadFacturadaRem,CveVentaDetalle,CvePromocionDetalle" DataKeyNames="Consec,CvePS,Total, IEPS, CveClasificacion,Clasificacion,CveUM,UM,CveProyecto,CveSubProyecto,TipoDocto,PS,Obs,Cantidad,PU,Descuento,IVA,ImporteIVA,CantidadInventario,CantidadFacturadaRem,CveVentaDetalle,CvePromocionDetalle"
CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" Style="min-width: 980px;"> CssClass="table table-striped table-advance table-hover Widthall Sortable mysmallbtn ScrollAD" Style="min-width: 980px;">
<Columns> <Columns>
<%--0--%> <%--0--%>
@@ -1404,6 +1404,8 @@
<%--19--%> <%--19--%>
<asp:TemplateField ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:LinkButton ID="LnkDescuentos" runat="server" Visible="false" AlternateText="Clonar" CausesValidation="False" CommandName="Descuento" CommandArgument='<%# GvPS.Rows.Count.ToString() %>'
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-comment-o'></i>" />
<asp:LinkButton ID="imgClone" runat="server" AlternateText="Clonar" CausesValidation="False" CommandName="Clonar" CommandArgument='<%# GvPS.Rows.Count.ToString() %>' <asp:LinkButton ID="imgClone" runat="server" AlternateText="Clonar" CausesValidation="False" CommandName="Clonar" CommandArgument='<%# GvPS.Rows.Count.ToString() %>'
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-clone'></i>" /> CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-clone'></i>" />
</ItemTemplate> </ItemTemplate>
@@ -4319,6 +4321,83 @@
</div> </div>
</div> </div>
</div> </div>
<div id="ModalDescPS" class="modal ADS fade" role="dialog">
<asp:UpdatePanel runat="server" ID="UpDescPS" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">
<asp:Label ID="LblTituloDesc" runat="server" ClientIDMode="Static" Text="Descuento:"></asp:Label>
</h4>
</div>
<div class="modal-body">
<asp:HiddenField ID="HdnDescPS" runat="server" ClientIDMode="Static" Value="0" />
<asp:HiddenField ID="HdnConsecPS" runat="server" ClientIDMode="Static" Value="-1" />
<asp:HiddenField ID="HdnTotalCompra" runat="server" ClientIDMode="Static" Value="0" />
<table style="width: 90%">
<tr>
<td>SubTotal</td>
<td>
<asp:Label ID="LblSubtotalDescPS" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label>
</td>
<td>Total</td>
<td>
<asp:Label ID="LblTotalDescPS" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label>
</td>
</tr>
<tr>
<td>% Descuento</td>
<td>
<asp:TextBox ID="TxtPorPS" runat="server" CausesValidation="true" ClientIDMode="Static" MaxLength="12" Text="0" ValidationGroup="GrpDescuentoP" Width="72px"></asp:TextBox>
<asp:CompareValidator ID="CVPorPS" runat="server" ControlToValidate="TxtPorPS" Display="None" ErrorMessage="El campo <b>''Descuento por Porcentaje''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpPorPS"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCEPorPS" runat="server" HighlightCssClass="vco" TargetControlID="CVPorPS" Width="300px"></ajax:ValidatorCalloutExtender>
&nbsp;(%)
</td>
<td>IVA</td>
<td>
<asp:Label ID="LblIVADescPS" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label>
</td>
</tr>
<tr>
<td>
<b>
<asp:Label runat="server" ClientIDMode="Static" Text="Descuento"></asp:Label>
</b>
</td>
<td><b>
<asp:Label ID="LblDescPS" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></b></td>
<td>
<b>
<asp:Label runat="server" ClientIDMode="Static" Text="% Utilidad"></asp:Label>
</b>
</td>
<td><b>
<asp:Label ID="LblUtilidadPorcentaje" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></b></td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Total Final</b></td>
<td>
<b>
<asp:Label ID="LblTotalFinalDescPS" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></b>
</td>
</tr>
</table>
</div>
<div class="modal-footer">
<asp:Button ID="BtnPorPS" runat="server" Text="Aplicar" ValidationGroup="GrpPorPS" CssClass="btn btn-primary" OnClick="BtnPorPS_Click" />
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="DivAnticipos" class="modal ADS fade" role="dialog"> <div id="DivAnticipos" class="modal ADS fade" role="dialog">
<asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional" class="modal-dialog"> <asp:UpdatePanel runat="server" ID="UpAnticipos" UpdateMode="Conditional" class="modal-dialog">
<ContentTemplate> <ContentTemplate>
@@ -8430,7 +8509,7 @@
<%--Cliente Sucursales --%> <%--Cliente Sucursales --%>
<div runat="server" visible="False" id="DvModalTipoVentaPasoCliente"> <div runat="server" visible="False" id="DvModalTipoVentaClientesucursal">
<div class="row"> <div class="row">
<div class="form-group col-md-12 form-md-line-input input-iconright "> <div class="form-group col-md-12 form-md-line-input input-iconright ">
<asp:DropDownList ID="DdlClienteSucursal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="Clave" CausesValidation="true" <asp:DropDownList ID="DdlClienteSucursal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="Clave" CausesValidation="true"
@@ -8444,8 +8523,17 @@
</div> </div>
</div> </div>
<%--Cliente Solo se usa para en PAgo Directo --%>
<div runat="server" visible="False" id="DvModalTipoVentaCliente">
<div class="row">
<div class="form-group col-md-12 form-md-line-input input-iconright" style="margin-top: -7px!important">
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlClienteSucursal">Cliente:</asp:Label>
<ADS:Dropdownlost CssClassDdl="form-control select2me" ID="DdlClientesModal" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"
Style="margin-top: -5px!important" IncluyeTodos="false"></ADS:Dropdownlost>
</div>
</div>
</div>
<%--Medico Procedimiento--%> <%--Medico Procedimiento--%>
@@ -8462,7 +8550,7 @@
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Médico:</asp:Label> <asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Médico:</asp:Label>
</div> </div>
<div class="form-group col-md-1 form-md-line-input input-iconright "> <div class="form-group col-md-1 form-md-line-input input-iconright ">
<asp:LinkButton runat="server" ID="LnkAddMedicoModal" OnClick="LnkAddMedicoModal_Click" CssClass="btn btn-default btn-circle btn-sm" Text="<i class='fa fa-plus' style='color:green'></i>" style="margin-top:8px!important" ></asp:LinkButton> <asp:LinkButton runat="server" ID="LnkAddMedicoModal" OnClick="LnkAddMedicoModal_Click" CssClass="btn btn-default btn-circle btn-sm" Text="<i class='fa fa-plus' style='color:green'></i>" Style="margin-top: 8px!important"></asp:LinkButton>
</div> </div>
<div class="form-group col-md-5 form-md-line-input input-iconright "> <div class="form-group col-md-5 form-md-line-input input-iconright ">
<asp:DropDownList ID="DdlProcedimientoModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" <asp:DropDownList ID="DdlProcedimientoModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento"
@@ -8476,7 +8564,7 @@
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlProcedimientoModal">Procedimiento:</asp:Label> <asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlProcedimientoModal">Procedimiento:</asp:Label>
</div> </div>
<div class="form-group col-md-1 form-md-line-input input-iconright "> <div class="form-group col-md-1 form-md-line-input input-iconright ">
<asp:LinkButton runat="server" ID="LnkAddProcedimientoModal" OnClick="LnkAddProcedimientoModal_Click" CssClass="btn btn-default btn-circle btn-sm" Text="<i class='fa fa-plus' style='color:green'></i>" style="margin-top:8px!important"></asp:LinkButton> <asp:LinkButton runat="server" ID="LnkAddProcedimientoModal" OnClick="LnkAddProcedimientoModal_Click" CssClass="btn btn-default btn-circle btn-sm" Text="<i class='fa fa-plus' style='color:green'></i>" Style="margin-top: 8px!important"></asp:LinkButton>
</div> </div>
</div> </div>
@@ -8517,9 +8605,9 @@
<asp:BoundField DataField="Abreviatura" HeaderText="UM"> <asp:BoundField DataField="Abreviatura" HeaderText="UM">
<ItemStyle HorizontalAlign="Left" /> <ItemStyle HorizontalAlign="Left" />
</asp:BoundField> </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:N4}") %>' Style="text-align: right!important" Width="80px" Enabled="false"></asp:TextBox> <asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("Precio", "{0:N4}") %>' Style="text-align: right!important" Width="80px" Enabled="false"></asp:TextBox>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -8544,14 +8632,14 @@
<div id="DvModalAddMedico" class="modal ADS fade" role="dialog"> <div id="DvModalAddMedico" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddMedico" UpdateMode="Conditional"> <asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddMedico" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="modal-content" style="max-width:600px!important;max-height:505px!important"> <div class="modal-content" style="max-width: 600px!important; max-height: 505px!important">
<UserControl:AddMedico runat="server" ID="AddMedicoControl" /> <UserControl:AddMedico runat="server" ID="AddMedicoControl" />
</div> </div>
<asp:Button ID="BtnRecargaMedicos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaMedicos_Click" /> <asp:Button ID="BtnRecargaMedicos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaMedicos_Click" />
<asp:HiddenField ID="HdnCveMedicoNuevo" runat="server" ClientIDMode="Static" Value="-1" /> <asp:HiddenField ID="HdnCveMedicoNuevo" runat="server" ClientIDMode="Static" Value="-1" />
@@ -8560,22 +8648,22 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div id="DvModalAddProcedimiento" class="modal ADS fade" role="dialog"> <div id="DvModalAddProcedimiento" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddProcedimiento" UpdateMode="Conditional"> <asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddProcedimiento" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="modal-content" style="max-width:600px!important;max-height:505px!important"> <div class="modal-content" style="max-width: 600px!important; max-height: 505px!important">
<UserControl:AddProcedimiento runat="server" ID="AddProcedimientoControl" /> <UserControl:AddProcedimiento runat="server" ID="AddProcedimientoControl" />
</div> </div>
<asp:Button ID="BtnRecargaProcedimientos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaProcedimientos_Click" /> <asp:Button ID="BtnRecargaProcedimientos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaProcedimientos_Click" />
<asp:HiddenField ID="HdnCveProcedimientoNuevo" runat="server" ClientIDMode="Static" Value="-1" /> <asp:HiddenField ID="HdnCveProcedimientoNuevo" runat="server" ClientIDMode="Static" Value="-1" />
</ContentTemplate>
</asp:UpdatePanel>
</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">
@@ -9657,6 +9745,46 @@
$("#LblSubTotal1").text($("#TxtSubTotal").val()); $("#LblSubTotal1").text($("#TxtSubTotal").val());
} }
function CalculaDescPS() {
if ($get("TxtPorPS").value != "") {
var PorcentajeDescuento = parseFloat($get("TxtPorPS").value);
if (PorcentajeDescuento < 0 || PorcentajeDescuento > 99) {
alert("No se puede aplicar ese porcentaje de descuento");
return;
}
var subTotal = parseFloat($get("LblSubtotalDescPS").innerText.replace(",", "").replace(",", ""));
var Monto = parseFloat($get("LblTotalDescPS").innerText.replace(",", "").replace(",", ""));
var Total = Monto - ((Monto * PorcentajeDescuento) / 100);
$get("LblTotalFinalDescPS").innerText = formato_numero(Total, 2, '.', ',');
var TotalRedondeado = parseFloat($get("LblTotalFinalDescPS").innerText.replace(",", "").replace(",", ""));
var descuento = - ((TotalRedondeado - (subTotal * 1.16)) / 1.16);
$get("LblIVADescPS").innerText = formato_numero(((subTotal - descuento) * 0.16), 2, '.', ',');
$get("LblDescPS").innerText = formato_numero(descuento, 2, '.', ',');
$get("HdnDescPS").value = descuento;
var totalCompra = parseFloat($get("HdnTotalCompra").value);
if (totalCompra > 0) {
var utilidad = ((TotalRedondeado - totalCompra) / TotalRedondeado) * 100;
$get("LblUtilidadPorcentaje").innerText = formato_numero(utilidad, 2, '.', ',');
}
}
else {
$get("LblTotalFinalDescPS").innerText = "0.00";
$get("LblDescPS").innerText = "0.00";
$get("LblIVADescPS").innerText = "0.00";
$get("LblUtilidadPorcentaje").innerText = "0.00";
$get("HdnDescPS").innerText = "0.00";
}
}
function formato_numero(numero, decimales, separador_decimal, separador_miles) { // v2007-08-06 function formato_numero(numero, decimales, separador_decimal, separador_miles) { // v2007-08-06
numero = parseFloat(numero); numero = parseFloat(numero);
if (isNaN(numero)) { if (isNaN(numero)) {
@@ -10501,17 +10629,17 @@
} }
function fncRegargaMedicos(CveNuevoMedico) { function fncRegargaMedicos(CveNuevoMedico) {
$("#HdnCveMedicoNuevo").val(CveNuevoMedico) $("#HdnCveMedicoNuevo").val(CveNuevoMedico)
$('#BtnRecargaMedicos').click(); $('#BtnRecargaMedicos').click();
} }
function fncRegargaProcedimientos(CveProcedimientoNuevo) { function fncRegargaProcedimientos(CveProcedimientoNuevo) {
$("#HdnCveProcedimientoNuevo").val(CveProcedimientoNuevo) $("#HdnCveProcedimientoNuevo").val(CveProcedimientoNuevo)
$('#BtnRecargaProcedimientos').click(); $('#BtnRecargaProcedimientos').click();
} }
</script> </script>

View File

@@ -539,6 +539,20 @@ Partial Class Ventas
End Get End Get
End Property End Property
Private Property CveClienteOS As Integer
Get
If ViewState("CveClienteOS") Is Nothing Then
ViewState("CveClienteOS") = -1
End If
Return ViewState("CveClienteOS").ToString().ToEntero()
End Get
Set(value As Integer)
ViewState("CveClienteOS") = value
End Set
End Property
Private Property CveClienteSucursal As Integer Private Property CveClienteSucursal As Integer
Get Get
If ViewState("CveClienteSucursal") Is Nothing Then If ViewState("CveClienteSucursal") Is Nothing Then
@@ -2567,6 +2581,7 @@ Partial Class Ventas
TabAlmacen.Enabled = UsuarioActual.Empresa.UsaInventarios TabAlmacen.Enabled = UsuarioActual.Empresa.UsaInventarios
TxtPorDescP.Attributes.Add("onKeyUp", "CalculaDescuento();") TxtPorDescP.Attributes.Add("onKeyUp", "CalculaDescuento();")
TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuento();") TxtDescP.Attributes.Add("onKeyUp", "CalculaDescuento();")
TxtPorPS.Attributes.Add("onKeyUp", "CalculaDescPS();")
CreaDTmpC() CreaDTmpC()
CreaDTmpF() CreaDTmpF()
@@ -8245,6 +8260,10 @@ Partial Class Ventas
e.Row.FCLinkButton("imgE").Visible = True e.Row.FCLinkButton("imgE").Visible = True
End If End If
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso UsuarioActual.TienePermisoProceso(374) Then
e.Row.FCLinkButton("LnkDescuentos").Visible = True
End If
'If GvInv.Rows.Count > 0 AndAlso ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso e.Row.DataKey("CveVentaDetalle").ToString().ToEntero() > 0 Then 'If GvInv.Rows.Count > 0 AndAlso ModalidadEdicion AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso e.Row.DataKey("CveVentaDetalle").ToString().ToEntero() > 0 Then
' e.Row.FCLinkButton("imgE").Enabled = False ' e.Row.FCLinkButton("imgE").Enabled = False
' e.Row.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen." ' e.Row.FCLinkButton("imgE").ToolTip = "No se puede editar debido a que ya hay un movimiento de almacen."
@@ -23888,7 +23907,6 @@ Partial Class Ventas
Dim RowNum As Integer = Convert.ToInt32(e.CommandArgument) Dim RowNum As Integer = Convert.ToInt32(e.CommandArgument)
Dim GvRow As GridViewRow = GvPS.Rows(RowNum) Dim GvRow As GridViewRow = GvPS.Rows(RowNum)
If (GvRow.RowState = DataControlRowState.Edit OrElse GvRow.RowState = 5) Then If (GvRow.RowState = DataControlRowState.Edit OrElse GvRow.RowState = 5) Then
TxtCantidad.Text = GvRow.FCTextBox("TxtCantidad").Text TxtCantidad.Text = GvRow.FCTextBox("TxtCantidad").Text
DdlClasificacion.SelectedValue = GvRow.FCDropDownList("DdlClasificacion").SelectedValue DdlClasificacion.SelectedValue = GvRow.FCDropDownList("DdlClasificacion").SelectedValue
@@ -23914,6 +23932,32 @@ Partial Class Ventas
RegistraScript("Recalcula();") RegistraScript("Recalcula();")
LbAgregar_Click(Nothing, Nothing) LbAgregar_Click(Nothing, Nothing)
ElseIf e.CommandName = "Descuento" Then
LblSubtotalDescPS.Text = ""
LblTotalDescPS.Text = ""
LblTituloDesc.Text = "Descuento"
HdnConsecPS.Value = "-1"
HdnTotalCompra.Value = ""
TxtPorPS.Text = ""
LblIVADescPS.Text = ""
Dim GvRow As GridViewRow = GvPS.Rows(e.CommandArgument.ToString().ToEntero())
LblTituloDesc.Text = $"Descuento: {GvRow.DataKey("PS")}"
HdnConsecPS.Value = GvRow.DataKey("Consec")
LblSubtotalDescPS.Text = (GvRow.DataKey("Total").ToDecimal()).FormatoNumero()
LblTotalDescPS.Text = (GvRow.DataKey("Total").ToDecimal() + GvRow.DataKey("ImporteIVA").ToDecimal()).FormatoNumero()
LblIVADescPS.Text = GvRow.DataKey("ImporteIVA").FormatoNumero()
Using ObjPS As New ClsProductosServicios
Dim PrecioCompra = ObjPS.GetUltimoPrecioCompra(UsuarioActual.CveEmpresa, GvRow.DataKey("CvePS").ToEntero())
If PrecioCompra > 0 Then
HdnTotalCompra.Value = (PrecioCompra * GvRow.DataKey("Cantidad").ToDouble() * 1.16).ToString()
End If
End Using
UpDescPS.Update()
RegistraScript("$('#ModalDescPS').modal({backdrop: 'static', keyboard: false});")
Else Else
DdlPS_SelectedIndexChanged(Nothing, Nothing) DdlPS_SelectedIndexChanged(Nothing, Nothing)
End If End If
@@ -36273,6 +36317,17 @@ Partial Class Ventas
DdlClienteSucursal.DataBind() DdlClienteSucursal.DataBind()
DdlClienteSucursal.Items.Insert(0, New ListItem("Seleccione uno", "-1")) DdlClienteSucursal.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
If EsWS Then
DdlClientesModal.setEsWebService(True)
Else
DdlClientesModal.setEsWebService(False)
DdlClientesModal.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlClientesModal.DataBind()
DdlClientesModal.ddl.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
End If
End Sub End Sub
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
@@ -36289,7 +36344,7 @@ Partial Class Ventas
If RBLTipoVenta.SelectedValue.ToEntero > 0 Then If RBLTipoVenta.SelectedValue.ToEntero > 0 Then
DvModalTipoVentaPasoTipo.Visible = False DvModalTipoVentaPasoTipo.Visible = False
DvModalTipoVentaPasoCliente.Visible = True DvModalTipoVentaClientesucursal.Visible = True
DvModalTipoVentaPasoRequiereOS.Visible = True DvModalTipoVentaPasoRequiereOS.Visible = True
DvModalTipoVentaPasoMedicoProcedimiento.Visible = True DvModalTipoVentaPasoMedicoProcedimiento.Visible = True
@@ -36315,6 +36370,7 @@ Partial Class Ventas
ChkRequiereTecnicoModal.Checked = True ChkRequiereTecnicoModal.Checked = True
ChkRequiereTecnicoModal.Enabled = False ChkRequiereTecnicoModal.Enabled = False
DvModalRequiereOSFecha.Visible = True DvModalRequiereOSFecha.Visible = True
DvModalTipoVentaCliente.Visible = True
Case "3" 'A-Vista Case "3" 'A-Vista
ChkRequiereTecnicoModal.Checked = False ChkRequiereTecnicoModal.Checked = False
DvModalTipoVentaPasoRequiereOS.Visible = False DvModalTipoVentaPasoRequiereOS.Visible = False
@@ -36404,7 +36460,8 @@ Partial Class Ventas
LnkDvModalTipoVentaAceptar.Visible = False LnkDvModalTipoVentaAceptar.Visible = False
DvModalTipoVentaPasoTipo.Visible = True DvModalTipoVentaPasoTipo.Visible = True
DvModalTipoVentaPasoCliente.Visible = False DvModalTipoVentaClientesucursal.Visible = False
DvModalTipoVentaCliente.Visible = False
DvModalTipoVentaPasoRequiereOS.Visible = False DvModalTipoVentaPasoRequiereOS.Visible = False
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
@@ -36437,15 +36494,35 @@ Partial Class Ventas
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs) Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
If RBLTipoVenta.SelectedValue.ToEntero = 2 Then
If DdlClientesModal.SelectedValue.ToEntero > 0 Then
ViewState("CveCliente") = DdlClientesModal.SelectedValue.ToEntero
Else
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If DdlClienteSucursalCliente() > 0 Then If DdlClienteSucursalCliente() > 0 Then
ViewState("CveCliente") = DdlClienteSucursalCliente() CveClienteOS = DdlClienteSucursalCliente()
Else
Alert("Debe de seleccionar un hospital.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Else Else
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia) If DdlClienteSucursalCliente() > 0 Then
Exit Sub ViewState("CveCliente") = DdlClienteSucursalCliente()
CveClienteOS = CveCliente
Else
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If End If
If ChkRequiereTecnicoModal.Checked Then If ChkRequiereTecnicoModal.Checked Then
If Not IsDate(TxtFechaModal.Text.Replace(",", "")) Then If Not IsDate(TxtFechaModal.Text.Replace(",", "")) Then
Alert("El campo fecha no es valido.", TipoMensaje.MsgAdvertencia) Alert("El campo fecha no es valido.", TipoMensaje.MsgAdvertencia)
@@ -36657,7 +36734,7 @@ Partial Class Ventas
Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero
If ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio, If ObjOrdenServicio.AddOrdenesServicios(CveClienteOS, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero, Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime,
@@ -36811,6 +36888,20 @@ Partial Class Ventas
Protected Sub TxtFechaAnticipoCliente_TextChanged(sender As Object, e As EventArgs) Protected Sub TxtFechaAnticipoCliente_TextChanged(sender As Object, e As EventArgs)
CargaAnticipos(CveCliente) CargaAnticipos(CveCliente)
End Sub End Sub
Protected Sub BtnPorPS_Click(sender As Object, e As EventArgs)
If HdnDescPS.Value.ToEntero() > 0 Then
Dim RowUpdate As DataRow = TmpDT.Select($"Consec = {HdnConsecPS.Value}").FirstOrDefault()
If RowUpdate IsNot Nothing Then
RowUpdate("Descuento") = HdnDescPS.Value.ToDecimal()
RowUpdate("ImporteIVA") = LblIVADescPS.Text.ToDecimal()
CalculaTotalesVenta()
RegistraScript("$('#ModalDescPS').modal('hide');")
End If
Else
Alert("No se pudo aplicar el descuento", TipoMensaje.MsgAdvertencia)
End If
End Sub
End Class End Class