This commit is contained in:
2024-09-28 10:10:36 -07:00
6 changed files with 607 additions and 518 deletions

View File

@@ -27,7 +27,9 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Pago Proveedor: Pago Proveedor:
<asp:HyperLink ID="HplProveedor" CssClass="Texto" runat="server" Text=""></asp:HyperLink> <asp:HyperLink ID="HplProveedor" CssClass="Texto" runat="server" Text=""></asp:HyperLink>
<asp:HyperLink ID="HplCambiarProveedor" runat="server" Visible="false" data-toggle="modal" data-target="#ModalCambiarProveedor" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>"></asp:HyperLink>
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content> </asp:Content>
@@ -67,6 +69,7 @@
</div> </div>
<div class="col-md-5" runat="server" id="DivTC" visible="false"> <div class="col-md-5" runat="server" id="DivTC" visible="false">
T.C.: T.C.:
<asp:TextBox ID="TxtTC" runat="server" Text="1" placeholder="Tipo de Cambio" CssClass="form-control input-sm" MaxLength="12" onblur="CambiaDolaresPesos();" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" /> <asp:TextBox ID="TxtTC" runat="server" Text="1" placeholder="Tipo de Cambio" CssClass="form-control input-sm" MaxLength="12" onblur="CambiaDolaresPesos();" Width="70px" ClientIDMode="Static" Style="text-align: right; display: inline-block;" />
<asp:RequiredFieldValidator ID="RFVTC" Enabled="false" runat="server" ControlToValidate="TxtTC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTC" Enabled="false" runat="server" ControlToValidate="TxtTC" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Cambio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCETC" runat="server" HighlightCssClass="vco" TargetControlID="RFVTC" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCETC" runat="server" HighlightCssClass="vco" TargetControlID="RFVTC" Width="350px"></ajax:ValidatorCalloutExtender>
@@ -168,6 +171,7 @@
</div> </div>
<div> <div>
<asp:CheckBox ID="ChkEnviarCorreo" CssClass="chksino" Text=" Notificar por Correo" Checked="true" runat="server" />Notificar por correo <asp:CheckBox ID="ChkEnviarCorreo" CssClass="chksino" Text=" Notificar por Correo" Checked="true" runat="server" />Notificar por correo
</div> </div>
</div> </div>
<asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server"> <asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server">
@@ -510,6 +514,7 @@
<div class="progress-info"> <div class="progress-info">
<div class="status" style="font-size: 12px"> <div class="status" style="font-size: 12px">
$: $:
<asp:Label Text="text" ID="LtlTotalMXN" runat="server" ClientIDMode="Static" /> <asp:Label Text="text" ID="LtlTotalMXN" runat="server" ClientIDMode="Static" />
</div> </div>
</div> </div>
@@ -555,6 +560,39 @@
</div> </div>
<%-- FIN MODAL SALDAR INCOBRABLE--%> <%-- FIN MODAL SALDAR INCOBRABLE--%>
<div id="ModalCambiarProveedor" class="modal ADS fade" role="dialog">
<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">Buscar Proveedor</h4>
</div>
<div class="modal-body">
<asp:UpdatePanel UpdateMode="Conditional" ID="UpCambiarProveedor" runat="server">
<ContentTemplate>
<div class="row">
<div class="col-md-2">Proveedor:</div>
<div class="col-md-6">
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
<asp:Button ID="BtnCambiarProveedor" runat="server" Text="Guardar" CssClass="btn btn-primary" OnClick="BtnCambiarProveedor_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script> <script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">

View File

@@ -223,6 +223,15 @@ Partial Class Bancos_ProveedoresAbonar
ChkNoValidaSAT.Visible = True ChkNoValidaSAT.Visible = True
End If End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
HplCambiarProveedor.Visible = True
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Todos"
DdlProveedores.SelectedValue = "-1"
End If
PermiteModificarImporte = True PermiteModificarImporte = True
TxtFechaIncobrable.Text = NowADS().ToShortDateString TxtFechaIncobrable.Text = NowADS().ToShortDateString
@@ -1722,5 +1731,14 @@ Partial Class Bancos_ProveedoresAbonar
End If End If
End Sub End Sub
Protected Sub BtnCambiarProveedor_Click(sender As Object, e As EventArgs)
If DdlProveedores.SelectedValue.ToEntero() <= 0 Then
Alert("Debe seleccionar un proveedor", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim url As String = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}", DdlProveedores.SelectedValue, Request("FechaI").ToString(), Request("FechaF").ToString(), Request("CveUsuarioProgramo").ToString(), -1, Request("CveUsuarioRegistro").ToString(), Request("CveUsuarioResponsable").ToString(), Request("CveClasificacion").ToString(), Request("CveMoneda").ToString(), Request("CveEstatus").ToString(), Request("CveProveedorSucursal").ToString(), Request("CveAplicaNC").ToString(), Request("CodigoProgramacion").ToString(), Request("CveSubProyecto").ToString())
Response.Redirect(url)
End Sub
End Class End Class

View File

@@ -268,11 +268,6 @@
<GroupExpression>=Fields!Almacen.Value</GroupExpression> <GroupExpression>=Fields!Almacen.Value</GroupExpression>
</GroupExpressions> </GroupExpressions>
</Group> </Group>
<SortExpressions>
<SortExpression>
<Value>=Fields!Almacen.Value</Value>
</SortExpression>
</SortExpressions>
<TablixHeader> <TablixHeader>
<Size>5cm</Size> <Size>5cm</Size>
<CellContents> <CellContents>
@@ -594,8 +589,8 @@
<rd:DefaultName>Textbox9</rd:DefaultName> <rd:DefaultName>Textbox9</rd:DefaultName>
<Top>0.06cm</Top> <Top>0.06cm</Top>
<Left>1.60042cm</Left> <Left>1.60042cm</Left>
<Height>0.68085cm</Height> <Height>0.42502cm</Height>
<Width>2.6852cm</Width> <Width>5.39277cm</Width>
<ZIndex>2</ZIndex> <ZIndex>2</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -628,9 +623,9 @@
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox10</rd:DefaultName> <rd:DefaultName>Textbox10</rd:DefaultName>
<Top>0.06cm</Top> <Top>0.06cm</Top>
<Left>5cm</Left> <Left>7.16958cm</Left>
<Height>0.68085cm</Height> <Height>0.68085cm</Height>
<Width>5cm</Width> <Width>2.83042cm</Width>
<ZIndex>3</ZIndex> <ZIndex>3</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -678,6 +673,7 @@
</Style> </Style>
</Textbox> </Textbox>
<Line Name="Line1"> <Line Name="Line1">
<Top>0in</Top>
<Height>0cm</Height> <Height>0cm</Height>
<Width>19.26933cm</Width> <Width>19.26933cm</Width>
<ZIndex>5</ZIndex> <ZIndex>5</ZIndex>

View File

@@ -116,15 +116,15 @@
</div> </div>
<asp:UpdatePanel ID="UpAdjunto" runat="server" UpdateMode="Conditional" class="task-status"> <asp:UpdatePanel ID="UpAdjunto" runat="server" UpdateMode="Conditional" class="task-status">
<ContentTemplate> <ContentTemplate>
<a class="done" id="linkDescargaRol" runat="server"> <asp:LinkButton ID="LnkDescargarManualRol" runat="server" class="done" Text=" <i class='fa fa-download fa-3'></i>" OnClick="LnkDescargarManualRol_Click"></asp:LinkButton>
<i class="fa fa-download fa-3"></i>
</a>
</ContentTemplate> </ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkDescargarManualRol" />
</Triggers>
</asp:UpdatePanel> </asp:UpdatePanel>
<div class="task-content"> <div class="task-content">
<h4 class="uppercase bold">Manual del Rol <h4 class="uppercase bold">Manual del Rol
</h4> </h4>
</div> </div>
</li> </li>
</ul> </ul>

View File

@@ -28,7 +28,6 @@ Partial Class Metronic_SigAyuda
If ObjRoles.DtResultados IsNot Nothing AndAlso ObjRoles.DtResultados.Rows.Count = 1 Then If ObjRoles.DtResultados IsNot Nothing AndAlso ObjRoles.DtResultados.Rows.Count = 1 Then
Me.Adjunto = ObjRoles.DtResultados.Rows(0)("Adjunto").ToString() Me.Adjunto = ObjRoles.DtResultados.Rows(0)("Adjunto").ToString()
If Not String.IsNullOrEmpty(Me.Adjunto) Then If Not String.IsNullOrEmpty(Me.Adjunto) Then
linkDescargaRol.HRef = $"javascript:downFile('{Me.Adjunto}');"
DivPerfil.Visible = True DivPerfil.Visible = True
End If End If
End If End If
@@ -39,6 +38,26 @@ Partial Class Metronic_SigAyuda
UpAdjunto.Update() UpAdjunto.Update()
End If End If
End Sub End Sub
Private Sub DescargaArchivoDirecto(RutaArchivo As String)
If RutaArchivo <> "" Then
'Dim Path As String = String.Format("{0}\{1}", UsuarioActual.Empresa.Ruta, RutaArchivo)
Dim Archivo As New System.IO.FileInfo(RutaArchivo)
If Archivo.Exists Then
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
HttpContext.Current.Response.ContentType = "application/octet-stream"
HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name))
HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString())
HttpContext.Current.Response.TransmitFile(RutaArchivo)
'HttpContext.Current.Response.Flush()
HttpContext.Current.Response.End()
End If
Archivo = Nothing
End If
End Sub
Protected Sub btnDownload_Click(sender As Object, e As EventArgs) Protected Sub btnDownload_Click(sender As Object, e As EventArgs)
Try Try
Dim docto As String = TxtDocto.Text.Replace("/", "\") Dim docto As String = TxtDocto.Text.Replace("/", "\")
@@ -67,4 +86,8 @@ Partial Class Metronic_SigAyuda
End Sub End Sub
Protected Sub LnkDescargarManualRol_Click(sender As Object, e As EventArgs)
DescargaArchivoDirecto($"{UsuarioActual.Empresa.Ruta}Roles/{Me.Adjunto}")
End Sub
End Class End Class

View File

@@ -7723,6 +7723,18 @@ Partial Class Ventas
' RBLPago.SelectedValue = "2" ' RBLPago.SelectedValue = "2"
'End If 'End If
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso Me.PermiteCredito Then
If IfNull(Request("Op"), "").ToString() = "Cot" OrElse (DdlTipoComprobante.SelectedValue = "Cot" AndAlso CveVenta > 0) Then
Dim CreditoDispo As Decimal = CargaCreditoDisponible(CveCliente, DdlSucursalCliente.SelectedValue.ToEntero())
If CreditoDispo > 0 Then
TrCreditoDisponible.Visible = True
LblCreditoDisponible.Text = CreditoDispo.FormatoNumero
TrPorcentajeCredito.Visible = True : LblPorcentajeCredito.Text = $"{PorcentajeCredito.FormatoNumero}%"
End If
End If
End If
If Not EsFilial AndAlso (((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito) Then If Not EsFilial AndAlso (((DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem", "Cot", "PA") AndAlso CveVenta <= 0) OrElse (DdlTipoComprobante.SelectedValue.Contiene("Cot") AndAlso CveVenta > 0)) AndAlso RBLPago.SelectedValue = "1" AndAlso PermiteCredito) Then
'FUNCIONALIDAD 702 - NO VERIFICAR LIMITE DE CRÉDITO Y CANDADOS DE VENTA 'FUNCIONALIDAD 702 - NO VERIFICAR LIMITE DE CRÉDITO Y CANDADOS DE VENTA
If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then If Not UsuarioActual.Empresa.Funcionalidad(702) = "1" Then
@@ -19785,15 +19797,17 @@ Partial Class Ventas
Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle, Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle,
ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento, CvePrecioLista:=CvePrecioListaPS, PrecioLista:=PrecioListaPS, NumTurnos:=NumTurnos, Costo:=Costo) ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento, CvePrecioLista:=CvePrecioListaPS, PrecioLista:=PrecioListaPS, NumTurnos:=NumTurnos, Costo:=Costo)
'CALCULA EN BASE AL ULTIMO AGREGADO
If TmpDT.Rows.Count > 0 Then
CalculaPSPromocionFiltrosLubricantes(TmpDT.Rows(TmpDT.Rows.Count - 1))
End If
CalculaUsados() CalculaUsados()
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ListaDescuentos IsNot Nothing AndAlso ObjDescuento IsNot Nothing Then If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ListaDescuentos IsNot Nothing AndAlso ObjDescuento IsNot Nothing Then
ListaDescuentos.Add(ObjDescuento) ListaDescuentos.Add(ObjDescuento)
End If End If
'CALCULA EN BASE AL ULTIMO AGREGADO
CalculaPSPromocionFiltrosLubricantes(TmpDT.Rows(TmpDT.Rows.Count - 1))
CalculaTotalesVenta() CalculaTotalesVenta()
LimpiaAgregar() LimpiaAgregar()