Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -493,6 +493,126 @@
|
||||
<asp:TextBox ID="TxtPrecio_25" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_26" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_26" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_27" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_27" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_28" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_28" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_29" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_29" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_30" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_30" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_31" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_31" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_32" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_32" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_33" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_33" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_34" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_34" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_35" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_35" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_36" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_36" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_37" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_37" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_38" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_38" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_39" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_39" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false" ItemStyle-Width="100px">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LtlLista_40" runat="server"></asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtPrecio_40" runat="server" CssClass="CssCamviaPrecio" MaxLength="39" Width="80px" onkeypress="return onlyNumberKey(event)" Style="text-align: right !important;"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveMedico,Medico,CedulaProfesional,FechaNacimiento,Notas,DiasAtencion,Horario,Lugar,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Consultorio,Torre"
|
||||
DataKeyNames="CveMedico,Medico,CedulaProfesional,FechaNacimiento,Notas,DiasAtencion,Horario,Lugar,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Consultorio,Torre,Usuario"
|
||||
data-sort="true"
|
||||
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
@@ -278,13 +278,13 @@
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -548,6 +548,22 @@
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" runat="server" id="DVUsuarioFechaIng" visible ="false">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtUsuario" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtUsuario.ClientID.ToString()%>">Usuario:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:TextBox ID="TxtFechaIng" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtFechaIng.ClientID.ToString()%>">Fecha Ing.:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -161,6 +161,10 @@ Partial Class Ventas_CatMedicos
|
||||
DdlEspecialidad.SelectedValueExist(-1)
|
||||
DdlSubEspecialidad.SelectedValueExist(-1)
|
||||
TxtTorre.Text = ""
|
||||
DVUsuarioFechaIng.Visible = False
|
||||
TxtFechaIng.Text = ""
|
||||
TxtUsuario.Text = ""
|
||||
|
||||
|
||||
DVEstatus.Visible = False
|
||||
ChkEstatus.Checked = True
|
||||
@@ -196,6 +200,10 @@ Partial Class Ventas_CatMedicos
|
||||
DdlSubEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero)
|
||||
TxtTorre.Text = GvRow.DataKey("Torre")
|
||||
|
||||
DVUsuarioFechaIng.Visible = True
|
||||
TxtFechaIng.Text = GvRow.DataKey("FechaIng").ToDateTime.ToString("dd/MM/yyyy hh:mm:ss tt")
|
||||
TxtUsuario.Text = GvRow.DataKey("Usuario")
|
||||
|
||||
DVEstatus.Visible = True
|
||||
LbAgregar.Text = "Actualizar"
|
||||
LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
|
||||
|
||||
@@ -817,35 +817,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- Marcar el Cliente como Frecuente --%>
|
||||
<div class="col-md-6 " id="DivProtletRegistrar" visible="false" runat="server">
|
||||
<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">Registrar</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-advance table-hover" style="width: 100%">
|
||||
<tr>
|
||||
<td style="text-align: center;">
|
||||
<asp:Button ID="BtnRegistrarCliente" runat="server" CssClass="btn btn-success" Text="Registrar" ValidationGroup="GrpGuardar" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 " id="DivPortletSucursales" runat="server">
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
|
||||
@@ -1753,7 +1753,6 @@ Partial Class Clientes
|
||||
'DivPortletBitacora.Visible = False
|
||||
BtnEliminar.Visible = False
|
||||
|
||||
DivProtletRegistrar.Visible = True
|
||||
End If
|
||||
|
||||
TxtCorreoEntregaCompras.Text = ObjClientes.DtResultados(0)("CorreoEntregaCompras").ToString()
|
||||
@@ -5847,19 +5846,8 @@ Partial Class Clientes
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar MAIL", ex)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub BtnRegistrarCliente_Click(sender As Object, e As EventArgs) Handles BtnRegistrarCliente.Click
|
||||
Dim ObjClientes As New ClsClientes
|
||||
|
||||
If ObjClientes.RegistrarCliente(CveCliente) Then
|
||||
RegistraScript("location.reload();")
|
||||
End If
|
||||
|
||||
ObjClientes.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "C O N T R A T O S"
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Activities.Expressions
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports ADSNetLibrary.SIGAPI.Models.RH.Response
|
||||
Imports Extensiones
|
||||
Imports ZXing
|
||||
|
||||
@@ -487,14 +485,10 @@ Partial Class ProductosyServicios
|
||||
If ObjGral.GetModelos(UsuarioActual.CveEmpresa) Then
|
||||
DdlModelo.DataSource = ObjGral.DtResultados.Copy()
|
||||
End If
|
||||
If ObjGral.GetMedidas(UsuarioActual.CveEmpresa) Then
|
||||
DdlMedida.DataSource = ObjGral.DtResultados.Copy()
|
||||
End If
|
||||
If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then
|
||||
DdlRin.DataSource = ObjGral.DtResultados.Copy()
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
DdlMedida.DataSource = GlobalDTPSMedidas(UsuarioActual.CveEmpresa)
|
||||
|
||||
DdlRin.DataSource = GlobalDTPSRinTamaños(UsuarioActual.CveEmpresa)
|
||||
DdlModelo.DataBind()
|
||||
DdlMedida.DataBind()
|
||||
DdlRin.DataBind()
|
||||
@@ -3138,12 +3132,10 @@ Partial Class ProductosyServicios
|
||||
If ObjGral.GetModelos(CveEmpresaFranquicia) Then
|
||||
CveModelo = ObjGral.DtResultados.FiltroPrimeroValor("CveModelo", String.Format("Modelo = '{0}'", DdlModelo.SelectedItem.Text)).ToEntero
|
||||
End If
|
||||
If ObjGral.GetMedidas(CveEmpresaFranquicia) Then
|
||||
CveMedida = ObjGral.DtResultados.FiltroPrimeroValor("CveMedida", String.Format("Medida = '{0}'", DdlMedida.SelectedItem.Text)).ToEntero
|
||||
End If
|
||||
If ObjGral.GetRimTamanios(CveEmpresaFranquicia) Then
|
||||
CveRin = ObjGral.DtResultados.FiltroPrimeroValor("CveRinTamaño", String.Format("RinTamaño = '{0}'", DdlRin.SelectedItem.Text)).ToEntero
|
||||
End If
|
||||
|
||||
CveMedida = GlobalDTPSMedidas(CveEmpresaFranquicia).FiltroPrimeroValor("CveMedida", String.Format("Medida = '{0}'", DdlMedida.SelectedItem.Text)).ToEntero
|
||||
CveRin = GlobalDTPSRinTamaños(CveEmpresaFranquicia).FiltroPrimeroValor("CveRinTamaño", String.Format("RinTamaño = '{0}'", DdlRin.SelectedItem.Text)).ToEntero
|
||||
|
||||
|
||||
ObjGral.Dispose()
|
||||
|
||||
|
||||
@@ -1976,7 +1976,10 @@
|
||||
<asp:LinkButton ID="ImgCalendarFechaEje" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaEje" runat="server" TargetControlID="TxtFechaEjecucion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<div runat="server" id="DVMEEFechaEje" visible="true">
|
||||
<ajax:MaskedEditExtender ID="MEEFechaEje" runat="server" TargetControlID="TxtFechaEjecucion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
</div>
|
||||
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaEje" TargetControlID="TxtFechaEjecucion" PopupButtonID="ImgCalendarFechaEje" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha de Ejecución''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
@@ -8415,19 +8418,35 @@
|
||||
</div>
|
||||
|
||||
|
||||
<%--Cliente--%>
|
||||
<%--Cliente Sucursales --%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoCliente">
|
||||
<div class="row">
|
||||
<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"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="DdlClienteSucursal_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlClienteSucursal" runat="server" CssClass="" Display="None" InitialValue="-1"
|
||||
ControlToValidate="DdlClienteSucursal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hospital''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalVentaMedica"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceRfvDdlClienteSucursal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlClienteSucursal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlClienteSucursal">Hospital:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<%--Cliente--%>
|
||||
<%-- <div runat="server" visible="False" id="DvModalTipoVentaPasoClienteEliminar">
|
||||
<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">Hospital:</asp:Label>
|
||||
<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>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<%--Sucursales--%>
|
||||
<div runat="server" visible="False" id="DvModalClientesucursal">
|
||||
<%-- <div runat="server" visible="False" id="DvModalClientesucursal">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
@@ -8437,8 +8456,7 @@
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlSucursalClienteModal">Sucursal:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<%--Medico Procedimiento--%>
|
||||
@@ -8511,11 +8529,6 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkDvModalTipoVentaAceptar" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkDvModalTipoVentaAceptar_Click" Text="Aceptar" Visible="false" ValidationGroup="GrpModalVentaMedica" />
|
||||
|
||||
@@ -2553,8 +2553,7 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
CargaMedicos()
|
||||
CargaProcedimientos()
|
||||
|
||||
CargaDdlClientes()
|
||||
CargaDdlClientesSucursal()
|
||||
End If
|
||||
|
||||
|
||||
@@ -3394,9 +3393,7 @@ Partial Class Ventas
|
||||
CargaTiposVenta()
|
||||
|
||||
If CveCliente > 0 Then
|
||||
DdlClientesWS.txtValue.Value = CveCliente.ToString
|
||||
DdlClientesWS.txtText.Value = NombreCliente
|
||||
DdlClientesWS.SelectedValue = CveCliente.ToString
|
||||
SeleccionarClienteSucursal(CveCliente:=CveCliente)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -3421,10 +3418,16 @@ Partial Class Ventas
|
||||
RegistraScript("$('#TxtCantidad').focus();", "A1")
|
||||
End If
|
||||
|
||||
If EsVentaMedica Then
|
||||
TxtPrecio.Enabled = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub CargaListasPrecios()
|
||||
DivPrecioLista.Visible = True
|
||||
|
||||
@@ -5195,7 +5198,7 @@ Partial Class Ventas
|
||||
HdnTotalVenta.Value = DbRowVenta("Total").ToString().FormatoNumero(2)
|
||||
TxtMotivoDescuento.Text = DbRowVenta("MotivoDescuento").ToString()
|
||||
TxtObsFact.Text = DbRowVenta("Observaciones").ToString()
|
||||
LblUsuario.Text = DbRowVenta("Nombre").ToString()
|
||||
LblUsuario.Text = DbRowVenta("Nombre").ToString().SubStringADS(30)
|
||||
LblFechaRegistro.Text = DbRowVenta("FechaIng").ToString().ToDate.ToShortDateString
|
||||
LblSeTimbro.Text = DbRowVenta("SeTimbro").ToString()
|
||||
LblMail.Text = DbRowVenta("EnvioMail").ToString()
|
||||
@@ -5318,7 +5321,13 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
TxtFechaEjecucion.Text = DbRowVenta("FechaEjecucion").ToString().ToDateTime.ToString("dd/MM/yyyy")
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso DbRowVenta("CveProcedimiento").ToString.ToEntero > 0 Then
|
||||
TxtFechaEjecucion.Text = DbRowVenta("FechaEjecucion").ToString().ToDateTime.ToString("dd/MM/yyyy hh:mm")
|
||||
DVMEEFechaEje.Visible = False
|
||||
Else
|
||||
TxtFechaEjecucion.Text = DbRowVenta("FechaEjecucion").ToString().ToDateTime.ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
'DdlSucursalEjecucion.SelectedValueExist(DbRowVenta("CveSucursalEjecucion").ToString())
|
||||
'DdlSucursalCobranza.SelectedValueExist(DbRowVenta("CveSucursalCobranza").ToString())
|
||||
DdlSucursalCliente.SelectedValueExist(DbRowVenta("CveClienteSucursal").ToString())
|
||||
@@ -7745,88 +7754,7 @@ Partial Class Ventas
|
||||
DdlClasificacion.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTiposVenta()
|
||||
|
||||
RBLTipoVenta.DataSource = GlobalDTTipoVenta().FiltraParametros("Estatus = 'True' ")
|
||||
RBLTipoVenta.DataBind()
|
||||
RBLTipoVenta.Items.Add(New ListItem("Otros", "5"))
|
||||
|
||||
TrVentasMedicas1.Visible = True
|
||||
TrVentasMedicas2.Visible = True
|
||||
|
||||
For Each item As ListItem In RBLTipoVenta.Items
|
||||
item.Text = $"  {item.Text}"
|
||||
Next
|
||||
|
||||
RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
|
||||
End Sub
|
||||
|
||||
Private Sub CargaProcedimientos()
|
||||
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimiento.DataBind()
|
||||
|
||||
DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimientoModal.DataBind()
|
||||
|
||||
DdlProcedimientoObservaciones.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa)
|
||||
DdlProcedimientoObservaciones.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMedicos()
|
||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedico.DataBind()
|
||||
|
||||
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedicoModal.DataBind()
|
||||
|
||||
DdlMedicoObservaciones.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa)
|
||||
DdlMedicoObservaciones.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaSucursalesModal(CveClienteSeleccionado As Integer)
|
||||
|
||||
DdlSucursalClienteModal.Items.Clear()
|
||||
DdlSucursalClienteModal.ClearSelection()
|
||||
DdlSucursalClienteModal.SelectedValue = Nothing
|
||||
|
||||
Dim ObjCliente As New ClsClientes
|
||||
If ObjCliente.GetSucursales(CveClienteSeleccionado) Then
|
||||
DdlSucursalClienteModal.DataSource = ObjCliente.DtResultados
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
DvModalClientesucursal.Visible = True
|
||||
Else
|
||||
DvModalClientesucursal.Visible = False
|
||||
End If
|
||||
Else
|
||||
DvModalClientesucursal.Visible = False
|
||||
DdlSucursalClienteModal.DataSource = Nothing
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
|
||||
DdlSucursalClienteModal.DataBind()
|
||||
DdlSucursalClienteModal.Items.Insert(0, New ListItem("Matriz", "-1"))
|
||||
|
||||
UpDvModalTipoVenta.FindDataSourceControl
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub CargaDdlClientes()
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlClientesWS.setEsWebService(True)
|
||||
Else
|
||||
DdlClientesWS.setEsWebService(False)
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlClientesWS.ddl.Items.Clear()
|
||||
DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientesWS.DataBind()
|
||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost, Optional AplicaParaVenta As Boolean = True)
|
||||
|
||||
@@ -8271,6 +8199,10 @@ Partial Class Ventas
|
||||
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").Enabled = False
|
||||
End If
|
||||
|
||||
If EsVentaMedica Then
|
||||
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtPrecio").Enabled = False
|
||||
End If
|
||||
|
||||
If CveCicloComercial > 0 Then
|
||||
For Each gvr As GridViewRow In GvContratoDetalles.Rows
|
||||
If gvr.RowType = DataControlRowType.DataRow Then
|
||||
@@ -10771,11 +10703,7 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.Fech2 = TxtFech2.Text.Trim.ToDate
|
||||
ObjFacturaDevolucion.Fech3 = TxtFech3.Text.Trim.ToDate
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
|
||||
ObjFacturaDevolucion.Alfa1 = TxtFechaOS.Text.Trim
|
||||
Else
|
||||
ObjFacturaDevolucion.Alfa1 = TxtAlfa1.Text.Trim
|
||||
End If
|
||||
|
||||
|
||||
ObjFacturaDevolucion.Alfa2 = TxtAlfa2.Text.Trim
|
||||
ObjFacturaDevolucion.Alfa3 = TxtAlfa3.Text.Trim
|
||||
@@ -10803,6 +10731,13 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.CveSucursalEjecucion = DdlSucursalEjecucion.SelectedValue.ToEntero()
|
||||
ObjFacturaDevolucion.CveSucursalCobranza = DdlSucursalCobranza.SelectedValue.ToEntero()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
|
||||
ObjFacturaDevolucion.Alfa1 = TxtFechaOS.Text.Trim
|
||||
ObjFacturaDevolucion.FechaEjecucion = TxtFechaOS.Text.Trim.ToDateTime
|
||||
Else
|
||||
ObjFacturaDevolucion.Alfa1 = TxtAlfa1.Text.Trim
|
||||
End If
|
||||
|
||||
ObjFacturaDevolucion.AtencionA = If(ObjFacturaDevolucion.TipoDocto = "Cot" Or (ObjFacturaDevolucion.TipoDocto.Contiene("Ing", "Rem") AndAlso LblRFC.Text = "XAXX010101000"), TxtAtencionA.Text, "-1")
|
||||
ObjFacturaDevolucion.MotivoDescuento = TxtMotivoDescuento.Text.Trim
|
||||
ObjFacturaDevolucion.Observaciones = TxtObsFact.Text.Trim
|
||||
@@ -11053,12 +10988,6 @@ Partial Class Ventas
|
||||
ObjFacturaBonificacion.Fech2 = TxtFech2.Text.Trim.ToDate
|
||||
ObjFacturaBonificacion.Fech3 = TxtFech3.Text.Trim.ToDate
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
|
||||
ObjFacturaBonificacion.Alfa1 = TxtFechaOS.Text.Trim
|
||||
Else
|
||||
ObjFacturaBonificacion.Alfa1 = TxtAlfa1.Text.Trim
|
||||
End If
|
||||
|
||||
ObjFacturaBonificacion.Alfa2 = TxtAlfa2.Text.Trim
|
||||
ObjFacturaBonificacion.Alfa3 = TxtAlfa3.Text.Trim
|
||||
ObjFacturaBonificacion.Num1 = TxtNum1.Text.Trim.ToDouble
|
||||
@@ -11085,6 +11014,13 @@ Partial Class Ventas
|
||||
ObjFacturaBonificacion.CveSucursalEjecucion = DdlSucursalEjecucion.SelectedValue.ToEntero()
|
||||
ObjFacturaBonificacion.CveSucursalCobranza = DdlSucursalCobranza.SelectedValue.ToEntero()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
|
||||
ObjFacturaBonificacion.Alfa1 = TxtFechaOS.Text.Trim
|
||||
ObjFacturaBonificacion.FechaEjecucion = TxtFechaOS.Text.Trim.ToDateTime
|
||||
Else
|
||||
ObjFacturaBonificacion.Alfa1 = TxtAlfa1.Text.Trim
|
||||
End If
|
||||
|
||||
ObjFacturaBonificacion.AtencionA = If(ObjFacturaBonificacion.TipoDocto = "Cot" Or (ObjFacturaBonificacion.TipoDocto.Contiene("Ing", "Rem") AndAlso LblRFC.Text = "XAXX010101000"), TxtAtencionA.Text, "-1")
|
||||
ObjFacturaBonificacion.MotivoDescuento = TxtMotivoDescuento.Text.Trim
|
||||
ObjFacturaBonificacion.Observaciones = TxtObsFact.Text.Trim
|
||||
@@ -11541,11 +11477,7 @@ Partial Class Ventas
|
||||
ObjFactura.Fech2 = TxtFech2.Text.Trim.ToDate
|
||||
ObjFactura.Fech3 = TxtFech3.Text.Trim.ToDate
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
|
||||
ObjFactura.Alfa1 = TxtFechaOS.Text.Trim
|
||||
Else
|
||||
ObjFactura.Alfa1 = TxtAlfa1.Text.Trim
|
||||
End If
|
||||
|
||||
|
||||
ObjFactura.Alfa2 = TxtAlfa2.Text.Trim
|
||||
ObjFactura.Alfa3 = TxtAlfa3.Text.Trim
|
||||
@@ -11609,6 +11541,13 @@ Partial Class Ventas
|
||||
ObjFactura.Det_ContraRecibo = TxtDet_ContraRecibo.Text.Trim
|
||||
ObjFactura.MonedaAbreviatura = ""
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
|
||||
ObjFactura.Alfa1 = TxtFechaOS.Text.Trim
|
||||
ObjFactura.FechaEjecucion = TxtFechaOS.Text.Trim.ToDateTime
|
||||
Else
|
||||
ObjFactura.Alfa1 = TxtAlfa1.Text.Trim
|
||||
End If
|
||||
|
||||
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
|
||||
If (ObjFactura.CveMoneda = 2 AndAlso ObjFactura.ConvertirPesos = True AndAlso ObjFactura.TipodeComprobante = "Ingresos" AndAlso RemisionesLista.Count > 0) Then
|
||||
Dim TotalCalculableImpuestos, TotalCalculableImpuestosIVA As Decimal
|
||||
@@ -12205,11 +12144,7 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.Fech3 = TxtFech3.Text.Trim.ToDate
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
|
||||
ObjFacturaDevolucion.Alfa1 = TxtFechaOS.Text.Trim
|
||||
Else
|
||||
ObjFacturaDevolucion.Alfa1 = TxtAlfa1.Text.Trim
|
||||
End If
|
||||
|
||||
|
||||
ObjFacturaDevolucion.Alfa2 = TxtAlfa2.Text.Trim
|
||||
ObjFacturaDevolucion.Alfa3 = TxtAlfa3.Text.Trim
|
||||
@@ -12247,6 +12182,13 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.Det_FechaOrdenCompra = TxtDet_FechaOrdenCompra.Text.Trim
|
||||
ObjFacturaDevolucion.MonedaAbreviatura = ""
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
|
||||
ObjFacturaDevolucion.Alfa1 = TxtFechaOS.Text.Trim
|
||||
ObjFacturaDevolucion.FechaEjecucion = TxtFechaOS.Text.Trim.ToDateTime
|
||||
Else
|
||||
ObjFacturaDevolucion.Alfa1 = TxtAlfa1.Text.Trim
|
||||
End If
|
||||
|
||||
'Totales, Y se llena TmpDTImpuestos
|
||||
ObjFacturaDevolucion.SubTotal = TxtSubTotal.Text.ToDecimal
|
||||
ObjFacturaDevolucion.Descuento = LblDescuentos.Text.Trim.ToDecimal
|
||||
@@ -13591,7 +13533,7 @@ Partial Class Ventas
|
||||
|
||||
If EsVentaMedica AndAlso ErrorList.Count = 0 AndAlso ChkRequiereTecnico.Checked Then
|
||||
|
||||
GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList)
|
||||
GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList, CveVentaOS:=factura.CveVenta, SerieFolioOS:=factura.SerieFolio)
|
||||
|
||||
If ErrorList.Count = 0 Then
|
||||
If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOSVentaMedica) Then
|
||||
@@ -16865,16 +16807,22 @@ Partial Class Ventas
|
||||
DdlUnidadMedida.DataBind()
|
||||
DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString())
|
||||
|
||||
If drPS("CveTipoPS").ToString() = "1" Then 'Si es servicio
|
||||
If UsuarioActual.Empresa.Funcionalidad(558).ToString() = "1" Then 'Si es Empresa llantera
|
||||
TxtPrecio.Enabled = True
|
||||
Else
|
||||
'TxtPrecio.Enabled = False
|
||||
End If
|
||||
If EsVentaMedica Then
|
||||
TxtPrecio.Enabled = False
|
||||
Else
|
||||
TxtPrecio.Enabled = True
|
||||
If drPS("CveTipoPS").ToString() = "1" Then 'Si es servicio
|
||||
If UsuarioActual.Empresa.Funcionalidad(558).ToString() = "1" Then 'Si es Empresa llantera
|
||||
TxtPrecio.Enabled = True
|
||||
Else
|
||||
'TxtPrecio.Enabled = False
|
||||
End If
|
||||
Else
|
||||
TxtPrecio.Enabled = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim PSCodigoSAT As String = drPS("SATClavePS").ToString
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(68) AndAlso Not PSCodigoSAT.Contiene("84111506", "80141610") Then TxtPrecio.Enabled = False
|
||||
@@ -18068,17 +18016,12 @@ Partial Class Ventas
|
||||
|
||||
'YOKOHAMA
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso CveRinTamañoPS > 0 AndAlso CveMarcaPromocion.Contiene(800, 912, 1238, 1381, 1456, 1528, 1600, 1672, 1807) Then
|
||||
Dim DtRines As DataTable = Nothing
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then
|
||||
DtRines = ObjGral.DtResultados.Copy()
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
|
||||
|
||||
If CveMarcaPromocion > 0 Then
|
||||
ObjDescuento.NombrePromo = "YOKOHAMA VERANO" 'dr("NombrePromocion").ToString()
|
||||
ObjDescuento.CveMarca = CveMarcaPromocion
|
||||
Dim Rin As String = DtRines.FiltroPrimeroValor("RinTamaño", $"CveRinTamaño = {CveRinTamañoPS}")
|
||||
Dim Rin As String = GlobalDTPSRinTamaños(UsuarioActual.CveEmpresa, CveRinTamañoPS).FiltroPrimeroValor("RinTamaño", "")
|
||||
Dim PromoDescuento As Decimal = (Descuento * (1 + If(IncluyeImpuestos, PorcentajeIVA, 0))).RoundSQL(2)
|
||||
|
||||
ObjDescuento.ObsDescuento = String.Format("RIN {0} BONO ${1:N2}", Rin, PromoDescuento)
|
||||
@@ -21783,7 +21726,14 @@ Partial Class Ventas
|
||||
TxtObsPS.Enabled = True
|
||||
DdlProyecto.Enabled = True
|
||||
DdlSubProyecto.Enabled = True
|
||||
TxtPrecio.Enabled = True
|
||||
|
||||
If EsVentaMedica Then
|
||||
TxtPrecio.Enabled = False
|
||||
Else
|
||||
TxtPrecio.Enabled = True
|
||||
End If
|
||||
|
||||
|
||||
LbAgregar.Enabled = True
|
||||
ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '2'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = ''; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = '';")
|
||||
LblSubTotal1.Text = TxtSubTotal.Text
|
||||
@@ -26259,7 +26209,26 @@ Partial Class Ventas
|
||||
|
||||
#Region " SALDAR VENTA "
|
||||
Protected Sub BtnSaldarVenta_Click(sender As Object, e As EventArgs)
|
||||
SaldarVenta()
|
||||
'SaldarVenta()
|
||||
|
||||
Dim ObjCancelacion As New Timbrado
|
||||
|
||||
Dim FolioFiscal As String = LblFolioFiscal.Text
|
||||
Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
||||
Dim RFCReceptor As String = LblRFC.Text
|
||||
Dim CvePACCancelacion As Integer = 4
|
||||
|
||||
|
||||
Dim RespCancelacion As RespuestaCancelacionSAT = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, TxtTotal.Text.ToDecimal, RFCReceptor, RFCEmisor, CvePACCancelacion, CveSATMotivoCancelacion:=3)
|
||||
|
||||
If RespCancelacion.Verificado Then
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Alert("Los servicios de cancelación del SAT no se encuentran disponibles o presentan time out. Intente de nuevo en unos minutos.<br/>Origen del error: WebService www.sat.gob.mx", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub SaldarVenta()
|
||||
'Dim ObjVenta As New ClsVentas
|
||||
@@ -36018,6 +35987,93 @@ Partial Class Ventas
|
||||
|
||||
#Region "VENTAS MEDICAS"
|
||||
|
||||
|
||||
Private Sub CargaTiposVenta()
|
||||
|
||||
RBLTipoVenta.DataSource = GlobalDTTipoVenta().FiltraParametros("Estatus = 'True' ")
|
||||
RBLTipoVenta.DataBind()
|
||||
RBLTipoVenta.Items.Add(New ListItem("Otros", "5"))
|
||||
|
||||
TrVentasMedicas1.Visible = True
|
||||
TrVentasMedicas2.Visible = True
|
||||
|
||||
For Each item As ListItem In RBLTipoVenta.Items
|
||||
item.Text = $"  {item.Text}"
|
||||
Next
|
||||
|
||||
RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
|
||||
End Sub
|
||||
|
||||
Private Sub CargaProcedimientos()
|
||||
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimiento.DataBind()
|
||||
|
||||
DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimientoModal.DataBind()
|
||||
|
||||
DdlProcedimientoObservaciones.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa)
|
||||
DdlProcedimientoObservaciones.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMedicos()
|
||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedico.DataBind()
|
||||
|
||||
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedicoModal.DataBind()
|
||||
|
||||
DdlMedicoObservaciones.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa)
|
||||
DdlMedicoObservaciones.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub CargaSucursalesModal(CveClienteSeleccionado As Integer)
|
||||
|
||||
' DdlSucursalClienteModal.Items.Clear()
|
||||
' DdlSucursalClienteModal.ClearSelection()
|
||||
' DdlSucursalClienteModal.SelectedValue = Nothing
|
||||
|
||||
' Dim ObjCliente As New ClsClientes
|
||||
' If ObjCliente.GetSucursales(CveClienteSeleccionado) Then
|
||||
' DdlSucursalClienteModal.DataSource = ObjCliente.DtResultados
|
||||
' If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
' DvModalClientesucursal.Visible = True
|
||||
' Else
|
||||
' DvModalClientesucursal.Visible = False
|
||||
' End If
|
||||
' Else
|
||||
' DvModalClientesucursal.Visible = False
|
||||
' DdlSucursalClienteModal.DataSource = Nothing
|
||||
' End If
|
||||
' ObjCliente.Dispose()
|
||||
|
||||
' DdlSucursalClienteModal.DataBind()
|
||||
' DdlSucursalClienteModal.Items.Insert(0, New ListItem("Matriz", "-1"))
|
||||
|
||||
' UpDvModalTipoVenta.FindDataSourceControl
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub CargaDdlClientesSucursal()
|
||||
|
||||
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("Seleccione uno", "-1"))
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
|
||||
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
|
||||
UpCliente.Update()
|
||||
@@ -36036,9 +36092,9 @@ Partial Class Ventas
|
||||
ChkRequiereTecnicoModal.Enabled = True
|
||||
DvModalRequiereOSFecha.Visible = True
|
||||
|
||||
If CveCliente > 0 Then
|
||||
CargaSucursalesModal(CveCliente)
|
||||
End If
|
||||
'If CveCliente > 0 Then
|
||||
' CargaSucursalesModal(CveCliente)
|
||||
'End If
|
||||
|
||||
TxtFechaModal.Text = NowADS.AddHours(1).ToString("yyyy-MM-dd HH").Replace(" ", "T") + ":00" ' ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
|
||||
@@ -36076,13 +36132,51 @@ Partial Class Ventas
|
||||
UpDvModalTipoVenta.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlClientesWS_selectedindexchange(sender As Object, e As EventArgs)
|
||||
CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClientesWS.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
'Protected Sub DdlClientesWS_selectedindexchange(sender As Object, e As EventArgs)
|
||||
|
||||
CargaSucursalesModal(DdlClientesWS.SelectedValue.ToEntero)
|
||||
' CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClientesWS.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
' 'CargaSucursalesModal(DdlClientesWS.SelectedValue.ToEntero)
|
||||
|
||||
'End Sub
|
||||
|
||||
|
||||
Protected Sub DdlClienteSucursal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
Dim CveClienteSplit As Integer = -1
|
||||
CargaPSProcedimiento(DdlProcedimiento.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
Private Function DdlClienteSucursalCliente() As Integer
|
||||
If DdlClienteSucursal.SelectedValue = "-1" Then
|
||||
Return -1
|
||||
Else
|
||||
Dim array As String() = DdlClienteSucursal.SelectedValue.Split("|"c)
|
||||
Return If(array(0).ToEntero > 0, array(0).ToEntero, -1)
|
||||
End If
|
||||
End Function
|
||||
Private Function DdlClienteSucursalSucursal() As Integer
|
||||
|
||||
If DdlClienteSucursal.SelectedValue = "-1" Then
|
||||
Return -1
|
||||
Else
|
||||
Dim array As String() = DdlClienteSucursal.SelectedValue.Split("|"c)
|
||||
Return If(array(1).ToEntero > 0, array(1).ToEntero, -1)
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub SeleccionarClienteSucursal(CveCliente As Integer)
|
||||
|
||||
Dim IndexSeleccion As Integer = 0
|
||||
For Each item As ListItem In DdlClienteSucursal.Items
|
||||
Dim array As String() = item.Value.Split("|"c)
|
||||
If CveCliente = array(0).ToEntero Then
|
||||
DdlClienteSucursal.SelectedIndex = IndexSeleccion
|
||||
Exit For
|
||||
End If
|
||||
IndexSeleccion = IndexSeleccion + 1
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ModalValidaMedicoProcedimiento()
|
||||
|
||||
@@ -36107,9 +36201,10 @@ Partial Class Ventas
|
||||
|
||||
ChkRequiereTecnicoModal.Enabled = True
|
||||
|
||||
DdlClientesWS.txtText.Value = ""
|
||||
DdlClientesWS.txtValue.Value = ""
|
||||
DdlClientesWS.ddl.SelectedValueExist(-1)
|
||||
'DdlClientesWS.txtText.Value = ""
|
||||
'DdlClientesWS.txtValue.Value = ""
|
||||
'DdlClientesWS.ddl.SelectedValueExist(-1)
|
||||
DdlClienteSucursal.SelectedValueExist(-1)
|
||||
|
||||
DvModalRequiereOSFecha.Visible = False
|
||||
ChkRequiereTecnicoModal.Checked = False
|
||||
@@ -36130,8 +36225,8 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlClientesWS.SelectedValue.ToEntero > 0 Then
|
||||
ViewState("CveCliente") = DdlClientesWS.SelectedValue.ToEntero
|
||||
If DdlClienteSucursalCliente() > 0 Then
|
||||
ViewState("CveCliente") = DdlClienteSucursalCliente()
|
||||
Else
|
||||
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -36177,7 +36272,7 @@ Partial Class Ventas
|
||||
|
||||
CargaCliente(CveCliente)
|
||||
|
||||
DdlSucursalCliente.SelectedValueExist(DdlSucursalClienteModal.SelectedValue)
|
||||
DdlSucursalCliente.SelectedValueExist(DdlClienteSucursalSucursal)
|
||||
|
||||
DdlTipoComprobante_SelectedIndexChanged(sender, Nothing)
|
||||
|
||||
@@ -36234,7 +36329,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaPSProcedimiento(DdlProcedimientoModal.SelectedValue.ToEntero, DdlClientesWS.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
CargaPSProcedimiento(DdlProcedimientoModal.SelectedValue.ToEntero, DdlClienteSucursalCliente, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPSProcedimiento(CveProcedimiento As Integer, CveClienteL As Integer, CveSubProyectoL As Integer)
|
||||
@@ -36255,7 +36350,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function GeneraOS(ByRef TransacSQL As SqlTransaction, ByRef errorList As List(Of String)) As Boolean
|
||||
Private Function GeneraOS(ByRef TransacSQL As SqlTransaction, ByRef errorList As List(Of String), CveVentaOS As Integer, SerieFolioOS As String) As Boolean
|
||||
|
||||
Dim Errores As Boolean = False
|
||||
|
||||
@@ -36291,18 +36386,22 @@ Partial Class Ventas
|
||||
Dim CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePSDetalle, 1, -1, -1, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", False, True, False, -1, "-1", "-1", "-1", "", UsuarioActual.CveUsuario, Archivo:="")
|
||||
|
||||
If CveOsDetalle > 0 Then
|
||||
'MENSAJE PRINCIPAL
|
||||
'Dim MensajeAlertOS As New StringBuilder
|
||||
MensajeAlert.AppendFormat(String.Format("<br/>La Orden de Servicio: <b>{0}</b> se generó correctamente.<br/>", ObjOrdenServicio.Folio))
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=OS&CVEOS={0}", ObjOrdenServicio.CveOS)))
|
||||
'Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";"
|
||||
'Alert(MensajeAlertOS.ToString, TipoMensaje.MsgInformacion, Liga)
|
||||
Else
|
||||
errorList.Add("Se presento un error al guardar la el detalle de la orden de servicio.")
|
||||
Errores = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not Errores Then
|
||||
Dim ObjEventos As New ClsOIEventos(TransacSQL)
|
||||
Dim LigaVenta As String = String.Format("Pedido en Folio: <a href=""/Ventas/Ventas.aspx?CveVenta={0}"" target=""_blank"">{1}</a>", CveVentaOS, SerieFolioOS)
|
||||
|
||||
If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveOS:=CveOSVentaMedica) Then
|
||||
errorList.Add("Se presento un error al guardar la bitacora de la orden de servicio.")
|
||||
Errores = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Return If(Errores, False, True)
|
||||
@@ -36351,5 +36450,8 @@ Partial Class Ventas
|
||||
Protected Sub BtnCargaAuxiliarConta_Click(sender As Object, e As EventArgs)
|
||||
CargarSaldoAuxiliar(CveCliente)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user