From f42c0e9878eac224c3a51d30efa035d3c1260ebe Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 29 Jun 2020 20:53:48 -0700 Subject: [PATCH 01/32] --otros ingresos --- Ventas/ClientesAbonar.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index cc9f9197d..22c97dceb 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -2581,9 +2581,9 @@ Partial Class Ventas_ClientesAbonar Dim CveCuenta As Integer = 0 Dim PorcentajePago As Decimal = gr.DataKey("Saldo").ToDecimal / gr.DataKey("Original").ToDecimal Dim Saldo As Decimal = gr.DataKey("Saldo").ToDecimal - Dim SubTotal As Decimal = PorcentajePago * gr.DataKey("SubTotal").ToDecimal - Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal - Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal + Dim SubTotal As Decimal = PorcentajePago * gr.DataKey("SubTotal").ToDecimal.RoundSQL + Dim IVA As Decimal = PorcentajePago * gr.DataKey("IVA").ToDecimal.RoundSQL + Dim IEPS As Decimal = PorcentajePago * gr.DataKey("IEPS").ToDecimal.RoundSQL Dim TCVenta As Decimal = gr.DataKey("TipoCambio").ToDecimal Dim FechaVenta As Date = gr.DataKey("Fecha").ToDate Dim tCveMoneda As Integer = gr.DataKey("CveMoneda").ToEntero From 898d28f56d52cac62b64cf5a46d21d2fd8f3059a Mon Sep 17 00:00:00 2001 From: rrene Date: Mon, 29 Jun 2020 20:54:07 -0700 Subject: [PATCH 02/32] - iva no deducible --- Compras/ReembolsosComprobaciones.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 001743e8f..592f5814e 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -745,7 +745,7 @@ Partial Class Compras_ReembolsosComprobaciones Dim ImporteNOIVA As Decimal = gvr.DataKey("IVANoDeducible").ToDecimal * PorcentajePago - If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("IVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteNOIVA, Referencia, 280, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVANoAcreditable > 0, IdCtaContIVANoAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteNOIVA), ImporteMX:=(ImporteNOIVA) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then MsgError = "Detalle" End If End If From b2c933895a32c70a8560ea5b7a7b8d66d9834b4b Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 30 Jun 2020 19:27:35 -0700 Subject: [PATCH 03/32] Reporte de Auxiliar de facturas de venta. --- App_Code/ClsPaginas.vb | 1 + App_Code/ClsVentas.vb | 37 ++++ Ventas/RepAuxiliarFacturas.aspx | 202 +++++++++++++++++++ Ventas/RepAuxiliarFacturas.aspx.vb | 304 +++++++++++++++++++++++++++++ 4 files changed, 544 insertions(+) create mode 100644 Ventas/RepAuxiliarFacturas.aspx create mode 100644 Ventas/RepAuxiliarFacturas.aspx.vb diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 21eb83cd4..2a66e9236 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4820,6 +4820,7 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 721) PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722) PaginaDict.Add("/Ventas/CatMetasVendedores.aspx".ToUpper(), 723) + PaginaDict.Add("/Ventas/RepAuxiliarFacturas.aspx".ToUpper(), 704) #End Region diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index c348cebec..f49aabb3c 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1638,6 +1638,43 @@ Public Class ClsVentas Return Retorno End Function + 'Reporte de Ventas - Auxiliar Facturas + Public Function GetRepAuxliarFacturas(CveProyecto As Integer, CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, + CveCliente As Integer, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, + Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = -1, Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1") As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_RepAuxiliarGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@TipoCambio", SqlDbType.Int).Value = TipoCambio + .Add("@TCEspecifico", SqlDbType.Float).Value = TCEspecifico + .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta + .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el reporte auxiliar de facturas de venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + + #End Region #Region "V E N T A S - P R E C I O L I S T A S" 'Hecho por Charlie 1/9/2016 diff --git a/Ventas/RepAuxiliarFacturas.aspx b/Ventas/RepAuxiliarFacturas.aspx new file mode 100644 index 000000000..4146eba0b --- /dev/null +++ b/Ventas/RepAuxiliarFacturas.aspx @@ -0,0 +1,202 @@ +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepAuxiliarFacturas.aspx.vb" Inherits="Ventas_RepAuxiliarFacturas" %> + + + + + + + Reporte auxiliar de facturas de venta. + + +
  • + PDF +
  • +
  • + Excel +
  • +
  • + Ver Dlls en pesos +
  • +
    + + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + +
    +
    + Fecha Inicio: +
    +
    +
    + + + + +
    + + + + + + +
    +
    + Fecha Fin: +
    +
    +
    + + + + +
    + + + + + + +
    + +
    + + + +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + diff --git a/Ventas/RepAuxiliarFacturas.aspx.vb b/Ventas/RepAuxiliarFacturas.aspx.vb new file mode 100644 index 000000000..82890d330 --- /dev/null +++ b/Ventas/RepAuxiliarFacturas.aspx.vb @@ -0,0 +1,304 @@ +Option Explicit On +Option Strict On + +Imports Extensiones +Imports Microsoft.Reporting.WebForms +Imports System.Data + + +Partial Class Ventas_RepAuxiliarFacturas + Inherits ClsPaginas +#Region "P R O P I E D A D E S" + + Private Property DtVentas As DataTable + Get + Return DirectCast(ViewState("DtVentas"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtVentas") = value + End Set + End Property + + Private Property DtColor As DataTable + Get + Return DirectCast(ViewState("DtColor"), DataTable) + End Get + Set(value As DataTable) + ViewState("DtColor") = value + End Set + End Property + Private Property Agrupador As String + Get + Return ViewState("Agrupador").ToString + End Get + + Set(value As String) + ViewState("Agrupador") = value + End Set + End Property + Private Property TCEspecifico As Double + Get + Return ViewState("TCEspecifico").ToString.ToDouble + End Get + + Set(value As Double) + ViewState("TCEspecifico") = value + End Set + End Property + Private Property TipoCambio As Integer + Get + Return ViewState("TipoCambio").ToString.ToEntero + End Get + + Set(value As Integer) + ViewState("TipoCambio") = value + End Set + End Property + +#End Region + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not IsPostBack Then + CargaCombos() + End If + End Sub + +#Region "C A R G A - C O M B O S" + Private Sub CargaClientes() + DdlClientes.ddl.Items.Clear() + DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) + DdlClientes.DataBind() + DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + End Sub + + Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs) + DdlEstatus.Items.Clear() + If DdlTipoComprobante.SelectedValue <> "-1" Then + DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto = '{0}'", DdlTipoComprobante.SelectedValue)) + Else + DdlEstatus.DataSource = GlobalDTEstatusFactura + + End If + DdlEstatus.Items.Add(New ListItem("Todos", "-1")) + DdlEstatus.DataBind() + DdlEstatus.SelectedValueExist("3") + End Sub + + Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged + DdlSubProyecto.Items.Clear() + If DdlProyecto.SelectedValue <> "-1" Then + DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, DdlProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1, 1) + DdlSubProyecto.DataBind() + End If + DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) + End Sub + + Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged + If UsuarioActual.Empresa.Funcionalidad(105) = "" Then + DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero) + DdlPS.DataBind() + DdlPS.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + Else + DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue) + DdlPS.SelectedText = "Todos" + DdlPS.SelectedValue = "-1" + End If + End Sub + + Private Sub CargaTipoCentroCosto() + + If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then + DdlSubProyecto.Items.Clear() + DivProyecto.Visible = False + LblProyecto.Visible = False + LblSubProyecto.InnerText = "Sucursal:" + DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) + DdlSubProyecto.DataBind() + + ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then + DdlSubProyecto.Items.Clear() + DivProyecto.Visible = False + LblProyecto.Visible = False + LblSubProyecto.InnerText = "Proyecto:" + DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) + DdlSubProyecto.DataBind() + + ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then + LblProyecto.InnerText = "Sucursal:" + LblSubProyecto.InnerText = "Proyecto:" + + ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then + LblProyecto.InnerText = "Proyecto:" + LblSubProyecto.InnerText = "Sucursal:" + + End If + End Sub + + Private Sub CargaCombos() + 'Cargo Clientes + CargaClientes() + + 'Cargo Proyectos + DdlProyecto.DataSource = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1) + DdlProyecto.DataBind() + + 'Cargo Clasificaciones + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlClasificacion.DataBind() + + + 'CargaSubProyectos + DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) + DdlSubProyecto.DataBind() + + 'Vendedor + DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) + DdlVendedor.DataBind() + + + 'Carga Productos + DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1") + + If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then + DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue) + DdlPS.SelectedText = "" + DdlPS.SelectedValue = "-1" + Else + DdlPS.ddl.Items.Clear() + DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero) + DdlPS.ddl.DataBind() + DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1")) + End If + + 'CargaEstatus + DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(" CveEstatusFactura NOT IN (1, 4, 5) ") + DdlEstatus.DataBind() + DdlEstatus.Items.Add(New ListItem("Canceladas", "4")) + If UsuarioActual.Empresa.TipoFacturacion = "CFDi" Then + DdlEstatus.SelectedIndex = 2 + Else + DdlEstatus.SelectedIndex = 1 + End If + + CargaTipoCentroCosto() + + TipoCambio = 1 + TCEspecifico = 0 + + Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False) + If EsWS Then + DdlClientes.setEsWebService(True) + Else + DdlClientes.setEsWebService(False) + DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) + DdlClientes.DataBind() + DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) + End If + + + End Sub + +#End Region + +#Region "C A R G A - D A T O S" + Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click + CargaDatos() + UPDatos.Update() + End Sub + + Private Sub CargaDatos() + + Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM) + Dim FechaI, FechaF As Date + FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha) + FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha) + + If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then TCEspecifico = TxtEspecifico.Text.ToDouble Else TCEspecifico = -1 + + Dim CveCliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1) + + Dim ObjVentas As New ClsVentas() + If ObjVentas.GetRepAuxliarFacturas(DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, + FechaI, FechaF, CveCliente, DdlVendedor.SelectedValue.ToEntero, -1, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, + CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico) Then + DtVentas = ObjVentas.DtResultados.Copy() + End If + ObjVentas.Dispose() + + GvDatos.DataSource = DtVentas + GvDatos.DataBind() + End Sub + + Protected Sub BtnTipoCambio_Click1(sender As Object, e As EventArgs) + CargaDatos() + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio")) + UPDatos.Update() + End Sub + + Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + Select Case e.Row.DBCampo("TipoFila") + Case "1" + e.Row.CssClass = "Totales" + Case "2" + e.Row.CssClass = "SubTotales" + e.Row.FCLiteral("LtlGrupo").Text = String.Format("{2}", "SubTotales", String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DBCampo("CveVenta")), e.Row.DBCampo("Gpo")) + End Select + + End If + End Sub + +#End Region + + Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click + GvDatos.ExportToExcel("RepAuxiliarFacturas" & Now.ToShortDateString) + End Sub + + Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click + If GvDatos.Rows.Count > 0 Then + GenerarPDF() + Else + Alert("No hay datos para imprimir") + End If + End Sub + + Private Sub GenerarPDF() + Dim FechaI, FechaF As Date + FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha) + FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha) + + Dim Cliente = If(DdlClientes.SelectedText = "", "", $" Cliente: {DdlClientes.SelectedText}") + Dim FechaInicio = If(txtFechaI.Text = "", "", $" Fecha Inicio: {txtFechaI.Text}") + Dim FechaFin = If(txtFechaF.Text = "", "", $" Fecha Fin: {txtFechaF.Text}") + Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" Clasificación: {DdlClasificacion.SelectedItem.Text}") + Dim PS = If(DdlPS.SelectedValue = "-1", "", $" P.S.: {DdlPS.SelectedText}") + Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" Proyecto: {DdlSubProyecto.SelectedItem.Text}") + Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" Estatus: {DdlEstatus.SelectedItem.Text}") + + + If DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + Dim params As New List(Of ReportParameter) + params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("FechaInicio", If(txtFechaI.Text <> "", FechaI.ToShortDateString, ""))) + params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, ""))) + params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) + params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) + params.Add(New ReportParameter("Filtros", $"{Cliente}{FechaInicio}{FechaFin}{Clasificacion}{PS}{Proyecto}{Estatus}")) + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", logouri)) + Else + params.Add(New ReportParameter("LogoPath", "")) + End If + ImprimirPDF("Empresas/Grales/Formatos/RepAuxiliarFacturas.rdlc", DtVentas, params, "ReporteAuxiliarFacturas") + Else + Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia) + End If + + End Sub + +End Class From 3f3db6663ea264034b8a6fb2ecaf3317084c211d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 30 Jun 2020 19:27:46 -0700 Subject: [PATCH 04/32] Correcion en corte --- Bancos/IE.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 47e593526..79370055c 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -544,7 +544,7 @@ Partial Class Bancos_IE Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then - + Me.CveCorte = -1 Folio = "" IDCtaBeneficiario = 0 IDCtaBeneficiarioComplementaria = 0 From 9566c81f822ccf0a121a4b4edbb3353a2edfbc3d Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 30 Jun 2020 19:28:27 -0700 Subject: [PATCH 05/32] correciones en servicio de registro confiable --- Ashx/SIGGPSRCService.ashx | 103 +++++++++++--------------------------- 1 file changed, 29 insertions(+), 74 deletions(-) diff --git a/Ashx/SIGGPSRCService.ashx b/Ashx/SIGGPSRCService.ashx index 33e0b4b40..30ad9d59c 100644 --- a/Ashx/SIGGPSRCService.ashx +++ b/Ashx/SIGGPSRCService.ashx @@ -26,85 +26,21 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState } } - private Usuario ValidaUsuarioSistema(int CveEmpresa) - { - Usuario UsuarioActual = null; - ClsSisUsuarios ObjUsuarios = new ClsSisUsuarios(); - if (ObjUsuarios.GetUsuarios(1727)) - { - if (ObjUsuarios.DtResultados.Rows.Count > 0) - { - var Usuario = ObjUsuarios.DtResultados.Rows[0]["Usuario"].ToString(); - var Contrasenia = ObjUsuarios.DtResultados.Rows[0]["Contraseña"].ToString(); - - UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, ModExtensiones.IMEI, CveEmpresa); - - UsuarioActual.CveEmpresa = CveEmpresa; - UsuarioActual.CveCliente = 183798; - - CreaObjetoEmpresa(ref UsuarioActual); - CargaZonasHorarias(ref UsuarioActual); - } - } - ObjUsuarios.Dispose(); - return UsuarioActual; - } - private void CreaObjetoEmpresa(ref Usuario UsuarioActual) - { - ClsSisEmpresas ObjEmpresa = new ClsSisEmpresas(); - if (ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1")) - { - if (ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa)) - { - System.Data.DataTable dttmp = ObjEmpresa.DtResultados; - - var EmpresasFuncionalidades = new HybridDictionary(); - foreach (System.Data.DataRow Row in dttmp.Rows) - EmpresasFuncionalidades.Add(Convert.ToInt32(Row["CveFuncionalidad"]), Row["Valor"].ToString()); - - ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades); - } - - UsuarioActual.Empresa = ObjEmpresa.Empresa; - } - ObjEmpresa.Dispose(); - } - private void CargaZonasHorarias(ref Usuario UsuarioActual) - { - ClsClientes ObjClientes = new ClsClientes(); - try - { - if (ObjClientes.GetClientes(UsuarioActual.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, -1, Estatus: 1)) - { - if (ObjClientes.DtResultados.Rows.Count == 1) - UsuarioActual.UTCOffset = ObjClientes.DtResultados.Rows[0]["UTCOffset"].ToString().ToEntero(); - } - } - catch (Exception ex) - { - ex.ToString().GuardaLog(); - } - finally - { - ObjClientes.Dispose(); - } - } - public bool IsReusable => false; public void ProcessRequest(HttpContext context) { + context.Response.ContentType = "text/plain"; + bool retorno = false; try { - context.Response.ContentType = "text/plain"; - bool retorno = false; + string Metodo = context.Request["Metodo"] == null ? "" : context.Request["Metodo"]; switch (Metodo) { case "EjecutaServicio": ModExtensiones.GuardaLogAD("Servicio Ejecutado...........", "LogServicioConfiable"); - IniciarTransmision(context); - retorno = true; + retorno = IniciarTransmision(); break; default: break; @@ -123,11 +59,14 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState { ex.GuardaLog(ex.Message); } + + context.Response.End(); } - private void IniciarTransmision(HttpContext context) + private bool IniciarTransmision() { - var UsuarioActual = ValidaUsuarioSistema(121); + var retorno = false; + var TieneError = false; var WS = new RCGPSService.RCServiceClient(); @@ -142,6 +81,10 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState { DtTrackings = ObjGPS.DtResultados.Copy(); } + else + { + TieneError = true; + } if (DtTrackings != null) { @@ -152,6 +95,10 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState { dtTracking = ObjGPS.DtResultados.Copy(); } + else + { + TieneError = true; + } if (dtTracking != null) { foreach (DataRow Row in dtTracking.Rows) @@ -175,6 +122,7 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState } catch (Exception ex) { + TieneError = true; this.OnError("Ocurrió un error al enviar los datos", ex); } ObjGPS.Dispose(); @@ -182,15 +130,22 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState DtTrackings.Dispose(); DtTrackings = null; - if (ListaEventos.Count > 0) + if (ListaEventos.Count > 0 && !TieneError) { - var respuesta = WS.GPSAssetTracking(Token.token, ListaEventos.ToArray()); - context.Response.Write(JsonConvert.SerializeObject(respuesta)); + if (respuesta.Length > 0) + { + retorno = !TieneError; + } + } + else + { + retorno = !TieneError; } WS.Close(); - //context.Response.Write(JsonConvert.SerializeObject(new { idJob = "1", exception = "" })); + + return retorno; } From d52da1dee74592c23abb2136d6d2f2c44a326e6e Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 30 Jun 2020 20:48:22 -0700 Subject: [PATCH 06/32] popup- cambio a global -- sigweb, que ponga existencia --- Ashx/SIGWeb.ashx | 2 +- OC/PopUpBuscarReq.aspx.vb | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 17e401ead..0f7b199d5 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -585,7 +585,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState 'verifica existencias - If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141) Then + If Pagina.Contiene("ventas/ventas", "oc/oc", "inv/traspaso") AndAlso CveEmpresa.Contiene(72, 80, 119, 140, 141, 152) Then UsaGlobal = False Dim objInv As New ClsInventarios diff --git a/OC/PopUpBuscarReq.aspx.vb b/OC/PopUpBuscarReq.aspx.vb index 118f8aa6a..f4d2d40c4 100644 --- a/OC/PopUpBuscarReq.aspx.vb +++ b/OC/PopUpBuscarReq.aspx.vb @@ -126,12 +126,15 @@ Partial Class OC_PopUpBuscarReq ViewState("CveProveedor") = Request("P") UPFiltros.Visible = False - Dim ObjPro As New ClsCompProveedores - ObjPro.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ViewState("CveProveedor").ToString.ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) - If ObjPro.DtResultados.Rows.Count > 0 Then - LbTitulo.Text = String.Format("Órdenes de Compra - {0}", ObjPro.DtResultados.Rows(0)("RazonSocial").ToString) - End If - ObjPro.Dispose() + Dim NombreProv As String = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, ViewState("CveProveedor").ToString.ToEntero).FiltroPrimeroValor("RazonSocial") + LbTitulo.Text = String.Format("Órdenes de Compra - {0}", NombreProv) + + 'Dim ObjPro As New ClsCompProveedores + 'ObjPro.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ViewState("CveProveedor").ToString.ToEntero, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) + 'If ObjPro.DtResultados.Rows.Count > 0 Then + ' LbTitulo.Text = String.Format("Órdenes de Compra - {0}", ObjPro.DtResultados.Rows(0)("RazonSocial").ToString) + 'End If + 'ObjPro.Dispose() 'Cargar Datos Dim ObjOC As New ClsOC From f2d48fbc646739fa3a555d3344cb4ea4dba3d113 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 30 Jun 2020 20:48:47 -0700 Subject: [PATCH 07/32] cambio de objeto AC, al usar AC --- Inventarios/RecepcionAlmacen.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index b93c5b5f8..9cf5cae5f 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -2459,9 +2459,9 @@ Partial Class Inventarios_RecepcionAlmacen Dim TotalPorDevengar = 0.0 TotalPorDevengar += GvInv.Rows.Cast(Of GridViewRow)().Sum(Function(Gvr) Math.Round(Gvr.DataKey("PU").ToString.ToDouble, 4) * Math.Round(Gvr.DataKey("CantidadF").ToString.ToDouble, 4)) TotalPorDevengar = Math.Round(TotalPorDevengar, 4) - If ObjContaContPAQ Is Nothing Then - ObjContaContPAQ = New ClsContPAQi(UsuarioActual.Empresa) - ObjContaContPAQ.IniciaTransacSQL() + If ObjContaAC Is Nothing Then + ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa) + ObjContaAC.IniciaTransacSQL() End If IDPoliza = ObjContaAC.AddPoliza(4, "Devengado", TotalPorDevengar * 2, TotalPorDevengar * 2, UsuarioActual.CveUsuario, FechaMovto) From 2e9b686e56732b6c959c06cbdf6424784770d873 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 30 Jun 2020 20:49:31 -0700 Subject: [PATCH 08/32] -- cambios Estados. --- App_Code/ClsClientes.vb | 32 ++++++++--------- App_Code/ClsVentas.vb | 4 +-- Compras/Compras.aspx.vb | 8 +++-- Ventas/Clientes.aspx.vb | 19 ++--------- Ventas/Ventas.aspx | 50 ++++++++++++++------------- Ventas/Ventas.aspx.vb | 76 +++++++++++++++++++++++------------------ 6 files changed, 95 insertions(+), 94 deletions(-) diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 3373f9526..7a14674f8 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -1022,22 +1022,22 @@ Public Class ClsClientes End Function - Public Function GetEstados(Optional ClaveSATPais As String = "-1") As Boolean - Dim Retorno As Boolean = False + 'Public Function GetEstados(Optional ClaveSATPais As String = "-1") As Boolean + ' Dim Retorno As Boolean = False - DataAdapter("PA_ClientesEstadosGet") + ' DataAdapter("PA_ClientesEstadosGet") - SqlAdapter.SelectCommand.Parameters.Add("@ClaveSATPais", SqlDbType.VarChar).Value = ClaveSATPais + ' SqlAdapter.SelectCommand.Parameters.Add("@ClaveSATPais", SqlDbType.VarChar).Value = ClaveSATPais - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el los estados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener el los estados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + ' End Try - Return Retorno - End Function + ' Return Retorno + 'End Function @@ -1596,8 +1596,8 @@ Public Class ClsClientes Return Retorno End Function - Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, Estado As String, - Pais As String, RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer, + Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, CveEstado As Integer, + RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer, NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_ClientesNoFrecuenteAdd") @@ -1610,8 +1610,8 @@ Public Class ClsClientes .Add("@Colonia", SqlDbType.VarChar).Value = Colonia .Add("@Localidad", SqlDbType.VarChar).Value = Localidad .Add("@Ciudad", SqlDbType.VarChar).Value = Ciudad - .Add("@Estado", SqlDbType.VarChar).Value = Estado - .Add("@Pais", SqlDbType.VarChar).Value = Pais + .Add("@CveEstado", SqlDbType.Int).Value = CveEstado + ' .Add("@Pais", SqlDbType.VarChar).Value = Pais .Add("@RFC", SqlDbType.VarChar).Value = RFC .Add("@CP", SqlDbType.VarChar).Value = CP .Add("@Telefono", SqlDbType.VarChar).Value = Telefono diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index daee7399b..59d5678ba 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4468,11 +4468,11 @@ Public Class ClsVentas Return retorno End Function - Public Function GetOCRelacionadas(CveVentasDetalles As String) As Boolean + Public Function GetOCRelacionadas(CveVenta As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Vta_OrdenCompraRelacionada", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters - .Add("@CveVentasDetalles", SqlDbType.NVarChar).Value = CveVentasDetalles + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta End With Try SqlAdapter.Fill(Data) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index ce6ccabce..9092932ce 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1227,7 +1227,6 @@ Partial Class Compras_Compras ClavesBorradas = New ArrayList() TxtFecha.Text = Now.ToShortDateString TxtFechaEjecucion.Text = Now.ToShortDateString - ViewState("CveCompra") = "0" ViewState("CveFactura") = "0" ViewState("IdPoliza") = "0" ViewState("CveCompra") = -1 @@ -10761,7 +10760,7 @@ Partial Class Compras_Compras e.Row.FCLinkButton("ImgD").Visible = False End If - If e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("IEPSPSPorcentaje").ToDouble > 0 Then + If CveCompra <= 0 AndAlso e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("IEPSPSPorcentaje").ToDouble > 0 Then If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=e.Row.DBCampo("CvePS").ToEntero).Rows.Count > 0 Then Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=e.Row.DBCampo("CvePS").ToEntero).Rows(0) If DrPS IsNot Nothing Then @@ -10773,6 +10772,11 @@ Partial Class Compras_Compras End If End If + If e.Row.DBCampo("CvePS").ToEntero > 0 AndAlso e.Row.DBCampo("NoDeducible") = "True" Then + e.Row.FCLabel("LblIVAPorcentaje").ToolTip = "IVA NO Deducible" + e.Row.FCLabel("LblIVAPorcentaje").ForeColor = Drawing.Color.Red + End If + 'CargaPresupuestosEgresos If UsuarioActual.Empresa.UsaAC Then e.Row.Cells(13).Visible = True diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index a6d91ab98..d9da7cfae 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -937,27 +937,12 @@ Partial Class Clientes Private Sub CargaEstados(Optional ClaveSATPais As String = "MEX") DdlEstadoSAT.Items.Clear() - - Dim ObjCliente As New ClsClientes - - - - If ObjCliente.GetEstados(ClaveSATPais) Then - DdlEstadoSAT.DataSource = ObjCliente.DtResultados.Copy - End If - - - - - ObjCliente.Dispose() + DdlEstadoSAT.DataSource = GlobalDTEstado(ClaveSATPais) DdlEstadoSAT.DataBind() - DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1")) - 'DdlEstadoSAT.SelectedValue = "-1" - + DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1")) UpDatos.Update() - End Sub Private Sub CargaResponsables() diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index cb0957bcf..f4435a3a5 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1297,6 +1297,14 @@ +
    @@ -3293,20 +3301,7 @@ - - - Ordenes de Compra Relacionadas:  - - - - - - - - - - + Tipo de Entrega:  @@ -3691,7 +3686,7 @@
    - +
    +
    - - - + + + + + + + + +
    - - - + + + + +
    @@ -7667,8 +7671,8 @@ $('#<%= TxtTelefonoCliente.ClientID %>').val(''); $('#<%= TxtCiudadCliente.ClientID %>').val(''); $('#<%= TxtLocalidadCliente.ClientID %>').val(''); - $('#<%= TxtEstadoCliente.ClientID %>').val(''); - $('#<%= TxtPaisCliente.ClientID %>').val(''); + $('#<%= DdlSATPais.ClientID %>').val(''); + $('#<%= DdlEstadoSAT.ClientID %>').val(''); $('#<%= TxtCorreoCliente.ClientID %>').val(''); $('#divAgregarCliente').modal(); diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 65b1df597..1583f4af3 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2049,7 +2049,7 @@ Partial Class Ventas DdlSubProyectoDatos.Enabled = False BtnEmitirImprimir.Visible = False BtnCrearApartirDe.Visible = True - BtnEditar.Visible = True + If UsuarioActual.TienePermisoProceso(302) Then BtnEditar.Visible = True 'DdlEstatus.Enabled = True DivFechaAnticipoCliente.Visible = True @@ -2107,8 +2107,7 @@ Partial Class Ventas DivDevAlm.Visible = True End If - 'CARGA GV DE OC RELACIONADAS - CargarOCRelacionadas() + End If Else If Request("CveOS") IsNot Nothing AndAlso IsNumeric(Request("CveOS")) AndAlso Request("CveOS").ToEntero() > 0 Then @@ -3564,6 +3563,19 @@ Partial Class Ventas End If End Sub + Private Sub CargaEstados(Optional ClaveSATPais As String = "MEX") + + DdlEstadoSAT.Items.Clear() + DdlEstadoSAT.DataSource = GlobalDTEstado(ClaveSATPais) + + DdlEstadoSAT.DataBind() + DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1")) + + End Sub + Protected Sub DdlSATPais_SelectedIndexChanged(sender As Object, e As EventArgs) + CargaEstados(DdlSATPais.SelectedValue) + End Sub + Private Function CargaVenta() As Boolean Dim Retorno As Boolean = False @@ -4477,12 +4489,22 @@ Partial Class Ventas DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString()) - CargaPS(-1, DdlPS) + CargaPS(-1, DdlPS) - UpPS.Update() - UpContado.Update() - UpEstatus.Update() - Retorno = True + 'CARGA GV DE OC RELACIONADAS + If CveVenta > 0 AndAlso ObjVentas.GetOCRelacionadas(CveVenta) Then + If ObjVentas.DtResultados.Rows.Count > 0 Then + DivOCRelacionadas.Visible = True + GvOCRelacionadas.DataSource = ObjVentas.DtResultados + + End If + End If + GvOCRelacionadas.DataBind() + + UpPS.Update() + UpContado.Update() + UpEstatus.Update() + Retorno = True Else ViewState("CveVenta") = -1 @@ -18456,6 +18478,7 @@ Partial Class Ventas DivBotonesAgregarCliente.Visible = False DivFormaCliente.Visible = False UpAgregarCliente.Update() + CargaEstados() RegistraScript("showDivEC();") End Sub @@ -18478,8 +18501,8 @@ Partial Class Ventas RFVColoniaC.Visible = False RFVCiudadC.Visible = False RFVLocalidadC.Visible = False - RFVEstadoC.Visible = False - RFVPaisC.Visible = False + RfvDdlEstadoSAT.Visible = False + RFVSATPais.Visible = False DdlMetodoCliente.SelectedValueExist(1) DdlFormaCliente.SelectedValueExist(1) @@ -18511,8 +18534,8 @@ Partial Class Ventas RFVColoniaC.Visible = True RFVCiudadC.Visible = True RFVLocalidadC.Visible = True - RFVEstadoC.Visible = True - RFVPaisC.Visible = True + RfvDdlEstadoSAT.Visible = True + RFVSATPais.Visible = True DdlMetodoCliente.SelectedValueExist(-1) DdlFormaCliente.SelectedValueExist(-1) @@ -18535,8 +18558,8 @@ Partial Class Ventas Dim ObjCliente As New ClsClientes If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, - TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim, - TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, + TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero, + TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista) Then If ObjCliente.DtResultados.Rows.Count > 0 Then RegistraScript("hideDivEC();") @@ -21273,6 +21296,11 @@ Partial Class Ventas Dim TempCliente As Integer = If(CveVenta <= 0, CveCliente, -1) Dim TipoDocumento As Integer = If(CveVenta <= 0, 14, -1) + If CveVenta <= 0 AndAlso TempCliente <= 0 Then + Dim a As String = "carga de docuemntacion del cleinte, masivo, corregir" + a.GuardaLog() + End If + If objRH.DocumentacionElectronicaGet(-1, TempCliente, -1, UsuarioActual.CveEmpresa, TipoDocumento, CveVenta) Then DtDocumentacionCliente = objRH.DtResultados.FiltraParametros("CveDocumentacionElectronica > 0") DtDocumentacionCliente.Columns.Add("Accion", Type.GetType("System.String")) @@ -25952,26 +25980,6 @@ Partial Class Ventas 'MailCls = Nothing End Sub - Private Sub CargarOCRelacionadas() - Dim GridViewPSAux As GridView = GvPS - Dim CveVentasDetalle As New StringBuilder() - For Each vd As GridViewRow In GridViewPSAux.Rows - Dim CveVentaDetalle As String = vd.DataKey("CveVentaDetalle") - CveVentasDetalle.AppendFormat("{0},", CveVentaDetalle) - Next - Dim ObjVentas As New ClsVentas() - If ObjVentas.GetOCRelacionadas(CveVentasDetalle.ToString) Then - Dim OC As DataTable = ObjVentas.DtResultados - If OC.Rows.Count > 0 Then - trOCRelacionadasLabel.Visible = True - trOCRelacionadas.Visible = True - GvOCRelacionadas.DataSource = OC - GvOCRelacionadas.DataBind() - End If - End If - ObjVentas.Dispose() - End Sub - Protected Sub BtnEditar_Click() Handles BtnEditar.Click Dim Opcion As String = BtnEditar.Text If Opcion = "Editar" Then From 6eed6a02c5474e9d545136e456fc9cc2c825975a Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 1 Jul 2020 08:47:20 -0700 Subject: [PATCH 09/32] - --- Sistemas/Empresa.aspx | 63 +++++++++++++++++++++++++++++--- Sistemas/Empresa.aspx.vb | 79 +++++++++++++++++++++++++++++++++++----- 2 files changed, 126 insertions(+), 16 deletions(-) diff --git a/Sistemas/Empresa.aspx b/Sistemas/Empresa.aspx index 505dbd406..d2d0a61c7 100644 --- a/Sistemas/Empresa.aspx +++ b/Sistemas/Empresa.aspx @@ -326,12 +326,21 @@ - Cargar Archivo Key + + Cargar Archivo Key - - Descargar Archivo Key + + + Descargar Archivo Key + + <%----%> + + + + + @@ -340,7 +349,8 @@ - Cargar Archivo CER + + Cargar Archivo CER @@ -354,7 +364,8 @@ - Cargar Archivo PFX + + Cargar Archivo PFX @@ -372,7 +383,7 @@ - + Registrar en ProFact @@ -497,6 +508,7 @@ <%-- --%> + Área Geográfica: @@ -505,6 +517,7 @@ <%-- --%> +
    @@ -1408,6 +1421,7 @@ + Tipo Centro de Costos: @@ -1758,6 +1772,43 @@
    + - + From 234e18850e6e3cbe761e27f58d07919dc04a7b9a Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 1 Jul 2020 21:59:59 -0700 Subject: [PATCH 18/32] -- porcentaje impuesto en concepto 4 --- Ventas/Ventas.aspx.vb | 200 +++++++++++++++++++++--------------------- 1 file changed, 100 insertions(+), 100 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 754b814a3..6491aa50a 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -10139,7 +10139,7 @@ Partial Class Ventas End If IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera - CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera + 'CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera End If CveSubProyectoContabilizar = CveSubProyectoVenta ImporteConcepto12 = importeMX.RoundSQL @@ -10148,10 +10148,10 @@ Partial Class Ventas CuentasContablesInvalidas.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True Else @@ -10810,7 +10810,7 @@ Partial Class Ventas ' End If - DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto"}) + DT = TmpDTDetalle.FiltraParametros($"CvePS <> {CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"}) If DT.Rows.Count > 0 Then 'Se agrega movimiento separado por la cuenta de ventas (ER) @@ -10829,7 +10829,7 @@ Partial Class Ventas End If - CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() + 'CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() If importeMovimiento <> 0 Then @@ -10838,12 +10838,12 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}")) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}")) + ' CveCuentaContabilizacion = 0 + 'End If - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then ErrorPrepoliza = True Else ViewState("SeGuardoPrePoliza") = True @@ -10912,7 +10912,7 @@ Partial Class Ventas If Row2("CveClasificacion").ToString() = "19929" Then IdCtaContable = 1142 End If - CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() + ' CveCuenta = GlobalDTClasificaciones(ObjFactura.CveEmpresa).FiltroPrimeroValor("IdCuentaIngresosSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToEntero() If importeMovimiento <> 0 Then @@ -10921,10 +10921,10 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}")) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString() + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString()}")) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta) Then ErrorPrepoliza = True @@ -11229,7 +11229,7 @@ Partial Class Ventas If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows.Count = 1 Then IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContable").ToString().ToEntero() - CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContableSIG").ToString().ToEntero() + ' CveCuenta = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("IdCtaContableSIG").ToString().ToEntero() End If If IdCtaContable <= 0 Then @@ -11237,10 +11237,10 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.AppendFormat("
    {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("NumCuentaMoneda").ToString().ToEntero()) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.AppendFormat("
    {0}", GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero()).Rows(0)("NumCuentaMoneda").ToString().ToEntero()) + ' CveCuentaContabilizacion = 0 + 'End If 'BANCOS Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString()) @@ -11309,10 +11309,10 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True @@ -12546,7 +12546,7 @@ Partial Class Ventas If CveMonedaVenta = 1 Then IdCtaContable = IdCtaContClientes - CveCuenta = CveCuentaClientes + 'CveCuenta = CveCuentaClientes Else IdCtaContable = IdCtaContComplementaria CveCuenta = 0 'If(ObjFactura.Cliente IsNot Nothing AndAlso ObjFactura.Cliente.CveCuentaComplementaria > 0, ObjFactura.Cliente.CveCuentaComplementaria, -1) @@ -12557,11 +12557,11 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - 'Conta SIG - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + ''Conta SIG + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, 0, Concepto, 207, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Math.Round(importeMovimiento * tipoCambioVenta - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioVentaValuacion) Then ErrorConta = True @@ -12596,11 +12596,11 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - 'Conta SIG - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + ''Conta SIG + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=gvr.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=CveVenta, CveCliente:=CveCliente, CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambioPago, ImporteME:=If(tipoCambioPago = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then ErrorConta = True @@ -12645,7 +12645,7 @@ Partial Class Ventas If ObjConta.GetRetCuenta(ConceptoContable, CveCliente) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString().ToEntero() - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString().ToEntero() + 'CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString().ToEntero() End If End If @@ -12656,10 +12656,10 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If Dim ImporteComplementaria As Decimal = 0 If UsaComplementariaClientes = True AndAlso gvr.DataKey("CveMoneda").ToString().ToDecimal > 1 Then @@ -12888,10 +12888,10 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(CvePrepoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=importeMX, CveCuenta:=CveCuenta, TipoCambio:=TipoCambioGeneral) Then ErrorConta = True @@ -13094,7 +13094,7 @@ Partial Class Ventas CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVAXTrasladar").ToString().ToEntero() End If IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) - CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar) + ' CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar) If ImporteMovimiento > 0 Then If IdCtaContable <= 0 Then @@ -13102,10 +13102,10 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 13))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 13))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 13, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then PrePolizaCorrecta = False @@ -13123,7 +13123,7 @@ Partial Class Ventas If ObjConta.GetRetCuenta(8, UsuarioActual.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString().ToEntero() - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero() + 'CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero() End If End If End If @@ -13134,10 +13134,10 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 8))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 8))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 8, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then PrePolizaCorrecta = False @@ -13160,15 +13160,15 @@ Partial Class Ventas End If 'ContaSIG - If CveCuentaRetISR <> 0 Then - CveCuenta = CveCuentaRetISR - Else - If ObjConta.GetRetCuenta(9, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero() - End If - End If - End If + 'If CveCuentaRetISR <> 0 Then + ' CveCuenta = CveCuentaRetISR + 'Else + ' If ObjConta.GetRetCuenta(9, UsuarioActual.CveEmpresa) Then + ' If ObjConta.DtResultados.Rows.Count > 0 Then + ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero() + ' End If + ' End If + 'End If If ImporteMovimiento > 0 Then If IdCtaContable <= 0 Then @@ -13176,10 +13176,10 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - If IdCtaContable <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 9))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + 'If IdCtaContable <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 9))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 9, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then PrePolizaCorrecta = False @@ -13211,7 +13211,7 @@ Partial Class Ventas CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=PorcentajeImpuesto).Rows(0)("CveCuentaIVATrasladado").ToString().ToEntero() End If IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) - CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado) + 'CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado) If ImporteMovimiento > 0 Then 'ContaContPAQ @@ -13220,11 +13220,11 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - 'ContaSIG - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 61))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + ''ContaSIG + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 61))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, Concepto, 61, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then PrePolizaCorrecta = False @@ -13244,14 +13244,14 @@ Partial Class Ventas End If End If - 'Conta SIG - If CveCuentaRetIVA <> 0 Then - CveCuenta = CveCuentaRetIVA - Else - If ObjConta.GetRetCuenta(62, UsuarioActual.CveEmpresa) Then - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero() - End If - End If + ''Conta SIG + 'If CveCuentaRetIVA <> 0 Then + ' CveCuenta = CveCuentaRetIVA + 'Else + ' If ObjConta.GetRetCuenta(62, UsuarioActual.CveEmpresa) Then + ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString().ToEntero() + ' End If + 'End If If ImporteMovimiento > 0 Then If IdCtaContable <= 0 Then @@ -13259,10 +13259,10 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 62))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 62))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 62, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then PrePolizaCorrecta = False @@ -13284,15 +13284,15 @@ Partial Class Ventas End If End If - If CveCuentaRetISR <> 0 Then - CveCuenta = CveCuentaRetISR - Else - If ObjConta.GetRetCuenta(63, UsuarioActual.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero() - End If - End If - End If + 'If CveCuentaRetISR <> 0 Then + ' CveCuenta = CveCuentaRetISR + 'Else + ' If ObjConta.GetRetCuenta(63, UsuarioActual.CveEmpresa) Then + ' If ObjConta.DtResultados.Rows.Count > 0 Then + ' CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString().ToEntero() + ' End If + ' End If + 'End If If ImporteMovimiento > 0 Then If IdCtaContable <= 0 Then @@ -13300,10 +13300,10 @@ Partial Class Ventas idCuentaContabilizacion = 0 End If - If CveCuenta <= 0 Then - CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 63))("ConceptoContable").ToString()) - CveCuentaContabilizacion = 0 - End If + 'If CveCuenta <= 0 Then + ' CuentasContablesInvalidasSIG.Append("
    " & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 63))("ConceptoContable").ToString()) + ' CveCuentaContabilizacion = 0 + 'End If If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, Concepto, 63, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta) Then PrePolizaCorrecta = False From 3cd5b6d57d8fed5c73174ca31a9381d9be606749 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 2 Jul 2020 09:24:13 -0700 Subject: [PATCH 19/32] . --- Sistemas/Empresa.aspx.vb | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Sistemas/Empresa.aspx.vb b/Sistemas/Empresa.aspx.vb index 6190efd84..456ba4757 100644 --- a/Sistemas/Empresa.aspx.vb +++ b/Sistemas/Empresa.aspx.vb @@ -1684,11 +1684,22 @@ Partial Class Sistemas_Empresa 'Dim fi As New FileInfo(File) Dim byteArray As Byte() = File.ReadAllBytes(FilePath) + 'HttpContext.Current.Response.Clear() + 'HttpContext.Current.Response.ClearContent() + 'HttpContext.Current.Response.ContentType = "application/octet-stream" + 'HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment filename=prueba.docx") + 'HttpContext.Current.Response.AddHeader("Content-Length", byteArray.Length.ToString()) + 'HttpContext.Current.Response.OutputStream.Write(byteArray, 0, byteArray.Length) + 'HttpContext.Current.Response.End() + Response.Buffer = True Response.Clear() Response.ContentType = "application/octet-stream" - Response.AddHeader("Content-Disposition", "attachment filename=prueba.docx") - Response.OutputStream.Write(byteArray, 0, byteArray.Length) - Response.Flush() + HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment filename=prueba.docx") + HttpContext.Current.Response.BinaryWrite(byteArray) ' create the file + HttpContext.Current.Response.Flush() ' send it to the client to download + HttpContext.Current.Response.SuppressContent = True + HttpContext.Current.ApplicationInstance.CompleteRequest() + HttpContext.Current.Response.End() End Sub End Class From 1a3eb82c44a18bcdf647739bd856e44185bdce6d Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 2 Jul 2020 09:46:49 -0700 Subject: [PATCH 20/32] --- App_Code/ClsNominas.vb | 17 ++ App_Code/ClsRH.vb | 21 ++- Nomina/Nomina2.aspx | 394 ++++++++++++++++++++++++++++++++++++++++- Nomina/Nomina2.aspx.cs | 260 +++++++++++++++++++++------ RH/Personal.aspx | 80 ++++++--- RH/Personal.aspx.vb | 36 +++- Scripts/custom.js | 15 ++ 7 files changed, 729 insertions(+), 94 deletions(-) diff --git a/App_Code/ClsNominas.vb b/App_Code/ClsNominas.vb index f82e8f176..e3b1f758d 100644 --- a/App_Code/ClsNominas.vb +++ b/App_Code/ClsNominas.vb @@ -1940,6 +1940,23 @@ Public Class ClsNominas Return Retorno End Function + Public Function ProcesarSUA(txtSUA As String, cveEmpresa As Int32) As Boolean + Dim retorno As Boolean = False + DTSet = New DataSet() + DataAdapter("PA_Nom_SUAProcesar", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@TxtSUA", SqlDbType.VarChar).Value = txtSUA + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + End With + Try + SqlAdapter.Fill(DTSet) + retorno = True + Catch ex As Exception + retorno = False + OnError("Ocurrió un error al procesar SUA.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return retorno + End Function Public Function GetNominaEmpleadoSimulador(CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CvePeriodo As Integer, CveEmpresa As Integer, Agrupador As Integer, SalarioDiario As Decimal) As Boolean Dim retorno As Boolean = False Try diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 40f8cfaa0..a13e094b3 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1973,11 +1973,12 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Try Return Retorno End Function - Public Function UpdateSalarios(CvePersonal As Integer, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double) As Boolean + Public Function UpdateSalarios(CvePersonal As Integer, Fecha As String, CveEmpresa As Integer, SalarioDiario As Double, SDI As Double, SalarioDiarioSS As Double, SalarioDiarioPago As Double) As Boolean Dim Retorno As Boolean = False SqlDataAdapter("PA_RH_PersonalUpdateSalarios") With SqlAdapter.SelectCommand.Parameters .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal + .Add("@Fecha", SqlDbType.Date).Value = Fecha .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@SalarioDiarioPago", SqlDbType.Money).Value = SalarioDiarioPago .Add("@SalarioDiario", SqlDbType.Money).Value = SalarioDiario @@ -1994,6 +1995,24 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo End Function + Public Function GetMovimientosToSUA(CveEmpresa As Integer, FechaI As String, FechaF As String) As Boolean + Dim Retorno As Boolean = False + SqlDataAdapter("PA_RH_MovimientosToSUA") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@FechaI", SqlDbType.VarChar).Value = FechaI + .Add("@FechaF", SqlDbType.VarChar).Value = FechaF + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al intentar guardar los cambios en el Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + Public Function UpdateRFCValidado(RFC As String, CveEmpresa As Integer, RFCValidadoisok As Boolean) As Boolean Dim Retorno As Boolean = False diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx index f347c4d54..176fdd0eb 100644 --- a/Nomina/Nomina2.aspx +++ b/Nomina/Nomina2.aspx @@ -4,10 +4,39 @@
    - - - - - - Textbox3 - 2.44856cm - 0.2667cm - 0.6cm - 18.82013cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - VSH VIGILANCIA Y PROTECCION SA DE CV - - - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - VSH - FitProportional - 0.35576cm - 0.2667cm - 2.02224cm - 3.36239cm - 2 - - - - - - true - true - - - - - PROVEEDOR: - - - - =Parameters!ProveedorNombre.Value - - - - - - - =Parameters!ProveedorDireccion.Value - - - - - - - =Parameters!ProveedorTel.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - FECHA DE REGISTRO: - - - - =Parameters!FechaSolicitud.Value - - - - - - - =Parameters!FechaEntrega.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - - - - true - true - - - - - DESCRIPCION: - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Justificacion.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - =Parameters!Folio.Value - - - - - - - Textbox2 - 0.35576cm - 17.81988cm - 0.6cm - 1.75917cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No. - - - - - - - Textbox19 - 0.35576cm - 16.43113cm - 0.6cm - 1.38875cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 1.97712cm - - - 1.53649cm - - - 4.25385cm - - - 4.73296cm - - - 2.24377cm - - - 1.01139cm - - - 2.00619cm - - - 1.75917cm - - - - - 0.473cm - - - - - true - true - - - - - CANTIDAD - - - - - - - Textbox1 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - CODIGO - - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - PRODUCTO - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - D E S C R I P C I O N - - - - - - - Textbox9 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Sub Proyecto - - - - - - - Textbox4 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - A.F. - - - - - - - Textbox21 - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - P. UNITARIO - - - - - - - Textbox13 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - IMPORTE - - - - - - - Textbox5 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.38833cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad1 - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!CodPS.Value - - - - - - - CodPS - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Producto.Value - - - - - - - Producto - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Obs.Value - - - - - - - Obs - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!SubProyecto.Value - - - - - - - SubProyecto - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!CodigoAF.Value - - - - - - - CodigoAF - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - 2pt - 2pt - 1pt - - - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - Total - - - 2pt - 2pt - 1pt - - - - - - - - - - - - - - - - - - - - - - - - After - - - - - - - DsOC - 7.26722cm - 0.02288in - 0.86133cm - 19.52094cm - 9 - - - - - - true - true - - - - - =IIF(CInt(Parameters!TipoTermino.Value)=2, "C A N C E L A D O", "") - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Uso CFDI 3.3: - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsoCFDI.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 3.23147in - - - - - - true - true - - - - - NOTAS: RECEPCION DE FACTURAS VIERNES UNICAMENTE NO SE RECIBIRA SU FACTURA SIN ESTA ORDEN DE COMPRA - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =UCase(Parameters!ImporteLetra.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - _______________ - - - - - - - Textbox17 - 2.70608cm - 0.48139cm - 1.30584cm - 3.1477cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - = "__________________________________" & Chr(10) - & Parameters!NombreAutorizo.Value & Chr(10) - & "FIRMA AUTORIZADA" - - - - - Textbox17 - 2.70608cm - 5.12961cm - 1.30584cm - 6.9577cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Banco - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cuenta/Clabe bancaria/Referencia - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - I.V.A. - - - - - - - Textbox20 - 1.62008cm - 14.6301cm - 0.45183cm - 2.5cm - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - DESCUENTO: - - - - - - - Textbox20 - 0.71938cm - 14.63363cm - 0.45183cm - 2.5cm - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!IVA.Value - - - - - - - Textbox20 - 1.62008cm - 17.1301cm - 0.45183cm - 2.5cm - 9 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Descuento.Value - - - - - - - Textbox20 - 0.71938cm - 17.13363cm - 0.45183cm - 2.5cm - 10 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - SUB-TOTAL - - - - - - - Textbox20 - 0.26755cm - 14.63363cm - 0.45183cm - 2.5cm - 11 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SubTotal.Value - - - - - - - Textbox20 - 0.26755cm - 17.13363cm - 0.45183cm - 2.5cm - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - TOTAL - - - - - - - Textbox20 - 0.02173cm - 0.45183cm - 2.5cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Total.Value - - - - - - - Textbox20 - 0.05181cm - 2.5cm - 0.45183cm - 2.5cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 2.07191cm - 14.63363cm - 0.50364cm - 5cm - 13 - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value <= 0 And Parameters!RetISR.Value <= 0, False, True) - - - - - - - - - true - true - - - - - Ret IVA - - - - - - - Textbox20 - 0.0247cm - 0.45183cm - 2.5cm - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!RetIVA.Value - - - - - - - Textbox20 - 2.5cm - 0.45183cm - 2.5cm - 1 - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!RetISR.Value - - - - - - - Textbox20 - 0.48711cm - 2.50353cm - 0.45183cm - 2.5cm - 2 - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ret ISR - - - - - - - Textbox20 - 0.51181cm - 0.01059cm - 0.45183cm - 2.5cm - 3 - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True) - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - TOTAL - - - - - - - Textbox20 - 0.94193cm - 0.00353cm - 0.45183cm - 2.5cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Total.Value - - - - - - - Textbox20 - 0.94193cm - 2.50353cm - 0.45183cm - 2.5cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 2.61082cm - 14.62657cm - 1.39376cm - 5.00353cm - 14 - - =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0 Or Parameters!RetISR.Value > 0, False, True) - - - - - - - External - =Parameters!FirmaAutorizo.Value - Fit - 0.82196cm - 6.69573cm - 3.09107cm - 3.55292cm - 15 - - =iif(Parameters!FirmaAutorizo.Value <> "",False,True) - - - - - - - true - true - - - - - SUB-TOTAL 2 - - - - - - - Textbox20 - 1.13297cm - 14.63716cm - 0.45183cm - 2.5cm - 16 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SubTotal2.Value - - - - - - - Textbox20 - 1.13297cm - 17.13716cm - 0.45183cm - 2.5cm - 17 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - - - =Today - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 1cm - 0cm - 1cm - 1cm - 0.13cm - + + + + + + Textbox3 + 2.44856cm + 0.2667cm + 0.6cm + 18.82013cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + VSH VIGILANCIA Y PROTECCION SA DE CV + + + + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + VSH + FitProportional + 0.35576cm + 0.2667cm + 2.02224cm + 3.36239cm + 2 + + + + + + true + true + + + + + PROVEEDOR: + + + + =Parameters!ProveedorNombre.Value + + + + + + + =Parameters!ProveedorDireccion.Value + + + + + + + =Parameters!ProveedorTel.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + FECHA DE REGISTRO: + + + + =Parameters!FechaSolicitud.Value + + + + + + + =Parameters!FechaEntrega.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + + + + true + true + + + + + DESCRIPCION: + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Justificacion.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + + =Parameters!Folio.Value + + + + + + + Textbox2 + 0.35576cm + 17.81988cm + 0.6cm + 1.75917cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. + + + + + + + Textbox19 + 0.35576cm + 16.43113cm + 0.6cm + 1.38875cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 1.97712cm + + + 1.53649cm + + + 4.25385cm + + + 4.73296cm + + + 2.24377cm + + + 1.01139cm + + + 2.00619cm + + + 1.75917cm + + + + + 0.473cm + + + + + true + true + + + + + CANTIDAD + + + + + + + Textbox1 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CODIGO + + + + + + + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PRODUCTO + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + D E S C R I P C I O N + + + + + + + Textbox9 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Sub Proyecto + + + + + + + Textbox4 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + A.F. + + + + + + + Textbox21 + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + P. UNITARIO + + + + + + + Textbox13 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + IMPORTE + + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.38833cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad1 + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!CodPS.Value + + + + + + + CodPS + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Producto.Value + + + + + + + Producto + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Obs.Value + + + + + + + Obs + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!SubProyecto.Value + + + + + + + SubProyecto + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!CodigoAF.Value + + + + + + + CodigoAF + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 1pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + 2pt + 2pt + 1pt + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DsOC + 7.26722cm + 0.02288in + 0.86133cm + 19.52094cm + 9 + + + + + + true + true + + + + + =IIF(CInt(Parameters!TipoTermino.Value)=2, "C A N C E L A D O", "") + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Uso CFDI 3.3: + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsoCFDI.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 3.23147in + + + + + + true + true + + + + + NOTAS: RECEPCION DE FACTURAS VIERNES UNICAMENTE NO SE RECIBIRA SU FACTURA SIN ESTA ORDEN DE COMPRA + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =UCase(Parameters!ImporteLetra.Value) + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + _______________ + + + + + + + Textbox17 + 2.70608cm + 0.48139cm + 1.30584cm + 3.1477cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + = "__________________________________" & Chr(10) + & Parameters!NombreAutorizo.Value & Chr(10) + & "FIRMA AUTORIZADA" + + + + + Textbox17 + 2.70608cm + 5.12961cm + 1.30584cm + 6.9577cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Banco + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cuenta/Clabe bancaria/Referencia + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + I.V.A. + + + + + + + Textbox20 + 1.62008cm + 14.6301cm + 0.45183cm + 2.5cm + 7 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + DESCUENTO: + + + + + + + Textbox20 + 0.71938cm + 14.63363cm + 0.45183cm + 2.5cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!IVA.Value + + + + + + + Textbox20 + 1.62008cm + 17.1301cm + 0.45183cm + 2.5cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Descuento.Value + + + + + + + Textbox20 + 0.71938cm + 17.13363cm + 0.45183cm + 2.5cm + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + SUB-TOTAL + + + + + + + Textbox20 + 0.26755cm + 14.63363cm + 0.45183cm + 2.5cm + 11 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SubTotal.Value + + + + + + + Textbox20 + 0.26755cm + 17.13363cm + 0.45183cm + 2.5cm + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + TOTAL + + + + + + + Textbox20 + 0.02173cm + 0.45183cm + 2.5cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox20 + 0.05181cm + 2.5cm + 0.45183cm + 2.5cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 2.07191cm + 14.63363cm + 0.50364cm + 5cm + 13 + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value <= 0 And Parameters!RetISR.Value <= 0, False, True) + + + + + + + + + true + true + + + + + Ret IVA + + + + + + + Textbox20 + 0.0247cm + 0.45183cm + 2.5cm + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!RetIVA.Value + + + + + + + Textbox20 + 2.5cm + 0.45183cm + 2.5cm + 1 + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!RetISR.Value + + + + + + + Textbox20 + 0.48711cm + 2.50353cm + 0.45183cm + 2.5cm + 2 + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ret ISR + + + + + + + Textbox20 + 0.51181cm + 0.01059cm + 0.45183cm + 2.5cm + 3 + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetISR.Value > 0, False, True) + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + TOTAL + + + + + + + Textbox20 + 0.94193cm + 0.00353cm + 0.45183cm + 2.5cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox20 + 0.94193cm + 2.50353cm + 0.45183cm + 2.5cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 2.61082cm + 14.62657cm + 1.39376cm + 5.00353cm + 14 + + =Microsoft.VisualBasic.Interaction.iif(Parameters!RetIVA.Value > 0 Or Parameters!RetISR.Value > 0, False, True) + + + + + + + External + =Parameters!FirmaAutorizo.Value + Fit + 0.82196cm + 6.69573cm + 3.09107cm + 3.55292cm + 15 + + =iif(Parameters!FirmaAutorizo.Value <> "",False,True) + + + + + + + true + true + + + + + SUB-TOTAL 2 + + + + + + + Textbox20 + 1.13297cm + 14.63716cm + 0.45183cm + 2.5cm + 16 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SubTotal2.Value + + + + + + + Textbox20 + 1.13297cm + 17.13716cm + 0.45183cm + 2.5cm + 17 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + + =Today + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 1cm + 0cm + 1cm + 1cm + 0.13cm +