From 14545bdcadc9db511cb16cac5da7c13f8177bc84 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 3 Jan 2020 12:04:35 -0700 Subject: [PATCH 01/13] =?UTF-8?q?se=20agreg=C3=B3=20validaci=C3=B3n=20para?= =?UTF-8?q?=20el=20caso=20de=20empresa=20llantera=20donde=20ser=20requiere?= =?UTF-8?q?=20el=20texto=20de=20observaciones=20con=20informaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/Ventas.aspx.vb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 41dcec827..88e690f9c 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6454,6 +6454,27 @@ Partial Class Ventas End If End If + 'Valida si en caso de que el detalle tenga llantas o polizas se agreguén kilometraje/serie en la parte de observaciones(solo para el caso de empresas llanteras) + If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then + If TxtObsFact.Text = "" Then + Dim FaltaObservacion As Integer = -1 + For Each PS As GridViewRow In GvPS.Rows + Dim PsRenglon As GridViewRow = PS + Dim CveClasificacion As Integer = PsRenglon.DataKey("CveClasificacion").ToEntero + If CveClasificacion = 20345 Or CveClasificacion = 20342 Then + FaltaObservacion = CveClasificacion + Exit For + End If + Next + If FaltaObservacion = 20345 Then + Alert("No se ha especificado la serie para la poliza en la sección de Observaciones", TipoMensaje.MsgAdvertencia) + Exit Sub + ElseIf FaltaObservacion = 20342 Then + Alert("No se ha especificado el kilometraje para la llanta en el sección de Observaciones", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + End If + End If If UsuarioActual.Empresa.Funcionalidad(135) = "1" And DdlTipoComprobante.SelectedValue = "Cot" Then Alert("Se mando autorización al supervisor.", TipoMensaje.MsgInformacion) @@ -6494,6 +6515,7 @@ Partial Class Ventas End If EmitirImprimirNew() + End Sub #End Region From 9dfb2de7df321474dd81f59a40c460b8c8f2199b Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Fri, 3 Jan 2020 12:30:08 -0700 Subject: [PATCH 02/13] cambios global - permiso inv fisico - oc, recarga global ps - actualiza precio,s que considere funcionalidad de listas de precio --- App_Code/ClsPaginas.vb | 32 +++++--- App_Code/ClsSisEmpresas.vb | 2 +- App_Code/Modelos.vb | 6 +- Contratos/Contrato.aspx.vb | 2 +- Inventarios/InventarioFisicoDetalle.aspx.vb | 2 +- Inventarios/RecepcionUsados.aspx | 15 +--- Inventarios/RecepcionUsados.aspx.vb | 87 +++++++++++++++++---- OC/OC.aspx.vb | 11 ++- Ventas/ActualizarPrecios.aspx.vb | 39 +++++---- Ventas/Ventas.aspx | 3 +- Ventas/Ventas.aspx.vb | 53 +++++++------ 11 files changed, 158 insertions(+), 94 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index ae2a6e5ca..e5ff86535 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -549,25 +549,34 @@ Public Class ClsPaginas Application("GlobalDTEmpresas") = value End Set End Property - Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1) As DataTable - Get + Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTClasificaciones{0}", CveEmpresa) + 'sino existe, recarga los datos + If Application(AppNombre) Is Nothing Then + Dim ObjClasificaciones As New ClsClasificaciones + If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then Application(AppNombre) = ObjClasificaciones.DtResultados + ObjClasificaciones.Dispose() + End If If CveEmpresa <> -1 Then Dim Str As New StringBuilder Str.AppendFormat("CveEmpresa = {0}", CveEmpresa) If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria) - If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion) - Dim Dv As New DataView(DirectCast(Application("GlobalDTClasificaciones"), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) + If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion) + If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion) + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) GlobalDTClasificaciones = Dv.ToTable Dv.Dispose() Else - GlobalDTClasificaciones = DirectCast(Application("GlobalDTClasificaciones"), DataTable) + GlobalDTClasificaciones = DirectCast(Application(AppNombre), DataTable) End If End Get - Set(value As DataTable) - Application("GlobalDTClasificaciones") = value + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTClasificaciones{0}", CveEmpresa) + Application(AppNombre) = value End Set End Property Property GlobalDTClasificaciones2(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable @@ -1507,7 +1516,7 @@ Public Class ClsPaginas 'Fin Ruta 'Cliente - Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1) As DataTable + Property GlobalDTCliente(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional CveCliente As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTCliente{0}", CveEmpresa) 'sino existe, recarga los datos @@ -1523,10 +1532,11 @@ Public Class ClsPaginas Dim StrSQL As New StringBuilder StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa) If Estatus >= 0 Then StrSQL.AppendFormat(" AND EstatusBool = {0} ", Estatus) + If CveCliente >= 0 Then StrSQL.AppendFormat(" AND CveCliente = {0} ", CveCliente) - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) - GlobalDTCliente = Dv.ToTable - Dv.Dispose() + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows) + GlobalDTCliente = Dv.ToTable + Dv.Dispose() Else GlobalDTCliente = DirectCast(Application(AppNombre), DataTable) diff --git a/App_Code/ClsSisEmpresas.vb b/App_Code/ClsSisEmpresas.vb index cfcca38dd..12fb16ca2 100644 --- a/App_Code/ClsSisEmpresas.vb +++ b/App_Code/ClsSisEmpresas.vb @@ -463,7 +463,7 @@ Public Class ClsSisEmpresas _Empresa.CveDistribuidor = Data.Rows(0)("CveDistribuidor").ToString.ToEntero _Empresa.DiasPermitidos = Data.Rows(0)("DiasPermitidos").ToString.ToEntero _Empresa.AsientoContableComprasContado = If(Data.Rows(0)("Conta_AsientoContableComprasContado").ToString = "", False, CBool(Data.Rows(0)("Conta_AsientoContableComprasContado").ToString)) - _Empresa.TipoContabilizacion = Data.Rows(0)("Conta_TipoContabilizacion").ToString.ToEntero + _Empresa.TipoContabilizacion = Data.Rows(0)("Conta_TipoContabilizacion").ToString.ToEntero '0 - Sin Conta, 1- Contabilidad SIG, 2- Contabilidad Contpaq _Empresa.DefaultAsistencias = If(Data.Rows(0)("RH_DefaultAsistencias").ToString = "", False, CBool(Data.Rows(0)("RH_DefaultAsistencias").ToString)) _Empresa.CIEC = Data.Rows(0)("CIEC").ToString _Empresa.Localidad = Data.Rows(0)("Localidad").ToString diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 52038c7cd..a85b009e2 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -1257,7 +1257,7 @@ Namespace Modelos End If - If Not GuardarUsados(ObjVentas.IniciaTransacSQL, ObjVentas.CveVenta, ObjVentas) Then + If Not GuardarUsados(ObjVentas.IniciaTransacSQL, ObjVentas.CveVenta, ObjVentas, factura.TipoDocto) Then ErrorList.Add("Error al guardar usados") End If @@ -1785,10 +1785,10 @@ Namespace Modelos DtVentasNC.Rows.Add(Dr) End If End Sub - Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer, ByRef ObjVentas As ClsVentas) As Boolean + Private Function GuardarUsados(SqlTransaccion As SqlClient.SqlTransaction, CveVenta As Integer, ByRef ObjVentas As ClsVentas, TipoDocto As String) As Boolean Dim Resultado As Boolean = True - If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 Then + If UsuarioActual.Empresa.Funcionalidad(533).ToEntero > 0 AndAlso TipoDocto.Contiene("Ing", "Ant") Then Dim CvePSPSA As Integer = UsuarioActual.Empresa.Funcionalidad(533).ToEntero Dim ObjAcum As New ClsAcumuladores(SqlTransaccion) diff --git a/Contratos/Contrato.aspx.vb b/Contratos/Contrato.aspx.vb index d4594f75c..175b3bfb4 100644 --- a/Contratos/Contrato.aspx.vb +++ b/Contratos/Contrato.aspx.vb @@ -2046,7 +2046,7 @@ Partial Class Contratos_Default Row("LimitarCantidad") = If(ChkLimitar.Checked, 1, 0) Dim ObjContratos As New ClsContratos - If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, Row("LimitarCantidad").ToString.ToEntero = 1, "") Then + If ObjContratos.AddContratosDetalle(CveContrato, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDouble, Row("PU").ToString.ToDouble, UsuarioActual.CveUsuario, Row("CveTipoPresupuesto").ToString.ToEntero, Row("NoIdentificacion").ToString, Convert.ToBoolean(Row("LimitarCantidad")), "") Then If Autorizado Then Dim msj As String = String.Format("Se agregaron {0} {1} del producto {2} con un precio ${3}.", Row("Cantidad"), Row("UM"), Row("PS"), Row("PU")) guardarBitacora(msj) diff --git a/Inventarios/InventarioFisicoDetalle.aspx.vb b/Inventarios/InventarioFisicoDetalle.aspx.vb index c07b9ca77..83cf75375 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx.vb +++ b/Inventarios/InventarioFisicoDetalle.aspx.vb @@ -71,7 +71,7 @@ Partial Class Inventarios_InventarioFisicoDetalle EsUsuarioActual = True End If - GvIFD.Columns(6).Visible = EsUsuarioActual + GvIFD.Columns(6).Visible = EsUsuarioActual OrElse UsuarioActual.TienePermisoProceso(283) ' si el usuario lo registro o si tiene permisos especial GvIFD.DataBind() If (GvIFD.Rows.Count > 0) Then diff --git a/Inventarios/RecepcionUsados.aspx b/Inventarios/RecepcionUsados.aspx index 635ed529a..71ed5c269 100644 --- a/Inventarios/RecepcionUsados.aspx +++ b/Inventarios/RecepcionUsados.aspx @@ -57,21 +57,12 @@ Recepción/Entrega de Usados - +
  • Imprimir
  • -
  • - Traspaso Almacen -
  • - <%--
  • - -
  • --%> -
  • - Ver PrePóliza -
  • +
  • @@ -757,7 +748,7 @@ diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index e7aca56de..a22ed7047 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -1003,6 +1003,12 @@ Partial Class Inventarios_RecepcionUsados Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click + If DdlClientes.SelectedValue.ToEntero <= 0 Then + Alert("No se ha especificado el cliente", TipoMensaje.MsgError) + Exit Sub + End If + + 'SI ES DISTRIBUIDOR Y NO VIENE DE REMISION, GENERA UNA REMISION DE NOTA DE CREDITO If EsDistribuidor AndAlso Me.CveRemisionRecibida <= 0 Then Dim CveCliente As Integer = DdlClientes.SelectedValue.ToEntero() @@ -1107,7 +1113,7 @@ Partial Class Inventarios_RecepcionUsados 'si es selectedvalue = 42, es entrada ,3 -salida Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 42, 1, 2) - If RBLOpcion.SelectedValue.ToEntero = 42 AndAlso EsDistribuidor Then + If RBLOpcion.SelectedValue.ToEntero = 42 AndAlso EsDistribuidor AndAlso Dr("CveTamaño").ToString.ToEntero > 0 Then If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then @@ -2067,6 +2073,8 @@ Partial Class Inventarios_RecepcionUsados Me.ObjRemisionNC.SetCliente() Me.ObjRemisionNC.CveAlmacen = -1 + + Dim ObjCliente As New ClsClientes If ObjCliente.GetClientes(CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then If ObjCliente.DtResultados.Rows.Count > 0 Then @@ -2112,7 +2120,11 @@ Partial Class Inventarios_RecepcionUsados End If ObjVentas.Dispose() - Me.ObjRemisionNC.Observaciones = "" + If RblUsadosAjuste.SelectedValue = "1" Then + Me.ObjRemisionNC.Observaciones = "Descuento por garantía" + Else + Me.ObjRemisionNC.Observaciones = "Devolución por usado" + End If Me.ObjRemisionNC.OrdenCompra = "" Me.ObjRemisionNC.PedidoContrato = "" Me.ObjRemisionNC.ObservacionesAlmacen = "" @@ -2125,7 +2137,7 @@ Partial Class Inventarios_RecepcionUsados Optional SerieLote As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0, Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, - Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False, Optional PorcentajeIVA As Decimal = 0D) As Boolean + Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional EsCargo As Boolean = False, Optional PorcentajeIVA As Decimal = 0D, Optional CveTamaño As Integer = 0) As Boolean Dim Retorno As Boolean = False If Not CvePS > 0 Then @@ -2238,8 +2250,9 @@ Partial Class Inventarios_RecepcionUsados Row("CveVentaDetallePedido2") = CveVentaDetallePedido2 Row("CuentaPredial") = CuentaPredial Row("EsCargo") = EsCargo - - 'RECARGAR GV + Row("CveTamaño") = CveTamaño + + 'RECARGAR GV TmpDT.Rows.Add(Row) TmpDT.AcceptChanges() Retorno = True @@ -2344,6 +2357,7 @@ Partial Class Inventarios_RecepcionUsados Dim CvePS As Integer = Row.DataKey("CvePS").ToEntero() Dim Cantidad As Decimal = Row.DataKey("Cantidad").ToDecimal() Dim PU As Decimal = Row.DataKey("PU").ToDecimal() + Dim CveTamaño As Integer = Row.DataKey("CveTamaño").ToEntero() Dim SubTotal As Decimal = Cantidad * PU Dim CveUnidadMedida As Integer = 0 @@ -2368,11 +2382,32 @@ Partial Class Inventarios_RecepcionUsados End If End If - AddPSRNC(ObjRemisionNC.DtDetalle, Cantidad, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "Inv/RecepcionUsados", PU, 0, -1, "", - ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA) + AddPSRNC(ObjRemisionNC.DtDetalle, Cantidad, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "", PU, 0, -1, "", + ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA, CveTamaño:=CveTamaño) End If Next + If RblUsadosAjuste.SelectedValue = "1" Then + 'agrego un registro extra del importe de ajuste + Dim PU As Decimal = TxtImporteAjuste.Text.ToDecimal + Dim CveSATNC As String = "84111506" + Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, SATClavePS:=CveSATNC, AplicaParaVenta:=1).FiltroPrimero("") + + If Dr IsNot Nothing Then + Dim CveUnidadMedida, CveClasificacion, CvePS As Integer + CveUnidadMedida = Dr("CveUnidadMedida").ToString.ToEntero + CveClasificacion = Dr("CveClasificacion").ToString.ToEntero + CvePS = Dr("CvePS").ToString.ToEntero + Dim PorcentajeIVA As Decimal = 0.16D + Dim Obs As String = "Descuento por garantía" + + AddPSRNC(ObjRemisionNC.DtDetalle, 1, CveUnidadMedida, "", CveClasificacion, "", CvePS, "", Obs, PU, 0, -1, "", + ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA) + Else + + End If + End If + Dim TotalImporte As Decimal = ObjRemisionNC.DtDetalle.SUM("TotalImporte").ToDecimal() Dim ImporteIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteIVA").ToDecimal() Dim ImporteRetIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteRetIVA").ToDecimal() @@ -2405,12 +2440,23 @@ Partial Class Inventarios_RecepcionUsados #Region "Ajustes" Public Sub OnRblUsadosAjuste_Change(sender As Object, e As EventArgs) + DdlAlmacen.Items.Clear() If RblUsadosAjuste.SelectedValue = "1" Then CargaAjuste() DivAjuste.Visible = True + 'Llenar el dropdownlist de almacén + DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6) + LnkAgregarUsado.Visible = False + UppAcciones.Update() + Else DivAjuste.Visible = False + 'Llenar el dropdownlist de almacén + DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 22) + LnkAgregarUsado.Visible = True + UppAcciones.Update() End If + DdlAlmacen.DataBind() End Sub Private Sub CargaAjuste() @@ -2496,6 +2542,7 @@ Partial Class Inventarios_RecepcionUsados End Sub Private Sub CargaBCIAjuste() + DdlBCIAjuste.Items.Clear() Dim ObjGral As New ClsGenerales If ObjGral.BCIUsadoGet(UsuarioActual.CveEmpresa) Then DdlBCIAjuste.DataSource = ObjGral.DtResultados @@ -2506,6 +2553,7 @@ Partial Class Inventarios_RecepcionUsados End Sub Private Sub CargaFolioAjuste() + DdlFolioGarantia.Items.Clear() Dim ObjAcum As New ClsAcumuladores If ObjAcum.FoliosGarantiaGet(-1, UsuarioActual.CveEmpresa) Then DdlFolioGarantia.DataSource = ObjAcum.DtResultados @@ -2519,16 +2567,17 @@ Partial Class Inventarios_RecepcionUsados Dim ObjAcumuladores As New ClsAcumuladores If ObjAcumuladores.GetNuevoConsecutivoFolio(DdlFolioGarantia.SelectedValue.ToEntero) Then Dim resultado As String = ObjAcumuladores.DtResultados.FiltroPrimeroValor("NuevoConsecutivo") - TxtConsecutivoAjuste.Text = resultado + TxtConsecutivoAjuste.Text = (resultado.ToEntero + 1).ToString UpAjuste.Update() End If ObjAcumuladores.Dispose() End Sub Protected Sub CargaTipoDeUso() + DdlTipoUso.Items.Clear() DdlTipoUso.DataSource = GlobalDTAcumTiposUso.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlTipoUso.DataBind + DdlTipoUso.DataBind() End Sub Protected Sub DdlTipoUso_SelectedIndexChanged(sender As Object, e As EventArgs) @@ -2637,14 +2686,22 @@ Partial Class Inventarios_RecepcionUsados If ObjPS.GetPS(CvePS, -1, UsuarioActual.CveEmpresa) Then CveTamaño = ObjPS.DtResultados.FiltroPrimeroValor("CveTamaño").ToEntero End If - Dim Datos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)) + Dim drDatos As DataRow = GlobalDTAcumTamaños().FiltroPrimero(String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)) - Dim TamañoPS As DataRow - If ObjPS.GetPS(Datos.Item("CvePSCargo").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then - TamañoPS = ObjPS.DtResultados.FiltroPrimero("") + If drDatos IsNot Nothing Then + Dim Importe As Decimal = drDatos("Cargo").ToString.ToDecimal + Dim drTamañoPS As DataRow = Nothing + + DtMovimientos.Rows.Clear() + + If ObjPS.GetPS(drDatos.Item("CvePSCargo").ToString.ToEntero, -1, UsuarioActual.CveEmpresa) Then + drTamañoPS = ObjPS.DtResultados.FiltroPrimero("") + 'CveTamaño = -1 'limpio esta variable para que no se registre dos veces en la clase Modelos + AddNew(drTamañoPS.Item("CvePS").ToString.ToEntero, drTamañoPS.Item("PSCodigo").ToString, drTamañoPS.Item("CveUM").ToString.ToEntero, drTamañoPS.Item("UnidadMedida").ToString, 1.0, Importe, + "", "-1", "-1", "-1", "", "", "", -1, "", "", CveTamaño) + + End If End If - AddNew(TamañoPS.Item("CvePS").ToString.ToEntero, TamañoPS.Item("PSCodigo").ToString, TamañoPS.Item("CveUM").ToString.ToEntero, TamañoPS.Item("UnidadMedida").ToString, 1.0, TxtPUFactura.Text.ToDouble, - "", "-1", "-1", "-1", "", "", "", -1, "", "", -1) ObjPS.Dispose() End Sub #End Region diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 968a7bc62..4f6b6aaae 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -7299,6 +7299,7 @@ Partial Class OC Dim ObjPS As New ClsProductosServicios If ObjPS.AddPSSimplificado(PS) > 0 Then RecargaGlobalEquivalencias() + RecargaPSGlobal() Alert("El P/S fue agregado correctamente.") End If ObjPS.Dispose() @@ -7312,10 +7313,10 @@ Partial Class OC UpAgregarPS.Update() RegistraScript("$('#DivAgregarPS').modal('hide');") - RecargaPSGlobal() + End Sub Private Sub RecargaPSGlobal() - 'GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing + GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing 'Dim ObjPS As New ClsProductosServicios 'If ObjPS.GetPSSimplificado(UsuarioActual.CveEmpresa) Then Application(String.Format("GlobalDTPSSimplificado{0}", UsuarioActual.CveEmpresa)) = ObjPS.DtResultados.AsEnumerable() @@ -7325,10 +7326,12 @@ Partial Class OC Private Sub RecargaGlobalEquivalencias() - Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalEquivalencias) - Hilo.Start() + GeneraGlobalEquivalencias() + 'Dim Hilo As New System.Threading.Thread(AddressOf GeneraGlobalEquivalencias) + 'Hilo.Start() End Sub Private Sub GeneraGlobalEquivalencias() + GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) = Nothing 'Dim dtt As DataTable = GlobalDTProductosServiciosEquivalencias(-1, -1, UsuarioActual.CveEmpresa) 'Dim ObjPS = New ClsProductosServicios 'If ObjPS.GetPSEquivalencias(-1, UsuarioActual.CveEmpresa) Then diff --git a/Ventas/ActualizarPrecios.aspx.vb b/Ventas/ActualizarPrecios.aspx.vb index 005ba0817..566773a6b 100644 --- a/Ventas/ActualizarPrecios.aspx.vb +++ b/Ventas/ActualizarPrecios.aspx.vb @@ -75,31 +75,30 @@ Partial Class Ventas_ActualizarPrecios Public Sub CargaPreciosLista() - DdlPrecioLista.ITEMS.Clear - Dim ObjVta As New ClsVentas - Dim primerItem As String = "" - If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then - DdlPrecioLista.DataSource = ObjVta.DtResultados.Copy() - DdlPrecioListaCarga.DataSource = ObjVta.DtResultados.Copy() - primerItem = ObjVta.DtResultados.FiltroPrimeroValor("CvePrecioLista") - End If - ObjVta.Dispose() + DdlPrecioLista.Items.Clear() + + If UsuarioActual.Empresa.Funcionalidad(404).ToString = "1" Then 'si manneja precios de lista + Dim ObjVta As New ClsVentas + Dim primerItem As String = "" + If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then + DdlPrecioLista.DataSource = ObjVta.DtResultados.Copy() + DdlPrecioListaCarga.DataSource = ObjVta.DtResultados.Copy() + primerItem = ObjVta.DtResultados.FiltroPrimeroValor("CvePrecioLista") + End If + ObjVta.Dispose() - DdlPrecioLista.DataBind() - DdlPrecioListaCarga.DataBind() + DdlPrecioLista.DataBind() + DdlPrecioListaCarga.DataBind() - If (DdlPrecioLista.Items.Count = 1) Then - DdlPrecioLista.Items.FindByValue(primerItem).Selected = True - End If - - DdlPrecioLista.Items.Insert(0, New ListItem("Seleccione", "-1")) - If UsuarioActual.CveEmpresa.Contiene(1, 140) Then + If (DdlPrecioLista.Items.Count = 1) Then + DdlPrecioLista.Items.FindByValue(primerItem).Selected = True + End If + Else DdlPrecioLista.Items.Insert(0, New ListItem("Sin Precio Lista", "-2")) - DdlPrecioListaCarga.Items.Insert(0, New ListItem("Sin Precio Lista", "-2")) + DdlPrecioListaCarga.Items.Insert(0, New ListItem("Sin Precio Lista", "-2")) End If - - + End Sub Public Sub CargaPS() diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 01639bdf5..ca8f594a4 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -5965,7 +5965,7 @@ <%--APLICAR REMISIONES DE NC--%>
  • From 7efb0ed5f79b360a58a3211417f6cb7d28a5b857 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Fri, 3 Jan 2020 17:30:21 -0700 Subject: [PATCH 05/13] Rep Traspaso Alamacen: Se agrego en grid e impresion alamacen origen y valor. Traspaso Alamacen: se agrego en grid alamacen origen. Proveedores: Global proveedores se pone en null al agregar o actualizar, para que recargue nuevamente cuando se solicite. --- Compras/Proveedores.aspx.vb | 17 +- .../Grales/Formatos/RepTraspasoAlmacen.rdlc | 2147 +++++++++-------- Inventarios/RepTraspasoAlmacen.aspx | 48 +- Inventarios/RepTraspasoAlmacen.aspx.vb | 3 +- Inventarios/TraspasoAlmacen.aspx.vb | 2 +- 5 files changed, 1169 insertions(+), 1048 deletions(-) diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 859af37e3..3036fa58f 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -1533,11 +1533,12 @@ Partial Class Compras_Proveedores If ObjContaAC IsNot Nothing Then ObjContaAC.Commit() 'ACTUALIZAR GLOBAL - If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then - GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = ObjProveedores.DtResultados - Else - ErrorBancos = True - End If + 'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then + GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing + 'Else + ' ErrorBancos = True + 'End If + Alert("El Proveedor se guardó correctamente. " & "
    " & MsgCuentaContable, TipoMensaje.MsgInformacion, If(Request("CveFactura") Is Nothing, "document.location.href=""/Compras/CatProveedores.aspx""", "window.opener.location.href = window.opener.location.href; window.close();")) RecargaGlobalCuentasBancarias() End If @@ -1617,9 +1618,9 @@ Partial Class Compras_Proveedores If tIdContaProveedor > 0 AndAlso CreoCuenta Then ObjProveedores.UpdateProveedorIdCuentaAC(CveProveedor, tIdContaProveedor) - If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then - GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = ObjProveedores.DtResultados - End If + 'If ObjProveedores.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then + GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing + 'End If Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) 'HABILITA ENVIAR ACTIVACION AL PORTAL PROVEEDOR SI SE AGREGO CORREO diff --git a/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc b/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc index a76bee9e1..37cfca530 100644 --- a/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc +++ b/Empresas/Grales/Formatos/RepTraspasoAlmacen.rdlc @@ -1,1023 +1,1126 @@ - - - - - - - - - 3.57404cm - - - 2.36927cm - - - 2.15604cm - - - 15.6445cm - - - 2.02375cm - - - - - 0.4148cm - - - - - true - true - - - - - Disponible - - - - - - - Textbox3 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Unidad - - - - - - - Textbox5 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Código - - - - - - - Textbox16 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Producto - - - - - - - Textbox12 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - SerieLote - - - - - - - Textbox4 - - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - - Black - - 1pt - - Silver - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49417cm - - - - - true - true - - - - - =IIf(Fields!PS.Value = "", "Folio: " & Fields!FolioSalida.Value, Fields!Cantidad.Value) - - - - - - =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =IIf(Fields!PS.Value = "", Fields!FechaMovto.Value, Fields!UnidadMedida.Value) - - - - - - - UnidadMedida - - - =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Codigo.Value - - - - - - - Codigo - - - =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - - - - - =IIf(Fields!PS.Value = "", "Almacén Destino: " & Fields!AlmacenDestino.Value & " Responsable: " & Fields!Recibio.Value, Fields!PS.Value) - - - - - - =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") - 2pt - 2pt - 2pt - 2pt - - - true - - - - - - true - true - - - - - =Fields!SerieLote.Value - - - - - - - SerieLote - - - =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - After - - - - - - - true - true - true - true - DataSet1 - 0.17639cm - 0.24474cm - 0.90897cm - 25.7676cm - - - - - - 0.67394in - - - - - - - Textbox1 - 0.47625cm - 6.54965cm - 0.6cm - 12.60299cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE TRASPASO DE ALMACÉN - - - - - - - - - - - - - - - - Textbox2 - 1.07625cm - 6.54965cm - 0.52945cm - 12.60299cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.11458in - 0.28839cm - 2.09585cm - 5.89966cm - 2 - - - - - - true - true - - - - - =Parameters!Filtros.Value - HTML - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 3.30439cm - 0.24474cm - 0cm - 25.72823cm - 4 - - - - - - - - - - - 1.84855cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.27341cm - 22.76211cm - 0.38981cm - 3.13456cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - - Textbox8 - 0.27341cm - 0.28839cm - 0.38981cm - 1.60042cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - - Textbox9 - 0.27341cm - 1.83272cm - 0.38981cm - 7.13374cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.15875cm - 0.24474cm - 0cm - 25.72823cm - 4 - - - - - - true - true - - - - - =Globals!ExecutionTime - - - - - - - Textbox11 - 0.27341cm - 12.77526cm - 0.38981cm - 4.99273cm - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - IMPRESO EN SIG, Rep. Traspaso Almacén - - - - - - - Textbox13 - 0.63378cm - 0.28839cm - 0.46771cm - 6.69369cm - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 21.59cm - 27.94cm - 0.5cm - 0.5cm - 0cm - 0cm - 0.13cm - + + + + + + Textbox3 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad + + + + + + + Textbox5 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Código + + + + + + + Textbox16 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Producto + + + + + + + Textbox12 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SerieLote + + + + + + + Textbox4 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Valor + + + + + + + Textbox6 + + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + + Black + + 1pt + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.49417cm + + + + + true + true + + + + + =IIf(Fields!PS.Value = "", "Folio: " & Fields!FolioSalida.Value, Fields!Cantidad.Value) + + + + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =IIf(Fields!PS.Value = "", Fields!FechaMovto.Value, Fields!UnidadMedida.Value) + + + + + + + UnidadMedida + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Codigo.Value + + + + + + + Codigo + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + + + + + =IIf(Fields!PS.Value = "", "Almacén Origen: " & Fields!Almacen.Value & " Almacén Destino: " & Fields!AlmacenDestino.Value & " Responsable: " & Fields!Recibio.Value, Fields!PS.Value) + + + + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + true + true + + + + + =Fields!SerieLote.Value + + + + + + + SerieLote + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Valor.Value + + + + + + + Valor + + + =IIf(Fields!PS.Value = "", "#9cacc1", "NoColor") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + true + true + true + true + DataSet1 + 0.17639cm + 0.24474cm + 0.90897cm + 25.65193cm + + + + + + 0.67394in + + + + + + + Textbox1 + 0.47625cm + 6.54965cm + 0.6cm + 12.60299cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE TRASPASO DE ALMACÉN + + + + + + + + + + + + + + + + Textbox2 + 1.07625cm + 6.54965cm + 0.52945cm + 12.60299cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.11458in + 0.28839cm + 2.09585cm + 5.89966cm + 2 + + + + + + true + true + + + + + =Parameters!Filtros.Value + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 3.30439cm + 0.24474cm + 0cm + 25.72823cm + 4 + + + + + + + + + + + 1.84855cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.27341cm + 22.76211cm + 0.38981cm + 3.13456cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + + Textbox8 + 0.27341cm + 0.28839cm + 0.38981cm + 1.60042cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + + Textbox9 + 0.27341cm + 1.83272cm + 0.38981cm + 7.13374cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.15875cm + 0.24474cm + 0cm + 25.72823cm + 4 + + + + + + true + true + + + + + =Globals!ExecutionTime + + + + + + + Textbox11 + 0.27341cm + 12.77526cm + 0.38981cm + 4.99273cm + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IMPRESO EN SIG, Rep. Traspaso Almacén + + + + + + + Textbox13 + 0.63378cm + 0.28839cm + 0.46771cm + 6.69369cm + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 21.59cm + 27.94cm + 0.5cm + 0.5cm + 0cm + 0cm + 0.13cm + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Valor + + + + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + @@ -207,7 +297,7 @@ =Fields!Cantidad.Value @@ -330,6 +420,74 @@ + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + @@ -340,6 +498,8 @@ + + @@ -356,7 +516,7 @@ 0.07056cm 0.00711cm 0.73434cm - 19.57434cm + 19.56807cm @@ -370,7 +530,7 @@ 7.70923in - 2.09944cm + 5.08094cm true true @@ -392,9 +552,10 @@ Textbox2 - 0.00711cm - 0.6cm - 16.69653cm + 0.03803cm + 4.37423cm + 2.04667cm + 12.55984cm @@ -424,8 +585,8 @@ Textbox4 - 1.34069cm - 17.81839cm + 4.48094cm + 17.3888cm 0.6cm 1.76305cm 1 @@ -456,8 +617,8 @@ Textbox5 - 1.34067cm - 16.70363cm + 4.48092cm + 16.27404cm 0.6cm 1.11476cm 2 @@ -487,8 +648,8 @@ Textbox4 - 1.34066cm - 15.46894cm + 0.63803cm + 17.07518cm 0.6cm 1.2347cm 3 @@ -517,8 +678,8 @@ Textbox5 - 1.34066cm - 14.2869cm + 0.03803cm + 17.07518cm 0.6cm 1.18203cm 4 @@ -549,7 +710,7 @@ Textbox2 - 0.7407cm + 2.6457cm 0.00711cm 0.6cm 7.66226cm @@ -582,7 +743,7 @@ Textbox2 - 1.34066cm + 3.24566cm 0.00711cm 0.6cm 14.27979cm @@ -597,6 +758,101 @@ 2pt + + true + true + + + + + Origen: + + + + =Parameters!Origen.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Destino: + + + + =Parameters!Destino.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.03803cm + 0.1121cm + 2.53711cm + 4.08574cm + 9 + + + + @@ -1324,6 +1580,23 @@ true ReportParameter1 + + String + true + ReportParameter1 + + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + From 2062dbdb0519af81152b4b09dff1ba27b989a380 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Sun, 5 Jan 2020 18:46:55 -0700 Subject: [PATCH 08/13] Iva 6% boton agregar ps se agrego valdia si se muest5ra boton de 6 % --- Compras/Compras.aspx.vb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 5fac2308b..3d24b5aef 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -2237,6 +2237,11 @@ Partial Class Compras_Compras If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then + 'If UsuarioActual.CveRol = 1 Then + ' Alert("Ok funcionalidad 577") + 'End If + + If RetencionIVA = 0 And IVAOriginal > 0 Then For Each dRow As DataRow In TmpDT.Rows If dRow("CveTipoPS").ToString.ToEntero = 1 Then @@ -16988,6 +16993,26 @@ Partial Class Compras_Compras CompruebaAgregar() GuardaAC() End If + + If UsuarioActual.Empresa.Funcionalidad(577).ToString = "1" Then + + 'If UsuarioActual.CveRol = 1 Then + ' Alert($"Ok funcionalidad 577 RetencionIVA { RetencionIVA} IVAOriginal {IVAOriginal}") + 'End If + + If RetencionIVA = 0 And IVAOriginal > 0 Then + For Each dRow As DataRow In TmpDT.Rows + If dRow("CveTipoPS").ToString.ToEntero = 1 Then + tdIVA6.Visible = True + Exit For + End If + Next + End If + + End If + + + UpPS.Update() CargaGvPersonal() End Sub From 892e4dff87e26b9658b4631df74786d09557312c Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 6 Jan 2020 09:49:02 -0700 Subject: [PATCH 09/13] correccion en el formato de traslado --- Compras/PopUpVerFactura.aspx.vb | 34 +++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 5adbdbc87..afd814184 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1884,9 +1884,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("CveConcepto", "8")) 'FolioTraspaso.ToString 'params.Add(New ReportParameter("TipoTraslado", "AVISO")) 'FolioTraspaso.ToString - params.Add(New ReportParameter("SubProyecto", "Traslado de: ")) 'DdlAlmacenDestino.SelectedItem.ToString - params.Add(New ReportParameter("Origen", Almacen)) - params.Add(New ReportParameter("Destino", AlmacenDestino)) + params.Add(New ReportParameter("SubProyecto", String.Format("Traslado de: {0} A {1}", Almacen, AlmacenDestino))) 'DdlAlmacenDestino.SelectedItem.ToString params.Add(New ReportParameter("Folio", Folio)) 'FolioTraspaso.ToString params.Add(New ReportParameter("Fecha", Fecha)) 'TxtFecha.Text params.Add(New ReportParameter("NombreEntrego", Capturo)) 'UsuarioActual.Nombre @@ -1894,15 +1892,6 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Accion", "RECIBE")) 'Antes Trasladó params.Add(New ReportParameter("Observaciones", Observaciones)) - Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) - Else - params.Add(New ReportParameter("LogoPath", "")) - End If - Dim DTCliente As New DataTable Dim SBDireccionO As New StringBuilder() Dim SBDireccionD As New StringBuilder() @@ -2013,6 +2002,16 @@ Partial Class PopUpVerFactura ImprimirPDF(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") Else + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", logouri)) + Else + params.Add(New ReportParameter("LogoPath", "")) + End If + params.Add(New ReportParameter("Origen", Almacen)) + params.Add(New ReportParameter("Destino", AlmacenDestino)) params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) @@ -2052,6 +2051,17 @@ Partial Class PopUpVerFactura ImprimirPDF(String.Format("{0}Formatos\Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Recepción de Traslado - {0}", Folio), RDSName:="DsInventarios") Else + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + If Imagen.Exists Then + params.Add(New ReportParameter("LogoPath", logouri)) + Else + params.Add(New ReportParameter("LogoPath", "")) + End If + params.Add(New ReportParameter("Origen", Almacen)) + params.Add(New ReportParameter("Destino", AlmacenDestino)) + params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) From cded13030a3e6ca8717f966ab62a26af0c9804f4 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 6 Jan 2020 09:52:18 -0700 Subject: [PATCH 10/13] correccion en la fecha de reporte --- Acumuladores/RepEntradasUsadosClientes.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx.vb b/Acumuladores/RepEntradasUsadosClientes.aspx.vb index 58fbe6141..f20abeef3 100644 --- a/Acumuladores/RepEntradasUsadosClientes.aspx.vb +++ b/Acumuladores/RepEntradasUsadosClientes.aspx.vb @@ -74,7 +74,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2)) Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1) - Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today)) + Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today)) Dim params As New List(Of ReportParameter) From 397e3131d3ebb2dae9c90d3ecadb9a41a449a24e Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 6 Jan 2020 10:45:15 -0700 Subject: [PATCH 11/13] Se agrego funcionalidad 578 Cuenta Contable Servicios 6% --- Compras/Compras.aspx.vb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 3d24b5aef..530715b2b 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8472,7 +8472,9 @@ Partial Class Compras_Compras If DdlRetIVAConcepto.Items.Count > 0 Then If DdlRetIVAConcepto.SelectedValue.ToEntero = 1 Then ImporteMovimiento = Math.Round(PorcentajePago * TxtRetIVA.Text.ToDecimal, 2) - importeMN = ImporteMovimiento * tipoCambio + importeMN = ImporteMovimiento * tipoCambio + + If CtaProveedorRetIVA > 0 Then IdCtaContable = CtaProveedorRetIVA CveCuenta = CveCuentaProveedorRetIVA @@ -8486,10 +8488,19 @@ Partial Class Compras_Compras End If End If End If - End If + + + If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero + End If + + + End If End If + End If + Case 183 'RetIVA x Acreditar Fletes P.F. If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then If DdlRetIVAConcepto.Items.Count > 0 Then From 7d5b9c4f9e994a646d094348b12ff8b90a7f006a Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 6 Jan 2020 10:55:17 -0700 Subject: [PATCH 12/13] correcciones en formatos de fecha --- Acumuladores/EntradasUsadosResumenRep.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Acumuladores/EntradasUsadosResumenRep.aspx.vb b/Acumuladores/EntradasUsadosResumenRep.aspx.vb index 1aa15ed02..799484355 100644 --- a/Acumuladores/EntradasUsadosResumenRep.aspx.vb +++ b/Acumuladores/EntradasUsadosResumenRep.aspx.vb @@ -49,7 +49,7 @@ Partial Class Acumuladores_RepEntradasUsados Dim Dia As String = {"lunes", "martes", "miércoles", "jueves", "viernes", "sábado", "domingo"}(If((Weekday(Today) - 2) = -1, 7, Weekday(Today) - 2)) Dim Mes As String = {"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"}(Month(Today) - 1) - Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Month(Today), Mes, Year(Today)) + Dim FechaConFormato As String = String.Format("{0}, {1} de {2} de {3}", Dia, Day(Today), Mes, Year(Today)) Dim params As New List(Of ReportParameter) From a94811fe93e044598e800f41e870a44911778d7e Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Mon, 6 Jan 2020 13:13:57 -0700 Subject: [PATCH 13/13] RegPrePoliza actualizar fecha, concepto --- Compras/Compras.aspx.vb | 12 +++++++++--- Contabilidad/RegPrePoliza.aspx.vb | 29 +++++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 530715b2b..cc7f2c705 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -5833,9 +5833,15 @@ Partial Class Compras_Compras CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero End If End If - End If - - 'Agregamos el Opuesto del 22 -> 15 + End If + + + If UsuarioActual.Empresa.Funcionalidad(577).ToEntero = 1 Then + IdCtaContable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero + End If + + + 'Agregamos el Opuesto del 22 -> 15 If importeMovimiento <> 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 15, Concepto + If(tipoCambioActual > 1, $" TC: {tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}", ""), FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then ErrorPrepoliza = True diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index d867a4a8e..623229efd 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -817,7 +817,11 @@ Partial Class ContabilidadC_RegPrePoliza If CvePrePoliza > 0 Then 'Nuevo Modulo Charlie - ActualizarPrePoliza() + ActualizarPrePoliza() + + + + Else Dim MensajeAlert = New StringBuilder Dim ObjIE As New ClsBancos() @@ -966,10 +970,19 @@ Partial Class ContabilidadC_RegPrePoliza Dim OcurrioError As Boolean = False Dim ObjContabilidad As New ClsContabilidad - ObjContabilidad.IniciaTransacSQL() + ObjContabilidad.IniciaTransacSQL() + + + + If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then + OcurrioError = True + End If + + ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate) + For Each row As GridViewRow In GvPrePoliza.Rows If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCTextBox("TxtConcepto").Text, row.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, @@ -996,13 +1009,20 @@ Partial Class ContabilidadC_RegPrePoliza If Not OcurrioError Then ObjContabilidad.Commit() Alert("La PrePoliza se actualizó correctamente.", TipoMensaje.MsgInformacion) - Else + Else ObjContabilidad.RollBack() Alert("Ocurrio un error al actualizar la PrePoliza.", TipoMensaje.MsgError) End If ObjContabilidad.Dispose() CargaPrePoliza() + + If Not OcurrioError Then + If IdPoliza > 0 Then + BtnContabilizar_Click(Nothing, Nothing) + End If + + End If End Sub Protected Sub GvPrePoliza_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvPrePoliza.RowUpdating RegistraScript(String.Format("$('#{0}').modal();", "DivEditConcepto")) @@ -1463,13 +1483,14 @@ Partial Class ContabilidadC_RegPrePoliza End Sub Private Sub Contabilizar() + Dim ObjConta As New ClsContabilidad If IdPoliza > 0 Then 'si está bloqueada, lo desbloqueaprimero ObjConta.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) End If - If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1)) Then + If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, pIDPoliza:=If(IdPoliza > 0, IdPoliza, -1), Concepto:=TxtConcepto.Text, Fecha:=TxtFechaDocumento.Text.ToDateTime) Then Alert(String.Format("Prepóliza contabilizada.

    Folio:Ver Póliza", ObjConta.ContaIdPoliza), ModExtensiones.TipoMensaje.MsgInformacion) Else