From 95ad7961c2b5a763387ebf7298a2dd15adb83ecc Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 6 Oct 2020 19:45:50 -0700 Subject: [PATCH 1/8] Desglose de IEPS en refacturacion --- App_Code/ClsVentas.vb | 3 ++- App_Code/Modelos.vb | 2 ++ Ventas/Ventas.aspx.vb | 39 +++++++++++++++++++++++++++------------ 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index ee571bfd0..ff7e79fa5 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -341,7 +341,7 @@ Public Class ClsVentas Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1, Optional CveUsoCFDI As Integer = -1, Optional OrdenCompra As String = "-1", Optional CveCuentaTerminal As Integer = -1, Optional CveTipoRelacion As Integer = -1, Optional ImpuestoLocal As Double = 0, Optional CveTipoAmortizacionAnticipo As Integer = -1, Optional CveVentaRelacion As Integer = -1, Optional ImporteRelacion As Decimal = -1, Optional CveEmpresaCRM As Integer = -1, Optional EsInterno As Integer = -1, Optional CveAcercamientoCRM As Integer = -1, Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0, - Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False) As Boolean + Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasAdd") @@ -433,6 +433,7 @@ Public Class ClsVentas .Add("@CorreoNotificacion", SqlDbType.VarChar).Value = CorreoNotificacion .Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria .Add("@FacturarSucursal", SqlDbType.Bit).Value = FacturarSucursal + .Add("@VentaDesglosaIEPS", SqlDbType.Bit).Value = VentaDesglosaIEPS .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 4ca5dafc2..6df233d4e 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -6094,6 +6094,8 @@ Namespace Modelos Public Property CveTipoRetencion As Integer + Public Property VentaDesglosaIEPS As Boolean + #End Region diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 69bc71753..ca3d32827 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -1782,6 +1782,15 @@ Partial Class Ventas End Set End Property + Private Property VentaDesglosaIEPS As Boolean + Get + Return CBool(IfNull(ViewState("VentaDesglosaIEPS"), "False", ViewState("VentaDesglosaIEPS"))) + End Get + Set(value As Boolean) + ViewState("VentaDesglosaIEPS") = value + End Set + End Property + #End Region '#Region "AuxiliarConta" @@ -5319,8 +5328,7 @@ Partial Class Ventas CargarAlmacenes() - If UsuarioActual.Empresa.FacturaProduccion Then - End If + CargaDocumentacionCliente() If UsuarioActual.CveEmpresa.Contiene(72, 80, 1, 119) Then @@ -8477,7 +8485,7 @@ Partial Class Ventas ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}") ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue) ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) - + ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS 'ObjFactura.RefDocto = TxtDocto.Text.Trim 'si es cancelacion, debe de conservar el folio actual If Not EsCancelacion Then ObjFactura.Folio = If(EstablecioFolio Or VistaPrevia Or (CveVenta > 0 And (NuevaFactura.Contiene(0, 2))), TxtFolio.Text.Trim.ToEntero(), -1) @@ -10042,7 +10050,8 @@ Partial Class Ventas CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero() > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)), CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM, DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False), - Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal) Then + Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, + FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS) Then ErrorList.Add("Ocurrió un error al Generar la Venta.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico") Else If factura.TipoDocto.Contiene("Dev", "Egs") Or DtVentasNC IsNot Nothing Or CveEstatusRefacturacion = 1 Then @@ -15662,13 +15671,10 @@ Partial Class Ventas ObjPS.Dispose() End Sub Private Function AgregarProductoServicio(Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String, - PU As Decimal, Descuento As Decimal, - CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, - Optional Serie 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 SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False) As Boolean + PU As Decimal, Descuento As Decimal, CveProyecto As Integer, Proyecto As String, CveSubProyecto As Integer, SubProyecto As String, Optional Serie 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 SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False) As Boolean Dim Retorno As Boolean = False If Not CvePS > 0 Then @@ -15752,12 +15758,21 @@ Partial Class Ventas End If End If + 'VERIFICA SI EN LA FACTURA PADRE SE DESGLOSO EL IEPS + Dim FacturaDesglosoIEPS As Boolean = ((CveDevolucion > 0 AndAlso NuevaFactura = 1) AndAlso (Me.ObjFacturaNC IsNot Nothing AndAlso Me.ObjFacturaNC.VentaDesglosaIEPS)) + If Not ClienteDesglosaIEPS Then - If Not RegeneraIEPS Then + If Not RegeneraIEPS AndAlso Not FacturaDesglosoIEPS Then PU = PU * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal) + VentaDesglosaIEPS = True End If DrPS("IEPSPorcentaje") = 0 End If + 'SI YA SE DESGLOSO EL IEPS SE GUARDA LA BANDERA EN ESTA FACTURA + If FacturaDesglosoIEPS Then + VentaDesglosaIEPS = True + End If + TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal) From 8926286db1c5fba5a226b6d717b5ca08725f890b Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 6 Oct 2020 19:49:01 -0700 Subject: [PATCH 2/8] registro de remisiones en entrega directa --- Inventarios/RecepcionAlmacen.aspx.vb | 111 +++++++++++++++++++++------ Ventas/Ventas.aspx.vb | 15 +++- 2 files changed, 98 insertions(+), 28 deletions(-) diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 53d9e0acb..674766529 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -2270,6 +2270,10 @@ Partial Class Inventarios_RecepcionAlmacen Dim ObjContaContPAQ As ClsContPAQi = Nothing 'ENTREGA DIRECTA + + Dim MovtosEntradaExA As New List(Of Integer) + Dim FoliosEntradaExA As New List(Of Integer) + Dim MovtosSalidaDirecta As New List(Of Integer) Dim FoliosSalidaDirecta As New List(Of Integer) @@ -2548,36 +2552,42 @@ Partial Class Inventarios_RecepcionAlmacen Dim CveVenta As Integer = DrVenta("CveVenta").ToString().ToEntero() - CveMovtoSalidaDirecta = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, - CveVenta, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), - MovimientoFijo:=True, CveMovimientoRelacionado:=CveMovimiento, Remision:=TxtRemision.Text, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RA/G2") - FolioSalidaDirecta = ObjInventario.Folio + Dim ObjFactura As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa) - If Not CveMovtoSalidaDirecta > 0 Then - ErrorMovInv = True - Exit For - End If + Dim DtDetalleMovimiento As DataTable = Dt.FiltraParametros($"CveVenta={ObjFactura.CveVenta}") - If Not ErrorMovInv AndAlso Dt IsNot Nothing Then - For Each Dr As DataRow In Dt.FiltraParametros($"CveVenta={CveVenta}").Rows - If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then - ErrorMovInv = True - Exit For - End If - Next - End If + If ObjFactura.TipoDocto = "Ing" Then + Dim MovSalida = GenerarMovimientoAlmacenVenta(DdlAlmacen.SelectedValue.ToEntero(), 3, ObjFactura.CveVenta, CveMovimiento, DtDetalleMovimiento, ObjInventario, ObjConta, ObjContaContPAQ, EsContabilizable, "RA/G2") - If Not ErrorMovInv Then - If Not GeneraPrePolizaSalidaEntregaDirecta(CveMovtoSalidaDirecta, ObjInventario, ObjConta, ObjContaContPAQ, EsContabilizable) Then - ErrorMovInv = True - Exit For + ErrorMovInv = MovSalida.CveMovimiento <= 0 + + If Not ErrorMovInv Then + MovtosSalidaDirecta.Add(MovSalida.CveMovimiento) + FoliosSalidaDirecta.Add(MovSalida.Folio) End If + + ElseIf ObjFactura.TipoDocto = "Rem" Then + Dim MovSalidaExA = GenerarMovimientoAlmacenVenta(DdlAlmacen.SelectedValue.ToEntero(), 8, ObjFactura.CveVenta, -1, DtDetalleMovimiento, ObjInventario, ObjConta, ObjContaContPAQ, False, "RA/G2R1") + + ErrorMovInv = MovSalidaExA.CveMovimiento <= 0 + + If Not ErrorMovInv Then + MovtosSalidaDirecta.Add(MovSalidaExA.CveMovimiento) + FoliosSalidaDirecta.Add(MovSalidaExA.Folio) + + Dim MovEntradaExA = GenerarMovimientoAlmacenVenta(ObjFactura.CveAlmacenTraspasoDestino, 9, ObjFactura.CveVenta, MovSalidaExA.CveMovimiento, DtDetalleMovimiento, ObjInventario, ObjConta, ObjContaContPAQ, False, "RA/G2R2") + + ErrorMovInv = MovEntradaExA.CveMovimiento <= 0 + + If Not ErrorMovInv Then + MovtosEntradaExA.Add(MovEntradaExA.CveMovimiento) + FoliosEntradaExA.Add(MovEntradaExA.Folio) + End If + + End If + End If - If Not ErrorMovInv Then - MovtosSalidaDirecta.Add(CveMovtoSalidaDirecta) - FoliosSalidaDirecta.Add(FolioSalidaDirecta) - End If Next If Not ErrorMovInv Then @@ -3307,6 +3317,14 @@ Partial Class Inventarios_RecepcionAlmacen 'ENTREGA DIRECTA If MovtosSalidaDirecta.Count > 0 Then Msg.AppendFormat("

Movimientos de control:
") + + If MovtosEntradaExA.Count > 0 Then + For index = 0 To MovtosEntradaExA.Count - 1 + link = String.Format("{1}", MovtosEntradaExA(index), FoliosEntradaExA(index)) + Msg.AppendFormat("
Movimiento de Entrada Folio: {0}", link) + Next + End If + For index = 0 To MovtosSalidaDirecta.Count - 1 link = String.Format("{1}", MovtosSalidaDirecta(index), FoliosSalidaDirecta(index)) Msg.AppendFormat("
Movimiento de Salida Folio: {0}", link) @@ -3355,6 +3373,45 @@ Partial Class Inventarios_RecepcionAlmacen If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose() If ObjContaContPAQ IsNot Nothing Then ObjContaContPAQ.Dispose() End Sub + + Private Function GenerarMovimientoAlmacenVenta(CveAlmacen As Integer, CveConceptoAlmacen As Integer, CveVenta As Integer, CveMovimientoRelacionado As Integer, DtDetalle As DataTable, ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, ObjContaContPAQ As ClsContPAQi, EsContabilizable As Boolean, Modulo As String) As MMovimientoAlmacen + Dim ErrorMovInv As Boolean = False + Dim Retorno As New MMovimientoAlmacen + + Dim CveMovtoSalidaDirecta As Integer = -1 + Dim FolioSalidaDirecta As Integer = -1 + + CveMovtoSalidaDirecta = ObjInventario.AddMovimiento(CveAlmacen, CveConceptoAlmacen, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, + CveVenta, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, TipoCambio:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, TipoCambio), + MovimientoFijo:=True, CveMovimientoRelacionado:=CveMovimientoRelacionado, Remision:=TxtRemision.Text, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:=Modulo) + FolioSalidaDirecta = ObjInventario.Folio + + If Not CveMovtoSalidaDirecta > 0 Then + ErrorMovInv = True + End If + + If Not ErrorMovInv AndAlso DtDetalle IsNot Nothing Then + For Each Dr As DataRow In DtDetalle.Rows + If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + ErrorMovInv = True + Exit For + End If + Next + End If + + If Not ErrorMovInv AndAlso CveConceptoAlmacen = 3 Then + If Not GeneraPrePolizaSalidaEntregaDirecta(CveMovtoSalidaDirecta, ObjInventario, ObjConta, ObjContaContPAQ, EsContabilizable) Then + ErrorMovInv = True + End If + End If + + If Not ErrorMovInv Then + Retorno.CveMovimiento = CveMovtoSalidaDirecta + Retorno.Folio = FolioSalidaDirecta + End If + + Return Retorno + End Function Private Sub GuardaImportacionFlete() Dim CveMovimiento As Integer Dim InvFolio As String = "" @@ -4283,3 +4340,9 @@ Partial Class Inventarios_RecepcionAlmacen End Class + +Public Class MMovimientoAlmacen + Public Property CveMovimiento As Integer + Public Property Folio As Integer + +End Class diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ca3d32827..828e64803 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9870,16 +9870,23 @@ Partial Class Ventas ObjClientes.Dispose() + BtnEmitirImprimir.Text = "Facturar" + 'REGISTRAR UNA ENTREGA DIRECTA If TmpDT.COUNT("EntregaDirecta", "EntregaDirecta = 1") > 0 Then trPaqueteriaOpciones.Visible = False trPaqueteriOpcionesLabel.Visible = False trPaqueteriaDirectaLabel.Visible = True - End If - BtnEmitirImprimir.Text = "Facturar" - DdlTipoComprobante.SelectedValue = "Ing" - DdlTipoComprobante.Enabled = False + DdlTipoComprobante.Items.Clear() + DdlTipoComprobante.Items.Insert(0, New ListItem("Ingresos", "Ing")) + DdlTipoComprobante.Items.Insert(1, New ListItem("Remisión", "Rem")) + DdlTipoComprobante.Enabled = True + + Else + DdlTipoComprobante.SelectedValue = "Ing" + DdlTipoComprobante.Enabled = False + End If Tab.ActiveTab = TabGenerales TabGenerales.Enabled = True From 5de1659cd6968a36f615cfedda7eeed45276c508 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 7 Oct 2020 10:32:42 -0700 Subject: [PATCH 3/8] =?UTF-8?q?se=20repar=C3=B3=20el=20reporte=20de=20movi?= =?UTF-8?q?mientos=20de=20uniformes=20en=20resguardos=20y=20correcci=C3=B3?= =?UTF-8?q?nes=20de=20layout=20en=20folios=20garant=C3=ADa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Acumuladores/CatFoliosGarantia.aspx | 22 +++++++++++----------- Compras/PopUpVerFactura.aspx.vb | 11 ++++++----- Ventas/ProductosServicios.aspx.vb | 6 +++++- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/Acumuladores/CatFoliosGarantia.aspx b/Acumuladores/CatFoliosGarantia.aspx index 4f7dc67ac..fde6379a1 100644 --- a/Acumuladores/CatFoliosGarantia.aspx +++ b/Acumuladores/CatFoliosGarantia.aspx @@ -247,35 +247,35 @@ -
+ <%--
--%> -
- SubProyecto: - +
+ SubProyecto:
+
-
+ <%--
--%>
-   +
-   - + Tipo Folio:
+ General Optima Motobateria
-
+ <%--
--%>
@@ -283,8 +283,8 @@
-   - + Área:
+ Piso Almacén diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 482e6026a..49ae7b3d6 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -1238,6 +1238,7 @@ Partial Class PopUpVerFactura Dim Observaciones As String = ObjInventarios.Observaciones Dim ObservacionesSolicitud As String = ObjInventarios.DtResultados.FiltroPrimeroValor("ObservacionesSolicitud") Dim NombreCapturo As String = ObjInventarios.NombreCapturo + Dim NombreEntrego As String = ObjInventarios.DtResultados.FiltroPrimeroValor("Entrego") Dim CveAlmacen As Integer = ObjInventarios.CveAlmacen Dim Recibio As String = ObjInventarios.Recibio Dim PuestoRecibio As String = ObjInventarios.PuestoRecibio @@ -1341,7 +1342,7 @@ Partial Class PopUpVerFactura EstadoOrigen, PaisOrigen, CPOrigen, CalleDestino, NoExtDestino, ColoniaDestino, LocalidadDestino, MunicipioDestino, EstadoDestino, PaisDestino, CPDestino, FechaMovimiento, NombreCapturo, PuestoRecibio, PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente, - CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen) + CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego) End Sub Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera @@ -1358,7 +1359,7 @@ Partial Class PopUpVerFactura Remision As String, Proveedor As String, CalleOrigen As String, NoExtOrigen As String, ColoniaOrigen As String, LocalidadOrigen As String, MunicipioOrigen As String, EstadoOrigen As String, PaisOrigen As String, CPOrigen As String, CalleDestino As String, NoExtDestino As String, ColoniaDestino As String, LocalidadDestino As String, MunicipioDestino As String, EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String, - RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, Optional CveTipoAlmacen As Integer = -1) + RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0, Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "") Select Case CveConcepto @@ -2704,7 +2705,7 @@ Partial Class PopUpVerFactura End If Dim DepartamentoRecibe As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Departamento", String.Format("NombreCompleto = '{0}'", Recibio)) - Dim DepartamentoEntrego As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Departamento", String.Format("NombreCompleto = '{0}'", Capturo)) + Dim DepartamentoEntrego As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Departamento", String.Format("NombreCompleto = '{0}'", NombreEntrego)) params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Concepto", "Salida por resguardo")) @@ -2715,7 +2716,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) params.Add(New ReportParameter("Total", "")) - params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) + params.Add(New ReportParameter("NombreEntrego", NombreEntrego)) params.Add(New ReportParameter("NombreRecibio", Recibio)) params.Add(New ReportParameter("PuestoRecibio", PuestoEntrego)) params.Add(New ReportParameter("PuestoEntrego", PuestoRecibio)) @@ -2727,7 +2728,7 @@ Partial Class PopUpVerFactura End If params.Add(New ReportParameter("FechaMovimiento", FechaMovimiento.ToString("dd/MM/yyyy"))) - params.Add(New ReportParameter("UsuarioImprimio", NombreCapturo)) + params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("Observaciones", Observaciones)) diff --git a/Ventas/ProductosServicios.aspx.vb b/Ventas/ProductosServicios.aspx.vb index 51997adf9..e9d0ab307 100644 --- a/Ventas/ProductosServicios.aspx.vb +++ b/Ventas/ProductosServicios.aspx.vb @@ -912,7 +912,7 @@ Partial Class ProductosyServicios Public Sub CargaDdlSATPS() DdlSATPS.setEsWebService(True) - DdlSATPS.Attributes.Add("data-metodo", "getpssat") + DdlSATPS.ddlWS.Attributes.Add("data-metodo", "getpssat") End Sub Public Sub CargaDdlFraccionArancelaria() @@ -1124,6 +1124,10 @@ Partial Class ProductosyServicios End Sub Protected Sub BtnGuardar_Click(sender As Object, e As System.EventArgs) Handles BtnGuardar.Click + If DdlSATPS.SelectedValue = "46920" Then + Alert("El Producto Servicio SAT con clave '01010101' no es valido, por favor seleccione otro", TipoMensaje.MsgAdvertencia) + Exit Sub + End If If TxtPS.Text.Trim.Length = 0 Or DdlTipoPS.SelectedValue.ToEntero <= 0 Or DdlUnidadMedida.SelectedValue.ToEntero <= 0 Or DdlClasificacion.SelectedValue.ToEntero <= 0 Then Alert("Los campos Producto/Servicio, Tipo, Unidad de medida, Clasificación Contable son requeridos por favor ingreselos.", TipoMensaje.MsgAdvertencia) From 821cc923e147410d6a519b409389bc27570ce223 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Wed, 7 Oct 2020 17:23:01 -0700 Subject: [PATCH 4/8] Clientes PopIEVentas Metodo Pago, Empresa validacion metodo inventario --- Bancos/PopIEVentas.aspx | 7 +++++++ Bancos/PopIEVentas.aspx.vb | 13 +++++++++---- Sistemas/Empresa.aspx | 5 +++++ Ventas/Clientes.aspx | 3 +++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Bancos/PopIEVentas.aspx b/Bancos/PopIEVentas.aspx index 4824b3eeb..cdaa66505 100644 --- a/Bancos/PopIEVentas.aspx +++ b/Bancos/PopIEVentas.aspx @@ -35,6 +35,13 @@ + + + +   + + +
diff --git a/Bancos/PopIEVentas.aspx.vb b/Bancos/PopIEVentas.aspx.vb index 3d83cb0b4..ef4f28551 100644 --- a/Bancos/PopIEVentas.aspx.vb +++ b/Bancos/PopIEVentas.aspx.vb @@ -736,11 +736,16 @@ Partial Class Bancos_PopIEVentas SerieFolio = dr("SerieFolio").ToString TipoCambioOriginal = dr("TipoCambio").ToString.ToDecimal CveSubProyectoVenta = dr("CveSubProyecto").ToString.ToEntero - 'Configuración de Modalidad Update - - 'Dim RFCCliente As String = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RFC", $"CveCliente = {CveCliente} ") - + LblMetodoPAgo.Text = $"{dr("ClaveMetodoPagoSATStr").ToString() }" + + + + 'Configuración de Modalidad Update + + 'Dim RFCCliente As String = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RFC", $"CveCliente = {CveCliente} ") + + If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then If dr("TipoDocto").ToString = "Rem" Then Alert("Los documentos de tipo Remisión no se permite realizar el pago", TipoMensaje.MsgAdvertencia) diff --git a/Sistemas/Empresa.aspx b/Sistemas/Empresa.aspx index 65c1c9719..0c560e540 100644 --- a/Sistemas/Empresa.aspx +++ b/Sistemas/Empresa.aspx @@ -1327,6 +1327,11 @@ + + + + + diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 3c9ac4d86..b592f7565 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1931,6 +1931,9 @@ + + + From 62b4d1dbd573665cede46afd290cdb41f965f87a Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Wed, 7 Oct 2020 18:22:36 -0700 Subject: [PATCH 5/8] correcion clientes --- Ventas/Clientes.aspx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index b592f7565..391f5f8cb 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1921,7 +1921,9 @@
- +
+ @@ -1977,6 +1979,8 @@ +
+ @@ -2006,14 +2010,15 @@
-
+
" style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
-
+

+
@@ -2055,6 +2060,7 @@ +
From 0fac7c5b0949682bcc50ea26327489b7cb713322 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 7 Oct 2020 19:59:18 -0700 Subject: [PATCH 6/8] =?UTF-8?q?validaciones=20del=20producto=20servicio=20?= =?UTF-8?q?sat=20con=20c=C3=B3digo=2001010101=20al=20cargar=20una=20factur?= =?UTF-8?q?a=20con=20xml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 117 ++++++++++++++++++++++++++++++++-------- 1 file changed, 96 insertions(+), 21 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index be933f6a1..d7ef591ea 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -29,6 +29,24 @@ Partial Class Compras_Compras End Set End Property + Private Property EstaAsociadoACajaChica() As Boolean + Get + Return If(IsNothing(ViewState("EstaAsociadoACajaChica")), False, CBool(ViewState("EstaAsociadoACajaChica"))) + End Get + Set + ViewState("EstaAsociadoACajaChica") = Value + End Set + End Property + + Private Property EstaAsociadoAPersonal() As Boolean + Get + Return If(IsNothing(ViewState("EstaAsociadoAPersonal")), False, CBool(ViewState("EstaAsociadoAPersonal"))) + End Get + Set + ViewState("EstaAsociadoAPersonal") = Value + End Set + End Property + Private Property CveUsuarioEvaluador() As Integer Get Return If(IsNothing(ViewState("CveUsuarioEvaluador")), -1, CInt(ViewState("CveUsuarioEvaluador"))) @@ -848,6 +866,14 @@ Partial Class Compras_Compras ViewState("PopUpOC") = value End Set End Property + Private Property CompraEstaVinculadaOC As Boolean + Get + Return CBool(ViewState("CompraEstaVinculadaOC")) + End Get + Set(value As Boolean) + ViewState("CompraEstaVinculadaOC") = value + End Set + End Property #End Region #Region "PROPIEDADES ALMACEN" 'Charlie @@ -1307,6 +1333,9 @@ Partial Class Compras_Compras ViewState("CveFactura") = Request("CveFactura").ToEntero Dim RFC As String = CargaFactura(CveFactura) + If Not VerificarProductosSATPS() Then + Exit Sub + End If If RFC.Trim <> String.Empty Then DdlProveedor.Visible = False HplProveedor.Visible = True @@ -1734,6 +1763,7 @@ Partial Class Compras_Compras 'TmpDT.Columns.Add("IEPSPSIVAPorcentaje") SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal AddPS2(False) + End If Else CargaConceptosXML(XMLDoc) @@ -3971,6 +4001,17 @@ Partial Class Compras_Compras DtNoEncontrados.Dispose() End If + 'Verifica funcionalidad 702 "Require orden de compra para factura de compra" + + If UsuarioActual.Empresa.Funcionalidad(702) = "1" Then + If Not EstaAsociadoACajaChica And Not EstaAsociadoAPersonal Then + If Not CompraEstaVinculadaOC Then + Alert("Debe de vincular una orden de compra para realizar esta factura") + Exit Sub + End If + End If + End If + 'Si se marcó No Deducible en el encabezado mínimo se debe registrar un No Deducible en el Detalle Dim GuardaNoDeducibles As Boolean = False If ChkEsNoDeducible.Checked Then @@ -12712,6 +12753,7 @@ Partial Class Compras_Compras CveMoneda = dr("CveMoneda").ToString.ToEntero IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero + EstaAsociadoACajaChica = True End If If UsuarioActual.Empresa.Funcionalidad(505) <> "1" Then @@ -12740,7 +12782,7 @@ Partial Class Compras_Compras ObjMovtos.Dispose() DDlCheques.DataBind() - + EstaAsociadoAPersonal = True DDlCheques_SelectedIndexChanged(DDlCheques, EventArgs.Empty) Else @@ -13751,6 +13793,9 @@ Partial Class Compras_Compras #Region " REEMBOLSOS NO USA AC " Protected Sub DdlPersonal2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPersonalReembolso.SelectedIndexChanged ViewState("CvePersonal") = DdlPersonalReembolso.SelectedValue + If DdlPersonalReembolso.SelectedValue.ToEntero > 0 Then + EstaAsociadoAPersonal = True + End If End Sub Protected Sub DdlCajaChica2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuentaCajaChicaReembolso.SelectedIndexChanged Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuentaCajaChicaReembolso.SelectedValue) @@ -13759,6 +13804,7 @@ Partial Class Compras_Compras CveMoneda = dr("CveMoneda").ToString.ToEntero IdCuentaBancaria = dr("IdCtaContable").ToString.ToEntero CveCuentaBancaria = dr("IdCtaContableSIG").ToString.ToEntero + EstaAsociadoACajaChica = True End If ViewState("CveCajaChica") = DdlCuentaCajaChicaReembolso.SelectedValue End Sub @@ -15381,27 +15427,27 @@ Partial Class Compras_Compras Dim SubTotalCompra As Decimal = Amortizacion Dim DiferenciaPermitida = 1 Dim Cont = 0 - Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") - For Each gvr As GridViewRow In GvOC1.Rows - SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal - If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero()) - Cont = 1 - If GvOC1.Columns(6).Visible Then - Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText() - Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text - If SatPS.Contains("01010101") Then - ProductosCodigoSATNoPermitidos.AppendFormat("{0}
", NombreProducto) - 'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto) - 'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) + 'Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") + 'For Each gvr As GridViewRow In GvOC1.Rows + ' SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal + ' If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero()) + ' Cont = 1 + ' If GvOC1.Columns(6).Visible Then + ' Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText() + ' Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text + ' If SatPS.Contains("01010101") Then + ' ProductosCodigoSATNoPermitidos.AppendFormat("{0}
", NombreProducto) + ' 'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto) + ' 'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) - End If - End If - Next - If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then - Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:

{0}", ProductosCodigoSATNoPermitidos.ToString) - Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) - Exit Sub - End If + ' End If + ' End If + 'Next + 'If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then + ' Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:

{0}", ProductosCodigoSATNoPermitidos.ToString) + ' Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) + ' Exit Sub + 'End If If Math.Abs(SubTotalGV - SubTotalCompra) < DiferenciaPermitida Then LbSubTotalDif.Visible = False @@ -15639,6 +15685,7 @@ Partial Class Compras_Compras End If CalculaTotales() + CompraEstaVinculadaOC = True End Sub @@ -20156,7 +20203,35 @@ Partial Class Compras_Compras End Sub + Private Function VerificarProductosSATPS() As Boolean + Dim CvePSGRuposAux As New StringBuilder("") + For Each gvr As GridViewRow In GvPS.Rows + Dim CvePSIndividual As String = gvr.DataKey("CvePS") + CvePSGRuposAux.AppendFormat("{0},", CvePSIndividual) + Next + Dim CvePSGRupos As String = Left(CvePSGRuposAux.ToString, CvePSGRuposAux.Length - 1) + + Dim PSSat As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CvePS IN ({0})", CvePSGRuposAux)) + + Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") + For Each PS As GridViewRow In GvPS.Rows + Dim PSIndividual As String = PS.DataKey("PS") + Dim ClavePSSAT As String = PSSat.FiltroPrimeroValor("CveSATPS", String.Format("PS = '{0}'", PSIndividual)) + If ClavePSSAT = "46920" Then + ProductosCodigoSATNoPermitidos.AppendFormat("{0}
", PSIndividual) + End If + Next + + If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then + Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:

{0}", ProductosCodigoSATNoPermitidos.ToString) + Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) + Return False + End If + + Return True + + End Function End Class From 7ef202e81842fc4c8cdd5d6af6906f6119f746c1 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Thu, 8 Oct 2020 12:33:34 -0700 Subject: [PATCH 7/8] Fuctaciones Cambiarias, se agrega txt Concepto por cada tipo --- Bancos/FluctuacionCambiaria.aspx | 155 +++++++++++++++++++------- Bancos/FluctuacionCambiaria.aspx.vb | 64 +++-------- Inventarios/TrasladoSolicitud.aspx | 50 +++++---- Inventarios/TrasladoSolicitud.aspx.vb | 6 + 4 files changed, 162 insertions(+), 113 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx index 57b64e754..3ecd068fa 100644 --- a/Bancos/FluctuacionCambiaria.aspx +++ b/Bancos/FluctuacionCambiaria.aspx @@ -225,20 +225,32 @@
+ +
-
- - - - - -
+ +
+ + + + +
+ +
+ + + + + +
+
-
- + + @@ -320,19 +332,31 @@ -
+
-
- - + +
+ + + + +
+ +
+ - - -
+ + + +
+ +
+

@@ -361,17 +385,30 @@
-
- - + + +
+ + + + +
+ +
+ - - -
+ + + +
+ +
+
@@ -407,13 +444,23 @@
-
- - + +
+ + + + +
+ +
+ - - -
+ + + +
+
@@ -445,14 +492,26 @@
-
-
- - - - - -
+
+ +
+ + + + +
+ +
+ + + + + +
+ + +
@@ -481,13 +540,23 @@
-
- - - - - -
+ +
+ + + + +
+ +
+ + + + + +
+
diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index b2b635433..504ba6539 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -20,7 +20,7 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyecto) + CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyectoBancos) CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas) CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras) CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales) @@ -232,17 +232,12 @@ Partial Class Bancos_FluctuacionCambiaria #Region "FLUCTUACION COMPRAS" - Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs) - - 'If DdlSubproyecto.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - + Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs) + Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaC", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaC", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoCompras.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -306,18 +301,12 @@ Partial Class Bancos_FluctuacionCambiaria #Region "FLUCTUACION VENTAS" - Protected Sub BtnGeneraVentas_Click(sender As Object, e As EventArgs) - - 'If DdlsubProyectoVentas.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - - + Protected Sub BtnGeneraVentas_Click(sender As Object, e As EventArgs) + Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Ventas", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoVentas.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -345,13 +334,13 @@ Partial Class Bancos_FluctuacionCambiaria CveCuenta = CveCuentaPerdida idCta = idCtaPerdida TipoMovto = False - End If - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then - ErrorRegistrar = True - End If + End If - Dim CveConconceptoCliente As Integer = 203 + If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then + ErrorRegistrar = True + End If + + Dim CveConconceptoCliente As Integer = 203 'saco las cuentas de pérdida y ganancia For Each gvr As GridViewRow In GvVentas.Rows @@ -386,18 +375,12 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraBancos_Click(sender As Object, e As EventArgs) - - 'If DdlSubproyectoBancos.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa) ObjContPaq.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Bancaria", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoBancos.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -485,16 +468,10 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraDedudores_Click(sender As Object, e As EventArgs) - - 'If DdlSubProyectoDeoudores.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Dim Banco As New ClsBancos(Conta.IniciaTransacSQL()) - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaDD", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Deudor", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaDD", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoDeudores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -565,17 +542,12 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraFiliales_Click(sender As Object, e As EventArgs) - 'If DdlSubproyecto.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Dim Banco As New ClsBancos(Conta.IniciaTransacSQL()) Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa) ObjContPaq.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaFilial", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Filiales", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaFilial", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoFiliales.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -665,12 +637,10 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraAcreedores_Click(sender As Object, e As EventArgs) - - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoAcreedores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer diff --git a/Inventarios/TrasladoSolicitud.aspx b/Inventarios/TrasladoSolicitud.aspx index 5e5b351c2..ea4114667 100644 --- a/Inventarios/TrasladoSolicitud.aspx +++ b/Inventarios/TrasladoSolicitud.aspx @@ -234,35 +234,39 @@
- - -
+ + + -
- +
+ +
+
- - - + + + -
Estado :
Usuario :
Fecha :
Estado :
Usuario :
Fecha :
+ +
+
-
- -
- -
- +
-
- -
-
- -
+
+ +
+
+ +
-
+
+ + + + + diff --git a/Inventarios/TrasladoSolicitud.aspx.vb b/Inventarios/TrasladoSolicitud.aspx.vb index 13286849f..baf983a9c 100644 --- a/Inventarios/TrasladoSolicitud.aspx.vb +++ b/Inventarios/TrasladoSolicitud.aspx.vb @@ -285,6 +285,9 @@ Partial Class Inventarios_TrasladoSolicitud Else Alert("Ocurrió un error al obtener los datos del traspaso.", TipoMensaje.MsgError) End If + + UpAutorizaciones.Update() + End If ObjInventarios.Dispose() ObjClientes.Dispose() @@ -1034,6 +1037,9 @@ Partial Class Inventarios_TrasladoSolicitud MandaCorreoRechazo(LbFolio.Text.ToEntero, CveTraspasoSolicitud, CveUsuarioSolicita, TxtMotivoRechazo.Text) CargaDatos() RegistraScript("$('#ModalRechazarTraslado').modal('hide');") + + + End If End Sub From 726b445552d1bc80aeaa1efa5bc5955cd63ebabd Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 8 Oct 2020 14:29:01 -0700 Subject: [PATCH 8/8] --- RH/Personal.aspx.vb | 17 ++++++++++++----- Ventas/Clientes.aspx.vb | 2 +- vwd.webinfo | 2 ++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 9f4100846..7e0de0225 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -1089,11 +1089,18 @@ Partial Class RH_Personal End Sub Private Sub CargaSubProyectoAsignado() - DdlSubProyectoAsignado.Items.Clear() - DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(DdlProyectoAsignado.SelectedValue.ToEntero) - DdlSubProyectoAsignado.DataBind() - - DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Sin SubProyecto asignado", "-1")) + If DivProyectosAsignado.Visible Then + + DdlSubProyectoAsignado.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + DdlSubProyectoAsignado.DataBind() + DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Todos", "-1")) + 'old + 'DdlSubProyectoAsignado.Items.Clear() + 'DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(DdlProyectoAsignado.SelectedValue.ToEntero) + 'DdlSubProyectoAsignado.DataBind() + + 'DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Sin SubProyecto asignado", "-1")) + End If End Sub Private Sub CargaSubProyectoAsistenciaC() diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index c2b28c20a..de17079a9 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2731,7 +2731,7 @@ Partial Class Clientes 'HLRemision.HRef = $"/Ventas/Ventas.aspx?CveRemision={e.Row.DBCampo("CveVenta")}" Dim Liga As String = String.Format("< a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta")) - HLSendMail.HRef = String.Format("javascript:$get('HdnTipoDocto').value='{0}';$get('HdnCveVenta').value='{1}';$get('HdnFolioVenta').value='{2}';$get('TxtParaMail').value='{3}';$get('HdnSerieFolio').value='{4}';$get('HdnSubProyecto').value='{5}';$('#ModalDivMail').modal();", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("folio"), e.Row.DBCampo("Correo"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("SubProyecto")) + HLSendMail.HRef = String.Format("javascript:(function mail(){{$get('HdnTipoDocto').value='{0}';$get('HdnCveVenta').value='{1}';$get('HdnFolioVenta').value='{2}';$get('TxtParaMail').value='{3}';$get('HdnSerieFolio').value='{4}';$get('HdnSubProyecto').value='{5}';$('#ModalDivMail').modal();return false;}})();", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("folio"), e.Row.DBCampo("Correo"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("SubProyecto")) e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("Folio")) UpSendMail.Update() diff --git a/vwd.webinfo b/vwd.webinfo index f280abd89..c04cff67c 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -114,6 +114,8 @@ + +