SMS Comisiones 2024-04-02
This commit is contained in:
@@ -6197,7 +6197,8 @@ Public Class ClsVentas
|
||||
End Function
|
||||
|
||||
Public Function AddMedico(Nombre As String, Apellidos As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Optional CveMedicoSubEspecialidad As Integer = -1, Optional CveVendedor As Integer = -1) As Integer
|
||||
CveEmpresa As Integer, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Optional CveMedicoSubEspecialidad As Integer = -1,
|
||||
Optional CveVendedor As Integer = -1, Optional CvePeriodoPago As Integer = 1) As Integer
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
CveMedicoNuevo = -1
|
||||
@@ -6218,6 +6219,7 @@ Public Class ClsVentas
|
||||
.Add("@Celular", SqlDbType.VarChar).Value = Celular
|
||||
.Add("@CveMedicoSubEspecialidad", SqlDbType.Int).Value = CveMedicoSubEspecialidad
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@CvePeriodoPago", SqlDbType.Int).Value = CvePeriodoPago
|
||||
.Add("@CveMedicoNuevo", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
End With
|
||||
@@ -6234,7 +6236,8 @@ Public Class ClsVentas
|
||||
End Function
|
||||
|
||||
Public Function UpdateMedico(CveMedico As Integer, Nombre As String, Apellidos As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Optional CveMedicoSubEspecialidad As Integer = -1, Optional CveVendedor As Integer = -1) As Boolean
|
||||
CveEmpresa As Integer, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Optional CveMedicoSubEspecialidad As Integer = -1,
|
||||
Optional CveVendedor As Integer = -1, Optional CvePeriodoPago As Integer = 1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MedicosUpdate")
|
||||
@@ -6259,6 +6262,7 @@ Public Class ClsVentas
|
||||
'.Add("@Consultorio", SqlDbType.VarChar).Value = Consultorio
|
||||
.Add("@CveMedicoSubEspecialidad", SqlDbType.Int).Value = CveMedicoSubEspecialidad
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@CvePeriodoPago", SqlDbType.Int).Value = CvePeriodoPago
|
||||
'.Add("@Torre", SqlDbType.VarChar).Value = Torre
|
||||
|
||||
|
||||
@@ -6827,7 +6831,7 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
Public Function AddUpdateComisionesMedicas(CvePS As Integer, CveEmpresa As Integer, ComisionMedico As Decimal, ComisionVendedor As Decimal, ComisionTecnico As Decimal) As Boolean
|
||||
Public Function AddUpdateComisionesMedicas(CvePS As Integer, CveEmpresa As Integer, ComisionMedico As Decimal, ComisionVendedor As Decimal, ComisionTecnico As Decimal, ComisionGerente As Decimal) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ComisionesMedicasAddUpdate")
|
||||
@@ -6838,6 +6842,7 @@ Public Class ClsVentas
|
||||
.Add("@ComisionMedico", SqlDbType.Money).Value = ComisionMedico
|
||||
.Add("@ComisionVendedor", SqlDbType.Money).Value = ComisionVendedor
|
||||
.Add("@ComisionTecnico", SqlDbType.Money).Value = ComisionTecnico
|
||||
.Add("@ComisionGerente", SqlDbType.Money).Value = ComisionGerente
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModal" runat="server">Agregar Médico</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body" >
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -34,12 +34,12 @@
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtAPellidos" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtAPellidos" runat="server" ControlToValidate="TxtAPellidos" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Apellido Paterno''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtAPellidos.ClientID.ToString()%>">Apellidos:</label>
|
||||
</div>
|
||||
</div>
|
||||
<asp:TextBox ID="TxtAPellidos" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtAPellidos" runat="server" ControlToValidate="TxtAPellidos" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Apellido Paterno''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtAPellidos.ClientID.ToString()%>">Apellidos:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
</div>
|
||||
@@ -50,7 +50,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCedulaProfesional" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtCedulaProfesional" runat="server" ControlToValidate="TxtCedulaProfesional" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cédula Profecional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cédula Profecional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCedulaProfesional.ClientID.ToString()%>">Cédula Profesional:</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,15 +74,15 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTelefono" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MEETelefono" runat="server" TargetControlID="TxtTelefono" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtTelefono" runat="server" ControlToValidate="TxtTelefono" CssClass="help-block errorimput"
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTelefono" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MEETelefono" runat="server" TargetControlID="TxtTelefono" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtTelefono" runat="server" ControlToValidate="TxtTelefono" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Telefono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtTelefono.ClientID.ToString()%>">Teléfono:</label>
|
||||
</div>
|
||||
</div>
|
||||
<label for="<%= TxtTelefono.ClientID.ToString()%>">Teléfono:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -93,7 +93,7 @@
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
@@ -101,23 +101,23 @@
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtCelular" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtCelular" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Celular''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarMedico">
|
||||
</asp:RequiredFieldValidator>
|
||||
</asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtCelular.ClientID.ToString()%>">Celular:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtMail" CssClass="form-control " runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtMail" runat="server" FilterType="Numbers, LowercaseLetters, UppercaseLetters, Custom" ValidChars=".;@_-ñ" TargetControlID="TxtMail" />
|
||||
<asp:RegularExpressionValidator ID="RETxtMail" runat="server" CssClass="help-block errorimput"
|
||||
ValidationExpression="(([a-zA-Z0-9ñÑ_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*"
|
||||
ControlToValidate="TxtMail" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarMedico"></asp:RegularExpressionValidator>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtMail" runat="server" ControlToValidate="TxtMail" CssClass="help-block errorimput"
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtMail" CssClass="form-control " runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtMail" runat="server" FilterType="Numbers, LowercaseLetters, UppercaseLetters, Custom" ValidChars=".;@_-ñ" TargetControlID="TxtMail" />
|
||||
<asp:RegularExpressionValidator ID="RETxtMail" runat="server" CssClass="help-block errorimput"
|
||||
ValidationExpression="(([a-zA-Z0-9ñÑ_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*"
|
||||
ControlToValidate="TxtMail" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarMedico"></asp:RegularExpressionValidator>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtMail" runat="server" ControlToValidate="TxtMail" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtMail.ClientID.ToString()%>">Correo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<label for="<%= TxtMail.ClientID.ToString()%>">Correo:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@@ -145,20 +145,35 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPeriodoPago" CssClass="form-control select2me" runat="server" Width="100%">
|
||||
<asp:ListItem Value="-1">-</asp:ListItem>
|
||||
<asp:ListItem Value="1">Mensual</asp:ListItem>
|
||||
<asp:ListItem Value="2">Quincenal</asp:ListItem>
|
||||
<asp:ListItem Value="3">Semanal</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlPeriodoPago.ClientID.ToString()%>">Perido de Pago:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNotas" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtNotas.ClientID.ToString()%>">Notas:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNotas" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtNotas.ClientID.ToString()%>">Notas:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align:right!important">
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarMedicoClienteSucursal" data-toggle="tooltip" data-placement="right" title="Agregar" CssClass="btn btn-circle btn-default" OnClick="LnkAgregarMedicoClienteSucursal_Click"
|
||||
Text="<i class='fa fa-plus'></i> Agregar"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12" style="text-align: right!important">
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarMedicoClienteSucursal" data-toggle="tooltip" data-placement="right" title="Agregar" CssClass="btn btn-circle btn-default" OnClick="LnkAgregarMedicoClienteSucursal_Click"
|
||||
Text="<i class='fa fa-plus'></i> Agregar"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -171,7 +186,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlClienteSucursal" runat="server" Text='<%# Eval("ClienteSucursal") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Dias de Atencion" ItemStyle-HorizontalAlign="Left">
|
||||
@@ -186,26 +201,26 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Consultorio" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConsultorio" runat="server" Text='<%# Eval("Consultorio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Consultorio" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlConsultorio" runat="server" Text='<%# Eval("Consultorio") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Torre" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTorre" runat="server" Text='<%# Eval("Torre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Torre" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTorre" runat="server" Text='<%# Eval("Torre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField HeaderText="Asistente" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAsistente" runat="server" Text='<%# Eval("AsistenteNombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Asistente" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAsistente" runat="server" Text='<%# Eval("AsistenteNombre") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- <asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||
<%-- <asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -170,7 +170,7 @@ Partial Class UserControl_AddMedico
|
||||
TxtCelular.Text = ""
|
||||
DdlEspecialidad.SelectedValueExist(-1)
|
||||
DdlSubEspecialidad.SelectedValueExist(-1)
|
||||
|
||||
DdlPeriodoPago.SelectedValueExist(-1)
|
||||
DVUsuarioFechaIng.Visible = False
|
||||
TxtFechaIng.Text = ""
|
||||
TxtUsuario.Text = ""
|
||||
@@ -209,7 +209,8 @@ Partial Class UserControl_AddMedico
|
||||
End Sub
|
||||
|
||||
Public Sub PreparaEdicion(CveMedicoEditar As Integer, Nombre As String, Apellidos As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean,
|
||||
Mail As String, Telefono As String, Celular As String, CveMedicoEspecialidad As Integer, CveMedicoSubEspecialidad As Integer, FechaIng As DateTime, Usuario As String, CveVendedor As Integer)
|
||||
Mail As String, Telefono As String, Celular As String, CveMedicoEspecialidad As Integer, CveMedicoSubEspecialidad As Integer, FechaIng As DateTime, Usuario As String,
|
||||
CveVendedor As Integer, Optional CvePeriodoPago As Integer = -1)
|
||||
|
||||
CargaCombos()
|
||||
CargaCombosMedicoClientesucursal()
|
||||
@@ -233,11 +234,15 @@ Partial Class UserControl_AddMedico
|
||||
TxtUsuario.Text = Usuario
|
||||
|
||||
DdlVendedor.SelectedValueExist(CveVendedor)
|
||||
DdlPeriodoPago.SelectedValueExist(CvePeriodoPago)
|
||||
|
||||
DVEstatus.Visible = True
|
||||
LbAgregar.Text = "Actualizar"
|
||||
LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfesional.Text}"
|
||||
|
||||
|
||||
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
CargaGVMedicoClienteSucursal(CveMedico, UsuarioActual.CveEmpresa)
|
||||
@@ -257,13 +262,15 @@ Partial Class UserControl_AddMedico
|
||||
|
||||
If CveMedico > 0 Then
|
||||
If ObjVentas.UpdateMedico(CveMedico, TxtNombre.Text.Trim, TxtAPellidos.Text.Trim, TxtCedulaProfesional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, ChkEstatus.Checked,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, DdlSubEspecialidad.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero) Then
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, DdlSubEspecialidad.SelectedValue.ToEntero,
|
||||
DdlVendedor.SelectedValue.ToEntero, CvePeriodoPago:=DdlPeriodoPago.SelectedValue.ToEntero) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
Else
|
||||
|
||||
CveMedicoNuevo = ObjVentas.AddMedico(TxtNombre.Text.Trim, TxtAPellidos.Text.Trim, TxtCedulaProfesional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, ChkEstatus.Checked,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, DdlSubEspecialidad.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero)
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, DdlSubEspecialidad.SelectedValue.ToEntero,
|
||||
DdlVendedor.SelectedValue.ToEntero, CvePeriodoPago:=DdlPeriodoPago.SelectedValue.ToEntero)
|
||||
|
||||
If CveMedicoNuevo > 0 Then
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
|
||||
<%--DataKeyNames="CveMedico,Medico,CedulaProfesional,FechaNacimiento,Notas,DiasAtencion,Horario,Lugar,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Consultorio,Torre,Usuario"--%>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CveMedico,Nombre,Apellidos,CedulaProfesional,FechaNacimiento,Notas,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Usuario,CveVendedor"
|
||||
DataKeyNames="CveMedico,Nombre,Apellidos,CedulaProfesional,FechaNacimiento,Notas,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Usuario,CveVendedor,CvePeriodoPago"
|
||||
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>
|
||||
|
||||
@@ -188,7 +188,7 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
AddMedicoControl.PreparaEdicion(CveMedico, GvRow.DataKey("Nombre"), GvRow.DataKey("Apellidos"), GvRow.DataKey("CedulaProfesional"), GvRow.DataKey("FechaNacimiento").ToDate(), GvRow.DataKey("Notas"),
|
||||
Boolean.Parse(GvRow.DataKey("Estatus")), GvRow.DataKey("Mail"), GvRow.DataKey("Telefono"), GvRow.DataKey("Celular"), GvRow.DataKey("CveMedicoEspecialidad").ToEntero, GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero,
|
||||
GvRow.DataKey("FechaIng").ToDateTime, GvRow.DataKey("Usuario"), GvRow.DataKey("CveVendedor").ToEntero)
|
||||
GvRow.DataKey("FechaIng").ToDateTime, GvRow.DataKey("Usuario"), GvRow.DataKey("CveVendedor").ToEntero, CvePeriodoPago:=GvRow.DataKey("CvePeriodoPago").ToEntero)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
|
||||
<div id="DvModalComisiones" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<div class="modal-dialog" style="width: 900px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpDvModalComisiones" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
@@ -183,7 +183,7 @@
|
||||
|
||||
|
||||
<asp:GridView ID="GvComisiones" runat="server" AutoGenerateColumns="False"
|
||||
DataKeyNames="CvePS"
|
||||
DataKeyNames="CvePS,ComisionMedico,ComisionGerente,ComisionVendedor,ComisionTecnico"
|
||||
data-sort="true" OnRowDataBound="GvComisiones_RowDataBound"
|
||||
EmptyDataText="No se encontraron Comisiones" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
@@ -200,15 +200,21 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="% Gerente" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtComisionVendedor" Width="75px" runat="server" Text='<%# String.Format("{0:#.00}", Eval("ComisionVendedor")) %>' Style="text-align: right;" onkeyup="FormatoMoneda(this)" AutoComplete="off"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtComisionGerente" Width="75px" runat="server" Text='<%# String.Format("{0:#.00}", Eval("ComisionGerente")) %>' Style="text-align: right;" onkeyup="FormatoMoneda(this);validaPorcentaje(this);" AutoComplete="off" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Técnico" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="% Vendedor" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtComisionTecnico" Width="75px" runat="server" Text='<%# String.Format("{0:#.00}", Eval("ComisionTecnico")) %>' Style="text-align: right;" onkeyup="FormatoMoneda(this)" AutoComplete="off"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtComisionVendedor" Width="75px" runat="server" Text='<%# String.Format("{0:#.00}", Eval("ComisionVendedor")) %>' Style="text-align: right;" onkeyup="FormatoMoneda(this);validaPorcentaje(this);" AutoComplete="off" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="% Técnico" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtComisionTecnico" Width="75px" runat="server" Text='<%# String.Format("{0:#.00}", Eval("ComisionTecnico")) %>' Style="text-align: right;" onkeyup="FormatoMoneda(this);validaPorcentaje(this);" AutoComplete="off" ></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -235,7 +241,19 @@
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
function validaPorcentaje(textbox) {
|
||||
|
||||
var valor = parseFloat(textbox.value.replace(/,/g, ''));
|
||||
|
||||
if (valor > 100) {
|
||||
|
||||
textbox.value = '100';
|
||||
} else if ( isNaN(valor) || valor == 0) {
|
||||
|
||||
textbox.value = '';
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
@@ -149,13 +149,16 @@ Partial Class Ventas_RepComisionesSMS
|
||||
Dim ComisionMedicoDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionMedico", $"CvePS = {CvePS} ").ToDecimal
|
||||
Dim ComisionVendedorDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionVendedor", $"CvePS = {CvePS} ").ToDecimal
|
||||
Dim ComisionTecnicoDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionTecnico", $"CvePS = {CvePS} ").ToDecimal
|
||||
Dim ComisionGerenteDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionGerente", $"CvePS = {CvePS} ").ToDecimal
|
||||
|
||||
Dim ComisionMedicoGV As Decimal = GvRow.FCTextBox("TxtComisionMedico").Text.ToDecimal
|
||||
Dim ComisionVendedorGV As Decimal = GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal
|
||||
Dim ComisionTecnicoGV As Decimal = GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal
|
||||
Dim ComisionGerenteGV As Decimal = (GvRow.FCTextBox("TxtComisionGerente").Text.ToDecimal / 100).RoundSQL(2)
|
||||
Dim ComisionVendedorGV As Decimal = (GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal / 100).RoundSQL(2)
|
||||
Dim ComisionTecnicoGV As Decimal = (GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal / 100).RoundSQL(2)
|
||||
|
||||
If ComisionMedicoDT <> ComisionMedicoGV Or ComisionVendedorDT <> ComisionVendedorGV Or ComisionTecnicoDT <> ComisionTecnicoGV Then
|
||||
If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, ComisionMedicoGV, ComisionVendedorGV, ComisionTecnicoGV) Then
|
||||
|
||||
If ComisionMedicoDT <> ComisionMedicoGV Or ComisionVendedorDT <> ComisionVendedorGV Or ComisionTecnicoDT <> ComisionTecnicoGV Or ComisionGerenteDT <> ComisionGerenteGV Then
|
||||
If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, ComisionMedicoGV, ComisionVendedorGV, ComisionTecnicoGV, ComisionGerenteGV) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
@@ -177,16 +180,36 @@ Partial Class Ventas_RepComisionesSMS
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.FCTextBox("TxtComisionMedico").Text.ToDecimal = 0 Then
|
||||
'ComisionMedico,ComisionGerente,ComisionVendedor,ComisionTecnico"
|
||||
|
||||
If e.Row.DataKey("ComisionMedico").ToDecimal = 0 Then
|
||||
e.Row.FCTextBox("TxtComisionMedico").Text = ""
|
||||
Else
|
||||
e.Row.FCTextBox("TxtComisionMedico").Text = e.Row.DataKey("ComisionMedico").ToDecimal.ToString("###.00")
|
||||
End If
|
||||
If e.Row.FCTextBox("TxtComisionVendedor").Text.ToDecimal = 0 Then
|
||||
|
||||
|
||||
If e.Row.DataKey("ComisionGerente").ToDecimal = 0 Then
|
||||
e.Row.FCTextBox("TxtComisionGerente").Text = ""
|
||||
Else
|
||||
e.Row.FCTextBox("TxtComisionGerente").Text = (e.Row.DataKey("ComisionGerente").ToDecimal * 100).ToString("###.00")
|
||||
End If
|
||||
|
||||
|
||||
If e.Row.DataKey("ComisionVendedor").ToDecimal = 0 Then
|
||||
e.Row.FCTextBox("TxtComisionVendedor").Text = ""
|
||||
Else
|
||||
e.Row.FCTextBox("TxtComisionVendedor").Text = (e.Row.DataKey("ComisionVendedor").ToDecimal * 100).ToString("###.00")
|
||||
End If
|
||||
If e.Row.FCTextBox("TxtComisionTecnico").Text.ToDecimal = 0 Then
|
||||
|
||||
If e.Row.DataKey("ComisionTecnico").ToDecimal = 0 Then
|
||||
e.Row.FCTextBox("TxtComisionTecnico").Text = ""
|
||||
Else
|
||||
e.Row.FCTextBox("TxtComisionTecnico").Text = (e.Row.DataKey("ComisionTecnico").ToDecimal * 100).ToString("###.00")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user