From 2607b0c34f9b54da9134bfa0901dc8bc4ef7b38d Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 29 Jun 2022 18:48:00 -0700 Subject: [PATCH] Ventas Rep Productos servicios leyennda de grafico cantidad, compras Case 23 'RetISR Acreditable se quita insert al agregar anticipo --- Compras/Compras.aspx.vb | 26 +++++++++++--------------- Ventas/RepProductosServicios.aspx.vb | 11 ++++++++++- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 321e6468c..93a5ecc1b 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -9336,14 +9336,16 @@ Partial Class Compras_Compras End If End If - If tipoCambio > 1 Then Concepto += $" TC{tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}" - 'Agregamos el Opuesto del 22 -> 15 - If ImporteMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, Not TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContableContra, Concepto + If(tipoCambio > 1, $" TC {tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}", ""), Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=-1, CveCreditoDetalle:=-1, ImporteMX:=ImporteMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), Contabilizable:=True, TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoAnticipo) Then - ErrorMovtosCxP = 1 - Exit For - End If - End If + + + 'If tipoCambio > 1 Then Concepto += $" TC{tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}" + ''Agregamos el Opuesto del 22 -> 15 + 'If ImporteMovimiento <> 0 Then + ' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContableContra, Concepto + If(tipoCambio > 1, $" TC {tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}", ""), Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=-1, CveCreditoDetalle:=-1, ImporteMX:=ImporteMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), Contabilizable:=True, TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoAnticipo) Then + ' ErrorMovtosCxP = 1 + ' Exit For + ' End If + 'End If End If End If @@ -9436,13 +9438,7 @@ Partial Class Compras_Compras If tipoCambio > 1 Then Concepto += $" TC{tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}" - 'Agregamos el Opuesto del 23 -> 16 - If ImporteMovimiento <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContableContra, Concepto + If(tipoCambio > 1, $" TC {tipoCambio} ${ImporteMovimiento.FormatoNumero(2)}", ""), Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=-1, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=-1, CveCreditoDetalle:=-1, ImporteMX:=ImporteMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), Contabilizable:=True, CveSubProyecto:=CveSubProyectoAnticipo) Then - ErrorMovtosCxP = 1 - Exit For - End If - End If + End If End If diff --git a/Ventas/RepProductosServicios.aspx.vb b/Ventas/RepProductosServicios.aspx.vb index 495990ad2..4f47796b5 100644 --- a/Ventas/RepProductosServicios.aspx.vb +++ b/Ventas/RepProductosServicios.aspx.vb @@ -675,6 +675,8 @@ Partial Class Ventas_RepProductosServicios Dim Row As DataRow = Nothing Row = Dt.NewRow() Row("Texto") = $"{Dr("GPO").ToString} {GlobalDTMonedas().FiltraParametros($"CveMoneda = {Dr("CveMoneda").ToString}").Rows(0)("Abreviatura").ToString}" + + Row("Moneda") = Dr("Moneda").ToString Select Case DdlVer.SelectedValue.ToEntero Case 1 Row("Valor") = Dr("Total").ToString.FormatoNumero @@ -684,9 +686,11 @@ Partial Class Ventas_RepProductosServicios Row("Valor") = Dr("IVA").ToString.FormatoNumero Case 4 Row("Valor") = Dr("Cantidad").ToString.FormatoNumero + Row("Texto") = $"{Dr("GPO").ToString} Cantidad" End Select + Row("Color") = DtColor.Rows(RowColorIndex)("Color").ToString - Row("Moneda") = Dr("Moneda").ToString + Dt.Rows.Add(Row) RowColorIndex += 1 If RowColorIndex = 17 Then @@ -696,6 +700,11 @@ Partial Class Ventas_RepProductosServicios Next Dim query = From s In Dt.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = s("Moneda").ToString()} + + If DdlVer.SelectedValue.ToEntero = 4 Then + query = From s In Dt.AsEnumerable() Select New With {.Texto = s("Texto").ToString(), .Valor = s("Valor").ToString().ToDouble(), .Color = s("Color").ToString(), .Moneda = ""} + End If + Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(query) Select Case DdlGrafica.SelectedValue.ToEntero Case 1