Ajuste balanza de comprobaciones, efacturas valida de copia de pdf

This commit is contained in:
rakcsle
2024-11-22 10:44:07 -07:00
parent a8739d5ef9
commit 9d2c6b40f8
2 changed files with 52 additions and 47 deletions

View File

@@ -1704,15 +1704,12 @@ Partial Class Compras_eFacturas
Hilo.Start()
Else
Dim PDfDestino As String = $"{UsuarioActual.Empresa.Ruta}\Compras\{FF.EmisorRFC}\{FF.CveFactura}.PDF"
If File.Exists(PDfDestino) Then
File.Delete(PDfDestino)
End If
Try
If File.Exists(RutaPDF) Then
If File.Exists(PDfDestino) Then
File.Delete(PDfDestino)
End If
File.Move(RutaPDF, PDfDestino)
Catch ex As Exception
End Try
End If
End If
End If

View File

@@ -11,7 +11,15 @@
<i class="fa fa-file-excel-o"></i> Exportar por <asp:Label runat="server" ID="LblAccionesSubProyecto" ></asp:Label>
</a>
<div style="display:none">
<asp:Button runat="server" ID="BtnImprimirPorsubProyecto" OnClick="BtnImprimirPorsubProyecto_Click" ClientIDMode="Static" />
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:Button runat="server" ID="BtnImprimirPorsubProyecto" OnClick="BtnImprimirPorsubProyecto_Click" ClientIDMode="Static" />
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="BtnImprimirPorsubProyecto" />
</Triggers>
</asp:UpdatePanel>
</div>
</li>
<li>
@@ -231,7 +239,7 @@
function BtnImprimirPoSubProyecto_Click() {
setTimeout(checkFileStatus, 5000);
//setTimeout(checkFileStatus, 5000);
$('#BtnImprimirPorsubProyecto').click();
//checkFileStatus();
@@ -239,46 +247,46 @@
}
function callMyStaticFunction() {
$.ajax({
type: "POST",
url: "MyPage.aspx/MyStaticFunction",
data: JSON.stringify({ parameter: "TuParametro" }),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
alert("Resultado: " + response.d);
},
error: function (xhr, status, error) {
console.error("Error: " + error);
}
});
}
//function callMyStaticFunction() {
// $.ajax({
// type: "POST",
// url: "MyPage.aspx/MyStaticFunction",
// data: JSON.stringify({ parameter: "TuParametro" }),
// contentType: "application/json; charset=utf-8",
// dataType: "json",
// success: function (response) {
// alert("Resultado: " + response.d);
// },
// error: function (xhr, status, error) {
// console.error("Error: " + error);
// }
// });
//}
function checkFileStatus() {
//$.ajax({
// url: 'RepBalanzaComprobacion.aspx',
// success: function (response) {
// setTimeout(checkFileStatus, 20000);
// }
//});
//function checkFileStatus() {
// //$.ajax({
// // url: 'RepBalanzaComprobacion.aspx',
// // success: function (response) {
// // setTimeout(checkFileStatus, 20000);
// // }
// //});
$.ajax({
type: "POST",
url: 'RepBalanzaComprobacion.aspx',
data: JSON.stringify({ parameter: "TuParametro" }),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
//alert("Resultado: " + response.d);
setTimeout(checkFileStatus, 20000);
},
error: function (xhr, status, error) {
console.error("Error: " + error);
}
});
}
// $.ajax({
// type: "POST",
// url: 'RepBalanzaComprobacion.aspx',
// data: JSON.stringify({ parameter: "TuParametro" }),
// contentType: "application/json; charset=utf-8",
// dataType: "json",
// success: function (response) {
// //alert("Resultado: " + response.d);
// setTimeout(checkFileStatus, 20000);
// },
// error: function (xhr, status, error) {
// console.error("Error: " + error);
// }
// });
//}
</script>