From ee4f2cf2d9fdb4c3bca1e59ccd671f6a50414849 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 23 Feb 2021 12:33:38 -0700 Subject: [PATCH 01/21] Clientes se retiran campos CveMetodoPago, NumCtaPago, ConvenioCIE desde base de datos, Validacion fecha de pago no debe ser menor a factura, ProveedoresAbonar, ClientesAbonar, PooIEVentas, PopIECopmpras --- App_Code/ClsClientes.vb | 37 +- Bancos/PopIECompras.aspx.vb | 15 +- Bancos/PopIEVentas.aspx.vb | 559 ++++++++++++++++--------------- Bancos/ProveedoresAbonar.aspx.vb | 24 ++ Compras/Compras.aspx.vb | 14 + General/SaldosIniciales.aspx.vb | 2 +- OI/Tablero.aspx.cs | 3 + Ventas/CatClientes.aspx | 8 +- Ventas/CatClientes.aspx.vb | 10 +- Ventas/Clientes.aspx | 12 +- Ventas/Clientes.aspx.vb | 30 +- Ventas/ClientesAbonar.aspx.vb | 26 ++ Ventas/Ventas.aspx.vb | 28 +- vwd.webinfo | 2 + 14 files changed, 428 insertions(+), 342 deletions(-) diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index a4eb2d97a..a1169276d 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -68,7 +68,7 @@ Public Class ClsClientes Public Property RecepcionPagos As String Public Property TipoPago As String Public Property CuentaContable As String - Public Property ConvenioCIE As String + 'Public Property ConvenioCIE As String Public Property FormaFacturacion As String Public Property IdCtaContClientes As Integer Public Property IdCtaContMonedaExtranjera As Integer @@ -86,8 +86,8 @@ Public Class ClsClientes Public Property CveCuentaFondoGarantia As Integer Public Property Codigo As String Public Property LimiteCredito As Double - Public Property NumCtaPago As String - Public Property CveMetodoPago As Integer + 'Public Property NumCtaPago As String + 'Public Property CveMetodoPago As Integer Public Property AplicaFEMSA As Boolean Public Property FEMSA_NumSociedad As String Public Property FEMSA_NumProveedor As String @@ -341,11 +341,11 @@ Public Class ClsClientes _CveCuentaRetIVA = Data.Rows(0)("IdCtaContRetIVASIG").ToString.ToEntero _CveCuentaRetISR = Data.Rows(0)("IdCtaContRetISRSIG").ToString.ToEntero _CveCuentaFondoGarantia = Data.Rows(0)("IdCtaContFondoGarantiaSIG").ToString.ToEntero - _ConvenioCIE = Data.Rows(0)("ConvenioCIE").ToString + '_ConvenioCIE = Data.Rows(0)("ConvenioCIE").ToString _FormaFacturacion = Data(0)("FormaFacturacion").ToString _LimiteCredito = Data(0)("LimiteCredito").ToString.ToDouble - _NumCtaPago = Data(0)("NumCtaPago").ToString - _CveMetodoPago = Data(0)("CveMetodoPago").ToString.ToEntero + '_NumCtaPago = Data(0)("NumCtaPago").ToString + '_CveMetodoPago = Data(0)("CveMetodoPago").ToString.ToEntero _AplicaFEMSA = CBool(Data(0)("AplicaFEMSA").ToString) _FEMSA_NumSociedad = Data(0)("FEMSA_NumSociedad").ToString _FEMSA_NumProveedor = Data(0)("FEMSA_NumProveedor").ToString @@ -569,7 +569,7 @@ Public Class ClsClientes RetieneIVAFletes As Boolean, CveUsuario As Integer, CveEmpresa As Integer, NombreCorto As String, CveVendedor As Integer, PlazoCobranza As Integer, PlazoCobranzaRemision As Integer, RecepcionPagos As String, TipoPago As String, IdCtaContClientes As Integer, CtaContClientes As String, IdCtaContAnticipos As Integer, CtaContAnticipos As String, IdCtaContRetIVA As Integer, CtaContRetIVA As String, IdCtaContRetISR As Integer, CtaContRetISR As String, IdCtaFondoGarantia As Integer, CtaFondoGarantia As String, IdCtaContCompClientes As Integer, CtaCompClientes As String, IdCtaContCompAnticipos As Integer, CtaCompAnticipos As String, - ConvenioCIE As String, FormaFacturacion As String, Codigo As String, LimiteCredito As Double, NumCtaPago As String, CveMetodoPago As Integer, AplicaFEMSA As Boolean, FEMSA_NumSociedad As String, FEMSA_NumProveedor As String, + FormaFacturacion As String, Codigo As String, LimiteCredito As Double, AplicaFEMSA As Boolean, FEMSA_NumSociedad As String, FEMSA_NumProveedor As String, FEMSA_Mail As String, AplicaDetallista As Boolean, Detallista_GLNComprador As String, Detallista_Departamento As String, Detallista_GLNVendedor As String, Detallista_NumProveedor As String, SevenEleven_NumProveedor As String, AplicaFord As Boolean, Ford_GSDB As String, TelefonoExtension As String, TelefonoOtros As String, PermiteCredito As Boolean, CveSubProyecto As Integer, CveClienteCorporativo As Integer, Optional CveClienteClasificacion As Integer = -1, Optional CveUsuarioResponsable As Integer = -1, @@ -637,14 +637,12 @@ Public Class ClsClientes .Add("@CtaContCompClientes", SqlDbType.VarChar).Value = CtaCompClientes .Add("@IdCtaContCompAnticipos", SqlDbType.Int).Value = IdCtaContCompAnticipos - .Add("@CtaContCompAnticipos", SqlDbType.VarChar).Value = CtaCompAnticipos - - .Add("@ConvenioCIE", SqlDbType.VarChar).Value = ConvenioCIE + .Add("@CtaContCompAnticipos", SqlDbType.VarChar).Value = CtaCompAnticipos + + .Add("@FormaFacturacion", SqlDbType.VarChar).Value = FormaFacturacion .Add("@Codigo", SqlDbType.VarChar).Value = Codigo - .Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito - .Add("@NumCtaPago", SqlDbType.VarChar).Value = NumCtaPago - .Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago + .Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito .Add("@AplicaFEMSA", SqlDbType.Bit).Value = If(AplicaFEMSA, 1, 0) .Add("@FEMSA_NumSociedad", SqlDbType.VarChar).Value = FEMSA_NumSociedad .Add("@FEMSA_NumProveedor", SqlDbType.VarChar).Value = FEMSA_NumProveedor @@ -754,7 +752,7 @@ Public Class ClsClientes IdCtaContClientes As Integer, CtaContClientes As String, IdCtaContAnticipos As Integer, CtaContAnticipos As String, IdCtaContRetIVA As Integer, CtaContRetIVA As String, IdCtaContRetISR As Integer, CtaContRetISR As String, IdCtaFondoGarantia As Integer, CtaFondoGarantia As String, IdCtaContCompClientes As Integer, CtaCompClientes As String, IdCtaContCompAnticipos As Integer, CtaCompAnticipos As String, IdCtaContMonedaExtranjera As Integer, CtaContMonedaExtranjera As String, IdCtaContMonedaExtranjeraAnticipos As Integer, CtaContMonedaExtranjeraAnticipos As String, - ConvenioCIE As String, FormaFacturacion As String, Codigo As String, LimiteCredito As Double, NumCtaPago As String, CveMetodoPago As Integer, AplicaFEMSA As Boolean, FEMSA_NumSociedad As String, + FormaFacturacion As String, Codigo As String, LimiteCredito As Double, AplicaFEMSA As Boolean, FEMSA_NumSociedad As String, FEMSA_NumProveedor As String, FEMSA_Mail As String, AplicaDetallista As Boolean, Detallista_GLNComprador As String, Detallista_Departamento As String, Detallista_GLNVendedor As String, Detallista_NumProveedor As String, SevenEleven_NumProveedor As String, AplicaFord As Boolean, Ford_GSDB As String, CveUsuario As Integer, CveCliente As Integer, CveUsuarioModifico As Integer, CveEmpresa As Integer, TelefonoExtension As String, TelefonoOtros As String, PermiteCredito As Boolean, CveSubProyecto As Integer, CveClienteCorporativo As Integer, @@ -833,14 +831,13 @@ Public Class ClsClientes .Add("@IdCtaContMonedaExtranjera", SqlDbType.Int).Value = IdCtaContMonedaExtranjera .Add("@CtaContMonedaExtranjera", SqlDbType.VarChar).Value = CtaContMonedaExtranjera .Add("@IdCtaContMonedaExtranjeraAnticipos", SqlDbType.Int).Value = IdCtaContMonedaExtranjeraAnticipos - .Add("@CtaContMonedaExtranjeraAnticipos", SqlDbType.VarChar).Value = IdCtaContMonedaExtranjeraAnticipos - - .Add("@ConvenioCIE", SqlDbType.VarChar).Value = ConvenioCIE + .Add("@CtaContMonedaExtranjeraAnticipos", SqlDbType.VarChar).Value = IdCtaContMonedaExtranjeraAnticipos + + .Add("@FormaFacturacion", SqlDbType.VarChar).Value = FormaFacturacion .Add("@Codigo", SqlDbType.VarChar).Value = Codigo - .Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito - .Add("@NumCtaPago", SqlDbType.VarChar).Value = NumCtaPago - .Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago + .Add("@LimiteCredito", SqlDbType.Float).Value = LimiteCredito + .Add("@AplicaFEMSA", SqlDbType.Bit).Value = If(AplicaFEMSA, 1, 0) .Add("@FEMSA_NumSociedad", SqlDbType.VarChar).Value = FEMSA_NumSociedad .Add("@FEMSA_NumProveedor", SqlDbType.VarChar).Value = FEMSA_NumProveedor diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 8f1a3f8bf..a2726b647 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -1382,12 +1382,21 @@ Partial Class Bancos_PopIECompras Dim rv As RangeValidator = CType(e.Row.FindControl("RVSaldoDeudor"), RangeValidator) End If - End Sub + End Sub #End Region - + #Region "G U A R D A R" Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click - 'VALIDACION PARA LOS IMPORTES CUANDO SE QUIERE PAGAR EN DIFERENTE MONEDA + + + If FechaCompra.ToString("dd/MM/yyyy").ToDate > TxtFechaDocumento.Text.ToDate Then + Alert($"La fecha de compra no puede ser mayor que la fecha de pago
Fecha de compra: { FechaCompra.ToString("dd/MM/yyyy") } ", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + + + 'VALIDACION PARA LOS IMPORTES CUANDO SE QUIERE PAGAR EN DIFERENTE MONEDA If Not Page.IsValid Then Exit Sub End If diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index fa3ad4341..00a20f1f1 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -1386,12 +1386,21 @@ Partial Class Bancos_PopIEVentas End If UpDatos.Update() - End Sub + End Sub #End Region - + #Region "G U A R D A R" - Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click - 'VALIDACION PARA LOS IMPORTES CUANDO SE QUIERE PAGAR EN DIFERENTE MONEDA + Private Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click + + + + If FechaVenta.ToString("dd/MM/yyyy").ToDate > TxtFechaDocumento.Text.ToDate Then + Alert($"La fecha de venta no puede ser mayor que la fecha de pago
Fecha de venta: { FechaVenta.ToString("dd/MM/yyyy") }", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + + 'VALIDACION PARA LOS IMPORTES CUANDO SE QUIERE PAGAR EN DIFERENTE MONEDA If Not Page.IsValid Then Exit Sub End If @@ -2152,34 +2161,34 @@ Partial Class Bancos_PopIEVentas Else ImporteMovimiento = 0 End If - CveSubProyectoContabilizar = CveSubProyectoVenta - - 'Case 65 'Perdida - ' If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then - ' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - ' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria - - ' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) - ' TimpocambioGeneral = TCImpuestos - - - ' Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta - ' Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA - ' Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA - ' Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR - ' Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS - ' Diferencia = Math.Round(Diferencia, 2) - - ' 'si la diferencia es negativa es pérdida, si es positiva es ganancia - ' If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then - ' ImporteMovimiento = Math.Abs(Diferencia) - ' ImporteMX = ImporteMovimiento - ' End If - ' Else - ' ImporteMovimiento = 0 - ' End If - ' CveSubProyectoContabilizar = CveSubProyectoVenta - + CveSubProyectoContabilizar = CveSubProyectoVenta + + 'Case 65 'Perdida + ' If CveMoneda <> 1 OrElse CveMonedaVenta <> 1 Then + ' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria + ' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria + + ' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) + ' TimpocambioGeneral = TCImpuestos + + + ' Dim Diferencia As Decimal = ((MovimientoPagar.Total * PorcentajePago) * tipoCambioVentaValuacion) - ((MovimientoPagar.Total * PorcentajePago) * tipoCambioPago) 'Añadimos la diferencia de perdida en la venta + ' Diferencia -= ((MovimientoPagar.IVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA + ' Diferencia += ((MovimientoPagar.RetIVA * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetIVA * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA + ' Diferencia += ((MovimientoPagar.RetISR * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.RetISR * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR + ' Diferencia -= ((MovimientoPagar.IEPS * PorcentajePago) * tipoCambioVenta) - ((MovimientoPagar.IEPS * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS + ' Diferencia = Math.Round(Diferencia, 2) + + ' 'si la diferencia es negativa es pérdida, si es positiva es ganancia + ' If Diferencia > 0 AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = Math.Abs(Diferencia) + ' ImporteMX = ImporteMovimiento + ' End If + ' Else + ' ImporteMovimiento = 0 + ' End If + ' CveSubProyectoContabilizar = CveSubProyectoVenta + Case 30 If RBLContado.SelectedValue = "1" Then If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then @@ -2882,249 +2891,249 @@ Partial Class Bancos_PopIEVentas End If Next ImporteMovimiento = 0 - End If - - 'Case 16 'Ret ISR X Acreditar COMPRA - ' If RBLContado.SelectedValue = "5" Then - ' For Each rw As GridViewRow In GvCompras.Rows - ' If rw.FCCheckBox("Chk").Checked Then - ' If rw.DataKey("CveRetIVAConcepto").ToString.ToDecimal = 1 Then - ' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal - - ' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then - ' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra - ' ImporteMX = ImporteMovimiento - ' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal - ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal - ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal - ' End If - ' ImporteMovimiento = Math.Round(ImporteMovimiento, 2) - ' ImporteMX = Math.Round(ImporteMX, 2) - - ' If rw.DataKey("TipoCambio").ToString.ToDecimal > 1 Then ConceptoMovimiento += $" TC:{rw.DataKey("TipoCambio").ToString.ToDecimal} ${ImporteMovimiento.FormatoNumero(2)}" - - ' 'Conta ContPAQ - ' If IdCtaContRetISRProveedor > 0 Then - ' IdCtaContable = IdCtaContRetISRProveedor - ' ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(315).ToEntero - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - ' End If - ' End If - ' End If - - ' 'Conta SIG - ' If CveCuentaRetISRProveedor <> 0 Then - ' CveCuenta = CveCuentaRetISRProveedor - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero - ' End If - ' End If - ' End If - - ' If ImporteMovimiento > 0 Then - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then - ' MsgError = "No se pudo insertar la póliza" - ' End If - ' End If - ' End If - ' End If - ' Next - ' ImporteMovimiento = 0 - ' End If - - 'Case 23 'Ret ISR Acreditable COMPRA - ' If RBLContado.SelectedValue = "5" Then - ' For Each rw As GridViewRow In GvCompras.Rows - ' If rw.FCCheckBox("Chk").Checked Then - ' If rw.DataKey("CveRetIVAConcepto").ToString.ToDecimal = 1 Then - ' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal - - ' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then - ' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra - ' ImporteMX = ImporteMovimiento - ' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento '* If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) - ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) - ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) - ' End If - ' ImporteMovimiento = Math.Round(ImporteMovimiento, 2) - ' ImporteMX = Math.Round(ImporteMX, 2) - - ' If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - - ' 'Conta ContPAQ - ' If IdCtaContRetISRAcreditableProveedor > 0 Then - ' IdCtaContable = IdCtaContRetISRAcreditableProveedor - ' ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - ' End If - ' End If - ' End If - - ' 'Conta SIG - ' If CveCuentaRetISRProveedor <> 0 Then - ' CveCuenta = CveCuentaRetISRProveedor - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero - ' End If - ' End If - ' End If - - - ' If ImporteMovimiento > 0 Then - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then - ' MsgError = "No se pudo insertar la póliza" - ' End If - ' End If - ' End If - ' End If - ' Next - ' ImporteMovimiento = 0 - ' End If - 'Case 243 'Ret ISR x Acreditar Terceros y Arrendamiento - ' If RBLContado.SelectedValue = "5" Then - ' For Each rw As GridViewRow In GvCompras.Rows - ' If rw.FCCheckBox("Chk").Checked Then - ' If rw.DataKey("CveRetISRConcepto").ToString.ToDecimal = 2 Then - ' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal - - ' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then - ' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra - ' ImporteMX = ImporteMovimiento - ' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal - ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal - ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal - ' End If - ' ImporteMovimiento = Math.Round(ImporteMovimiento, 2) - ' ImporteMX = Math.Round(ImporteMX, 2) - - ' If rw.DataKey("TipoCambio").ToString.ToDecimal > 1 Then ConceptoMovimiento += $" TC:{rw.DataKey("TipoCambio").ToString.ToDecimal} ${ImporteMovimiento.FormatoNumero(2)}" - - ' 'Conta ContPAQ - ' If IdCtaContRetISRProveedor > 0 Then - ' IdCtaContable = IdCtaContRetISRProveedor - ' ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(317).ToEntero - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - ' End If - ' End If - ' End If - - ' 'Conta SIG - ' If CveCuentaRetISRProveedor <> 0 Then - ' CveCuenta = CveCuentaRetISRProveedor - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero - ' End If - ' End If - ' End If - - ' If ImporteMovimiento > 0 Then - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then - ' MsgError = "No se pudo insertar la póliza" - ' End If - ' End If - ' End If - ' End If - ' Next - ' ImporteMovimiento = 0 - ' End If - - 'Case 244 'Ret ISR Acreditable Terceros y Arrendamiento - ' If RBLContado.SelectedValue = "5" Then - ' For Each rw As GridViewRow In GvCompras.Rows - ' If rw.FCCheckBox("Chk").Checked Then - ' If rw.DataKey("CveRetISRConcepto").ToString.ToDecimal = 2 Then - ' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal - - ' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then - ' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra - ' ImporteMX = ImporteMovimiento - ' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento '* If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) - ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) - ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then - ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) - ' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) - ' End If - ' ImporteMovimiento = Math.Round(ImporteMovimiento, 2) - ' ImporteMX = Math.Round(ImporteMX, 2) - - ' If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" - - ' 'Conta ContPAQ - ' If IdCtaContRetISRAcreditableProveedor > 0 Then - ' IdCtaContable = IdCtaContRetISRAcreditableProveedor - ' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then - ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero - ' End If - ' End If - ' End If - - ' 'Conta SIG - ' If CveCuentaRetISRProveedor <> 0 Then - ' CveCuenta = CveCuentaRetISRProveedor - ' Else - ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then - ' If ObjMov.DtResultados.Rows.Count > 0 Then - ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero - ' End If - ' End If - ' End If - - - ' If ImporteMovimiento > 0 Then - ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then - ' MsgError = "No se pudo insertar la póliza" - ' End If - ' End If - ' End If - ' End If - ' Next - ' ImporteMovimiento = 0 - ' End If - + End If + + 'Case 16 'Ret ISR X Acreditar COMPRA + ' If RBLContado.SelectedValue = "5" Then + ' For Each rw As GridViewRow In GvCompras.Rows + ' If rw.FCCheckBox("Chk").Checked Then + ' If rw.DataKey("CveRetIVAConcepto").ToString.ToDecimal = 1 Then + ' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal + + ' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then + ' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra + ' ImporteMX = ImporteMovimiento + ' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal + ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal + ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal + ' End If + ' ImporteMovimiento = Math.Round(ImporteMovimiento, 2) + ' ImporteMX = Math.Round(ImporteMX, 2) + + ' If rw.DataKey("TipoCambio").ToString.ToDecimal > 1 Then ConceptoMovimiento += $" TC:{rw.DataKey("TipoCambio").ToString.ToDecimal} ${ImporteMovimiento.FormatoNumero(2)}" + + ' 'Conta ContPAQ + ' If IdCtaContRetISRProveedor > 0 Then + ' IdCtaContable = IdCtaContRetISRProveedor + ' ElseIf UsuarioActual.Empresa.Funcionalidad(315).ToEntero > 0 Then + ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(315).ToEntero + ' Else + ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjMov.DtResultados.Rows.Count > 0 Then + ' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + ' End If + ' End If + ' End If + + ' 'Conta SIG + ' If CveCuentaRetISRProveedor <> 0 Then + ' CveCuenta = CveCuentaRetISRProveedor + ' Else + ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjMov.DtResultados.Rows.Count > 0 Then + ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero + ' End If + ' End If + ' End If + + ' If ImporteMovimiento > 0 Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then + ' MsgError = "No se pudo insertar la póliza" + ' End If + ' End If + ' End If + ' End If + ' Next + ' ImporteMovimiento = 0 + ' End If + + 'Case 23 'Ret ISR Acreditable COMPRA + ' If RBLContado.SelectedValue = "5" Then + ' For Each rw As GridViewRow In GvCompras.Rows + ' If rw.FCCheckBox("Chk").Checked Then + ' If rw.DataKey("CveRetIVAConcepto").ToString.ToDecimal = 1 Then + ' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal + + ' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then + ' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra + ' ImporteMX = ImporteMovimiento + ' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento '* If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) + ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) + ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) + ' End If + ' ImporteMovimiento = Math.Round(ImporteMovimiento, 2) + ' ImporteMX = Math.Round(ImporteMX, 2) + + ' If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" + + ' 'Conta ContPAQ + ' If IdCtaContRetISRAcreditableProveedor > 0 Then + ' IdCtaContable = IdCtaContRetISRAcreditableProveedor + ' ElseIf UsuarioActual.Empresa.Funcionalidad(316).ToEntero > 0 Then + ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(316).ToEntero + ' Else + ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjMov.DtResultados.Rows.Count > 0 Then + ' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + ' End If + ' End If + ' End If + + ' 'Conta SIG + ' If CveCuentaRetISRProveedor <> 0 Then + ' CveCuenta = CveCuentaRetISRProveedor + ' Else + ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjMov.DtResultados.Rows.Count > 0 Then + ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero + ' End If + ' End If + ' End If + + + ' If ImporteMovimiento > 0 Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then + ' MsgError = "No se pudo insertar la póliza" + ' End If + ' End If + ' End If + ' End If + ' Next + ' ImporteMovimiento = 0 + ' End If + 'Case 243 'Ret ISR x Acreditar Terceros y Arrendamiento + ' If RBLContado.SelectedValue = "5" Then + ' For Each rw As GridViewRow In GvCompras.Rows + ' If rw.FCCheckBox("Chk").Checked Then + ' If rw.DataKey("CveRetISRConcepto").ToString.ToDecimal = 2 Then + ' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal + + ' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then + ' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra + ' ImporteMX = ImporteMovimiento + ' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal + ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal + ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento * rw.DataKey("TipoCambio").ToString.ToDecimal + ' End If + ' ImporteMovimiento = Math.Round(ImporteMovimiento, 2) + ' ImporteMX = Math.Round(ImporteMX, 2) + + ' If rw.DataKey("TipoCambio").ToString.ToDecimal > 1 Then ConceptoMovimiento += $" TC:{rw.DataKey("TipoCambio").ToString.ToDecimal} ${ImporteMovimiento.FormatoNumero(2)}" + + ' 'Conta ContPAQ + ' If IdCtaContRetISRProveedor > 0 Then + ' IdCtaContable = IdCtaContRetISRProveedor + ' ElseIf UsuarioActual.Empresa.Funcionalidad(317).ToEntero > 0 Then + ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(317).ToEntero + ' Else + ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjMov.DtResultados.Rows.Count > 0 Then + ' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + ' End If + ' End If + ' End If + + ' 'Conta SIG + ' If CveCuentaRetISRProveedor <> 0 Then + ' CveCuenta = CveCuentaRetISRProveedor + ' Else + ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjMov.DtResultados.Rows.Count > 0 Then + ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero + ' End If + ' End If + ' End If + + ' If ImporteMovimiento > 0 Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=rw.DataKey("TipoCambio").ToString.ToDecimal) Then + ' MsgError = "No se pudo insertar la póliza" + ' End If + ' End If + ' End If + ' End If + ' Next + ' ImporteMovimiento = 0 + ' End If + + 'Case 244 'Ret ISR Acreditable Terceros y Arrendamiento + ' If RBLContado.SelectedValue = "5" Then + ' For Each rw As GridViewRow In GvCompras.Rows + ' If rw.FCCheckBox("Chk").Checked Then + ' If rw.DataKey("CveRetISRConcepto").ToString.ToDecimal = 2 Then + ' Dim PorcentajePagoCompra = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal / rw.DataKey("Total").ToString.ToDecimal + + ' If CveMoneda = 1 AndAlso CveMonedaVenta = 1 Then + ' ImporteMovimiento = rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra + ' ImporteMX = ImporteMovimiento + ' ElseIf CveMoneda = 1 AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento '* If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) + ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 1 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) + ' ElseIf CveMoneda = 2 AndAlso CveMonedaVenta = 2 Then + ' ImporteMovimiento = (rw.DataKey("RetISR").ToString.ToDecimal * PorcentajePagoCompra) + ' ImporteMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago) + ' End If + ' ImporteMovimiento = Math.Round(ImporteMovimiento, 2) + ' ImporteMX = Math.Round(ImporteMX, 2) + + ' If tipoCambioPago > 1 Then ConceptoMovimiento += $" TC:{tipoCambioPago} ${ImporteMovimiento.FormatoNumero(2)}" + + ' 'Conta ContPAQ + ' If IdCtaContRetISRAcreditableProveedor > 0 Then + ' IdCtaContable = IdCtaContRetISRAcreditableProveedor + ' ElseIf UsuarioActual.Empresa.Funcionalidad(318).ToEntero > 0 Then + ' IdCtaContable = UsuarioActual.Empresa.Funcionalidad(318).ToEntero + ' Else + ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjMov.DtResultados.Rows.Count > 0 Then + ' IdCtaContable = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero + ' End If + ' End If + ' End If + + ' 'Conta SIG + ' If CveCuentaRetISRProveedor <> 0 Then + ' CveCuenta = CveCuentaRetISRProveedor + ' Else + ' If ImporteMovimiento <> 0 AndAlso ObjMov.GetRetCuenta(ConceptoContable, UsuarioActual.CveEmpresa) Then + ' If ObjMov.DtResultados.Rows.Count > 0 Then + ' CveCuenta = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero + ' End If + ' End If + ' End If + + + ' If ImporteMovimiento > 0 Then + ' If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, ImporteMovimiento, rw.FCLiteral("LtlFolio").Text, ConceptoContable, ConceptoMovimiento, Fecha, IdCtaContable, -1, -1, CveVenta:=CveVenta, CveCompra:=rw.DataKey("CveCompra").ToString.ToEntero, CveProveedor:=rw.DataKey("CveProveedor").ToString.ToEntero, CvePersonal:=CvePersonal, ImporteMX:=ImporteMX, CveCuenta:=CveCuenta, TipoCambio:=If(FuncionalidadFluctuacionImpuestos, rw.DataKey("TipoCambio").ToString.ToDecimal, tipoCambioPago)) Then + ' MsgError = "No se pudo insertar la póliza" + ' End If + ' End If + ' End If + ' End If + ' Next + ' ImporteMovimiento = 0 + ' End If + Case 14 'Iva por Acreditar COMPRA If RBLContado.SelectedValue = "5" Then For Each rw As GridViewRow In GvCompras.Rows diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index e0d894fd5..269273ba0 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -711,6 +711,30 @@ Partial Class Bancos_ProveedoresAbonar #Region " GUARDAR " Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click + + + Dim ValFechaDocumento As Boolean = False + Dim FoliosFechasValFechaDocumento As New StringBuilder + + FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha superior a la fecha de pago:
") + + For Each gvRowVal As GridViewRow In GvCxP.Rows + + If gvRowVal.FCCheckBox("Chk").Checked Then + If gvRowVal.DataKey("Fecha").ToDate > TxtFechaDocumento.Text.ToDate Then + FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") + ValFechaDocumento = True + End If + + End If + Next + + If ValFechaDocumento Then + Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + If DdlTipoTransaccion.SelectedValue.ToEntero < 0 Then Alert("Seleccione un tipo de transacción", TipoMensaje.MsgAdvertencia) Exit Sub diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 0e5c10f96..d55250157 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -3988,6 +3988,20 @@ Partial Class Compras_Compras Protected Sub BtnGuardar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnGuardar.Click '------------------INICIA VALIDACIONES------------------ + + Dim TempIva As Decimal + For Each drowv As DataRow In TmpDT.Rows + TempIva = TempIva + (drowv("Total").ToString.ToDecimal * drowv("IVAPorcentaje").ToString.ToDecimal) + Next + + Dim DifGenelraIvas As Decimal = (TxtIVA.Text.ToDecimal - TempIva) + + If Math.Abs(DifGenelraIvas) > 0.2 Then + Alert($"Los importes no coinciden, error en calculo de IVA diferencia { DifGenelraIvas }", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + Dim EstatusCredito As Integer = 0 Dim CveSubProyecto As Integer = 0 'Credito Multiple diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index bc5167d0e..098149d60 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1172,7 +1172,7 @@ Partial Class General_SaldosIniciales Dim CveSATEstado As Integer = GlobalDTEstado("MEX").FiltroPrimeroValor("CveSATEstado", String.Format("NombreEstado ='{0}'", Estado)).ToEntero If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString, "", Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, "", "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, PlazoCobranza, -1, - "-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", "", Codigo, LimiteCredito, "", 1, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado, + "-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", Codigo, LimiteCredito, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado, BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago33:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado) Then ErrorClientes = True diff --git a/OI/Tablero.aspx.cs b/OI/Tablero.aspx.cs index a3ec5ebcf..a3f522fb9 100644 --- a/OI/Tablero.aspx.cs +++ b/OI/Tablero.aspx.cs @@ -121,6 +121,9 @@ public partial class OI_Tablero : ClsPaginas { CargaTablero(); this.Alert("El Tablero Se ha Eliminado"); + }else + { + this.Alert("El Tablero Se ha Eliminado", ModExtensiones.TipoMensaje.MsgAdvertencia); } } protected void LnkTableros_Click(object sender, EventArgs e) diff --git a/Ventas/CatClientes.aspx b/Ventas/CatClientes.aspx index cb3868201..66b98dba9 100644 --- a/Ventas/CatClientes.aspx +++ b/Ventas/CatClientes.aspx @@ -316,12 +316,14 @@ - + + <%-- CIE - + --%> + Calle @@ -441,7 +443,7 @@ - + <%----%> diff --git a/Ventas/CatClientes.aspx.vb b/Ventas/CatClientes.aspx.vb index eff429f72..33a704d22 100644 --- a/Ventas/CatClientes.aspx.vb +++ b/Ventas/CatClientes.aspx.vb @@ -163,11 +163,11 @@ Partial Class CatClientes GvDatos.Columns(21).Visible = ChkRetISR.Checked GvDatos.Columns(22).Visible = ChkPlazoCobranza.Checked GvDatos.Columns(23).Visible = ChkLimiteCredito.Checked - GvDatos.Columns(24).Visible = ChkCIE.Checked - GvDatos.Columns(25).Visible = ChkCalle.Checked - GvDatos.Columns(26).Visible = ChkCelular.Checked - GvDatos.Columns(27).Visible = ChkCorreoCotizacion.Checked - GvDatos.Columns(28).Visible = ChkOtroTelefono.Checked + 'GvDatos.Columns(24).Visible = ChkCIE.Checked + GvDatos.Columns(24).Visible = ChkCalle.Checked + GvDatos.Columns(25).Visible = ChkCelular.Checked + GvDatos.Columns(26).Visible = ChkCorreoCotizacion.Checked + GvDatos.Columns(27).Visible = ChkOtroTelefono.Checked CargaDatos() diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index bc71b2918..78c15c76b 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -906,27 +906,27 @@
-
+ <%--
-
+
--%>
-
+ <%--
-
-
+
--%> + <%--
-
+
--%>
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index ec3737877..f61818a4b 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1242,10 +1242,10 @@ Partial Class Clientes End Sub Private Sub CargaMetodosPago() - DdlMetodoPago.DataSource = GlobalDTMetodosPago.FiltraParametros("Estatus = 'Activo'", "ClaveSAT") '.FiltraParametros("CveMetodoPago > 0 ") + 'DdlMetodoPago.DataSource = GlobalDTMetodosPago.FiltraParametros("Estatus = 'Activo'", "ClaveSAT") '.FiltraParametros("CveMetodoPago > 0 ") DdlMetodoPagoSucursal.DataSource = GlobalDTMetodosPago.FiltraParametros("Estatus = 'Activo'", "ClaveSAT") DdlMetodoPagoSucursal.DataBind() - DdlMetodoPago.DataBind() + 'DdlMetodoPago.DataBind() End Sub Private Sub CargaPrecioLista() DdlPrecioLista.DataSource = GlobalDTPrecioListas(UsuarioActual.CveEmpresa) @@ -1495,10 +1495,8 @@ Partial Class Clientes IdCtaAnticipos = ObjClientes.IdCtaContAnticipos.ToString IdCtaRetIVA = ObjClientes.IdCtaContRetIVA.ToString IdCtaRetISR = ObjClientes.IdCtaContRetISR.ToString - IdCtaFondoGarantia = ObjClientes.IdCtaContFondoGarantia.ToString - TxtConvenioCIE.Text = ObjClientes.ConvenioCIE - TxtNumCtaPago.Text = ObjClientes.NumCtaPago - DdlMetodoPago.SelectedValue = ObjClientes.CveMetodoPago.ToString + IdCtaFondoGarantia = ObjClientes.IdCtaContFondoGarantia.ToString + 'DdlMetodoPago.SelectedValue = ObjClientes.CveMetodoPago.ToString TxtFormaFacturacion.Text = ObjClientes.FormaFacturacion ChkPermiteCredito.Checked = ObjClientes.PermiteCredito TxtLimiteCredito.Text = ObjClientes.LimiteCredito.FormatoNumero @@ -2515,10 +2513,10 @@ Partial Class Clientes End If End If - Dim MetodoPago = DdlMetodoPago.SelectedValue.ToEntero - If UsuarioActual.Empresa.CvePlataforma = 3 Then - MetodoPago = 1 - End If + 'Dim MetodoPago = DdlMetodoPago.SelectedValue.ToEntero + 'If UsuarioActual.Empresa.CvePlataforma = 3 Then + ' MetodoPago = 1 + 'End If Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "") @@ -2529,7 +2527,7 @@ Partial Class Clientes DiasPago, DdlTipoPago.SelectedValue, DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableCompClientes.SelectedValue.ToEntero, DdlCtaContableCompClientes.SelectedItem.Text, DdlCtaContableCompAnticipos.SelectedValue.ToEntero, DdlCtaContableCompAnticipos.SelectedItem.Text, - TxtConvenioCIE.Text.Trim, TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, TxtNumCtaPago.Text.Trim, MetodoPago, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, + TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim, ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim, TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero, DdlCorporativo.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero, CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero, @@ -2624,7 +2622,7 @@ Partial Class Clientes DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, DdlCtaContableAnticipos.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableCompClientes.SelectedValue.ToEntero, DdlCtaContableCompClientes.SelectedItem.Text, DdlCtaContableCompAnticipos.SelectedValue.ToEntero, DdlCtaContableCompAnticipos.SelectedItem.Text, DdlMonedaExtranjeraClientes.SelectedValue.ToEntero, DdlMonedaExtranjeraClientes.SelectedItem.Text, DdlMonedaExtranjeraAnticipos.SelectedValue.ToEntero, DdlMonedaExtranjeraAnticipos.SelectedItem.Text, - TxtConvenioCIE.Text.Trim, TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, TxtNumCtaPago.Text.Trim, DdlMetodoPago.SelectedValue.ToEntero, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim, + TxtFormaFacturacion.Text.Trim, TxtCodigo.Text.Trim, TxtLimiteCredito.Text.ToDouble, ChkAplicaFEMSA.Checked, TxtFEMSA_NumSociedad.Text.Trim, TxtFEMSA_NumProveedor.Text.Trim, TxtFEMA_Mail.Text.Trim, ChkAplicaDetallista.Checked, TxtDet_GLNComprador.Text.Trim, TxtDet_Departamento.Text.Trim, TxtDet_GLNVendedor.Text.Trim, TxtDet_NumProveedor.Text.Trim, TxtProveedor.Text.Trim, ChkAplicaFord.Checked, TxtFordGSDB.Text.Trim, UsuarioActual.CveUsuario, CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtExtension.Text.Trim, TxtTelefonoOtro.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), ChkPermiteCredito.Checked, DdlSubProyecto.SelectedValue.ToEntero, DdlCorporativo.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClasificacion.SelectedValue.ToEntero, CveUsuarioResponsable:=DdlResponsable.SelectedValue.ToEntero, CveCondicionEntrega:=DdlCondicionesEntrega.SelectedValue.ToEntero, ImprimeNombreSucursal:=ChkMuestraNombre.Checked, CveZonaHoraria:=DdlZonaHoraria.SelectedValue.ToEntero, CobranzaContacto:=TxtCobranzaContacto.Text.Trim, CobranzaTelefono:=TxtCobranzaTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), CobranzaExt:=TxtCobranzaExt.Text, @@ -6122,7 +6120,7 @@ Partial Class Clientes End If - If TxtNumeroCuenta2.Text.Trim.Length = 0 AndAlso TxtCLABE.Text.Trim.Length = 0 AndAlso TxtSWIFT.Text.Trim.Length = 0 AndAlso TxtConvenioCIE.Text.Trim.Length = 0 Then + If TxtNumeroCuenta2.Text.Trim.Length = 0 AndAlso TxtCLABE.Text.Trim.Length = 0 AndAlso TxtSWIFT.Text.Trim.Length = 0 Then Alert("Debe especificar al menos un numero de cuenta.", TipoMensaje.MsgAdvertencia) Exit Sub End If @@ -9458,9 +9456,9 @@ Partial Class Clientes ObjFactura.Fecha = Now ObjFactura.CvePrePoliza = -1 - ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.ToEntero - ObjFactura.MetodoPago = DdlMetodoPago.SelectedItem.Text - ObjFactura.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {DdlMetodoPago.SelectedValue}") + 'ObjFactura.CveMetodoPago = DdlMetodoPago.SelectedValue.ToEntero + 'ObjFactura.MetodoPago = DdlMetodoPago.SelectedItem.Text + 'ObjFactura.ClaveMetodoPagoSAT = GlobalDTMetodosPago.FiltroPrimeroValor("ClaveSAT", $"CveMetodoPago = {DdlMetodoPago.SelectedValue}") ObjFactura.FechaVencimiento = TxtFechaPago.Text.ToDate ObjFactura.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index 28094c1f9..826785f1e 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -652,6 +652,32 @@ Partial Class Ventas_ClientesAbonar Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click + + + Dim ValFechaDocumento As Boolean = False + Dim FoliosFechasValFechaDocumento As New StringBuilder + + FoliosFechasValFechaDocumento.AppendLine("Se seleccionaron facturas con fecha superior a la fecha de pago:
") + + For Each gvRowVal As GridViewRow In GvCxC.Rows + + If gvRowVal.FCCheckBox("Chk").Checked Then + If gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy").ToDate > TxtFechaDocumento.Text.ToDate Then + FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") + ValFechaDocumento = True + End If + End If + Next + + + + If ValFechaDocumento Then + Alert(FoliosFechasValFechaDocumento.ToString, TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + + If Not TxtImporte.Text.ToDecimal > 0 Then Alert("Debe de llevar un Importe", TipoMensaje.MsgAdvertencia) Exit Sub diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index fb94fa794..b17ae4652 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -1588,14 +1588,16 @@ Partial Class Ventas ViewState("EstatusCliente") = value End Set End Property - Private Property CveMetodoPagoCliente As Integer - Get - Return ViewState("CveMetodoPagoCliente").ToString().ToEntero() - End Get - Set(value As Integer) - ViewState("CveMetodoPagoCliente") = value - End Set - End Property + + 'Private Property CveMetodoPagoCliente As Integer + ' Get + ' Return ViewState("CveMetodoPagoCliente").ToString().ToEntero() + ' End Get + ' Set(value As Integer) + ' ViewState("CveMetodoPagoCliente") = value + ' End Set + 'End Property + Private Property Modalidad As String Get Return ViewState("Modalidad").ToString() @@ -2047,7 +2049,7 @@ Partial Class Ventas ImprimeNombreSucursal = False RegistraScript("SetDisabledTxtTotal(true);") TrVistaPrevia.Visible = False - CveMetodoPagoCliente = 1 + 'CveMetodoPagoCliente = 1 CveAlmacenExistenciasContrato = -1 UpFacturar.Update() 'CargaTiposDocumentos() @@ -5454,7 +5456,7 @@ Partial Class Ventas If CveCliente = 239903 AndAlso UsuarioActual.CveEmpresa = 119 Then DdlMetodoPago33.Enabled = False - ObjCliente.CveMetodoPago = 1 ' PUE, y que no se pueda modificar + 'ObjCliente.CveMetodoPago = 1 ' PUE, y que no se pueda modificar Else DdlMetodoPago33.Enabled = True End If @@ -5462,7 +5464,7 @@ Partial Class Ventas Dim CveCotizacion As Integer = IfNull(ViewState("CveCotizacion"), 0).ToString().ToEntero() If (CveVenta <= 0 AndAlso CveCotizacion <= 0) Or EsCreaApartirDe Or NuevaFactura = 1 Then - CveMetodoPagoCliente = ObjCliente.CveMetodoPago + 'CveMetodoPagoCliente = ObjCliente.CveMetodoPago DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33) @@ -6214,7 +6216,7 @@ Partial Class Ventas End If If CveVenta <= 0 Then - CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString().ToEntero() + 'CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString().ToEntero() DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString()) DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty) @@ -6246,7 +6248,7 @@ Partial Class Ventas Dim CveCotizacion As Integer = IfNull(ViewState("CveCotizacion"), 0).ToString().ToEntero() If CveVenta <= 0 AndAlso CveCotizacion <= 0 Then - CveMetodoPagoCliente = ObjCliente.CveMetodoPago + 'CveMetodoPagoCliente = ObjCliente.CveMetodoPago DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33) DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty) diff --git a/vwd.webinfo b/vwd.webinfo index d553518ff..cd758a39f 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -176,6 +176,8 @@ + + From e933964847241287ccce448878606f2d5537f2f0 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 23 Feb 2021 20:01:50 -0700 Subject: [PATCH 02/21] Reembolsos --- Compras/ReembolsosComprobaciones.aspx | 2 +- Compras/ReembolsosComprobaciones.aspx.vb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Compras/ReembolsosComprobaciones.aspx b/Compras/ReembolsosComprobaciones.aspx index 02d0f7f59..285fe20dd 100644 --- a/Compras/ReembolsosComprobaciones.aspx +++ b/Compras/ReembolsosComprobaciones.aspx @@ -244,7 +244,7 @@
-
+
diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 4b00fbc2c..8e2fedf24 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -112,11 +112,11 @@ Partial Class Compras_ReembolsosComprobaciones CbPermitirExcedente.Visible = False End If - If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then - rowComisiones.Visible = True - End If + ' If UsuarioActual.CveEmpresa.Contiene(1, 4, 7, 11, 12, 72, 80, 119) Then + 'rowComisiones.Visible = True + ' End If - If UsuarioActual.CveEmpresa = 119 Then + If UsuarioActual.CveEmpresa = 119 Then ChkReembolsarSinBancos.Visible = True End If From 2ca1b77237be746bc3eaf86ccc4b8cb0050c3f0b Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 24 Feb 2021 08:08:12 -0700 Subject: [PATCH 03/21] se manda, empresa y plataforma --- App_Code/ClsSisRoles.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsSisRoles.vb b/App_Code/ClsSisRoles.vb index da2d9a59a..85b9a7211 100644 --- a/App_Code/ClsSisRoles.vb +++ b/App_Code/ClsSisRoles.vb @@ -237,13 +237,15 @@ Public Class ClsSisRoles Return Retorno End Function - Public Function GetRolesModulos(CveRol As Integer, CveModulo As Integer) As Boolean + Public Function GetRolesModulos(CveRol As Integer, CveModulo As Integer, CvePlataforma As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Sis_RolesModulosGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveRol", SqlDbType.Int).Value = CveRol .Add("@CveModulo", SqlDbType.Int).Value = CveModulo + .Add("@CvePlataforma", SqlDbType.Int).Value = CvePlataforma + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With Try From 756bbddae9856265e9f3514cf6a2daa7fe796d63 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 24 Feb 2021 10:32:03 -0700 Subject: [PATCH 04/21] Redondeo decimal --- Inventarios/ResguardoMaterial.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb index 95743d634..28e392832 100644 --- a/Inventarios/ResguardoMaterial.aspx.vb +++ b/Inventarios/ResguardoMaterial.aspx.vb @@ -864,7 +864,7 @@ Partial Class Inventarios_ResguardoMaterial If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then Dim CveSeccionAlmacen As Integer = 0 - Importe = ObjInventario.DtResultados.SUMD("Total").RoundSQL + Importe = ObjInventario.DtResultados.SUMD("Total").RoundAD For Each Dr As DataRow In ObjInventario.DtResultados.Rows If CBool(Dr("AplicaSeccion")) Then CveSeccionAlmacen = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenDestino.SelectedValue.ToEntero, Dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveSeccionAlmacen").ToEntero @@ -929,7 +929,7 @@ Partial Class Inventarios_ResguardoMaterial Else If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then Cont = 0 - Importe = ObjInventario.DtResultados.SUMD("Total").RoundSQL + Importe = ObjInventario.DtResultados.SUMD("Total").RoundAD For Each Dr As DataRow In ObjInventario.DtResultados.Rows Dim CveSeccionAlmacen As Integer = DiccionarioSecciones(Dr("CveMovimientoDetalle").ToString.ToEntero).ToString.ToEntero If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString) Then From 217a02968500218fae24f31f9802f5815b38783a Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 24 Feb 2021 10:33:11 -0700 Subject: [PATCH 05/21] -- parametos de cveplataforma y cveempresa sobre modulos --- Sistemas/CatRoles.aspx.vb | 2 +- Sistemas/PermisosPorUsuario.aspx.vb | 2 +- Sistemas/RolesDetalle.aspx.vb | 2 +- Sistemas/UsuarioDetalle.aspx.vb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sistemas/CatRoles.aspx.vb b/Sistemas/CatRoles.aspx.vb index 955d0a9d7..06391880a 100644 --- a/Sistemas/CatRoles.aspx.vb +++ b/Sistemas/CatRoles.aspx.vb @@ -90,7 +90,7 @@ Partial Class CatRoles If Array.Length = 2 Then Dim ObjPermisos As New ClsSisRoles() ViewState("CveRol") = Array(0).ToEntero - If ObjPermisos.GetRolesModulos(Array(0).ToEntero, -1) Then + If ObjPermisos.GetRolesModulos(Array(0).ToEntero, -1, 1, UsuarioActual.CveEmpresa) Then GvPermisos.DataSource = ObjPermisos.DtResultados.FiltraParametros("AGRUPACION ='N'") Else GvPermisos.DataSource = Nothing diff --git a/Sistemas/PermisosPorUsuario.aspx.vb b/Sistemas/PermisosPorUsuario.aspx.vb index 54f321149..d089848a8 100644 --- a/Sistemas/PermisosPorUsuario.aspx.vb +++ b/Sistemas/PermisosPorUsuario.aspx.vb @@ -76,7 +76,7 @@ Partial Class Sistemas_PermisosPorUsuario UsuarioControlado = False End If Dim ObjRoles As New ClsSisRoles - If ObjRoles.GetRolesModulos(-1, -1) Then + If ObjRoles.GetRolesModulos(-1, -1, 1, UsuarioActual.CveEmpresa) Then DTRolesModulos = ObjRoles.DtResultados End If ObjRoles.Dispose() diff --git a/Sistemas/RolesDetalle.aspx.vb b/Sistemas/RolesDetalle.aspx.vb index 84db02353..805e69fc1 100644 --- a/Sistemas/RolesDetalle.aspx.vb +++ b/Sistemas/RolesDetalle.aspx.vb @@ -92,7 +92,7 @@ Partial Class Sistemas_RolesDetalle Private Sub CargaGridPermisos() Dim ObjPermisos As New ClsSisRoles() - If ObjPermisos.GetRolesModulos(CveRol, -1) Then + If ObjPermisos.GetRolesModulos(CveRol, -1, 1, UsuarioActual.CveEmpresa) Then GvPermisos.DataSource = ObjPermisos.DtResultados.FiltraParametros("AGRUPACION ='N'") Else GvPermisos.DataSource = Nothing diff --git a/Sistemas/UsuarioDetalle.aspx.vb b/Sistemas/UsuarioDetalle.aspx.vb index 67eb0733e..3c125be18 100644 --- a/Sistemas/UsuarioDetalle.aspx.vb +++ b/Sistemas/UsuarioDetalle.aspx.vb @@ -2941,7 +2941,7 @@ Partial Class Sistemas_UsuarioDetalle #Region "TAB - ACCESO MODULOS" Public Sub CargaModulosAcceso() Dim ObjPermisos As New ClsSisUsuarios - If ObjPermisos.GetUsuariosModulos(CveUsuario, UsuarioActual.CveEmpresa, If(UsuarioControlado, UsuarioActual.CveUsuario, -1)) Then + If ObjPermisos.GetUsuariosModulos(CveUsuario, UsuarioActual.CveEmpresa, If(UsuarioControlado, UsuarioActual.CveUsuario, -1), CvePlataforma:=1) Then DTModulos = ObjPermisos.DtResultados.FiltraParametros("Liga <> '' ") Else DTModulos = Nothing From 35e1d2fe70995c25d01294fa4c7f30650c18abc0 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 24 Feb 2021 10:33:39 -0700 Subject: [PATCH 06/21] incluir E154 --- Compras/Compras.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 4ffaeb928..38966ae28 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -4586,7 +4586,7 @@ Partial Class Compras_Compras 'End If 'METODO DE PREPOLIZA DE ALMACEN - If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140, 141, 152, 153, 159, 160, 161, 162, 163) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then + If UsuarioActual.CveEmpresa.Contiene(1, 119, 72, 80, 140, 141, 152, 153, 154, 159, 160, 161, 162, 163) And UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then Dim ImporteAlmacen = TmpDT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0, "ImporteSinImpuestos", "Total"), $"ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal If ImporteAlmacen > 0 Then If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then From 9adc0ebe4fa17552cddcd99dc32ce20c3c2cf1d8 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 24 Feb 2021 10:36:07 -0700 Subject: [PATCH 07/21] cambio en CveMetodoPago --- Ventas/PV.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 20408025b..b5c645db1 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -2451,7 +2451,7 @@ Partial Class PV End If If CveVenta <= 0 Then - CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero + CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString.ToEntero DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString) DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString) DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString) @@ -2624,7 +2624,7 @@ Partial Class PV End If If CveVenta <= 0 Then - CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero + CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString.ToEntero DdlMetodoPago.SelectedValueExist(CveMetodoPagoCliente.ToString) DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString) DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString) From 193f44f3891009ba668b0d156842df6dca70959a Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 24 Feb 2021 10:49:40 -0700 Subject: [PATCH 08/21] mejora en moneda --- General/SaldosIniciales.aspx.vb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index bc5167d0e..4580b6c65 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -1398,7 +1398,7 @@ Partial Class General_SaldosIniciales 'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For - TipoDocto = IIf(TipoDocto.Contiene("INGRESO", "INGRESOS"), "Ing", IIf(TipoDocto = "EGRESO", "Egs", "Rem")).ToString + TipoDocto = IIf(TipoDocto.Contiene("INGRESO", "INGRESOS"), "Ing", IIf(TipoDocto.Contiene("EGRESO", "EGRESOS"), "Egs", "Rem")).ToString 'PrePóliza Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Venta/SaldoInicial", 1, Total, Total, 1, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) @@ -1410,8 +1410,9 @@ Partial Class General_SaldosIniciales End If 'Moneda - If Moneda.ToUpper.Contiene("PESOS", "PESO", "MN") Then + If Moneda.ToUpper.Contiene("PESOS", "PESO", "MXN") Then CveMoneda = 1 + TipoCambio = "1" ElseIf Moneda.ToUpper.Contiene("DÓLARES", "DOLARES", "USD") Then CveMoneda = 2 End If @@ -1460,12 +1461,20 @@ Partial Class General_SaldosIniciales End If End If + Dim UsaComplementaria As Boolean = False + + If UsuarioActual.CveEmpresa.Contiene(119, 158) Then UsaComplementaria = True + 'PrePólizaDetalle If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero) Then ErrorVentas = True : Exit For If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, ConceptoContable, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=Total) Then ErrorVentas = True : Exit For If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, Folio.ToString, 13, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IVA, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorVentas = True : Exit For 'If IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IEPS, Folio.ToString, 38, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteMX:=IEPS) Then ErrorVentas = True : Exit For + If UsaComplementaria Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total, Folio.ToString, 203, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, ImporteME:=Total, ImporteMX:=Total * TipoCambio.ToDecimal, TipoCambio:=TipoCambio.ToDecimal) Then ErrorVentas = True : Exit For + + End If 'Saldo If Saldo < Total Then From 2ee231334a83d2e9d89be8e477f8e7c652e9634b Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Wed, 24 Feb 2021 11:11:41 -0700 Subject: [PATCH 09/21] Cambios en Reporte Polizas se muestre igual en contabilidad y contabilidad2 --- App_Code/ClsContPAQi.vb | 8 +- Empresas/119/Formatos/Polizas.rdlc | 129 +- Empresas/Grales/Formatos/Polizas.rdlc | 4992 +++++++++++++------------ 3 files changed, 2556 insertions(+), 2573 deletions(-) diff --git a/App_Code/ClsContPAQi.vb b/App_Code/ClsContPAQi.vb index aaa18df7f..ccf45d815 100644 --- a/App_Code/ClsContPAQi.vb +++ b/App_Code/ClsContPAQi.vb @@ -7373,10 +7373,10 @@ Public Class ClsContPAQi AND PP.Fecha >= @Inicio AND PP.Fecha <= @Fin") StrSQL.Append(" END; ") - StrSQL.Append(" SELECT P.Id,P.Fecha,T.Nombre as TipoPoliza, MP.IdPoliza, P.IdUsuario, P.Concepto AS ConceptoPoliza,P.Cargos,P.Abonos,P.Folio ,P.Folio AS Numero , SN.Nombre AS SegNeg, MP.Concepto, ") - StrSQL.Append(" CASE WHEN ISNUMERIC(C.CODIGO) = 1 THEN FORMAT(CAST (C.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE C.CODIGO END AS CuentaFormato , MP.TipoMovto ") - StrSQL.Append(" ,C.Nombre AS Cuenta ,MP.Referencia AS Referencia, CASE WHEN MP.TipoMovto=0 THEN MP.Importe ELSE 0 END AS Cargo ") - StrSQL.Append(" , CASE WHEN MP.TipoMovto=1 THEN MP.Importe ELSE 0 END AS Abono,U.Nombre AS UsuarioRegistro ") + StrSQL.Append(" SELECT P.Id,P.Fecha,T.Nombre as TipoPoliza, MP.Id, P.IdUsuario, P.Concepto AS ConceptoPoliza,P.Cargos,P.Abonos,P.Folio ,P.Folio AS Numero , SN.Nombre AS SegNeg, MP.Concepto, ") + StrSQL.Append(" CASE WHEN ISNUMERIC(C.CODIGO) = 1 THEN FORMAT(CAST (C.CODIGO AS FLOAT),(SELECT REPLACE(Mascarilla,'X','0') FROM Parametros)) ELSE C.CODIGO END AS CodigoCuenta , MP.TipoMovto ") + StrSQL.Append(" ,C.Nombre AS NombreCuenta ,MP.Referencia AS Referencia, CASE WHEN MP.TipoMovto=0 THEN MP.Importe ELSE 0 END AS Cargo ") + StrSQL.Append(" , CASE WHEN MP.TipoMovto=1 THEN MP.Importe ELSE 0 END AS Abono,U.Nombre AS NombreUsuario ") StrSQL.Append(" FROM Polizas P ") StrSQL.Append(" LEFT JOIN MovimientosPoliza MP ON P.Id= MP.IdPoliza ") diff --git a/Empresas/119/Formatos/Polizas.rdlc b/Empresas/119/Formatos/Polizas.rdlc index 30145ef5f..10714b4b2 100644 --- a/Empresas/119/Formatos/Polizas.rdlc +++ b/Empresas/119/Formatos/Polizas.rdlc @@ -1,5 +1,5 @@ - + 0 @@ -19,35 +19,31 @@ Id - System.Int16 - - - IdPoliza - System.Int16 + System.Int32 Fecha System.DateTime - - TipoPol + + TipoPoliza System.String - - Nombre + + NombreCuenta System.String - - Cuenta - System.String - - - CuentaFormato + + CodigoCuenta System.String Numero - System.String + System.Int32 + + + Folio + System.Int32 Referencia @@ -63,48 +59,40 @@ Cargos - System.Double + System.String Abonos - System.Double - - - Cargo - System.Double - - - Abono - System.Double - - - Folio - System.Double - - - Codigo - System.Double + System.String SegNeg System.String - - TipoMovto - System.Double + + Cargo + System.Decimal - - UsuarioRegistro + + Abono + System.Decimal + + + Codigo + System.String + + + NombreUsuario System.String - DataSet1 - C:\inetpub\wwwroot\ADSistemas\Ventas.root\Reportes\DataSet1.xsd - DataTable1 - - - + SIG_Resp_2021_01_14DataSet2 + C:\Users\Hector\source\repos\WebApplication1\SIG_Resp_2021_01_14DataSet2.xsd + PA_Conta_PrePolizasImpresionGet + Fill + GetData + PA_Conta_PrePolizasImpresionGetTableAdapter @@ -283,7 +271,7 @@ - ="Folio: " & Fields!Folio.Value + ="Folio: " & CStr(Fields!Numero.Value) - - - =Fields!ConceptoPoliza.Value + ="Concepto: " & CStr(Fields!ConceptoPoliza.Value) - + - + 2pt 2pt 2pt @@ -357,6 +334,7 @@ 4 + true @@ -671,7 +649,7 @@ - =Fields!CuentaFormato.Value + =Fields!CodigoCuenta.Value - - - =Parameters!Direccion.Value - - - - - - 2pt - 2pt - 1pt - 1pt - - - 5 - - - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 1pt - 1pt - - - - - - - - true - true - - - - - Código postal: - - - - - - - Textbox103 - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - =Parameters!CodigoPostal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.25in - - - - - true - true - - - - - Reg. Fed.: - - - - =Parameters!RFC.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 4 - - - - - - - - - true - true - - - - - Cta. Estatal: - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - =Parameters!Cta.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.25in - - - - - true - true - - - - - Fecha - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Tipo - - - - - - - Textbox19 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Número - - - - - - - Textbox20 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox27 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Concepto - - - - - - - Textbox33 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox39 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox45 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Clase - - - - - - - Textbox51 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Diario - - - - - - - Textbox65 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.25in - - - - - true - true - - - - - No. - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Refer. - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cuenta - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Nombre - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Diario - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Seg. - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Cargos - - - - - - - Textbox52 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Abonos - - - - - - - Textbox66 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.15in - - - - - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha1 - - - - - - 1pt - 1pt - 1pt - 1pt - - - - - - - - true - - - - - =Parameters!TipoPoliza.Value - - - - - - - - - 1pt - 1pt - 1pt - 1pt - - - - - - - - true - true - - - - - =Parameters!Numero.Value - - - - - - - Textbox6 - - - - - - 1pt - 4pt - 1pt - 1pt - - - - - - - - true - true - - - - - =Fields!ConceptoPoliza.Value - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.15in - - - - - true - - - - - =RowNumber("Fecha") - - - - - - - Textbox2 - - - 1pt - 1pt - 1pt - 1pt - - - - - - - - true - - - - - =Fields!Referencia.Value - - - - - - 1pt - 1pt - 1pt - 1pt - - - - - - - - true - - - - - =Fields!Codigo.Value - - - - - - 1pt - 1pt - 1pt - 1pt - - - - - - - - true - - - - - =Fields!Cuenta.Value - - - - - - - Cuenta1 - - - 1pt - 1pt - 1pt - 1pt - - - 2 - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - =Fields!Cargo.Value - - - - - - 1pt - 1pt - 1pt - 1pt - - - - - - - - true - - - - - =Fields!Abono.Value - - - - - - 1pt - 1pt - 1pt - 1pt - - - - - - - - 0.15in - - - - - true - true - - - - - - - - - - - 1pt - 1pt - 1pt - 1pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - =Fields!Concepto.Value - - - - - - 1pt - 1pt - 1pt - 1pt - - - 2 - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.2in - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Total póliza: - - - - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - - - - - =Sum(Fields!Cargo.Value) - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - =Sum(Fields!Abono.Value) - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - - - - - =FormatDateTime(Fields!Fecha.Value, DateFormat.ShortDate) - =Fields!TipoPol.Value - =Fields!Numero.Value - =Fields!ConceptoPoliza.Value - - - Start - - - - - =Fields!Folio.Value - - - - - After - - - After - - - After - - - After - - - After - - - - - - - - - - Before - - - - - - DataSet1 - - Start - - 0.02083in - 1.65in - 7.9617in - - - - - - 1.65in - - - - - - - - - Impreso de póliza del - - - - =Parameters!Finicio.Value - - - - al - - - - =Parameters!FFin.Value - - - - - - - - - Moneda: - - - - =Parameters!Moneda.Value - - - - - - - Textbox4 - 0.61055cm - 1.8125in - 1.26472cm - 9.94376cm - - - 2pt - 2pt - - - - true - - - - - Hoja: - - - - =Globals!PageNumber - - - - - - - - - Fecha: - - - - =Parameters!Fecha.Value - - - - - - - - - - - - Textbox4 - 0.61055cm - 5.94612in - 0.89872cm - 4.22452cm - 1 - - - - - - External - = Parameters!pImg.Value - FitProportional - 0.19871in - 1.52576cm - 1.54252cm - 1.70215cm - 2 - - - - - - - - - - - 0.23958in - true - true - - - true - true - - - - - Fecha Impresión: - - - - =Today - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.19685in - 0.19685in - 0.01181in - + + + =Parameters!Direccion.Value + + + + + + 2pt + 2pt + 1pt + 1pt + + + 5 + + + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 1pt + 1pt + + + + + + + + true + true + + + + + Código postal: + + + + + + + Textbox103 + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + =Parameters!CodigoPostal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.25in + + + + + true + true + + + + + Reg. Fed.: + + + + =Parameters!RFC.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 4 + + + + + + + + + true + true + + + + + Cta. Estatal: + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + =Parameters!Cta.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.25in + + + + + true + true + + + + + Fecha + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tipo + + + + + + + Textbox19 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Número + + + + + + + Textbox20 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox27 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Concepto + + + + + + + Textbox33 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox39 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox45 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Clase + + + + + + + Textbox51 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Diario + + + + + + + Textbox65 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.25in + + + + + true + true + + + + + No. + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Refer. + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cuenta + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Nombre + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Diario + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Seg. + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cargos + + + + + + + Textbox52 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Abonos + + + + + + + Textbox66 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.15in + + + + + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha1 + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + + + + + =Parameters!TipoPoliza.Value + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + =Parameters!Numero.Value + + + + + + + Textbox6 + + + + + + 1pt + 4pt + 1pt + 1pt + + + + + + + + true + true + + + + + =Fields!ConceptoPoliza.Value + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.15in + + + + + true + + + + + =RowNumber("Fecha") + + + + + + + Textbox2 + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + + + + + =Fields!Referencia.Value + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + + + + + =Fields!Codigo.Value + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + + + + + =Fields!CodigoCuenta.Value + + + + + + + CodigoCuenta + + + 1pt + 1pt + 1pt + 1pt + + + 2 + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!Cargo.Value + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + + + + + =Fields!Abono.Value + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + 0.15in + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Fields!Concepto.Value + + + + + + 1pt + 1pt + 1pt + 1pt + + + 2 + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.2in + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Total póliza: + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + + + + + =Sum(Fields!Cargo.Value) + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =Sum(Fields!Abono.Value) + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + =FormatDateTime(Fields!Fecha.Value, DateFormat.ShortDate) + =Fields!TipoPol.Value + =Fields!Numero.Value + =Fields!ConceptoPoliza.Value + + + Start + + + + + =Fields!Folio.Value + + + + + After + + + After + + + After + + + After + + + After + + + + + + + + + + Before + + + + + + DataSet1 + + Start + + 0.02083in + 1.65in + 7.9617in + + + + + + 1.65in + + + + + + + + + Impreso de póliza del + + + + =Parameters!Finicio.Value + + + + al + + + + =Parameters!FFin.Value + + + + + + + + + Moneda: + + + + =Parameters!Moneda.Value + + + + + + + Textbox4 + 0.61055cm + 1.8125in + 1.26472cm + 9.94376cm + + + 2pt + 2pt + + + + true + + + + + Hoja: + + + + =Globals!PageNumber + + + + + + + + + Fecha: + + + + =Parameters!Fecha.Value + + + + + + + + + + + + Textbox4 + 0.61055cm + 5.94612in + 0.89872cm + 4.22452cm + 1 + + + + + + External + = Parameters!pImg.Value + FitProportional + 0.19871in + 1.52576cm + 1.54252cm + 1.70215cm + 2 + + + + + + + + + + + 0.23958in + true + true + + + true + true + + + + + Fecha Impresión: + + + + =Today + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.19685in + 0.19685in + 0.01181in + - - - - - - Textbox1 - 0.30208in - 0.43625in - 0.3125in - 7.52083in - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información de Distribuidor - - - - - - - Textbox2 - 0.73833in - 0.43625in - 0.22917in - 7.52083in - 1 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre del distribuidor: - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad, Estado: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tel. - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre del mayorista que lo atiende: - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Consecutivo acuse de acumuladores: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio acuse: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información de Garantía o Ajuste - - - - - - - Textbox2 - 1.80082in - 0.43625in - 0.22917in - 7.52083in - 8 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha de instalación: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Año: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Día: - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Mes: - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha de Reclamación: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Año: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Día: - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Mes: - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Defecto: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - %Ajuste: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Meses de uso: - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información Acumulador - - - - - - - Textbox2 - 2.65498in - 0.43624in - 0.22917in - 7.52083in - 20 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Etiqueta: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Marca: - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CodEnsamble.Value - - - - Textbox3 - 3.09248in - 0.43623in - 0.20833in - 2.17711in - 24 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CodInspeccion.Value - - - - Textbox3 - 3.09248in - 5.06124in - 0.20833in - 2.89582in - 25 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CodLinea.Value - - - - Textbox3 - 3.09248in - 2.61334in - 0.20833in - 2.4479in - 26 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ensamble (primeros 7 dígitos) - - - - - - - Textbox3 - 3.30081in - 0.43623in - 0.20833in - 2.17711in - 27 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Inspección (4 dígitos) - - - - - - - Textbox3 - 3.30081in - 5.06124in - 0.20833in - 2.89582in - 28 - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Linea (4 dígitos) - - - - - - - Textbox3 - 3.30081in - 2.61334in - 0.20833in - 2.4479in - 29 - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información del Consumidor - - - - - - - Textbox2 - 3.50914in - 0.43625in - 0.28125in - 7.52083in - 30 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información Vehículo - - - - - - - Textbox2 - 3.7904in - 0.43625in - 0.22917in - 7.52083in - 31 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Marca: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Año: - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Información Consumidor - - - - - - - Textbox2 - 4.2279in - 0.43623in - 0.22917in - 7.52083in - 35 - - - Silver - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre del consumidor: - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección: - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad, Estado: - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tel. - - - - Black - - 1pt - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Por medio de la presente acepto de conformidad el ajuste o garantía según información arriba mencionada. - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 5.97792in - 0.70708in - 0in - 3.03125in - 42 - - - - - - 5.97792in - 4.44667in - 0in - 3.13542in - 43 - - - - - - true - true - - - - - Fecha - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Firma del Consumidor - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox46 - 5.70014in - 0.70708in - 0.25in - 3.03125in - 46 - - - 2pt - 2pt - 2pt - 2pt - - - - 6.57167in - - - - =Today - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 1pt - 1pt - 1pt - 1pt - + + + + + + Textbox1 + 0.30208in + 0.43625in + 0.3125in + 7.52083in + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información de Distribuidor + + + + + + + Textbox2 + 0.73833in + 0.43625in + 0.22917in + 7.52083in + 1 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Nombre del distribuidor: + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Ciudad, Estado: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tel. + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Nombre del mayorista que lo atiende: + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Consecutivo acuse de acumuladores: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Folio acuse: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información de Garantía o Ajuste + + + + + + + Textbox2 + 1.80082in + 0.43625in + 0.22917in + 7.52083in + 8 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha de instalación: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Año: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Día: + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Mes: + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Fecha de Reclamación: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Año: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Día: + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Mes: + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Defecto: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + %Ajuste: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Meses de uso: + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información Acumulador + + + + + + + Textbox2 + 2.65498in + 0.43624in + 0.22917in + 7.52083in + 20 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tipo: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Etiqueta: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Marca: + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!CodEnsamble.Value + + + + Textbox3 + 3.30498in + 0.43623in + 0.20833in + 2.17711in + 24 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!CodInspeccion.Value + + + + Textbox3 + 3.30498in + 5.06124in + 0.20833in + 2.89582in + 25 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + =Parameters!CodLinea.Value + + + + Textbox3 + 3.30498in + 2.61334in + 0.20833in + 2.4479in + 26 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Ensamble (primeros 7 dígitos) + + + + + + + Textbox3 + 3.51331in + 0.43623in + 0.20833in + 2.17711in + 27 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Inspección (4 dígitos) + + + + + + + Textbox3 + 3.51331in + 5.06124in + 0.20833in + 2.89582in + 28 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Linea (4 dígitos) + + + + + + + Textbox3 + 3.51331in + 2.61334in + 0.20833in + 2.4479in + 29 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Información del Consumidor + + + + + + + Textbox2 + 3.72164in + 0.43625in + 0.28125in + 7.52083in + 30 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información Vehículo + + + + + + + Textbox2 + 4.0029in + 0.43625in + 0.22917in + 7.52083in + 31 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Marca: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tipo: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Año: + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Información Consumidor + + + + + + + Textbox2 + 4.4404in + 0.43623in + 0.22917in + 7.52083in + 35 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Nombre del consumidor: + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Dirección: + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Ciudad, Estado: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Tel. + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Por medio de la presente acepto de conformidad el ajuste o garantía según información arriba mencionada. + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 6.19042in + 0.70708in + 0in + 3.03125in + 42 + + + + + + 6.19042in + 4.44667in + 0in + 3.13542in + 43 + + + + + + true + true + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Firma del Consumidor + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox46 + 5.91264in + 0.70708in + 0.25in + 3.03125in + 46 + + + 2pt + 2pt + 2pt + 2pt + + + + true + + + + + Poliza: + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + 6.58209in + + + + =Today + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 1pt + 1pt + 1pt + 1pt + @@ -819,7 +827,7 @@ - + @@ -2645,8 +2653,8 @@
- +
@@ -2667,7 +2675,7 @@
- +
@@ -2763,7 +2771,7 @@
- Total: $ + Total: $
@@ -2816,12 +2824,13 @@
-
-
- +
+ +
+
@@ -2842,13 +2851,19 @@
-
+
+
+
+ + +
+
@@ -2897,7 +2912,7 @@
- +
@@ -2923,11 +2938,11 @@
- + - +
@@ -2952,33 +2967,45 @@
- + - +
-
+
- - + + + + + + + + +
+
+
+
+ + <%----%> <%----%> - +
- + - +
diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 18fb5bee9..cb3ef2a4c 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -1144,6 +1144,11 @@ Partial Class PV CargaVenta() End If + + If CveVenta > 0 Then + CargaTmpDTAjustes() + End If + 'CARGA PARA FACTURAR ViewState("CveRemision") = IfNull(Request("CveRemision").ToEntero, 0) ViewState("CveCotizacion") = IfNull(Request("CveCotizacion").ToEntero, 0) @@ -1807,6 +1812,28 @@ Partial Class PV OcurrioError = True Exit For End If + + If TmpDTRecepcionUsados IsNot Nothing Then + If TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then + Dim rowInv As DataRow = TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0) + rowInv("CveVentaDetalle") = CveVentaDetalle + End If + End If + + If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then + If TmpDTAjustes.Select($"ConsecutivoVenta={Row("Consec").ToString.ToEntero}").Length > 0 Then + Dim DrAju As DataRow = TmpDTAjustes.Select($"ConsecutivoVenta={Row("Consec").ToString.ToEntero}")(0) + DrAju("CveVentaDetalle") = CveVentaDetalle + End If + End If + + If TmpDTPolizaVirtual IsNot Nothing Then + If TmpDTPolizaVirtual.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then + Dim RowPoliza As DataRow = TmpDTPolizaVirtual.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0) + RowPoliza("CveVentaDetalle") = CveVentaDetalle + End If + End If + Else If Not ObjVentas.AddVentaDetalle(CveVenta, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("CveUM").ToString.ToEntero, Row("PU").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString.ToDouble, Math.Round((Row("Total").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString.ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6), @@ -1901,9 +1928,11 @@ Partial Class PV If Not OcurrioError AndAlso TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then For Each Dr As DataRow In TmpDTAjustes.Rows If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero, - Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero, - Dr("NumPoliza").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime(), Dr("PorcentajeAjuste").ToString.ToDecimal()) Then - ErrorList.Add("Ocurrió un error al agregar la garantia detalle.") + Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero, Dr("CodigoTD").ToString, Dr("TipoComprobante").ToString.ToEntero, + Dr("Comprobante").ToString, Dr("Importe").ToString.ToDouble, Dr("Consecutivo").ToString, Dr("FechaAjuste").ToString.ToDateTime(), Dr("PorcentajeAjuste").ToString.ToDecimal(), + Dr("CveBCIAjuste").ToString.ToEntero(), Dr("Etiqueta").ToString, Dr("CveClienteDistribuidor").ToString.ToEntero(), Dr("CveModeloAuto").ToString.ToEntero(), Dr("Año").ToString) Then + OcurrioError = True + Exit For End If Next End If @@ -2451,9 +2480,9 @@ Partial Class PV End If If CveVenta <= 0 Then - CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero + CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString.ToEntero DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString) - DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString) + 'DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString) DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString) 'DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString) DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty) @@ -2652,7 +2681,7 @@ Partial Class PV PlazoCobranza = ObjCliente.PlazoCobranza If CveVenta <= 0 Then - CveMetodoPagoCliente = ObjCliente.CveMetodoPago + 'CveMetodoPagoCliente = ObjCliente.CveMetodoPago DdlMetodoPago.SelectedValueExist(CveMetodoPagoCliente.ToString) DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33) @@ -3156,10 +3185,19 @@ Partial Class PV If TmpDT.Rows.Count > 0 Then Dim Retorno = ObjFactura.EmitirFactura() If Retorno.CveVenta > 0 Then + Dim SbAlert As New StringBuilder SbAlert.AppendFormat("{0}
", Retorno.Mensajes(Retorno.Mensajes.Count - 1)) - SbAlert.AppendFormat("
", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))) + SbAlert.AppendFormat("
", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", Retorno.CveVenta))) + Using ObjAcum As New ClsAcumuladores + If ObjAcum.GetGarantiasDetalle(Retorno.CveVenta) Then + Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("") + If RowGarantia IsNot Nothing Then + SbAlert.AppendFormat("
", Encripta(String.Format("OP=AJUSTE&CVEGARANTIADETALLE={0}", RowGarantia("CveGarantiaDetalle")))) + End If + End If + End Using Retorno.Mensajes(Retorno.Mensajes.Count - 1) = SbAlert.ToString() End If @@ -3432,7 +3470,7 @@ Partial Class PV 'SI LA SUCURSAL NO TIENE ENTREGA POR ADELANTADO If ObjFactura.CveAlmacenTraspasoDestino <= 0 And ObjFactura.TipoDocto = "Rem" Then - ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.") + ObjFactura.ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.") End If End If @@ -4687,10 +4725,10 @@ Partial Class PV LblTotalPS.Text = GvRow.DataKey("Total") ChkAgregar.Checked = False divagregrarotrops.Visible = False - If CveVenta <= 0 Then - Ajuste() - End If + + Ajuste() AddPolizaVirtual(DdlPS.SelectedValue.ToEntero()) + UpVenta.Update() RegistraScript("$('#DivAddVenta').modal({backdrop: 'static', keyboard: false});", "EdicionVenta") End Sub @@ -5967,6 +6005,7 @@ Partial Class PV TmpDTAjustes.Columns.Add("CveFolioGarantia", GetType(Integer)) TmpDTAjustes.Columns.Add("CveTipoUso", GetType(Integer)) TmpDTAjustes.Columns.Add("CveTipoDefecto", GetType(Integer)) + TmpDTAjustes.Columns.Add("CodigoTD", GetType(String)) TmpDTAjustes.Columns.Add("CodigoEnsamble", GetType(String)) TmpDTAjustes.Columns.Add("CodigoLinea", GetType(String)) TmpDTAjustes.Columns.Add("CodigoInspeccion", GetType(String)) @@ -5975,7 +6014,8 @@ Partial Class PV TmpDTAjustes.Columns.Add("FechaAjuste", GetType(Date)) TmpDTAjustes.Columns.Add("Meses", GetType(String)) TmpDTAjustes.Columns.Add("PorcentajeAjuste", GetType(Double)) - TmpDTAjustes.Columns.Add("NumPoliza", GetType(String)) + TmpDTAjustes.Columns.Add("TipoComprobante", GetType(Integer)) + TmpDTAjustes.Columns.Add("Comprobante", GetType(String)) TmpDTAjustes.Columns.Add("Importe", GetType(Double)) TmpDTAjustes.Columns.Add("CvePS", GetType(Integer)) TmpDTAjustes.Columns.Add("PS", GetType(String)) @@ -5984,6 +6024,93 @@ Partial Class PV TmpDTAjustes.Columns.Add("CveVentaDetalle", GetType(Integer)) TmpDTAjustes.Columns.Add("CveVenta", GetType(Integer)) TmpDTAjustes.Columns.Add("PUFactura", GetType(Double)) + TmpDTAjustes.Columns.Add("CveBCIAjuste", GetType(Integer)) + TmpDTAjustes.Columns.Add("Etiqueta", GetType(String)) + TmpDTAjustes.Columns.Add("CveClienteDistribuidor", GetType(Integer)) + TmpDTAjustes.Columns.Add("Distribuidor", GetType(String)) + TmpDTAjustes.Columns.Add("CveModeloAuto", GetType(Integer)) + TmpDTAjustes.Columns.Add("Año", GetType(String)) + End Sub + + Private Sub CargaTmpDTAjustes() + Dim DtGarantias As DataTable = Nothing + Using ObjAcum As New ClsAcumuladores + If ObjAcum.GetGarantiasDetalle(CveVenta) Then + Dim RowGarantia As DataRow = ObjAcum.DtResultados.FiltroPrimero("") + If RowGarantia IsNot Nothing Then + If ObjAcum.GetFoliosGarantiasDetalle(-1, CveGarantiaDetalle:=RowGarantia("CveGarantiaDetalle").ToString().ToEntero()) Then + DtGarantias = ObjAcum.DtResultados.Copy() + End If + End If + End If + End Using + + If DtGarantias IsNot Nothing Then + For Each Row As DataRow In DtGarantias.Rows + Dim RowAjuste As DataRow = TmpDTAjustes.NewRow + + RowAjuste("CveFolioGarantia") = Row("CveFolioGarantia") + RowAjuste("CveTipoUso") = Row("CveTipoUso") + RowAjuste("CveTipoDefecto") = Row("CveTipoDefecto") + RowAjuste("CodigoTD") = Row("CodigoTipoDefecto") + RowAjuste("CodigoEnsamble") = Row("CodigoEnsamble") + RowAjuste("CodigoLinea") = Row("CodigoLinea") + RowAjuste("CodigoInspeccion") = Row("CodigoInspeccion") + RowAjuste("Consecutivo") = Row("Consecutivo") + RowAjuste("FechaAjuste") = Row("FechaAjuste") + + Dim FechaAjuste As DateTime = Row("FechaVenta").ToString.ToDateTime() + Dim FechaReclamacion As DateTime = Row("FechaReclamacion").ToString.ToDateTime() + + Dim FechaI As Date = FechaAjuste.AddDays(1) + Dim FechaF As Date = FechaReclamacion + + Dim Dia As Integer = FechaI.Day + Try + 'validación adicional, para saber si el mes tiene 31 días y el actua es menor. + If FechaI.Day > Today.LastDayOfMonth.Day Then Dia = Today.LastDayOfMonth.Day + Dim FechaT As Date = String.Format("{0}/{1}/{2}", Dia, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual + + Dim MesesTrascurridos As Integer = Math.Round(DateDiff(DateInterval.Day, FechaI, FechaT) / 30.4, 2).ToEntero 'saco los meses y lo redondeo + + If FechaT > FechaF Then + 'todavía está en el mes actual. + MesesTrascurridos = MesesTrascurridos + Else + MesesTrascurridos = MesesTrascurridos + 1 + End If + + RowAjuste("Meses") = MesesTrascurridos.ToString + + Catch ex As Exception + OnError("Ocurrió un error al calcular los meses de uso", ex) + End Try + + RowAjuste("PorcentajeAjuste") = Row("PorcentajeAjuste") + RowAjuste("TipoComprobante") = Row("TipoComprobante") + RowAjuste("Comprobante") = Row("Comprobante") + RowAjuste("Importe") = Row("Importe") + + If TmpDT IsNot Nothing Then + RowAjuste("ConsecutivoVenta") = TmpDT.FiltroPrimeroValor("Consec", $"CveVentaDetalle={Row("CveVentaDetalle")}") + End If + + RowAjuste("CvePS") = Row("CvePS") + RowAjuste("PS") = Row("PS") + RowAjuste("CveVenta") = Row("CveRemision") + RowAjuste("PUFactura") = Row("Importe") + RowAjuste("Cantidad") = 1 + + RowAjuste("CveBCIAjuste") = Row("CveBCIAjuste") + RowAjuste("Etiqueta") = Row("Etiqueta") + RowAjuste("CveClienteDistribuidor") = Row("CveClienteDistribuidor") + RowAjuste("Distribuidor") = Row("Distribuidor") + RowAjuste("CveModeloAuto") = Row("CveModeloAuto") + RowAjuste("Año") = Row("Año") + + TmpDTAjustes.Rows.Add(RowAjuste) + Next + End If End Sub @@ -6047,6 +6174,7 @@ Partial Class PV CreaDTmpDTPolizaVirtual() DdlDistribuidor.setEsWebService(True) DivChkAjuste.Visible = True + End Sub Private Sub CargaModelos() @@ -6087,7 +6215,9 @@ Partial Class PV ' DdlPSAjuste.Items.Insert(0, New ListItem("Seleccione", "-1")) DtPUFacturas.AcceptChanges() UpAjuste.Update() - CalculaPorcentajeAjuste() + If CveVenta < 0 Then + CalculaPorcentajeAjuste() + End If End Sub Private Sub Ajuste() @@ -6097,11 +6227,16 @@ Partial Class PV TxtPrecio.Attributes.Add("onKeyUp", $"CambiaAjuste(this,{TxtPrecio.ClientID});") ChkAjuste.Checked = True DivAjuste.Visible = True + + ChkAjuste_CheckedChanged(ChkAjuste, EventArgs.Empty) + CargaAjusteDetalle() Else ModalidadAjuste = "A" TxtPrecio.Attributes.Add("onKeyUp ", "Recalcula();") End If + + UpAjuste.Update() End Sub Private Sub LimpiaAjuste() @@ -6117,11 +6252,15 @@ Partial Class PV TxtMesesUso.Text = "" DdlTipoDefecto.SelectedIndex = -1 TxtPorcentajeAjuste.Text = "" - TxtPoliza.Text = "" + TxtComprobante.Text = "" TxtImporteAjuste.Text = "" DdlPSAjuste.SelectedValue = "-1" ChkAjuste.Checked = False DivAjuste.Visible = False + DdlBCIAjuste.SelectedValueExist(-1) + TxtEtiqueta.Text = "" + DdlModeloAuto.SelectedValueExist(-1) + TxtAnioVehiculo.Text = "" End Sub @@ -6137,6 +6276,18 @@ Partial Class PV Next If Dr IsNot Nothing Then IndexAjuste = TmpDTAjustes.Rows.IndexOf(Dr) + + CargaPSAjuste() + + DdlPSAjuste.SelectedValue = Dr("CvePS").ToString() + DdlPSAjuste.SelectedText = Dr("PS").ToString() + DdlPSAjuste_selectedindexchange(DdlPSAjuste, EventArgs.Empty) + + If Dr("CveClienteDistribuidor").ToString().ToEntero() > 0 Then + DdlDistribuidor.SelectedValue = Dr("CveClienteDistribuidor").ToString() + DdlDistribuidor.SelectedText = Dr("Distribuidor").ToString() + End If + DdlFolioGarantia.SelectedValueExist(Dr("CveFolioGarantia").ToString) TxtConsecutivoAjuste.Text = Dr("Consecutivo").ToString TxtCodEnsamble.Text = Dr("CodigoEnsamble").ToString @@ -6145,15 +6296,32 @@ Partial Class PV TxtCodInspeccion.Text = Dr("CodigoInspeccion").ToString TxtMesesUso.Text = Dr("Meses").ToString DdlTipoDefecto.SelectedValueExist(Dr("CveTipoDefecto").ToString) + TxtCodigoTD.Text = Dr("CodigoTD").ToString TxtPorcentajeAjuste.Text = Dr("PorcentajeAjuste").ToString - TxtPoliza.Text = Dr("NumPoliza").ToString + DdlTipoComprobanteAjuste.SelectedValueExist(Dr("TipoComprobante").ToString()) + TxtComprobante.Text = Dr("Comprobante").ToString TxtImporteAjuste.Text = Dr("Importe").ToString DdlFacturas.SelectedValueExist(Dr("CveVenta").ToString) - CargaPSAjuste() - DdlPSAjuste.SelectedValue = (Dr("CvePS").ToString) + + If TxtDescuento.Text.ToDecimal() > 0 AndAlso Dr("Importe").ToString.ToDecimal() > 0 Then + + Dim DescuentoSinAjuste As Decimal = TxtDescuento.Text.ToDecimal - Dr("Importe").ToString.ToDecimal + + If DescuentoSinAjuste <= 0 Then + TxtDescuento.Text = "0" + Else + TxtDescuento.Text = DescuentoSinAjuste.FormatoNumero(2) + End If + + End If + TxtFechaAjuste.Text = Dr("FechaAjuste").ToString.ToDate.ToShortDateString TxtPrecio.Text = Dr("PUFactura").ToString.ToDecimal.FormatoNumero(2) - TxtPrecio.Enabled = Not Dr("CveVenta").ToString.ToEntero > 0 + 'TxtPrecio.Enabled = Dr("CveVenta").ToString.ToEntero > 0 + DdlBCIAjuste.SelectedValueExist(Dr("CveBCIAjuste").ToString()) + TxtEtiqueta.Text = Dr("Etiqueta").ToString + DdlModeloAuto.SelectedValueExist(Dr("CveModeloAuto").ToString()) + TxtAnioVehiculo.Text = Dr("Año").ToString End If End Sub 'Protected Sub BtnCalculaMesesUso_Click(sender As Object, e As EventArgs) @@ -6188,7 +6356,7 @@ Partial Class PV TxtMesesUso.Text = MesesTrascurridos.ToString Catch ex As Exception - OnError("Ocurrió un error al calcular los meses de uso", ex) + OnError("Ocurrió un Error al calcular los meses de uso", ex) End Try Return True @@ -6342,7 +6510,7 @@ Partial Class PV End If End If - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}") + Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} And CveTamaño = {CveTamaño}") If DrCargo IsNot Nothing Then CargoVendido = DrCargo("Cargo").ToString.ToDecimal @@ -6395,6 +6563,7 @@ Partial Class PV Row("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero Row("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero Row("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero + Row("CodigoTD") = TxtCodigoTD.Text Row("CodigoEnsamble") = TxtCodEnsamble.Text Row("CodigoLinea") = TxtCodLinea.Text Row("CodigoInspeccion") = TxtCodInspeccion.Text @@ -6402,7 +6571,8 @@ Partial Class PV Row("FechaAjuste") = TxtFechaAjuste.Text.ToDate Row("Meses") = TxtMesesUso.Text.ToEntero Row("PorcentajeAjuste") = TxtPorcentajeAjuste.Text.ToDouble - Row("NumPoliza") = TxtPoliza.Text + Row("TipoComprobante") = DdlTipoComprobanteAjuste.SelectedValue.ToEntero() + Row("Comprobante") = TxtComprobante.Text Row("Importe") = TxtImporteAjuste.Text.ToDouble Row("ConsecutivoVenta") = ConsecutivoVenta Row("CvePS") = DdlPSAjuste.SelectedValue @@ -6420,11 +6590,17 @@ Partial Class PV End If Row("CveUM") = CveUM Row("CveVentaDetalle") = -1 + Row("CveBCIAjuste") = DdlBCIAjuste.SelectedValue.ToEntero() + Row("Etiqueta") = TxtEtiqueta.Text.TrimStart.TrimEnd + Row("CveClienteDistribuidor") = DdlDistribuidor.SelectedValue.ToEntero() + Row("CveModeloAuto") = DdlModeloAuto.SelectedValue.ToEntero() + Row("Año") = TxtAnioVehiculo.Text.TrimStart.TrimEnd TmpDTAjustes.Rows.Add(Row) ElseIf ModalidadAjuste = "U" Then TmpDTAjustes.Rows(IndexAjuste)("CveFolioGarantia") = DdlFolioGarantia.SelectedValue.ToEntero TmpDTAjustes.Rows(IndexAjuste)("CveTipoUso") = DdlTipoUso.SelectedValue.ToEntero TmpDTAjustes.Rows(IndexAjuste)("CveTipoDefecto") = DdlTipoDefecto.SelectedValue.ToEntero + TmpDTAjustes.Rows(IndexAjuste)("CodigoTD") = TxtCodigoTD.Text TmpDTAjustes.Rows(IndexAjuste)("CodigoEnsamble") = TxtCodEnsamble.Text TmpDTAjustes.Rows(IndexAjuste)("CodigoLinea") = TxtCodLinea.Text TmpDTAjustes.Rows(IndexAjuste)("CodigoInspeccion") = TxtCodInspeccion.Text @@ -6432,7 +6608,8 @@ Partial Class PV TmpDTAjustes.Rows(IndexAjuste)("FechaAjuste") = TxtFechaAjuste.Text.ToDate TmpDTAjustes.Rows(IndexAjuste)("Meses") = TxtMesesUso.Text.ToDouble TmpDTAjustes.Rows(IndexAjuste)("PorcentajeAjuste") = TxtPorcentajeAjuste.Text.ToDecimal - TmpDTAjustes.Rows(IndexAjuste)("NumPoliza") = TxtPoliza.Text.ToDouble + TmpDTAjustes.Rows(IndexAjuste)("TipoComprobante") = DdlTipoComprobanteAjuste.SelectedValue.ToEntero() + TmpDTAjustes.Rows(IndexAjuste)("Comprobante") = TxtComprobante.Text.ToDouble TmpDTAjustes.Rows(IndexAjuste)("Importe") = TxtImporteAjuste.Text.ToDouble TmpDTAjustes.Rows(IndexAjuste)("ConsecutivoVenta") = ConsecutivoVenta TmpDTAjustes.Rows(IndexAjuste)("CvePS") = DdlPSAjuste.SelectedValue @@ -6440,6 +6617,11 @@ Partial Class PV TmpDTAjustes.Rows(IndexAjuste)("CveVenta") = DdlFacturas.SelectedValue TmpDTAjustes.Rows(IndexAjuste)("PUFactura") = TxtPrecio.Text.ToDouble TmpDTAjustes.Rows(IndexAjuste)("Cantidad") = 1 + TmpDTAjustes.Rows(IndexAjuste)("CveBCIAjuste") = DdlBCIAjuste.SelectedValue.ToEntero() + TmpDTAjustes.Rows(IndexAjuste)("Etiqueta") = TxtEtiqueta.Text.TrimStart.TrimEnd + TmpDTAjustes.Rows(IndexAjuste)("CveClienteDistribuidor") = DdlDistribuidor.SelectedValue.ToEntero() + TmpDTAjustes.Rows(IndexAjuste)("CveModeloAuto") = DdlModeloAuto.SelectedValue.ToEntero() + TmpDTAjustes.Rows(IndexAjuste)("Año") = TxtAnioVehiculo.Text.TrimStart.TrimEnd Dim CveUM As Integer = -1 If DdlPSAjuste.SelectedValue.ToEntero > 0 Then Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows(0) @@ -7028,11 +7210,19 @@ Partial Class PV If (DdlDistribuidor.SelectedValue.ToEntero > 0) Then Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", DdlDistribuidor.SelectedValue.ToEntero)) - Dim Ciudad As String = DatosClienteSeleccionado.Item("Ciudad").ToString - Dim Estado As String = DatosClienteSeleccionado.Item("Estado").ToString - params.Add(New ReportParameter("NombreDistribuidor", DdlDistribuidor.SelectedText)) - params.Add(New ReportParameter("CiudadEstado", String.Format("{0}, {1}", Ciudad.Trim, Estado))) - params.Add(New ReportParameter("TelCliente", DatosClienteSeleccionado.Item("Telefono").ToString)) + Dim CiudadEstado As String = "" + Dim Telefono As String = "" + Dim Nombre As String = "" + + If DatosClienteSeleccionado IsNot Nothing Then + CiudadEstado = String.Format("{0}, {1}", DatosClienteSeleccionado("Ciudad"), DatosClienteSeleccionado("Estado")) + Telefono = DatosClienteSeleccionado("Telefono").ToString + Nombre = DatosClienteSeleccionado("Nombre").ToString + End If + + params.Add(New ReportParameter("NombreDistribuidor", Nombre)) + params.Add(New ReportParameter("CiudadEstado", CiudadEstado)) + params.Add(New ReportParameter("TelCliente", Telefono)) End If params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) @@ -7052,14 +7242,26 @@ Partial Class PV params.Add(New ReportParameter("CodInspeccion", TxtCodInspeccion.Text.Trim)) params.Add(New ReportParameter("Tipo", DdlBCIAjuste.SelectedItem.Text)) params.Add(New ReportParameter("Marca", MarcaPS)) + params.Add(New ReportParameter("Etiqueta", TxtEtiqueta.Text)) 'Informacion Vehiculo params.Add(New ReportParameter("MarcaAuto", If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Marca", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), ""))) params.Add(New ReportParameter("TipoAuto", If(DdlPS.SelectedValue.ToEntero > 0, DtModelosAuto.FiltroPrimeroValor("Modelo", $"CveModeloAuto ={DdlModeloAuto.SelectedValue}"), ""))) 'Informacion Consumidor - params.Add(New ReportParameter("NombreCliente", LtlCliente.Text)) - params.Add(New ReportParameter("Direccion", LblDireccion.Text)) + 'Informacion Distribuidor + If (CveCliente > 0) Then + + Dim DatosClienteSeleccionado As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", DdlDistribuidor.SelectedValue.ToEntero)) + Dim Ciudad As String = DatosClienteSeleccionado.Item("Ciudad").ToString + Dim Estado As String = DatosClienteSeleccionado.Item("Estado").ToString + + params.Add(New ReportParameter("NombreCliente", LtlCliente.Text)) + params.Add(New ReportParameter("Direccion", LblDireccion.Text)) + params.Add(New ReportParameter("CiudadEstadoConsumidor", String.Format("{0}, {1}", Ciudad.Trim, Estado))) + params.Add(New ReportParameter("TelConsumidor", DatosClienteSeleccionado.Item("Telefono").ToString)) + + End If If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", logouri)) @@ -7067,6 +7269,10 @@ Partial Class PV params.Add(New ReportParameter("LogoPath", "")) End If + params.Add(New ReportParameter("Anio", TxtAnioVehiculo.Text)) + params.Add(New ReportParameter("Comprobante", TxtComprobante.Text)) + + ImprimirPDF("Empresas/Grales/Formatos/Ajuste.rdlc", DtDatos, params, "Reporte de Ajuste", "PDF") End Sub diff --git a/Ventas/RepVentas.aspx b/Ventas/RepVentas.aspx index 699b91e4a..10ce64ea8 100644 --- a/Ventas/RepVentas.aspx +++ b/Ventas/RepVentas.aspx @@ -1,122 +1,126 @@ -<%@ Page Title="Reporte de Ventas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepVentas.aspx.vb" Inherits="Ventas_RepVentas" %> - - - - - - - - - - - -
  • - PDF -
  • - -
  • - Excel -
  • - - - -
  • - Personalizar -
  • -
    -
    -
  • - Generar Reporte HP -
  • -
  • - Ver Dlls en pesos -
  • - - -
  • - Ver Grafica -
  • -
    -
    -
    - - Reporte de Ventas - - - - - - - -
    -
    -
    - - -
    -
    -
    - -
    - - - - - - - - - - +<%@ Page Title="Reporte de Ventas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepVentas.aspx.vb" Inherits="Ventas_RepVentas" %> + + + + + + + + + + + +
  • + PDF +
  • + +
  • + Excel +
  • + + + +
  • + Personalizar +
  • +
    +
    + + +
  • + Generar Reporte HP +
  • +
    +
    +
  • + Ver Dlls en pesos +
  • + + +
  • + Ver Grafica +
  • +
    +
    +
    + + Reporte de Ventas + + + + + + + +
    +
    +
    + + +
    +
    +
    + +
    + + + + + + + + + + <%-- @@ -126,45 +130,47 @@ - --%> -
    -
    + --%> +
    +
    Fecha Inicio: -
    -
    -
    - - - - -
    - - - - - - -
    -
    + +
    +
    +
    + + + + +
    + + + + + + +
    +
    Fecha Fin: -
    -
    -
    - - - - -
    - - - - - - -
    - -
    - + +
    +
    +
    + + + + +
    + + + + + + +
    + +
    + <%-- @@ -183,365 +189,444 @@ - --%> - -
    -
    -
    -
    - +
    + -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
    +
    +
    + + + + + + + + + + + + + + + + + - + + diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index affcda2f5..40f0622e7 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -659,27 +659,6 @@ Partial Class Ventas_RepVentas Protected Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click GenerarPDF() - End Sub - - Private Sub LnkRepHP_Click(sender As Object, e As EventArgs) Handles LnkRepHP.Click - - Dim Rep As New ClsVentas - Dim Str As New StringBuilder - Str.AppendLine("Header Section,,,,,,,,,,,End Customer Identification ,,,,,,,,,,,,, Ship To Identification,,,,,,,,,,,,, Sold To Identification,,,,,,,,,,,,, Bill To Identification,,,,,,,,,,,,, Salesperson Detail,,,,,, Line Item Detail,,,,,,,,,,,,,,,,,,,,,,,,,,,, New FIELDS,,,,,,,,,,,,,,,,,,,,,,,,,, ") - Str.AppendLine("Partner Purchase Price Currency Code, Exchange Rate, Reporter_id, Reported Partner Type, Reporter Company Name , Sell From Address line 1, Sell From Address line 2, Sell From City, Reported Partner State/Province, Sell from postal code, Sell from Country code,End User Customer Name,End User Company Tax ID,End User Address Line 1,End User Address Line 2,End User City,End User State/Province Code,End User Postal Code,End User Country Code,End User ID,End Customer Department,End Customer Contact Name,End Customer Contact Phone,End Customer County, Ship To Customer Name, Ship To Company Tax ID, Ship To Address Line 1, Ship To Address Line 2, Ship To City, Ship To State/Province Code, Ship To Postal Code, Ship To Country Code, Ship To Customer ID, Ship To Department, Ship To Contact Name, Ship To Contact Phone, Ship To County, Sold To Customer Name, Sold To Company Tax ID, Sold To Address Line 1, Sold To Address Line 2, Sold To City, Sold To State/Province Code, Sold To Postal Code, Sold To Country Code, Sold To Customer ID, Sold To Department, Sold To Contact Name, Sold To Contact Phone, Sold To County, Bill To Customer Name, Bill To Company Tax ID, Bill To Address Line 1 , Bill To Address Line 2, Bill To City, Bill To State/Province Code, Bill To Postal Code, Bill To Country Code, Bill To Customer ID, Bill To Agreement Number, Bill To Contact Name, Bill To Contact Phone, Bill To County, HP Representative Name, HP Sales Rep Email, Salesperson2 Name, Salesperson2 Unique Employee ID, Salesperson's Manager's Name,Salesperson's Manager Unique Employee ID,Quantity Qualifier,Product Quantity Shipped/Sold,Line Item ID,Partner Reported Product ID,Product Description,Date Type Qualifier,Channel Partner to Customer Transaction Date,Reseller’’s Product Number,Partner Purchase Price,Extended Price,Partner Sell Price,Extended Resale Price,Transaction Type,Rebate Tracking #,Partner Requested Rebate Amount,Extended Rebate Amount,Debit Number,Channel Partner to Customer Invoice ID,Reference Number,Customer to Channel Partner Purchase Order ID,Deal ID #1,Deal ID #2,Deal ID #3,Deal ID #4,Deal ID #5,Deal ID #6,Marketing Subprogram Code,Product Serial ID assigned by HP,Purchasing Source wholesaler indicator,Drop Ship Flag,Distributor's Invoice Number,Partner Internal transaction ID,Partner Comment,Deal Bundle ID #1,Deal Bundle ID #2,Deal Bundle ID #3,Deal Bundle ID #4,Deal Bundle ID #5,Deal Bundle ID #6,NMSO NAME,Sales Type,Purchase Agreement,Product Origin,Partner Reported CBN#,Partner Reference,Supplies Tracking ID (QR Code),Sell From Location ID (assigned by HP or Partner-assigned),Sell from name,Comment Deal ID #1,Comment Deal ID #2,Comment Deal ID #3,Comment Deal ID #4,Comment Deal ID #5,Comment Deal ID #6,Partner Sell Price Currency Code") - If Rep.GetReporteHP(72, Now.AddMonths(-1).FirstDayOfMonth, Now.AddMonths(-1).LastDayOfMonth) Then - For Each dr As DataRow In Rep.DtResultados.Rows - Str.AppendLine($"MXN,,AM30089,,""COMPUPROVEEDORES, S.A.DE C.V."",,,,,,,,,,,,,,,,,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Cantidad")},,{dr("Codigo")},,,{dr("Fecha")},,,,{dr("PU")},,,,,,,{dr("SerieFolio")},,,,,,,,,,{dr("Serie")},,,,,,,,,,,,,,,{dr("Proveedor")},,,,,,,,,,,,MXN") - Next - End If - - Rep.Dispose() - 'GenerarPDF una salida - Response.Clear() - Response.ContentType = "text/csv" - Response.AppendHeader("Content-Disposition", "attachment; filename=ReporteHP.csv") - Response.Write(Str.ToString) - Context.Response.End() End Sub #End Region @@ -860,5 +839,58 @@ Partial Class Ventas_RepVentas #End Region + Private Sub LnkRepHP_Click(sender As Object, e As EventArgs) Handles LnkRepHP.Click + CalcularIntervaloRepHP() + RegistraScript("$('#DivRepHP').modal('show');") + End Sub + Protected Sub RblIntervaloHP_SelectedIndexChanged(sender As Object, e As EventArgs) + CalcularIntervaloRepHP() + End Sub + + Private Sub CalcularIntervaloRepHP() + Dim PrevMondayDate = DateTime.Today.AddDays(-Weekday(Today.AddDays(-1), Microsoft.VisualBasic.FirstDayOfWeek.Monday)) + Dim Sunday As DateTime = PrevMondayDate.AddDays(6) + + txtFechaIHP.Text = PrevMondayDate.ToString("dd/MM/yyyy") + txtFechaFHP.Text = Sunday.ToString("dd/MM/yyyy") + 'Select Case RblIntervaloHP.SelectedValue + ' Case "1" ' SEMANAL + ' Dim PrevMondayDate = DateTime.Today.AddDays(-Weekday(Today.AddDays(-1), Microsoft.VisualBasic.FirstDayOfWeek.Monday)) + ' Dim Sunday As DateTime = PrevMondayDate.AddDays(6) + + ' txtFechaIHP.Text = PrevMondayDate.ToString("dd/MM/yyyy") + ' txtFechaFHP.Text = Sunday.ToString("dd/MM/yyyy") + ' Case "2" ' MENSUAL + ' Dim FechaRef As DateTime = Now + ' Dim LastDayOfMonth = DateTime.DaysInMonth(FechaRef.Year, FechaRef.Month) + + ' txtFechaIHP.Text = $"01/{FechaRef.Month}/{FechaRef.Year}" + ' txtFechaFHP.Text = $"{LastDayOfMonth}/{FechaRef.Month}/{FechaRef.Year}" + 'End Select + UpHP.Update() + End Sub + + Protected Sub BtnGenerarRepHP_Click(sender As Object, e As EventArgs) + Dim FechaI As DateTime = txtFechaIHP.Text.ToDate() + Dim FechaF As DateTime = txtFechaFHP.Text.ToDate() + + Dim Rep As New ClsVentas + Dim Str As New StringBuilder + Str.AppendLine("Header Section,,,,,,,,,,,End Customer Identification ,,,,,,,,,,,,, Ship To Identification,,,,,,,,,,,,, Sold To Identification,,,,,,,,,,,,, Bill To Identification,,,,,,,,,,,,, Salesperson Detail,,,,,, Line Item Detail,,,,,,,,,,,,,,,,,,,,,,,,,,,, New FIELDS,,,,,,,,,,,,,,,,,,,,,,,,,, ") + Str.AppendLine("Partner Purchase Price Currency Code, Exchange Rate, Reporter_id, Reported Partner Type, Reporter Company Name , Sell From Address line 1, Sell From Address line 2, Sell From City, Reported Partner State/Province, Sell from postal code, Sell from Country code,End User Customer Name,End User Company Tax ID,End User Address Line 1,End User Address Line 2,End User City,End User State/Province Code,End User Postal Code,End User Country Code,End User ID,End Customer Department,End Customer Contact Name,End Customer Contact Phone,End Customer County, Ship To Customer Name, Ship To Company Tax ID, Ship To Address Line 1, Ship To Address Line 2, Ship To City, Ship To State/Province Code, Ship To Postal Code, Ship To Country Code, Ship To Customer ID, Ship To Department, Ship To Contact Name, Ship To Contact Phone, Ship To County, Sold To Customer Name, Sold To Company Tax ID, Sold To Address Line 1, Sold To Address Line 2, Sold To City, Sold To State/Province Code, Sold To Postal Code, Sold To Country Code, Sold To Customer ID, Sold To Department, Sold To Contact Name, Sold To Contact Phone, Sold To County, Bill To Customer Name, Bill To Company Tax ID, Bill To Address Line 1 , Bill To Address Line 2, Bill To City, Bill To State/Province Code, Bill To Postal Code, Bill To Country Code, Bill To Customer ID, Bill To Agreement Number, Bill To Contact Name, Bill To Contact Phone, Bill To County, HP Representative Name, HP Sales Rep Email, Salesperson2 Name, Salesperson2 Unique Employee ID, Salesperson's Manager's Name,Salesperson's Manager Unique Employee ID,Quantity Qualifier,Product Quantity Shipped/Sold,Line Item ID,Partner Reported Product ID,Product Description,Date Type Qualifier,Channel Partner to Customer Transaction Date,Reseller’’s Product Number,Partner Purchase Price,Extended Price,Partner Sell Price,Extended Resale Price,Transaction Type,Rebate Tracking #,Partner Requested Rebate Amount,Extended Rebate Amount,Debit Number,Channel Partner to Customer Invoice ID,Reference Number,Customer to Channel Partner Purchase Order ID,Deal ID #1,Deal ID #2,Deal ID #3,Deal ID #4,Deal ID #5,Deal ID #6,Marketing Subprogram Code,Product Serial ID assigned by HP,Purchasing Source wholesaler indicator,Drop Ship Flag,Distributor's Invoice Number,Partner Internal transaction ID,Partner Comment,Deal Bundle ID #1,Deal Bundle ID #2,Deal Bundle ID #3,Deal Bundle ID #4,Deal Bundle ID #5,Deal Bundle ID #6,NMSO NAME,Sales Type,Purchase Agreement,Product Origin,Partner Reported CBN#,Partner Reference,Supplies Tracking ID (QR Code),Sell From Location ID (assigned by HP or Partner-assigned),Sell from name,Comment Deal ID #1,Comment Deal ID #2,Comment Deal ID #3,Comment Deal ID #4,Comment Deal ID #5,Comment Deal ID #6,Partner Sell Price Currency Code") + If Rep.GetReporteHP(UsuarioActual.CveEmpresa, FechaI, FechaF) Then + For Each dr As DataRow In Rep.DtResultados.Rows + Str.AppendLine($"MXN,,AM30089,,""COMPUPROVEEDORES, S.A.DE C.V."",,,,,,,,,,,,,,,,,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,{dr("Nombre")},{dr("RFC")},{dr("Direccion")},,{dr("Ciudad")},{dr("Estado")},{dr("CP")},MX,{dr("RFC")},,,,,,,,,,,,,,,,,,,,,,,,,{dr("Cantidad")},,{dr("Codigo")},,,{dr("Fecha")},,,,{dr("PU")},,,,,,,{dr("SerieFolio")},,,,,,,,,,{dr("Serie")},,,,,,,,,,,,,,,{dr("Proveedor")},,,,,,,,,,,,MXN") + Next + End If + + Rep.Dispose() + 'GenerarPDF una salida + Response.Clear() + Response.ContentType = "text/csv" + Response.AppendHeader("Content-Disposition", $"attachment; filename=ReporteHP_{FechaI.ToString("dd_MM_yyyy")} a {FechaF.ToString("dd_MM_yyyy")}.csv") + Response.Write(Str.ToString) + Context.Response.End() + End Sub End Class diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index fb94fa794..3429f0068 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6291,8 +6291,22 @@ Partial Class Ventas If ObjVentasAplciar.DtResultados.Rows.Count > 0 Then If tCveSucursalCliente > 0 Then - Retorno = ObjVentasAplciar.DtResultados(0)("LimiteRestanteSucursal").ToString().ToDecimal - PorcentajeCredito = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoSucursal").ToString().ToDecimal + + Dim LimiteRestanteSucursal As Decimal = ObjVentasAplciar.DtResultados(0)("LimiteRestanteSucursal").ToString().ToDecimal + Dim PorcentajeSaldoSucursal As Decimal = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoSucursal").ToString().ToDecimal + + Dim LimiteRestanteCliente As Decimal = ObjVentasAplciar.DtResultados(0)("LimiteRestanteCliente").ToString().ToDecimal + Dim PorcentajeSaldoCliente As Decimal = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoCliente").ToString().ToDecimal + + 'SI EL LIMITE DE LA SUCURSAL ES MAYOR AL DEL CLIENTE DEBE LIMITAR AL DEL CLIENTE + If LimiteRestanteSucursal > LimiteRestanteCliente Then + Retorno = LimiteRestanteCliente + PorcentajeCredito = PorcentajeSaldoCliente + ElseIf LimiteRestanteSucursal < LimiteRestanteCliente Then + Retorno = LimiteRestanteSucursal + PorcentajeCredito = PorcentajeSaldoSucursal + End If + Else Retorno = ObjVentasAplciar.DtResultados(0)("LimiteRestanteCliente").ToString().ToDecimal PorcentajeCredito = ObjVentasAplciar.DtResultados(0)("PorcentajeSaldoCliente").ToString().ToDecimal @@ -14402,7 +14416,7 @@ Partial Class Ventas ' Alert("El importe registrado como descuento no coincide con el importe seleccionado de anticipo.", TipoMensaje.MsgAdvertencia) ' Exit Sub 'End If - Dim TotalCalculableImpuestos As Decimal = 0 + Dim TotalCalculableImpuestos As Decimal = 0, TotalCalculableImpuestosIVA As Decimal = 0 Dim TotalDescuentosRound As Decimal = 0 Dim Cantidad, PU, Descuento, DescuentoRound As Decimal @@ -14416,14 +14430,19 @@ Partial Class Ventas TotalDescuentosRound += DescuentoRound TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento + TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + dr("PorcentajeIEPS").ToString().ToDecimal) + dr("Descuento") = DescuentoRound - dr("TotalImporte") = Math.Round(Cantidad * PU, NumeroDecimales) - dr("ImporteIVA") = Math.Round(dr("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales) - dr("ImporteIEPS") = Math.Round(dr("PorcentajeIEPS").ToString().ToDecimal * TotalCalculableImpuestos, NumeroDecimales) - dr("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales) - dr("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales) + + dr("Total") = (Cantidad * PU) + dr("TotalImporte") = (Cantidad * PU).RoundSQL + dr("ImporteIVA") = (dr("PorcentajeIVA").ToString().ToDecimal * TotalCalculableImpuestosIVA).RoundSQL(NumeroDecimales) + dr("ImporteIEPS") = (dr("PorcentajeIEPS").ToString().ToDecimal * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) + dr("ImporteRetIVA") = (ClienteRetIVA * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) + dr("ImporteRetISR") = (ClienteRetISR * TotalCalculableImpuestos).RoundSQL(NumeroDecimales) dr("PorcentajeRetIVA") = ClienteRetIVA dr("PorcentajeRetISR") = ClienteRetISR + Next 'REVISA SI EXISTEN DIFERENCIAS ENTRE EL DESCUENTO Y LO AMORTIZADO PARA REALIZAR UN AJUSTE EN EL ULTIMO CONCEPTO AGREGADO @@ -15685,11 +15704,10 @@ Partial Class Ventas End If - If DdlTipoComprobante.SelectedValue.Contiene("Rem") Then - ' IPP 15 Julio 2017 - ERA FALSE - ImgAntiPend.Visible = False - ElseIf Opcion <> "Op" Then + If DdlTipoComprobante.SelectedValue.Contiene("Ing") Then ImgAntiPend.Visible = True + Else + ImgAntiPend.Visible = False End If @@ -15709,6 +15727,10 @@ Partial Class Ventas TrVistaPrevia.Visible = EstatusCliente End If + If DdlTipoComprobante.SelectedValue = "Ing" Then + ImgAntiPend.Visible = True + End If + MostrarOpcioensPaqueteria() TrAtencionA.Visible = True @@ -15724,9 +15746,7 @@ Partial Class Ventas End Sub Protected Sub DdlSucursalCliente_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSucursalCliente.SelectedIndexChanged CargaClienteSucursal(DdlSucursalCliente.SelectedValue.ToEntero()) - 'If Me.CveVenta > 0 Then - ' CargaRestriccionesCreditoCliente(Alertas:=True) - 'End If + CargaRestriccionesCreditoCliente(Alertas:=True, CveVenta:=Me.CveVenta) End Sub Protected Sub DdlCCEdit_SelectedIndexChanged(sender As Object, e As System.EventArgs) Dim gvr As GridViewRow = DirectCast(DirectCast(sender, DropDownList).BindingContainer, GridViewRow) @@ -27838,6 +27858,8 @@ Partial Class Ventas ' BtnCrearApartirDe.Visible = False 'End If + HdnCveVenta.Value = "" + BtnCrearApartirDe.Visible = False '[IPP-2Novimebre2018] REEMPLAZA LO COMENTADO ARRIBA EsCreaApartirDe = True ModalidadEdicion = True @@ -27885,6 +27907,7 @@ Partial Class Ventas 'Cuando es cotización, Genera nueva cotizacion If DdlTipoComprobante.SelectedValue = "Cot" Then BtnEmitirImprimir.Text = "Cotizar" + ImgAntiPend.Visible = False 'TdReferencia.Style.Add("display", "none") End If @@ -28015,6 +28038,8 @@ Partial Class Ventas GvFacturasRelacionadas.Columns(2).Visible = True + CalculaTotalesVenta() + UpnTools.Update() UpCliente.Update() UpParametros.Update() diff --git a/asmx/WsTSoft.asmx b/asmx/WsTSoft.asmx index 3288b8237..ba1f49cd0 100644 --- a/asmx/WsTSoft.asmx +++ b/asmx/WsTSoft.asmx @@ -21,22 +21,35 @@ Public Class WsTSoft Public Function AddRemision(FolioRemision As String, NoEconomico As String, CveEstatus As Integer, GeoInicial As String, GeoCarga As String, GeoEntrega As String, Fecha As String) As String Dim retorno As String = "" + Dim Continuar As Boolean = False + Dim objTsoft As New ClsTSoft - objTsoft.IniciaTransacSQL() - Dim Continuar As Boolean = objTsoft.AddRemisiones(FolioRemision, NoEconomico, CveEstatus, GeoInicial, GeoCarga, GeoEntrega, Fecha) - Dim objRem As New addRemisionObj - If Continuar Then - objTsoft.Commit() - objRem.CveRemision = objTsoft.DtResultados.Rows(0)("CveRemision").ToString().ToEntero() - objRem.CurrentError = "" - Else - objTsoft.RollBack() - objRem.CveRemision = 0 - objRem.CurrentError = objTsoft.MyCurrentError - End If + objTsoft.IniciaTransacSQL() + Try + Continuar = objTsoft.AddRemisiones(FolioRemision, NoEconomico, CveEstatus, GeoInicial, GeoCarga, GeoEntrega, Fecha) + + Dim objRem As New addRemisionObj + If Continuar Then + objRem.CveRemision = objTsoft.DtResultados.Rows(0)("CveRemision").ToString().ToEntero() + objRem.CurrentError = "" + Else + objRem.CveRemision = 0 + objRem.CurrentError = objTsoft.MyCurrentError + End If + + retorno = JsonConvert.SerializeObject(objRem) + objRem = Nothing + Catch ex As Exception + Continuar = False + Finally + If Continuar Then + objTsoft.Commit() + Else + objTsoft.RollBack() + End If + End Try objTsoft.Dispose() - retorno = JsonConvert.SerializeObject(objRem) - objRem = Nothing + Return retorno End Function @@ -69,22 +82,29 @@ Public Class WsTSoft DtPosicion = ObjGPS.DtResultados.Copy() Continuar = True End If - End Using - - Dim ObjPos As New LatLng - - If Continuar AndAlso DtPosicion IsNot Nothing Then - 'CONSULTA DIRECCIONES - Try + End Using + + Dim ObjPos As New LatLng + + Try + + If Continuar AndAlso DtPosicion IsNot Nothing Then + 'CONSULTA DIRECCIONES + If DtPosicion IsNot Nothing AndAlso DtPosicion.Rows.Count > 0 Then + Try - Dim Direcciones As JArray = ConsultarDirecciones(DtPosicion, "Lat", "Lng") + Dim Direcciones As JArray = ConsultarDirecciones(DtPosicion, "Lat", "Lng") - If Direcciones IsNot Nothing Then - For Each Dir As JObject In Direcciones - DtPosicion.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString() - Next - End If + If Direcciones IsNot Nothing Then + For Each Dir As JObject In Direcciones + DtPosicion.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString() + Next + End If + Catch ex As Exception + ObjPos.CurrentError = "No se pudo obtener la posición." + OnError("Ocurrió un error al asignar las direcciones", ex) + End Try Dim RowPosicion As DataRow = DtPosicion.Rows("0") @@ -96,20 +116,20 @@ Public Class WsTSoft ObjPos.CurrentError = "No se encontraron resultados." End If - Catch ex As Exception + Else ObjPos.CurrentError = "No se pudo obtener la posición." - OnError("Ocurrió un error al asignar las direcciones", ex) - End Try - Else - ObjPos.CurrentError = "No se pudo obtener la posición." - End If + End If - If DtPosicion IsNot Nothing Then - DtPosicion.Dispose() - DtPosicion = Nothing - End If + If DtPosicion IsNot Nothing Then + DtPosicion.Dispose() + DtPosicion = Nothing + End If + + retorno = JsonConvert.SerializeObject(ObjPos) + Catch ex As Exception + OnError("Ocurrió un error al obtener los datos", ex) + End Try - retorno = JsonConvert.SerializeObject(ObjPos) ObjPos = Nothing Return retorno End Function @@ -135,36 +155,43 @@ Public Class WsTSoft Public Function GetRemisionHistorial(FolioRemision As String, NoEconomico As String) As String Dim retorno As String = "" - Dim objTsoft As New ClsTSoft - Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico) - Dim objRem As New GetRemisionHistorialesObj - If Continuar Then - Try + Dim objTsoft As New ClsTSoft + Try + Dim Continuar As Boolean = objTsoft.GETRemisionesHistorial(FolioRemision, NoEconomico) + Dim objRem As New GetRemisionHistorialesObj + If Continuar Then Dim Dt = objTsoft.DtResultados.Copy() - Dt.Columns.Add("Direccion", GetType(String)) + Try + Dt.Columns.Add("Direccion", GetType(String)) - 'CONSULTA DIRECCIONES - Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon") - If Direcciones IsNot Nothing Then - For Each Dir As JObject In Direcciones - Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString() - Next - End If + 'CONSULTA DIRECCIONES + Dim Direcciones As JArray = ConsultarDirecciones(Dt, "Lat", "Lon") + If Direcciones IsNot Nothing Then + For Each Dir As JObject In Direcciones + Dt.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString() + Next + End If + + objRem.CurrentError = "" + Catch ex As Exception + objRem.CurrentError = "Ocurrió un error al asignar las direcciones" + OnError("Ocurrió un error al asignar las direcciones", ex) + End Try objRem.Historial = Dt.DataTableToObject(Of GetRemisionHistorialsObj) - objRem.CurrentError = "" - Catch ex As Exception - objRem.CurrentError = "Ocurrió un error al asignar las direcciones" - OnError("Ocurrió un error al asignar las direcciones", ex) - End Try - - Else - objRem.Historial = New List(Of GetRemisionHistorialsObj) - objRem.CurrentError = objTsoft.MyCurrentError - End If + Dt.Dispose() + Dt = Nothing + Else + objRem.Historial = New List(Of GetRemisionHistorialsObj) + objRem.CurrentError = objTsoft.MyCurrentError + End If + retorno = JsonConvert.SerializeObject(objRem) + objRem = Nothing + Catch ex As Exception + OnError("Ocurrió un error al obtener los datos", ex) + End Try objTsoft.Dispose() - retorno = JsonConvert.SerializeObject(objRem) - retorno = Nothing + Return retorno End Function @@ -172,27 +199,32 @@ Public Class WsTSoft Dim retorno As String = "[]" Dim objTsoft As New ClsTSoft - If objTsoft.GetInfoEventosPenske(FechaInicio.ToDateTime(), FechaFin.ToDateTime()) Then - If objTsoft.DtResultados.Rows.Count > 0 Then - Try - 'CONSULTA DIRECCIONES - Dim Direcciones As JArray = ConsultarDirecciones(objTsoft.DtResultados) - If Direcciones IsNot Nothing Then - For Each Dir As JObject In Direcciones - objTsoft.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString() - Next - End If - Catch ex As Exception - OnError("Ocurrió un error al asignar las direcciones", ex) - End Try + Try + If objTsoft.GetInfoEventosPenske(FechaInicio.ToDateTime(), FechaFin.ToDateTime()) Then + If objTsoft.DtResultados.Rows.Count > 0 Then + Try + 'CONSULTA DIRECCIONES + Dim Direcciones As JArray = ConsultarDirecciones(objTsoft.DtResultados) + If Direcciones IsNot Nothing Then + For Each Dir As JObject In Direcciones + objTsoft.DtResultados.Rows(Dir("Indice").ToEntero())("Direccion") = Dir("Direccion").ToString() + Next + End If + Catch ex As Exception + OnError("Ocurrió un error al asignar las direcciones", ex) + End Try - retorno = objTsoft.DtResultados.DataTableToJSONIPP() + retorno = objTsoft.DtResultados.DataTableToJSONIPP() + Else + retorno = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.Mensaje = "No se encontraron resultados"}) + End If Else - retorno = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.Mensaje = "No se encontraron resultados"}) + retorno = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.Mensaje = "Ocurrío un error al consultar los datos"}) End If - Else - retorno = Newtonsoft.Json.JsonConvert.SerializeObject(New With {.Mensaje = "Ocurrío un error al consultar los datos"}) - End If + Catch ex As Exception + retorno = "[]" + OnError("Ocurrió un error al obtener los datos", ex) + End Try objTsoft.Dispose() Return retorno @@ -202,17 +234,22 @@ Public Class WsTSoft Dim retorno As String = "" Dim Continuar As Boolean = False - Dim ObjTSoft As New ClsTSoft - Continuar = ObjTSoft.TieneRemisionesActivas(NoEconomico) - - Dim objRem As New MTieneRemisiones With - { - .TieneRemisiones = Continuar, - .CurrentError = ObjTSoft.MyCurrentError - } - ObjTSoft.Dispose() - retorno = JsonConvert.SerializeObject(objRem) - objRem = Nothing + Dim ObjTSoft As New ClsTSoft + Try + If ObjTSoft.TieneRemisionesActivas(NoEconomico) Then + Dim objRem As New MTieneRemisiones With + { + .TieneRemisiones = Continuar, + .CurrentError = ObjTSoft.MyCurrentError + } + retorno = JsonConvert.SerializeObject(objRem) + objRem = Nothing + End If + Catch ex As Exception + OnError("Ocurrió un error al obtener los datos", ex) + End Try + ObjTSoft.Dispose() + Return retorno End Function From 82f4a1538363aebc1901ee7e3e773cf87cd72f5a Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Wed, 24 Feb 2021 18:07:09 -0700 Subject: [PATCH 12/21] Cambio al rdlc correcto, cambio en algunos campos --- Empresas/119/Formatos/Polizas.rdlc | 753 ++++++++++++++++++++--------- 1 file changed, 511 insertions(+), 242 deletions(-) diff --git a/Empresas/119/Formatos/Polizas.rdlc b/Empresas/119/Formatos/Polizas.rdlc index 10714b4b2..080600e53 100644 --- a/Empresas/119/Formatos/Polizas.rdlc +++ b/Empresas/119/Formatos/Polizas.rdlc @@ -17,82 +17,86 @@ /* Local Query */ - - Id - System.Int32 - - - Fecha - System.DateTime - - - TipoPoliza - System.String - - - NombreCuenta - System.String - - - CodigoCuenta - System.String - - - Numero - System.Int32 - - - Folio - System.Int32 - - - Referencia - System.String - - - Concepto - System.String - - - ConceptoPoliza - System.String - - - Cargos - System.String - - - Abonos - System.String - - - SegNeg - System.String - - - Cargo - System.Decimal - - - Abono - System.Decimal - - - Codigo - System.String - - - NombreUsuario - System.String - + + Id + System.Int32 + + + Fecha + System.DateTime + + + TipoPoliza + System.String + + + NombreCuenta + System.String + + + CodigoCuenta + System.String + + + Numero + System.Int32 + + + Folio + System.Int32 + + + Referencia + System.String + + + Concepto + System.String + + + ConceptoPoliza + System.String + + + TipoMovto + System.Int32 + + + Cargos + System.String + + + Abonos + System.String + + + SegNeg + System.String + + + Cargo + System.Decimal + + + Abono + System.Decimal + + + Codigo + System.String + + + NombreUsuario + System.String + - SIG_Resp_2021_01_14DataSet2 - C:\Users\Hector\source\repos\WebApplication1\SIG_Resp_2021_01_14DataSet2.xsd - PA_Conta_PrePolizasImpresionGet - Fill - GetData - PA_Conta_PrePolizasImpresionGetTableAdapter + DataSet1 + C:\inetpub\wwwroot\ADSistemas\Ventas.root\Reportes\DataSet1.xsd + DataTable1 + + + @@ -104,22 +108,31 @@ - 2.5cm + 2.15421cm - 2.5cm + 2.15421cm - 8.64979cm + 2.15421cm - 2.15333cm + 2.15421cm - 2.15604cm + 2.15421cm - 1.89146cm + 2.15421cm + + + 2.15421cm + + + 2.15421cm + + + 2.15421cm @@ -228,6 +241,108 @@ + + + + true + true + + + + + + + + + + + + Textbox34 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox25 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox17 + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -271,7 +386,7 @@ - ="Folio: " & CStr(Fields!Numero.Value) + ="Folio: " & Fields!Numero.Value + + + =Fields!ConceptoPoliza.Value - - Textbox7 + Textbox103 + 2pt 2pt 2pt 2pt - 4 - true + 7 + + + @@ -495,8 +623,12 @@ 2pt + 4 + + + @@ -706,8 +838,12 @@ 1pt + 4 + + + @@ -751,7 +887,7 @@ - =Fields!Cargo.Value + = Fields!Cargo.Value + 4 + + + @@ -1077,7 +1217,7 @@ - =Fields!NombreUsuario.Value + =Fields!NombreUsuario.Value + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + + + + + true + true + + + + + + + + + + + 1pt + 1pt + 1pt + 1pt + + + + @@ -1252,6 +1488,175 @@ + + 2.26688cm + + + + + true + true + + + + + Usuario: + + + + + + + + + =Fields!NombreUsuario.Value + + + + + + + UsuarioRegistro1 + + + Bottom + 1pt + 1pt + 1pt + 1pt + + + 3 + + + + + + + + true + true + + + + + Revisado Por: + + + + + + + + + + + + + + + + Textbox41 + + + Bottom + 1pt + 1pt + 1pt + 1pt + + + 3 + + + + + + + + true + true + + + + + Autorizado Por: + + + + + + + + + + + + + + + + UsuarioRegistro + + + + + + Bottom + 1pt + 1pt + 1pt + 1pt + + + 3 + + + + + + @@ -1262,6 +1667,9 @@ + + + @@ -1276,8 +1684,8 @@ true - - =Fields!Id.Value + + =Fields!NombreUsuario.Value @@ -1306,6 +1714,9 @@ Before + + Before + @@ -1317,8 +1728,8 @@ true 0.05076cm - 3.18542cm - 19.85062cm + 5.4523cm + 19.38789cm @@ -1353,153 +1764,11 @@ 2pt - - true - true - - - - - Usuario: - - - - - - - - - - - - - =ReportItems!TxtUsuarioRegistro.Value - - - - - - - Textbox31 - 4.47958cm - 0.9cm - 6cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Revisado Por: - - - - - - - - - - - Textbox31 - 4.47958cm - 7.295cm - 0.9cm - 6cm - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Autorizado Por: - - - - - - - - - - - Textbox31 - 4.47958cm - 14.14166cm - 0.9cm - 5.70896cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - 5.82055cm - =Today + =Now() @@ -1772,7 +2042,6 @@ ReportParameter1 - REM Reset Page Number: Shared offset As Integer From 2081642479537529aca96fd54b79a6bfbf314070 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 25 Feb 2021 12:05:36 -0700 Subject: [PATCH 13/21] =?UTF-8?q?Cambio=20para=20llenar=20los=20a=C3=B1os?= =?UTF-8?q?=20sin=20usar=20la=20base=20de=20datos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Acumuladores/EntradasUsadosResumenRep.aspx.vb | 19 +++++++++++-------- App_Code/ClsAcumuladores.vb | 14 -------------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb index 4043c344f..8e389cde6 100644 --- a/Acumuladores/EntradasUsadosResumenRep.aspx.vb +++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb @@ -9,6 +9,7 @@ Partial Class Acumuladores_RepEntradasUsados Private DiasSemana(7) As String Private Meses(12) As String + Private Cargado As Integer = 0 Private Property DatosEntradasUsados() As DataTable Get @@ -25,8 +26,6 @@ Partial Class Acumuladores_RepEntradasUsados txtFechaF.Text = Today CargarDatos() CargarCombos() - - End If End Sub @@ -36,14 +35,18 @@ Partial Class Acumuladores_RepEntradasUsados End Sub Protected Sub CargarCombos() - Dim ObjAcum As New ClsAcumuladores Dim fecha As Date = Date.Now.AddMonths(-1) - ObjAcum.GetAñosVentas(UsuarioActual.CveEmpresa) - DdlAño.DataSource = ObjAcum.DtResultados - DdlAño.DataBind() - DdlAño.SelectedValue = fecha.Year.ToEntero - ObjAcum.Dispose() + Dim Años As New ListItem + Dim i As Integer + If Cargado = 0 Then + For i = Date.Now.Year.ToEntero To (fecha.Year.ToEntero - 5) Step -1 + Años = New ListItem(i, i) + DdlAño.Items.Add(Años) + Next + End If + Cargado = 1 + DdlAño.SelectedValue = fecha.Year.ToEntero DdlMes.SelectedValue = fecha.Month.ToEntero End Sub diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index be1ec4b01..940bf0817 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -1206,20 +1206,6 @@ Public Class ClsAcumuladores Return Retorno End Function - Public Function GetAñosVentas(CveEmprea As Integer) As Boolean - Dim Retorno As Boolean = False - SqlDataAdapter(String.Format("select top 6 year(Fecha) as Año from Ventas where CveEmpresa = {0} group by year(Fecha) Order by year(Fecha) desc", CveEmprea.ToString), CommandType.Text) - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError(String.Format("Ocurrió un error al consultar los año de venta"), ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - Return Retorno - - End Function - #Region " IDisposable Support " ' IDisposable From 21745c0736dd4aa0add33f4e128cf8415a835119 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 25 Feb 2021 12:42:38 -0700 Subject: [PATCH 14/21] Cambios en etiquetas y nombres --- Acumuladores/EntradasUsadosResumenRep.aspx | 2 +- Acumuladores/RepEntradasUsadosClientes.aspx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx b/Acumuladores/EntradasUsadosResumenRep.aspx index 9fe1ff8df..67f945d0f 100644 --- a/Acumuladores/EntradasUsadosResumenRep.aspx +++ b/Acumuladores/EntradasUsadosResumenRep.aspx @@ -14,7 +14,7 @@
  • - +
  • diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx b/Acumuladores/RepEntradasUsadosClientes.aspx index a2dd036e1..7b495acc8 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx +++ b/Acumuladores/RepEntradasUsadosClientes.aspx @@ -16,7 +16,7 @@
  • - +
  • @@ -39,7 +39,7 @@
    -
    Almacen:
    +
    Almacén:
    From dc25d760b935bd01413bf7700d5643c0bb302630 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 25 Feb 2021 12:44:18 -0700 Subject: [PATCH 15/21] Cambio en parametros de fecha incio y fecha fin --- Contabilidad/PolizasImpresion.aspx.vb | 4 ++-- Contabilidad2/PolizasImpresion.aspx.vb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Contabilidad/PolizasImpresion.aspx.vb b/Contabilidad/PolizasImpresion.aspx.vb index 7450186f7..d597518c4 100644 --- a/Contabilidad/PolizasImpresion.aspx.vb +++ b/Contabilidad/PolizasImpresion.aspx.vb @@ -49,8 +49,8 @@ Partial Class Contabilidad_PolizasImpresion Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString)) - params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString)) - params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString)) + params.Add(New ReportParameter("Finicio", TxtFechaInicio.Text)) + params.Add(New ReportParameter("FFin", TxtFechaFin.Text)) params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString)) 'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString)) 'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString)) diff --git a/Contabilidad2/PolizasImpresion.aspx.vb b/Contabilidad2/PolizasImpresion.aspx.vb index 992887fb8..7bd641e54 100644 --- a/Contabilidad2/PolizasImpresion.aspx.vb +++ b/Contabilidad2/PolizasImpresion.aspx.vb @@ -51,8 +51,8 @@ Partial Class Contabilidad2_PolizasImpresion Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString)) - params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString)) - params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString)) + params.Add(New ReportParameter("Finicio", TxtFechaInicio.Text)) + params.Add(New ReportParameter("FFin", TxtFechaFin.Text)) params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString)) 'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString)) 'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString)) From 4c67f16c360760b08b727e20301dbbd353f13160 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 25 Feb 2021 13:03:42 -0700 Subject: [PATCH 16/21] reportes nuevos --- Empresas/140/Formatos/RepEntradasUsados.rdlc | 1477 +++++++++++++++++ .../Formatos/RepEntradasUsadosClientes.rdlc | 674 ++++++++ 2 files changed, 2151 insertions(+) create mode 100644 Empresas/140/Formatos/RepEntradasUsados.rdlc create mode 100644 Empresas/140/Formatos/RepEntradasUsadosClientes.rdlc diff --git a/Empresas/140/Formatos/RepEntradasUsados.rdlc b/Empresas/140/Formatos/RepEntradasUsados.rdlc new file mode 100644 index 000000000..22e6dba92 --- /dev/null +++ b/Empresas/140/Formatos/RepEntradasUsados.rdlc @@ -0,0 +1,1477 @@ + + + + + + + + + 2.6528cm + + + 1.31753cm + + + 2.31753cm + + + 1.58961cm + + + 1.60315cm + + + 2.31753cm + + + 1.37304cm + + + 1.5767cm + + + 2.05295cm + + + 1.49732cm + + + 2.31753cm + + + + + 0.62959cm + + + + + true + true + + + + + Grupo + + + + + + + Textbox9 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Inicial + + + + + + + Textbox1 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Alm + + + + + + + Textbox29 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Pub + + + + + + + Textbox13 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Tras + + + + + + + Textbox27 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + E.Compras + + + + + + + Textbox15 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Otrs. + + + + + + + Textbox17 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + S.Alm + + + + + + + Textbox5 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + S.Trasp + + + + + + + Textbox8 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Otrs + + + + + + + Textbox11 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Exist Actual + + + + + + + Textbox41 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.58521cm + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + TipoAgrupador + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Almacen.Value + + + + + + + E_Almacen + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Paqueteria1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Traspaso.Value + + + + + + + E_Traspaso + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!E_Compra.Value + + + + + + + E_Compra + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!S_Almacen.Value + + + + + + + S_Almacen + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!S_Traspaso.Value + + + + + + + S_Traspaso + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Textbox16 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + 0 + + + + + + + Textbox42 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 0.95278cm + 0.08377cm + 1.2148cm + 20.61569cm + + + + + + true + true + + + + + Entradas + + + + + + + Textbox37 + 0.17639cm + 3.02491cm + 0.6cm + 10.33589cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Salidas + + + + + + + Textbox38 + 0.17639cm + 13.43136cm + 0.6cm + 7.2681cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.9799in + + + + + 8.2362in + + + 3.1764cm + true + true + + + Embedded + Logo + Fit + 0.09927in + 0.10752in + 0.99993in + 1.6045in + + + + + + true + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tarjeta de Almacén Del + + + + =Parameters!FechaInicial.Value + + + + Al + + + + =Parameters!FechaFinal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaConFormato.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Globals!PageNumber + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.727cm + true + true + + + 0.127cm + 0.01325cm + 0cm + 20.90669cm + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + + + + + + + Codigo + + + =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo_Clientes.Value + + + + + + + Codigo_Clientes + + + =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Cantidad + + + =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + DataSet1 + 0.17639cm + 0.08377cm + 0.58521cm + 20.05235cm + + + + + + 0.64657in + + + + + 8.2362in + + + 3.83786cm + true + true + + + Embedded + Logo + Fit + 0.09927in + 0.10752in + 0.99993in + 1.6045in + + + + + + true + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Entradas de Usados del + + + + =Parameters!FechaInicial.Value + + + + al + + + + =Parameters!FechaFinal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaConFormato.Value + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.727cm + true + true + + + 0.127cm + 0.01325cm + 0cm + 20.90669cm + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm + - - - - - - Codigo - - - =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Codigo_Clientes.Value - - - - - - - Codigo_Clientes - - - =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - Cantidad - - - =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - DataSet1 - 0.17639cm - 0.08377cm - 0.58521cm - 20.05235cm - - - - - - 0.64657in - - - - - 8.2362in - - - 3.83786cm - true - true - - - Embedded - Logo - Fit - 0.09927in - 0.10752in - 0.99993in - 1.6045in - - - - - - true - true - - - - - BDH BATERÍAS DISTRIBUCIONES DE - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Entradas de Usados del - - - - =Parameters!FechaInicial.Value - - - - al - - - - =Parameters!FechaFinal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaConFormato.Value - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - 0.727cm - true - true - - - 0.127cm - 0.01325cm - 0cm - 20.90669cm - - - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0cm - 0.5cm - 1cm - 0.13cm - + + + + + + Codigo + + + =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo_Clientes.Value + + + + + + + Codigo_Clientes + + + =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Cantidad + + + =IIF(Fields!EsHeader.Value = "-1" or Fields!Codigo.Value = "","LightGrey","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + DataSet1 + 0.17639cm + 0.08377cm + 0.58521cm + 20.05235cm + + + + + + 0.64657in + + + + + 8.2362in + + + 3.87766cm + true + true + + + Embedded + Logo + Fit + 0.09927in + 0.10752in + 0.99993in + 1.6045in + + + + + + true + true + + + + + BDH BATERÍAS DISTRIBUCIONES DE + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Entradas de Usados del + + + + =Parameters!FechaInicial.Value + + + + al + + + + =Parameters!FechaFinal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaConFormato.Value + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo + + + + + + + Textbox1 + 3.27766cm + 0.6cm + 1.68911cm + 4 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Clientes/Grupos + + + + + + + Textbox3 + 3.27766cm + 1.68911cm + 0.6cm + 15.36419cm + 5 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cantidad + + + + + + + Textbox1 + 3.27766cm + 17.0533cm + 0.6cm + 3.08282cm + 6 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.727cm + true + true + + + 0.127cm + 0.01325cm + 0cm + 20.90669cm + + + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0cm + 0.5cm + 1cm + 0.13cm +