diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 88145dd74..7b6ee5275 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -223,7 +223,28 @@ Partial Class PopUpVerFactura End If End If + End If + 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 Private Sub ReciboAgropecuaria() @@ -972,6 +993,12 @@ Partial Class PopUpVerFactura DescargaFactura(UrlParametros) End If + If UrlParametros("OP").ToString = "File" Then + + DescargaArchivoDirecto(UrlParametros("FILE").ToString) + + End If + 'DESCARGA DOCUMENTO XML O PDF DE LA FACTURA VENTA If UrlParametros("OP").ToString = "FactVta" Then DescargaFacturaVenta(UrlParametros) @@ -1258,6 +1285,13 @@ Partial Class PopUpVerFactura End If End If + 'IMPRIME ENTREGAS POR REALIZAR + If UrlParametros("OP").ToString = "FILE" Then + If UrlParametros("CVEASIGNACIONENTREGA") IsNot Nothing And UrlParametros("USUARIOENTREGA") IsNot Nothing Then + ImprimeEntregasPorRealizar(UrlParametros("CVEASIGNACIONENTREGA").ToString.ToLong, UrlParametros("USUARIOENTREGA").ToString) + End If + End If + End Sub Private Function Parametros(Cadena As String) As Hashtable diff --git a/Inicio.aspx b/Inicio.aspx index a83974a0a..07c626bb3 100644 --- a/Inicio.aspx +++ b/Inicio.aspx @@ -510,136 +510,27 @@ - -
-
-
- AMERICA -
-
-
-
- CRONOS -
-
-
- -
-
-
- DIENER -
-
-
-
- FULL POWER -
-
-
- - -
-
-
- LTH AGM -
-
-
-
- LTH ESPECIALES -
-
-
- -
-
-
- LTH HEAVY DUTY -
-
-
-
- LTH HI-TEC -
-
-
- - -
-
-
- LTH SUV-VAN-MINIVAN -
-
-
-
- LTH TAXI -
-
-
- -
-
-
- LTH -
-
-
-
- OPTIMA -
-
-
- -
-
-
- FILTROS PISOS - -
-
-
-
- FILTROS MAYOREO - -
-
-
-
-
-
- MOTOBATERIAS LTH - -
-
-
-
- MOTOBATERIAS AMERICA - -
-
-
-
-
-
- ALCALINAS PISOS - -
-
-
-
- ALCALINAS MAYOREO - -
-
-
-
-
-
- Cat APS AGM-HT-LTH-CR 2021 -
-
-
+ + + + +
+
+
+ <%# Eval("Nombre") %> +
+
+
+
+ <%# Eval("Nombre2") %> +
+
+
+
+
+
+
+
@@ -1481,14 +1372,6 @@ - - - - - - - - - - - - @@ -1599,22 +1478,6 @@ - - - - - - - - - - - - - - - - diff --git a/Inicio.aspx.vb b/Inicio.aspx.vb index e919fbee7..ca405f7d7 100644 --- a/Inicio.aspx.vb +++ b/Inicio.aspx.vb @@ -236,9 +236,7 @@ Partial Class Inicio 'Evaluacion del proveedor CargaEvaluacionProveedor() - If UsuarioActual.CveEmpresa = 140 Then - DVDescargasBDH.Visible = True - End If + CargaDocumentacion() End If @@ -1298,37 +1296,61 @@ Partial Class Inicio RegistraScript("$('#DvUnoaUno').modal('hide')") End Sub - 'Protected Sub LnkDecargaDoc_Click(sender As Object, e As EventArgs) - ' Dim NombreArchivo As String = DirectCast(sender, LinkButton).Attributes("NombreArchivo") - ' Dim filePath As String = $"{Server.MapPath("~")}\Documentacion\140\{DirectCast(sender, LinkButton).Attributes("NombreArchivo")}" +#Region "DOCUMENTACION" + Private Sub CargaDocumentacion() + If UsuarioActual.CveEmpresa = 140 Then + DVDescargasBDH.Visible = True - ' Dim Archivo As New System.IO.FileInfo(filePath) + Dim TmpDT = New DataTable() + Dim ObjDoc As New ClsEdocumentacion + If ObjDoc.DocumentacionGet(-1, -1, 1, UsuarioActual.Empresa.CveEmpresa, Modulo:=8) Then + Dim dtt As New DataTable + dtt = ObjDoc.DtResultados + If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then - ' Dim mimeType As String = Nothing + TmpDT.Columns.Add(New DataColumn("Nombre", GetType(String))) + TmpDT.Columns.Add(New DataColumn("Liga", GetType(String))) + TmpDT.Columns.Add(New DataColumn("Nombre2", GetType(String))) + TmpDT.Columns.Add(New DataColumn("Liga2", GetType(String))) + 'Dim i As Integer = 0 + 'Dim Nombre As String = "" + 'Dim Liga As String = "" + Dim drr As DataRow + For Each dr As DataRow In dtt.Rows - ' If Archivo.Exists Then + If (dr("Consec").ToString.ToEntero Mod 2) = 1 Then 'primer renglón + drr = TmpDT.NewRow + drr("Nombre") = dr("Documentacion").ToString + drr("Liga") = String.Format("/Compras/PopUpVerFactura.aspx?p={0}", Encripta(String.Format("op=File&File={0}\Formatos\{1}_{2}", UsuarioActual.Empresa.Ruta, dr("CveDocumentacion"), dr("DocumentacionFormato")).Replace("\", "/").Replace("//", "/"))) + TmpDT.Rows.Add(drr) + Else + TmpDT.Rows((dr("Consec").ToString.ToEntero / 2) - 1)("Nombre2") = dr("Documentacion").ToString + TmpDT.Rows((dr("Consec").ToString.ToEntero / 2) - 1)("Liga2") = String.Format("/Compras/PopUpVerFactura.aspx?op={0}", Encripta(String.Format("op=File&File={0}\Formatos\{1}_{2}", UsuarioActual.Empresa.Ruta, dr("CveDocumentacion"), dr("DocumentacionFormato")).Replace("\", "/").Replace("//", "/"))) + End If + Next - ' HttpContext.Current.Response.Buffer = True - ' HttpContext.Current.Response.Clear() - ' HttpContext.Current.Response.ClearContent() - ' HttpContext.Current.Response.ContentType = mimeType - ' HttpContext.Current.Response.AppendHeader("Content-disposition", "inline; filename=" & NombreArchivo) - ' HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString()) - ' HttpContext.Current.Response.TransmitFile(filePath) - ' HttpContext.Current.Response.Flush() - ' HttpContext.Current.Response.SuppressContent = True - ' HttpContext.Current.ApplicationInstance.CompleteRequest() - ' HttpContext.Current.Response.End() + End If + End If + ObjDoc.Dispose() - ' Archivo = Nothing - ' End If + GvDoc.DataSource = TmpDT + GvDoc.DataBind() + End If + End Sub + Protected Sub GvDoc_RowDataBound(sender As Object, e As GridViewRowEventArgs) + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DBCampo("Nombre2") <> "" Then + e.Row.FindControl("divdoc20").Visible = True + End If + End If + End Sub +#End Region - 'End Sub End Class diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 84596bdd7..c126a59cd 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -4216,8 +4216,22 @@ Partial Class Clientes
Gracias por la atención brindada al presente.
Reciba un cordial saludo.

- ESTE CORREO SE GENERO EN FORMA AUTOMATICA.", TxtNombreComercial.Text, UsuarioActual.Empresa.Empresa) - Dim Hilo As New System.Threading.Thread(Sub() MandaCorreoEstadoCuenta(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Me.CveCliente, File, TxtCobranzaCorreo.Text, $"Estado Actual de Cartera {UsuarioActual.Empresa.Empresa}", Cuerpo, GuardarBitacora:=True)) + ESTE CORREO SE GENERO EN FORMA AUTOMATICA.", TxtNombreComercial.Text, UsuarioActual.Empresa.Empresa) + + If UsuarioActual.CveEmpresa = 140 Then + Cuerpo = String.Format("Estimado cliente {0}, se anexa su estado de cuenta con adeudo actual en {1}.
+
+ Quedamos a sus ordenes para cualquier duda o aclaración: con su asesor comercial, al teléfono celular del área de Crédito y Cobranza 6624 52 99 64 o a los correos:

+ credito@bdhbaterias.com
+ cobranza@bdhbaterias.com
+
+ Gracias por la atención brindada al presente.
+ Reciba un cordial saludo.
+
+ + ESTE CORREO SE GENERO EN FORMA AUTOMATICA, FAVOR DE NO RESPONDERLO.", TxtNombreComercial.Text, UsuarioActual.Empresa.Empresa) + End If + Dim Hilo As New System.Threading.Thread(Sub() MandaCorreoEstadoCuenta(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Me.CveCliente, File, TxtCobranzaCorreo.Text, $"Estado Actual de Cartera en {UsuarioActual.Empresa.Empresa}", Cuerpo, GuardarBitacora:=True)) Hilo.Start() Alert("El correo se envió con éxito", TipoMensaje.MsgInformacion) Catch ex As Exception diff --git a/Ventas/ClientesAbonar.aspx b/Ventas/ClientesAbonar.aspx index 84e10111e..0258b17f2 100644 --- a/Ventas/ClientesAbonar.aspx +++ b/Ventas/ClientesAbonar.aspx @@ -693,7 +693,7 @@ if (textBoxes[i].value != '') { idd = textBoxes[i].id.replace('C_GvCxC_TxtAbonar_', ''); Ventas = Ventas + (Importe == 0 ? '' : ', ') + $get("C_GvCxC_HplF_" + idd).innerText; - abono = parseFloat(textBoxes[i].value.split(',').join('')); + abono = ToDouble(textBoxes[i].value); moneda = $get("C_GvCxC_LtlMoneda_" + idd).innerText; if (monedaPago == 1 && moneda == 'USD') { @@ -708,7 +708,7 @@ } if (textBoxes[i].id.indexOf('C_GvCxC_TxtComision') >= 0) { if (textBoxes[i].value != '') { - abonoComision = parseFloat(textBoxes[i].value.split(',').join('')); + abonoComision = ToDouble(textBoxes[i].value); moneda = $get("C_GvCxC_LtlMoneda_" + idd).innerText; if (monedaPago == 1 && moneda == 'USD') { facDolares = true @@ -954,6 +954,7 @@ let Total = 0.0; let Anticipos = 0.0; + debugger; $( ClsSelLiqVenta).each(function () { @@ -966,11 +967,10 @@ }); - Total = Total + Anticipos; - + Total = Total + Anticipos; $(ClsSelLiqVentaTotal).each(function () { - $(this).val(Total); + $(this).val(Total.toFixed(2)); FormatoMoneda2($(this)); }); @@ -979,6 +979,7 @@ var Suma = SumaValores(pagoMultiple, monedaPago); $get('TxtImporte').value = FormatoNumero(Suma, 2); + } function disablekeys() diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 0ca49f970..affd10af3 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -4426,7 +4426,7 @@ Partial Class Ventas End If If DbRowVenta IsNot Nothing Then - If ObjVentas.GetVentasRelacionadas(CveVenta, UsuarioActual.CveEmpresa) Then + If ObjVentas.GetVentasRelacionadas(CveVenta, 1, UsuarioActual.CveEmpresa) Then DtAntRelacionados = ObjVentas.DtResultados.FiltraParametros("TipoDocto IN ('Ing','Ant','Egs','Dev')") End If