From 4895cb99e67ba9cb4bfb8402bf8724af50b60ebe Mon Sep 17 00:00:00 2001 From: Raul Pimienta Date: Tue, 10 Sep 2019 17:14:45 -0700 Subject: [PATCH] Soporte Compras y Ventas --- Compras/Compras.aspx.vb | 6 +++--- Ventas/Ventas.aspx.vb | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index bb6ac059f..08c098bd7 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -7951,7 +7951,7 @@ Partial Class Compras_Compras ImporteMovimiento = 0 IdCtaContable = 0 CveCuenta = 0 - Dim Concepto As String = "" + Dim Concepto As String = String.Format("{0}-{1}", TxtSerie.Text, TxtFolio.Text) Dim importeMN As Decimal = 0 Dim Multiplicador As Integer = If(Row("Multiplicador").ToString.ToEntero = 1, 1, -1) Dim PorcentajeImpuesto As Decimal = 0 @@ -13440,7 +13440,7 @@ Partial Class Compras_Compras Protected Sub BtnRefacturacionVer_Click(sender As Object, e As EventArgs) Handles BtnRefacturacionVer.Click Dim Opcion As Integer = 1 - If UsuarioActual.CveEmpresa = 119 Then Opcion = 2 + If UsuarioActual.CveEmpresa.Contiene(119, 72) Then Opcion = 2 Dim ObjCompras As New ClsCompras @@ -14553,7 +14553,7 @@ Partial Class Compras_Compras End If End If - If Math.Abs(HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal) > 0.05 Then + If Math.Abs(HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal) > 0.05 AndAlso UsuarioActual.CveEmpresa.Contiene(119) Then Alert($"Hay una diferencia de IEPS entre la factura y la OC. Dif: {HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal}", TipoMensaje.MsgAdvertencia) Exit Sub End If diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index b217b5626..8e0f54237 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9370,8 +9370,8 @@ Partial Class Ventas Importe91 = Dr("Importe").ToString.ToDecimal ImporteMN91 = Dr("Importe").ToString.ToDecimal * TipoCambioNC ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then - Importe251 = Dr("Importe").ToString.ToDecimal - Importe91 = Dr("Importe").ToString.ToDecimal + + Importe91 = Dr("Importe").ToString.ToDecimal / TipoCambioNC ImporteMN91 = Dr("Importe").ToString.ToDecimal End If @@ -9385,7 +9385,8 @@ Partial Class Ventas ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then - ImporteMN251 = Dr("Importe").ToString.ToDecimal / TipoCambioNC + Importe251 = Dr("Importe").ToString.ToDecimal / TCFluctuacion + ImporteMN251 = Dr("Importe").ToString.ToDecimal Else ImporteMN251 = Dr("Importe").ToString.ToDecimal End If @@ -19928,7 +19929,7 @@ Partial Class Ventas Private Sub CargaCxC() Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, "-1", "-1", DdlMoneda.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then + If ObjMovtos.GetCxCClienteDetalle(ViewState("CveCliente").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero) Then Dim DtTemporal As DataTable = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act' AND CveVenta > 0", "Moneda, OrdenVencimiento, FechaVencimiento") GvCxC.DataSource = DtTemporal End If