--Modal para autorizar descuentos
This commit is contained in:
@@ -4358,9 +4358,10 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCEPorPS" runat="server" HighlightCssClass="vco" TargetControlID="CVPorPS" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEPorPS" runat="server" HighlightCssClass="vco" TargetControlID="CVPorPS" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
(%)
|
(%)
|
||||||
</td>
|
</td>
|
||||||
<td><label style="display:none;">IVA</label></td>
|
|
||||||
<td>
|
<td>
|
||||||
<asp:Label ID="LblIVADescPS" runat="server" ClientIDMode="Static" Text="0.00" style="display:none;"></asp:Label>
|
<label style="display: none;">IVA</label></td>
|
||||||
|
<td>
|
||||||
|
<asp:Label ID="LblIVADescPS" runat="server" ClientIDMode="Static" Text="0.00" Style="display: none;"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -4378,7 +4379,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td><b>
|
<td><b>
|
||||||
<asp:Label ID="LblUtilidadPorcentaje" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></b>
|
<asp:Label ID="LblUtilidadPorcentaje" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></b>
|
||||||
 
|
 
|
||||||
<asp:Label ID="LblPrecioCompra" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></td>
|
<asp:Label ID="LblPrecioCompra" runat="server" ClientIDMode="Static" Text="0.00"></asp:Label></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -4401,6 +4402,50 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="ModalPermisoDesc" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:Panel runat="server" ID="UpAutorizarDesc" DefaultButton="BtnAutorizarDescuento">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<!-- Modal content-->
|
||||||
|
<asp:UpdatePanel runat="server" class="modal-content">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header ">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Autorizar descuento"></asp:Label>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 v-center" style="display: flex">
|
||||||
|
<i class="fa fa-user fa-2 icontxt" style="font-size: 20px!important;"></i>
|
||||||
|
|
||||||
|
<asp:TextBox ID="txtUserDesc" runat="server" CssClass="form-control" placeholder="Usuario" ClientIDMode="Static" AutoComplete="off"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvUsuario" runat="server" ControlToValidate="txtUserDesc" Display="Static" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Usuario''</b> es necesario.</span></span>" ValidationGroup="GrpAutorizarDesc"></asp:RequiredFieldValidator>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12 v-center" style="display: flex">
|
||||||
|
<i class="fa fa-lock fa-2 icontxt" style="font-size: 20px!important;"></i>
|
||||||
|
|
||||||
|
<asp:TextBox ID="txtPassDesc" runat="server" CssClass="form-control" placeholder="Contraseña" type="password" ClientIDMode="Static" AutoComplete="off"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvContraseña" runat="server" ControlToValidate="txtPassDesc" Display="Static" ErrorMessage="<span class='has-error'><span id='username-error' class='help-block'>El campo <b>''Contraseña''</b> es necesario.</span></span>" ValidationGroup="GrpAutorizarDesc"></asp:RequiredFieldValidator>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnAutorizarDescuento" runat="server" Text="Aplicar" ValidationGroup="GrpAutorizarDesc" CssClass="btn btn-primary" OnClick="BtnAutorizarDescuento_Click" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</asp:Panel>
|
||||||
|
</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>
|
||||||
|
|||||||
@@ -8279,7 +8279,7 @@ 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
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
e.Row.FCLinkButton("LnkDescuentos").Visible = True
|
e.Row.FCLinkButton("LnkDescuentos").Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -24060,7 +24060,16 @@ Partial Class Ventas
|
|||||||
|
|
||||||
UpDescPS.Update()
|
UpDescPS.Update()
|
||||||
|
|
||||||
RegistraScript("$('#ModalDescPS').modal({backdrop: 'static', keyboard: false});")
|
If UsuarioActual.TienePermisoProceso(374) Then
|
||||||
|
RegistraScript("$('#ModalDescPS').modal({backdrop: 'static', keyboard: false});")
|
||||||
|
Else
|
||||||
|
txtUserDesc.Text = ""
|
||||||
|
txtPassDesc.Text = ""
|
||||||
|
'UpAutorizarDesc.Update()
|
||||||
|
txtUserDesc.Focus()
|
||||||
|
RegistraScript("$('#ModalPermisoDesc').modal({backdrop: 'static', keyboard: false});$('#txtUserDesc').focus();", "A2")
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
DdlPS_SelectedIndexChanged(Nothing, Nothing)
|
||||||
End If
|
End If
|
||||||
@@ -37038,5 +37047,25 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnAutorizarDescuento_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim UsuarioAutorizar As Usuario = Nothing
|
||||||
|
|
||||||
|
Using ObjUsuario As New ClsSisUsuarios
|
||||||
|
UsuarioAutorizar = ObjUsuario.ValidaUsuario(txtUserDesc.Text.Trim, Encripta(txtPassDesc.Text), ModExtensiones.IMEI, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||||
|
If UsuarioAutorizar IsNot Nothing Then
|
||||||
|
If UsuarioAutorizar.TienePermisoProceso(374) Then
|
||||||
|
txtUserDesc.Text = ""
|
||||||
|
txtPassDesc.Text = ""
|
||||||
|
'UpAutorizarDesc.Update()
|
||||||
|
|
||||||
|
RegistraScript("$('#ModalPermisoDesc').modal('hide');$('#ModalDescPS').modal({backdrop: 'static', keyboard: false});", "AUT")
|
||||||
|
Else
|
||||||
|
Alert("El usuario no tiene permiso para autorizar", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Alert("No se encontro el usuario para autorizar", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Reference in New Issue
Block a user