From ada9cbb203cc485dd463f7124d8c73e8152950af Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Thu, 23 Jan 2020 12:35:21 -0700 Subject: [PATCH 01/13] -getpersonal ashx --- Ashx/SIGWeb.ashx | 14 ++++++------- Compras/Compras.aspx.vb | 45 ++++++++++++++++++++++------------------- vwd.webinfo | 10 +++++++++ 3 files changed, 41 insertions(+), 28 deletions(-) create mode 100644 vwd.webinfo diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index b4e505574..ec5a98394 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -701,14 +701,14 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState Else CveEmpresa = usuario.CveEmpresa Dim Name = IfNull(context.Request("Name"), "-1").ToString - Dim AppNombre As String = String.Format("GlobalDTCompProveedores{0}", CveEmpresa) + Dim AppNombre As String = String.Format("GlobalDTRHPersonal{0}", CveEmpresa) 'sino existe, recarga los datos If context.Application(AppNombre) Is Nothing Then - Dim ObjProveedores As New ClsRH - If ObjProveedores.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, usuario.CveEmpresa) Then - context.Application(AppNombre) = ObjProveedores.DtResultados + Dim ObjPersonal As New ClsRH + If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, CveEmpresa) Then + context.Application(AppNombre) = ObjPersonal.DtResultados End If - ObjProveedores.Dispose() + ObjPersonal.Dispose() End If 'Dim ObjProveedores As New ClsCompProveedores @@ -718,13 +718,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState 'ObjProveedores.Dispose() Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}") If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then - DtRetorno = dt.FiltraParametros($"Nombre like '%{Name}%'") + DtRetorno = dt.FiltraParametros($"NombreCompleto like '%{Name}%'") End If End If If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then DtRetorno.Columns("CvePersonal").ColumnName = "id" - DtRetorno.Columns("Nombre").ColumnName = "text" + DtRetorno.Columns("NombreCompleto").ColumnName = "text" retorno = JsonConvert.SerializeObject(DtRetorno).ToString context.Response.Write(retorno) Else diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index d7784b57e..0f55c081a 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -6622,33 +6622,36 @@ Partial Class Compras_Compras IdCtaContable = 0 CveCuenta = 0 End If - Case 5 'Proveedores + Case 5 'Proveedores + If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor If Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then importeMovimiento = importeProv importeMN = importeMovimiento * tipoCambioActual * Multiplicador If tipoCambioActual > 1 Then Concepto += $" TC:{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}" - - If tipoCambioActual = 1 Then - IdCtaContable = CtaProveedor - CveCuenta = CveCuentaProveedor - Else - IdCtaContable = CtaProveedorComplementaria - CveCuenta = CveCuentaProveedorComplementaria - If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then - importeMN = importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, 201, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then - ErrorPrepoliza = True - End If - End If - IdCtaContable = CtaProveedorExtranjera - CveCuenta = CveCuentaProveedorExtranjera - End If - End If - If CveTipoConcepto = 2 Then ConceptoContable = 305 'cuando es acreedor - - Case 59 'Documentos + Dim CveConceptoComplementario As Integer = 201 + If CveTipoConcepto = 2 Then CveConceptoComplementario = 310 + + If tipoCambioActual = 1 Then + IdCtaContable = CtaProveedor + CveCuenta = CveCuentaProveedor + Else + IdCtaContable = CtaProveedorComplementaria + CveCuenta = CveCuentaProveedorComplementaria + If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsuarioActual.CveEmpresa = 119) Then 'Cuando tiene complementaria lo dividimos en dos Then + importeMN = importeMovimiento + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Referencia, CveConceptoComplementario, Concepto, FechaMovimiento, IdCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, ImporteMX:=importeMovimiento * tipoCambioActual - importeMovimiento, ImporteME:=importeMovimiento, CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then + ErrorPrepoliza = True + End If + End If + IdCtaContable = CtaProveedorExtranjera + CveCuenta = CveCuentaProveedorExtranjera + End If + End If + + + Case 59 'Documentos importeMovimiento = importeCreditos importeMN = importeMovimiento * tipoCambioActual * Multiplicador If ObjConta.GetRetCuenta(ConceptoContable, CveProveedor) Then diff --git a/vwd.webinfo b/vwd.webinfo new file mode 100644 index 000000000..07746b18a --- /dev/null +++ b/vwd.webinfo @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file From 839878500861869e9da931dd6b17e5108301fe2e Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 23 Jan 2020 12:56:02 -0700 Subject: [PATCH 02/13] haciendo grande el qr de de los reportes --- Empresas/146/Formatos/Factura.rdlc | 6 +++--- Empresas/146/Formatos/NotaCredito.rdlc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Empresas/146/Formatos/Factura.rdlc b/Empresas/146/Formatos/Factura.rdlc index ed8648fc9..011fa5947 100644 --- a/Empresas/146/Formatos/Factura.rdlc +++ b/Empresas/146/Formatos/Factura.rdlc @@ -227,10 +227,10 @@ External =Parameters!QR.Value FitProportional - 5.87436in + 5.8661in 0.03915in - 0.95455in - 1.49755in + 1.31478in + 1.58997in 5 - - - - true - true - - - - - PLACA: - - - - =Parameters!Placa.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - CHOFER: - - - - =Parameters!ResponsableRecibio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - ESPECIFICACIÓN DE LA UNIDAD: - - - - =Parameters!EspecifUnidad.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 9.85744cm - 0cm - 0.91152cm - 19.6022cm - 13 - - =IIf((Parameters!Chofer.Value = "" or Parameters!Chofer.Value = "-1") And (Parameters!Placa.Value = "" Or Parameters!Placa.Value = "-1"),True,False) - - - - - true true @@ -1468,11 +1331,11 @@ Textbox21 - 13.24837cm - 2.21206cm + 13.69816cm + 2.20199cm 1.2cm 5.78664cm - 14 + 13 @@ -1503,11 +1366,11 @@ Textbox22 - 11.58471cm - 2.21206cm + 12.0345cm + 2.20199cm 0.6cm 5.78664cm - 15 + 14 @@ -1551,11 +1414,11 @@ Textbox21 - 13.24837cm - 11.60471cm + 13.69816cm + 11.59464cm 1.2cm 5.78664cm - 16 + 15 @@ -1586,11 +1449,11 @@ Textbox22 - 11.58471cm - 11.60471cm + 12.0345cm + 11.59464cm 0.6cm 5.78664cm - 17 + 16 @@ -1621,11 +1484,11 @@ Textbox22 - 12.88411cm - 2.21206cm + 13.3339cm + 2.20199cm 0.52062cm 5.78664cm - 18 + 17 @@ -1656,11 +1519,11 @@ Textbox22 - 12.88411cm - 11.60471cm + 13.3339cm + 11.59464cm 0.52062cm 5.78664cm - 19 + 18 @@ -1776,7 +1639,7 @@ 0.23022cm 2.22232cm 19.21855cm - 20 + 19 @@ -1819,7 +1682,7 @@ 0.23022cm 0.62599cm 19.21855cm - 21 + 20 @@ -1839,11 +1702,174 @@ 2pt + + + + + 5.06862cm + + + 3.10917cm + + + 10.93493cm + + + + + 0.6cm + + + + + true + true + + + + + CHOFER: + + + + =Parameters!ResponsableRecibio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + PLACA: + + + + =Parameters!Placa.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + ESPECIFICACION DE LA UNIDAD: + + + + =Parameters!EspecifUnidad.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + + + + + 7.37959cm + 0.21008cm + 0.6cm + 19.11272cm + 21 + + + + 8.91698in - 1.23527cm + 1.23526cm true true - 0.03528cm + 0.03527cm 0.22015cm 0cm 19.22862cm @@ -2119,7 +2145,7 @@ Textbox13 - 0.14111cm + 0.1411cm 0.22015cm 0.54708cm 1.55632cm @@ -2153,7 +2179,7 @@ Textbox14 - 0.14111cm + 0.1411cm 1.77647cm 0.54708cm 4.96223cm @@ -2188,7 +2214,7 @@ Textbox13 - 0.14111cm + 0.1411cm 6.84454cm 0.54708cm 2.84562cm @@ -2223,7 +2249,7 @@ Textbox14 - 0.14111cm + 0.1411cm 9.69015cm 0.54708cm 4.68641cm @@ -2257,7 +2283,7 @@ Textbox14 - 0.17639cm + 0.17638cm 14.62633cm 0.54708cm 4.8023cm @@ -2289,7 +2315,7 @@ Textbox14 - 0.68819cm + 0.68818cm 0.22015cm 0.54708cm 6.21751cm diff --git a/Inventarios/TraspasoAlmacen.aspx b/Inventarios/TraspasoAlmacen.aspx index f1c3f6634..dee55b849 100644 --- a/Inventarios/TraspasoAlmacen.aspx +++ b/Inventarios/TraspasoAlmacen.aspx @@ -1,866 +1,916 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="TraspasoAlmacen.aspx.vb" Inherits="Inventarios_TraspasoAlmacen" %> - - - - - - - - - - Traspaso de Almacén - - -
  • - Cargar Conceptos -
  • -
    - - - - - - - - -
    -
    - - - - - -
    -
    -
    - - TRASPASO ENTRE ALMACENES -
    -
    -
    -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - - -
    - - -
    - - - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    - - - - -
    -
    -
    -
    -
    - - - - - -
    -
    -
    -
    - - Movimiento Entrada: -
    -
    -
    -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    - -
    - -
    -
    -
    - -
    - Ver Compra -
    -
    -
    -
    -
    -
    -
    - - - - - - - - - -
    -
    - - - - - - -
    - - - - - - - -
    -
    -
    -
    -
    - - - - - - - +<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="TraspasoAlmacen.aspx.vb" Inherits="Inventarios_TraspasoAlmacen" %> + + + + + + + + + + Traspaso de Almacén + + +
  • + Cargar Conceptos +
  • +
    + + + + + + + + +
    +
    + + + + + +
    +
    +
    + + TRASPASO ENTRE ALMACENES +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    + + + +
    + + +
    + + + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + + + + +
    +
    +
    +
    +
    + + + + + +
    +
    +
    +
    + + Movimiento Entrada: +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + Ver Compra +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + +
    +
    +
    #CantidadUnidad
    + + + + + +
    + + + + + + + +
    +
    + +
    + + + + + + + + - - - - - - - - - - - - - - - - - - - -
    #CantidadUnidad Clasificación -
    + +
    Producto -
    ObservacionesSerie - Lote LoteBatchSección AlmacenComandos
    - - - - - - - - - - - -
    -
    - - - -
    - -
    -
    -
    -
    -
    - - - - - - - - - - - -
    - - -
    - - - - - - - - - - - <%-- --%> - - - - - - - - - - - - - - - - - - - -
    - - - -
    - - - -
    -
    - - -
    -
    -
    -
    - - - - - -
    - - - - - - -
    -
    -
    - -
    -
    -
      + + Observaciones + Serie - Lote + Lote + Batch + Sección Almacen + Comandos + + + + + + + + + + + + + + + + + + +
      +
      + + + +
      + +
      +
      +
      +
      + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + +
      + + + +
      + + + +
      +
      + + +
      +
      +
      +
      + +
    + + + + + + + + + + +
    +
    +
    + +
    +
    +
    • Almacén Recibe: - - <%----%> + + + <%----%> <%----%> -
    • +
    • Almacén Transitorio: - - - -
    • + + + + +
    • Folio: - - -
    • + + + + <%--
    • Transportista/Responsable: -
    • --%> -
    -
    -
    -
    -
    -
    -
    - -
    -
    - - - - -
    -
    -
    - - RECEPCIÓN DE TRASPASO -
    -
    -
    -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    - - - - - - - - - - - - - -
    -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    -
    - - + --%> + +
    +
    +
    + + +
    + +
    +
    + + + + +
    +
    +
    + + RECEPCIÓN DE TRASPASO +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +     - - - -
    -
    -
    -
    -
    -
    -
    -
    -
    - - - - -
    -
    - - - - - - -
    - - - - - - - -
    -
    -
    -
    -
    - - - - - - + + + + +
    +
    +
    +
    + + +
    + +
    + + + + +
    +
    + + + + + + +
    + + + + + + + +
    +
    +
    +
    +
    + + + + + + <%-- - --%> - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - - -
    -
    - -
    - -
    - - -
    - - + + <%--Modal para agregar camion--%> + +
    + + - - + + + diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 33aa8f9b5..34968bd47 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -422,7 +422,7 @@ Partial Class Inventarios_TraspasoAlmacen SiguienteFolio(If(ChkTransitorio.Checked, 9, 8)) 'DdlProducto.DataBind() - + CargarCamiones() End Sub Private Sub CargaAlmacenOrigen() DdlAlmacenOrigen.Enabled = True @@ -2779,4 +2779,22 @@ Partial Class Inventarios_TraspasoAlmacen Return dataTable End Function + Public Sub CargarCamiones() + Dim ObjInventarios As New ClsInventarios + If ObjInventarios.GetCamiones(-1, UsuarioActual.CveEmpresa) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then + DdlUnidadCamion.DataSource = ObjInventarios.DtResultados + End If + ObjInventarios.Dispose() + DdlUnidadCamion.DataBind() + End Sub + Public Sub BtnAgregarCamion_Click(sender As Object, e As EventArgs) Handles BtnAgregarCamion.Click + Dim ObjInventarios As New ClsInventarios + If ObjInventarios.AddCamiones(TxtPlacaNuevo.Text, TxtEspecificacionNuevo.Text, UsuarioActual.CveEmpresa) Then + RegistraScript("$('#DivAgregarNuevoCamion').modal('hide');") + CargarCamiones() + TxtPlacaNuevo.Text = "" + TxtEspecificacionNuevo.Text = "" + End If + ObjInventarios.Dispose() + End Sub End Class From 06e57efeedcbbff471c95b80afd6cab2455b84fa Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 24 Jan 2020 17:34:37 -0700 Subject: [PATCH 08/13] cambios en los reportes --- Compras/PopUpVerFactura.aspx.vb | 73 ++++++++++++++----------- Empresas/72/Formatos/EntradaSalida.rdlc | 9 +++ 2 files changed, 51 insertions(+), 31 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 636954eb7..1956cf894 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -2422,10 +2422,15 @@ Partial Class PopUpVerFactura ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Desarmado de Paquete - {0}", Folio.ToString), RDSName:="DsInventarios") - Case 21 'SALIDA POR PRESTAMO + Case 21, 22 'SALIDA POR PRESTAMO Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim params As New List(Of ReportParameter) + Dim Archivo As String = $"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntradaSalida.rdlc" + If Not File.Exists($"{Server.MapPath("~")}/{Archivo}") Then + Archivo = "Empresas/Grales/Formatos/EntradaSalida.rdlc" + End If + 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)) @@ -2433,7 +2438,7 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("LogoPath", "")) End If - params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) + 'params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Concepto", "Salida por Prestamo")) params.Add(New ReportParameter("Almacen", Almacen)) params.Add(New ReportParameter("Fecha", Fecha)) @@ -2447,37 +2452,43 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturadoA", NombreCliente)) If (UsuarioActual.CveEmpresa = 72) Then params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) - End If - ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") - - Case 22 'ENTRADA POR PRESTAMO - Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim params As New List(Of ReportParameter) - - 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", "")) + params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) End If - - params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("Concepto", "Entrada por Prestamo")) - params.Add(New ReportParameter("Almacen", Almacen)) - params.Add(New ReportParameter("Fecha", Fecha)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) - params.Add(New ReportParameter("Folio", Folio)) - 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("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) - params.Add(New ReportParameter("FacturadoA", NombreCliente)) - If (UsuarioActual.CveEmpresa = 72) Then - params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) - End If - ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") - + If CveConcepto = 21 Then + ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Salida por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") + ElseIf CveConcepto = 22 Then + ImprimirPDF(Archivo, DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") + End If + + 'Case 22 'ENTRADA POR PRESTAMO + ' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + ' Dim params As New List(Of ReportParameter) + + ' 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("Empresa", UsuarioActual.Empresa.Empresa)) + ' params.Add(New ReportParameter("Concepto", "Entrada por Prestamo")) + ' params.Add(New ReportParameter("Almacen", Almacen)) + ' params.Add(New ReportParameter("Fecha", Fecha)) + ' params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString("dd/MM/yyyy"))) + ' params.Add(New ReportParameter("Folio", Folio)) + ' 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("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio))) + ' params.Add(New ReportParameter("FacturadoA", NombreCliente)) + ' If (UsuarioActual.CveEmpresa = 72) Then + ' params.Add(New ReportParameter("DomicilioFiscal", DomicilioFiscalCompu)) + ' End If + ' ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada por Prestamo - {0}", Folio.ToString), RDSName:="DsInventarios") + Case 24 'SALIDA POR RESGUARDO If DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 20 Or DtMovimientos(0)("CveTipoAlmacen").ToString.ToEntero = 19 Then Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) diff --git a/Empresas/72/Formatos/EntradaSalida.rdlc b/Empresas/72/Formatos/EntradaSalida.rdlc index 367195937..e490dca7f 100644 --- a/Empresas/72/Formatos/EntradaSalida.rdlc +++ b/Empresas/72/Formatos/EntradaSalida.rdlc @@ -992,6 +992,9 @@ 0.6cm 1.57396cm 9 + + =IIF(Parameters!FacturaProveedor.Value<>"",False,True) + @@ -1573,6 +1576,12 @@ String ReportParameter1 + + String + true + true + ReportParameter1 + From 5375506fceb0848617843cb22578a883a7b8225f Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Sat, 25 Jan 2020 11:30:15 -0700 Subject: [PATCH 09/13] Correcion iva no cocide al genrar nota de credito --- Compras/Compras.aspx.vb | 8 +++- Ventas/Ventas.aspx.vb | 82 +++++++++++++++++++++++------------------ 2 files changed, 52 insertions(+), 38 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 249aacf1a..bac62de39 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -8431,8 +8431,12 @@ Partial Class Compras_Compras If Not gvr.DataKey("TipoDocto").Contiene("NC", "DEV", "Ant") Then If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then If sumaAmortizacion = CompraSaldo Then - ImporteMovimiento = TxtIVA.Text.ToDecimal - IVACompleto = True + ImporteMovimiento = TxtIVA.Text.ToDecimal + + If ImporteMovimiento > 0 Then + IVACompleto = True + End If + Else ImporteMovimiento = 0 End If diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 2d40eee5b..b837eb7cd 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -21240,20 +21240,24 @@ Partial Class Ventas Dim ImporteReferencia As Decimal = If(DdlNCNivelImporte.SelectedValue.ToEntero = 1, Total, SubTotal) Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100 Dim FiltroStr As String = "" + Dim importePuTemp As Decimal = 0 For Each Dr As DataRow In DtImpuestosLocal.Rows FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString.ToDecimal, Dr("PorcentajeRetIVA").ToString.ToDecimal, Dr("PorcentajeRetISR").ToString.ToDecimal, Dr("PorcentajeIEPS").ToString.ToDecimal, Dr("CveSubProyecto")) - Dr("ImporteTotal") = Math.Round(Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr) - TmpDT.SUM("Descuento", FiltroStr)), 2) + importePuTemp = (Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr) - TmpDT.SUM("Descuento", FiltroStr))).ToDecimal + Dr("ImporteTotal") = importePuTemp.RoundSQL() - 'Dr("ImporteIVA") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeIVA").ToString().ToDecimal()).RoundSQL(2) - 'Dr("ImporteRetIVA") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2) - 'Dr("ImporteRetISR") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2) - 'Dr("ImporteIEPS") = (Dr("ImporteTotal").ToString().ToDecimal() * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2) - Dr("ImporteIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIVA", FiltroStr), 2) - Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2) - Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2) - Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", FiltroStr), 2) - Dr("ImportePU") = Dr("ImporteTotal").ToString.ToDecimal '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal) + Dr("ImporteIEPS") = (importePuTemp * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2) + Dr("ImporteIVA") = ((importePuTemp + Dr("ImporteIEPS").ToString.ToDecimal) * Dr("PorcentajeIVA").ToString.ToDecimal) + Dr("ImporteRetIVA") = (importePuTemp * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2) + Dr("ImporteRetISR") = (importePuTemp * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2) + + + 'Dr("ImporteIVA") = (Porcentaje * TmpDT.SUM("ImporteIVA", FiltroStr)).RoundSQL(2) + 'Dr("ImporteRetIVA") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetIVA", FiltroStr), 2) + 'Dr("ImporteRetISR") = Math.Round(Porcentaje * TmpDT.SUM("ImporteRetISR", FiltroStr), 2) + 'Dr("ImporteIEPS") = Math.Round(Porcentaje * TmpDT.SUM("ImporteIEPS", FiltroStr), 2) + Dr("ImportePU") = Dr("ImporteTotal").ToString.ToDecimal.RoundSQL(2) '(Dr("ImporteTotal").ToString.ToDecimal - Dr("ImporteIVA").ToString.ToDecimal - Dr("ImporteRetIVA").ToString.ToDecimal - Dr("ImporteRetISR").ToString.ToDecimal - Dr("ImporteIEPS").ToString.ToDecimal) Next 'codigo para ajuste de centavo, si el importe total no cuadra con los totales Dim difTmp As Decimal = Importe - (DtImpuestosLocal.SUMD("ImporteTotal") + DtImpuestosLocal.SUMD("ImporteIVA") + DtImpuestosLocal.SUMD("ImporteIEPS") - DtImpuestosLocal.SUMD("ImporteRetIVA") - DtImpuestosLocal.SUMD("ImporteRetISR")) @@ -24067,39 +24071,45 @@ Partial Class Ventas #End Region Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs) - If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then - If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then - For Each RowServicio As DataRow In TmpDT.Rows - Dim tClienteRetIVA = ClienteRetIVA - If tClienteRetIVA <= 0 Then - If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then - tClienteRetIVA = 0.106667D - ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then - tClienteRetIVA = 0.04D - ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then - tClienteRetIVA = 0.06D + + If CveVenta <= 0 Then + If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then + If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count > 0 Then + For Each RowServicio As DataRow In TmpDT.Rows + Dim tClienteRetIVA = ClienteRetIVA + If tClienteRetIVA <= 0 Then + If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then + tClienteRetIVA = 0.106667D + ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then + tClienteRetIVA = 0.04D + ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then + tClienteRetIVA = 0.06D + End If + ViewState("ClienteRetIVA") = tClienteRetIVA End If - ViewState("ClienteRetIVA") = tClienteRetIVA + + Dim TotalCalculableImpuestos As Decimal = (RowServicio("Cantidad").ToString().ToDecimal() * RowServicio("PU").ToString().ToDecimal()) - RowServicio("Descuento").ToString().ToDecimal() + RowServicio("ImporteRetIVA") = (TotalCalculableImpuestos * ClienteRetIVA).RoundSQL() + RowServicio("PorcentajeRetIVA") = ClienteRetIVA + + Next + TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2) + Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100) + LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2) + If PorcentajeRetIVA > 0 Then + DdlTipoRetencion.Visible = True End If - Dim TotalCalculableImpuestos As Decimal = (RowServicio("Cantidad").ToString().ToDecimal() * RowServicio("PU").ToString().ToDecimal()) - RowServicio("Descuento").ToString().ToDecimal() - RowServicio("ImporteRetIVA") = (TotalCalculableImpuestos * ClienteRetIVA).RoundSQL() - RowServicio("PorcentajeRetIVA") = ClienteRetIVA + GvPS.DataSource = TmpDT + GvPS.DataBind() - Next - TxtRetIVA.Text = TmpDT.SUM("ImporteRetIVA").ToDecimal().FormatoNumero(2) - Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100) - LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2) - If PorcentajeRetIVA > 0 Then - DdlTipoRetencion.Visible = True + UpPS.Update() End If - - GvPS.DataSource = TmpDT - GvPS.DataBind() - - UpPS.Update() End If + End If + + End Sub End Class \ No newline at end of file From b9b22e0574d3f69c55ba265216a88185fd59e15a Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Sat, 25 Jan 2020 12:03:20 -0700 Subject: [PATCH 10/13] impresion de un formato de excel en ResguardoMaterial y funcion de no cerrar al modal de recepcion usados --- Inventarios/RecepcionUsados.aspx | 30 ++++++++++++++++----------- Inventarios/RecepcionUsados.aspx.vb | 10 +++++++-- Inventarios/ResguardoMaterial.aspx | 3 +++ Inventarios/ResguardoMaterial.aspx.vb | 14 +++++++++++++ 4 files changed, 43 insertions(+), 14 deletions(-) diff --git a/Inventarios/RecepcionUsados.aspx b/Inventarios/RecepcionUsados.aspx index 631f1dc2d..fc548e4f3 100644 --- a/Inventarios/RecepcionUsados.aspx +++ b/Inventarios/RecepcionUsados.aspx @@ -57,12 +57,12 @@ Recepción/Entrega de Usados - +
  • Imprimir
  • - +
  • @@ -347,7 +347,7 @@
    - +
    @@ -969,16 +969,22 @@
  • + Excel +
  • diff --git a/Inventarios/ResguardoMaterial.aspx.vb b/Inventarios/ResguardoMaterial.aspx.vb index 74c532c7d..fa847b2a8 100644 --- a/Inventarios/ResguardoMaterial.aspx.vb +++ b/Inventarios/ResguardoMaterial.aspx.vb @@ -3,6 +3,7 @@ Option Strict On Imports System.Data Imports Extensiones +Imports Microsoft.Reporting.WebForms Partial Class Inventarios_ResguardoMaterial Inherits ClsPaginas @@ -1210,7 +1211,20 @@ Partial Class Inventarios_ResguardoMaterial #End Region + Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click + Imprime("Excel") + End Sub + + Private Sub Imprime(Formato As String) + If DtMovimientosLiberacion IsNot Nothing Then + Dim params As New List(Of ReportParameter) + + ImprimirPDF("Empresas/Grales/Formatos/ResguardoMaterial.rdlc", DtMovimientosLiberacion, params, String.Format("RepResguardoMaterial-{0}", Now.ToDateTime.ToShortDateString), Formato) + Else + Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) + End If + End Sub End Class From aab5ce20f64c5e4da07fcd9f202f7b6515a42ebf Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Sat, 25 Jan 2020 14:00:42 -0700 Subject: [PATCH 11/13] . --- Inventarios/RecepcionUsados.aspx.vb | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index edbc4153c..68c89a4b4 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -1032,7 +1032,7 @@ Partial Class Inventarios_RecepcionUsados If Me.ObjRemisionNC IsNot Nothing Then Dim sb As New StringBuilder() - sb.Append($"Se va a generar un documento de tipo 'Remisión de nota de crédito'.
    Serie-Folio:{Me.ObjRemisionNC.SerieFolio}.
    ¿Esta seguro que desea guardar?:
    ") + sb.Append($"Se va a generar un documento de tipo 'Remisión de nota de crédito'.
    ¿Esta seguro que desea guardar?:
    ") Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, JSBtnAceptar:="GenerarRNC();", TextoConfirmacion:="    Si    ", TextoCancelacion:="    No    ") Else @@ -1096,10 +1096,11 @@ Partial Class Inventarios_RecepcionUsados CargaDTDetalleRNC() - Dim Resp = ObjRemisionNC.EmitirFactura(False) + Dim Resp = ObjRemisionNC.EmitirFactura(False, ObjInventario.IniciaTransacSQL) For Each mensaje2 As String In Resp.Mensajes Msg.AppendFormat("
    {0}", mensaje2) Next + If Resp.TieneError Then ErrorMovInv = True Alert(Msg.ToString, If(Resp.CveVenta > 0, TipoMensaje.MsgInformacion, TipoMensaje.MsgAdvertencia)) CveVenta = Resp.CveVenta End If @@ -2031,20 +2032,20 @@ Partial Class Inventarios_RecepcionUsados Dim Folio As String = "" Dim Serie As String = "" - Dim ObjFolios As New ClsGralFolios() - If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then - Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo' AND CveSubProyecto = {0}", CveSubProyecto)) - If DT.Rows.Count > 0 Then - Serie = DT.Rows(0)("Serie").ToString() - Folio = DT.Rows(0)("FActual").ToString() - End If - DT.Dispose() - End If - ObjFolios.Dispose() + 'Dim ObjFolios As New ClsGralFolios() + 'If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then + ' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo' AND CveSubProyecto = {0}", CveSubProyecto)) + ' If DT.Rows.Count > 0 Then + ' Serie = DT.Rows(0)("Serie").ToString() + ' Folio = DT.Rows(0)("FActual").ToString() + ' End If + ' DT.Dispose() + 'End If + 'ObjFolios.Dispose() Me.ObjRemisionNC.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.HTML - Me.ObjRemisionNC.Serie = Serie - Me.ObjRemisionNC.Folio = Folio.ToEntero() + Me.ObjRemisionNC.Serie = "-1" + Me.ObjRemisionNC.Folio = -1 'Folio.ToEntero() Me.ObjRemisionNC.Version = "3.3" Me.ObjRemisionNC.FolioFiscal = "" Me.ObjRemisionNC.CveUsuario = UsuarioActual.CveUsuario From 10ec41274041766659c4a2e379916bd7c3450345 Mon Sep 17 00:00:00 2001 From: Rene Molina Date: Mon, 27 Jan 2020 09:19:20 -0700 Subject: [PATCH 12/13] -cambios BDH --- App_Code/ClsPaginas.vb | 11 ++-- App_Code/Modelos.vb | 16 +++--- Inventarios/RecepcionUsados.aspx.vb | 80 +++++++++++++++-------------- Ventas/PV.aspx | 21 +++++--- Ventas/PV.aspx.vb | 23 ++++++++- Ventas/Ventas.aspx.vb | 25 ++++----- 6 files changed, 103 insertions(+), 73 deletions(-) diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index fbafc00cb..ef3b2d0a4 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1732,10 +1732,15 @@ Public Class ClsPaginas Application("GlobalDTSeccionAlmacen") = value End Set End Property - Property GlobalDTAlmacen(CveEmpresa As Integer) As DataTable + Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1) As DataTable Get - If CveEmpresa <> -1 Then - Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows) + If CveEmpresa <> -1 Then + + Dim Str As New StringBuilder + Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa) + If CveTipoAlmacen > 0 Then Str.AppendFormat("AND CveTipoAlmacen = {0}", CveTipoAlmacen) + + Dim Dv As New DataView(DirectCast(Application("GlobalDTAlmacen"), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) GlobalDTAlmacen = Dv.ToTable Dv.Dispose() Else diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 06a030092..d14b65406 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -541,7 +541,7 @@ Namespace Modelos End Class - Public Function EmitirFactura(Optional Timbrar As Boolean = True, Optional Trasac As SqlClient.SqlTransaction = Nothing, Optional ObjContPaqTransac As ClsContPAQi = Nothing) As MMensajeFactura + Public Function EmitirFactura(Optional Timbrar As Boolean = True, Optional Transac As SqlClient.SqlTransaction = Nothing, Optional ObjContPaqTransac As ClsContPAQi = Nothing) As MMensajeFactura Dim Retorno As New MMensajeFactura() If Me.Version = "3.3" AndAlso Not Me.TipoDocto.Contiene("Ped", "PeC") Then @@ -589,8 +589,8 @@ Namespace Modelos If DtDetalle.Rows.Count > 0 Then Dim ObjVentas As ClsVentas = Nothing - If Trasac IsNot Nothing Then - ObjVentas = New ClsVentas(Trasac) + If Transac IsNot Nothing Then + ObjVentas = New ClsVentas(Transac) Else ObjVentas = New ClsVentas() ObjVentas.IniciaTransacSQL() @@ -801,7 +801,7 @@ Namespace Modelos If Me.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or Me.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then - If Trasac Is Nothing Then + If Transac Is Nothing Then ObjVentas.Commit() End If If ObjContPaqTransac Is Nothing Then @@ -1004,7 +1004,7 @@ Namespace Modelos Retorno.Mensajes = ListaMensajes End Try Else - If Trasac Is Nothing Then + If Transac Is Nothing Then ObjVentas.RollBack() End If If ObjContPaqTransac Is Nothing Then @@ -1015,7 +1015,7 @@ Namespace Modelos End If Else - If Trasac Is Nothing Then + If Transac Is Nothing Then ObjVentas.RollBack() End If @@ -1030,7 +1030,7 @@ Namespace Modelos Catch ex As Exception Me.ErrorList.Add(ex.ToString()) - If Trasac Is Nothing Then + If Transac Is Nothing Then ObjVentas.RollBack() End If If ObjContPaqTransac Is Nothing Then @@ -1040,7 +1040,7 @@ Namespace Modelos Retorno.Mensajes = ErrorList Retorno.TieneError = True Finally - If Trasac Is Nothing Then + If Transac Is Nothing Then ObjVentas.Dispose() ObjConta.Dispose() ObjInventario.Dispose() diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 7f1732916..90e480137 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -1026,7 +1026,7 @@ Partial Class Inventarios_RecepcionUsados If Me.ObjRemisionNC IsNot Nothing Then Dim sb As New StringBuilder() - sb.Append($"Se va a generar un documento de tipo 'Remisión de nota de crédito'.
    Serie-Folio:{Me.ObjRemisionNC.SerieFolio}.
    ¿Esta seguro que desea guardar?:
    ") + sb.Append($"Se va a generar un documento de tipo 'Remisión de nota de crédito'.
    ¿Esta seguro que desea guardar?:
    ") Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, JSBtnAceptar:="GenerarRNC();", TextoConfirmacion:="    Si    ", TextoCancelacion:="    No    ") Else @@ -1090,10 +1090,12 @@ Partial Class Inventarios_RecepcionUsados CargaDTDetalleRNC() - Dim Resp = ObjRemisionNC.EmitirFactura(False) + Dim Resp = ObjRemisionNC.EmitirFactura(False, ObjInventario.IniciaTransacSQL) For Each mensaje2 As String In Resp.Mensajes Msg.AppendFormat("
    {0}", mensaje2) + Next + If Resp.TieneError Then ErrorMovInv = True Alert(Msg.ToString, If(Resp.CveVenta > 0, TipoMensaje.MsgInformacion, TipoMensaje.MsgAdvertencia)) CveVenta = Resp.CveVenta End If @@ -1104,13 +1106,13 @@ Partial Class Inventarios_RecepcionUsados ImporteConcepto = Dr("PU").ToString.ToDouble * GlobalTipoCambio(TxtFecha.Text.ToDate) Else ImporteConcepto = Dr("PU").ToString.ToDouble - End If + End If - If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then - Mensaje = "Error al guardar los movimientos" - ErrorMovInv = True - Exit For - End If + If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then + Mensaje = "Error al guardar los movimientos" + ErrorMovInv = True + Exit For + End If If CveVenta > 0 AndAlso Not ObjVentas.UpdateVentaUsadoRecibido(CveVenta, Dr("CvePS").ToString.ToEntero, True) Then Mensaje = "Error al actualizar el recibo de los usados" @@ -1132,34 +1134,34 @@ Partial Class Inventarios_RecepcionUsados End If Next - If Not ErrorMovInv Then + If Not ErrorMovInv Then - Msg.AppendFormat("
    El Movimiento se registro con el Folio: {0}", ObjInventario.Folio) - Msg.AppendFormat("

    Imprimir Movimiento ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) + Msg.AppendFormat("
    El Movimiento se registro con el Folio: {0}", ObjInventario.Folio) + Msg.AppendFormat("

    Imprimir Movimiento ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento))) - If IDPoliza > 0 Then Msg = Msg.AppendFormat("

    Ver Póliza", IDPoliza) + If IDPoliza > 0 Then Msg = Msg.AppendFormat("

    Ver Póliza", IDPoliza) - ObjInventario.Commit() ' aplica los movimientos insertados + ObjInventario.Commit() ' aplica los movimientos insertados - 'Limpia Valores cuando inserta de campos especiales - If UsuarioActual.CveEmpresa = 66 Then - DdlSubProyecto.SelectedValueExist("-1") - End If - - EnvioCorreo() - - CargaPendientesRecibir() - UPDatos.Update() - - Else - ObjInventario.RollBack() 'deshace lo insertado - CveMovimiento = 0 - Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError) + 'Limpia Valores cuando inserta de campos especiales + If UsuarioActual.CveEmpresa = 66 Then + DdlSubProyecto.SelectedValueExist("-1") End If + EnvioCorreo() + + CargaPendientesRecibir() + UPDatos.Update() + + Else + ObjInventario.RollBack() 'deshace lo insertado + CveMovimiento = 0 + Alert("ocurrió un Error al registrar los movimientos", TipoMensaje.MsgError) End If + End If + End If Catch ex As Exception ObjInventario.RollBack() 'deshace lo insertado CveMovimiento = 0 @@ -2025,20 +2027,20 @@ Partial Class Inventarios_RecepcionUsados Dim Folio As String = "" Dim Serie As String = "" - Dim ObjFolios As New ClsGralFolios() - If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then - Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo' AND CveSubProyecto = {0}", CveSubProyecto)) - If DT.Rows.Count > 0 Then - Serie = DT.Rows(0)("Serie").ToString() - Folio = DT.Rows(0)("FActual").ToString() - End If - DT.Dispose() - End If - ObjFolios.Dispose() + 'Dim ObjFolios As New ClsGralFolios() + 'If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyecto) Then + ' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" Estado = 'Activo' ")) + ' If DT.Rows.Count > 0 Then + ' Serie = DT.Rows(0)("Serie").ToString() + ' Folio = DT.Rows(0)("FActual").ToString() + ' End If + ' DT.Dispose() + 'End If + 'ObjFolios.Dispose() Me.ObjRemisionNC.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.HTML - Me.ObjRemisionNC.Serie = Serie - Me.ObjRemisionNC.Folio = Folio.ToEntero() + Me.ObjRemisionNC.Serie = "-1" + Me.ObjRemisionNC.Folio = -1 'Folio.ToEntero() Me.ObjRemisionNC.Version = "3.3" Me.ObjRemisionNC.FolioFiscal = "" Me.ObjRemisionNC.CveUsuario = UsuarioActual.CveUsuario diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index ae2bdbd52..92e7823ae 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -2312,7 +2312,7 @@
    - +
    @@ -2386,6 +2386,7 @@
    +
    @@ -2681,8 +2682,8 @@
    - - + + @@ -2898,7 +2899,7 @@
    - + <%----%> <%----%> @@ -2984,8 +2985,14 @@
    -
    -
    +
    +
    +
    + + +
    +
    +
    @@ -3623,7 +3630,7 @@ } function showDivEC() { - $('#<%= TxtRFCCliente.ClientID %>').val(''); + $('#<%= TxtNombreCliente.ClientID %>').val(''); $('#<%= TxtDireccionCliente.ClientID %>').val(''); $('#<%= TxtNumExtCliente.ClientID %>').val(''); diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 4e051e985..fd3dfa963 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -4654,6 +4654,7 @@ Partial Class PV DivCorreoCuentaCliente.Visible = False DivBotonesAgregarCliente.Visible = False DivFormaCliente.Visible = False + TxtRFCCliente.Text = "XAXX010101000" UpAgregarCliente.Update() RegistraScript("showDivEC();") @@ -5244,6 +5245,16 @@ Partial Class PV DdlTipoUso.DataSource = GlobalDTAcumGarantiasMesesTipoUso(UsuarioActual.CveEmpresa, CveMarca) DdlTipoUso.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlTipoUso.DataBind() + + 'si la marca es optima, el codigo cambia a solo numerico + If CveMarca = 1086 Then + REVCodEnsamble.ValidationExpression = "^[0-9]$" + REVCodLinea.ValidationExpression = "^[0-9]$" + Else + REVCodEnsamble.ValidationExpression = "^[0-9][A-HJ-M]([[0-2][0-9]|3[0-1])[0-9A-Z][ACEN][2-5]$" + REVCodLinea.ValidationExpression = "^[*]$" + End If + End If If Not DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso DdlFacturas.SelectedValue.ToEntero > 0 Then @@ -5272,13 +5283,14 @@ Partial Class PV Dim CveMarca As Integer = -1 CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero - + Dim ImportePagarCliente As Decimal = 0 Dim ObjAcum As New ClsAcumuladores If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then If ObjAcum.DtResultados.Rows.Count > 0 Then TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero + ImportePagarCliente = TxtImporteAjuste.Text.ToDecimal Dim CargoVendido As Decimal = 0 Dim CargoGarantia As Decimal = 0 @@ -5310,10 +5322,13 @@ Partial Class PV TxtImporteAjuste.Text = "0.00" CargoGarantia = CargoVendido + ImportePagarCliente = 0 End If + ImportePagarCliente = (TxtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))).ToDecimal + TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}." TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero - + TxtPagarCliente.Text = ImportePagarCliente.FormatoNumero Else Alert("El producto no tiene ajuste en ese periodo", TipoMensaje.MsgAdvertencia) 'cuando no está registrada, no da ajuste @@ -5324,6 +5339,10 @@ Partial Class PV Alert("No se tiene especificado tabla de garantía") End If ObjAcum.Dispose() + Else + If DdlPSAjuste.SelectedValue.ToEntero <= 0 Then + Alert("Especificar el producto a recibir") + End If End If Catch ex As Exception OnError("Ocurrió un error al recalcular el costo", ex) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 952ba1f49..8fc1fa25b 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -13925,21 +13925,21 @@ Partial Class Ventas Dim PorcentajeProducto2 = RowPorcentaje("PorcentajeProducto2").ToString().ToDecimal() / 100D Dim PorcentajeProducto3 = RowPorcentaje("PorcentajeProducto3").ToString().ToDecimal() / 100D - Dim TotalInicial = (Cantidad * (PU)) - Descuento + Dim TotalInicial As Decimal = (Cantidad * (PU)) - Descuento Dim TotalFinal = TotalInicial 'SI APLICA EL PRIMER DESCUENTO If PorcentajeProducto > 0 Then - Dim Descuento1 = TotalInicial * PorcentajeProducto + Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2) Dim Total2 = (TotalInicial - Descuento1) 'SI APLICA EL SEGUNDO DESCUENTO If PorcentajeProducto2 > 0 Then - Dim Descuento2 = Total2 * PorcentajeProducto2 + Dim Descuento2 As Decimal = (Total2 * PorcentajeProducto2).RoundSQL(2) Dim Total3 = (Total2 - Descuento2) 'SI APLICA EL TERCER DESCUENTO If PorcentajeProducto3 > 0 Then - Dim Descuento3 = Total3 * PorcentajeProducto3 + Dim Descuento3 As Decimal = (Total3 * PorcentajeProducto3).RoundSQL(2) TotalFinal = Total3 - Descuento3 Else TotalFinal = Total3 @@ -15752,17 +15752,21 @@ Partial Class Ventas Try Dim CveMovimientoVirtual As Integer = -1 Dim CveAlmacenVirtual As Integer = -1 - Dim CveConceptoMovimientoVirtual As Integer = 36 + Dim CveConceptoMovimientoVirtual As Integer = 37 Dim DtPSVirtual As DataTable = Nothing Dim DtTamanios As DataTable = Nothing Dim CveMovimientoEntradaDev As Integer = -1 + Dim CveSubProyecto As Integer = -1 If ObjInventario.GetInv_Mov(CveRemision, UsuarioActual.CveEmpresa) Then Dim RowMovimiento As DataRow = ObjInventario.DtResultados.FiltroPrimero("CvePS IS NULL AND ((CveTipoAlmacen = 24 AND CveConcepto = 2) OR (CveTipoAlmacen = 1 AND CveConcepto = 8)) AND CveVenta > 0") If RowMovimiento IsNot Nothing Then CveMovimientoEntradaDev = RowMovimiento("CveMovimiento").ToString().ToEntero() - CveAlmacenVirtual = RowMovimiento("CveAlmacen").ToString().ToEntero() + Dim tCveAlmacen = RowMovimiento("CveAlmacen").ToString().ToEntero() + CveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {tCveAlmacen}").ToEntero() + CveAlmacenVirtual = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $" CveTipoAlmacen = 24 AND CveSubProyecto={CveSubProyecto}").ToEntero() + Else OcurrioError = True End If @@ -15776,16 +15780,9 @@ Partial Class Ventas OcurrioError = True End If - 'CARGA CONCEPTOS DEVUELTOS EN LA VENTA - 'If ObjInventario.GetMovimientosDetalle(CveMovimientoEntradaDev, UsuarioActual.CveEmpresa) Then - ' DtPSVirtual = ObjInventario.DtResultados.Copy() - 'Else - ' OcurrioError = True - 'End If - If Not OcurrioError AndAlso DtPSVirtual.Rows.Count > 0 Then - CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/V", CveMovimientoRelacionado:=CveMovimientoEntradaDev) + CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, ObjFactura.CveVenta, -1, -1, Modulo:="Vta/VV", CveMovimientoRelacionado:=CveMovimientoEntradaDev) If CveMovimientoVirtual > 0 Then For Each RowUsado As DataRow In DtPSVirtual.Rows From 3a82c3abf5330bf08fbae5caa69d6db6e1159609 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 27 Jan 2020 11:16:49 -0700 Subject: [PATCH 13/13] se agrego una nueva columna al reporte --- .../RepMovimientosAuxiliaresCatalogo.rdlc | 128 +++++++++++++++++- 1 file changed, 121 insertions(+), 7 deletions(-) diff --git a/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc b/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc index 2068a25b8..1c4ecdb04 100644 --- a/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc +++ b/Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc @@ -20,6 +20,9 @@ 1.99729cm + + 2.54cm + 2.3148cm @@ -152,12 +155,13 @@ 2pt - 4 + 5 + @@ -199,7 +203,7 @@ - 0.6cm + 0.86458cm @@ -391,6 +395,44 @@ + + + + true + true + + + + + Referencia Movto + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + @@ -647,11 +689,12 @@ 2pt - 3 + 4 + @@ -887,6 +930,38 @@ + + + + true + true + + + + + =Fields!ReferenciaAdmin.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -1128,6 +1203,40 @@ + + + + true + true + + + + + + + + + + + + Textbox42 + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -1282,6 +1391,7 @@ + @@ -1319,8 +1429,8 @@ true DataSet1 0.06345cm - 3cm - 20.37044cm + 3.26458cm + 22.91044cm @@ -1328,10 +1438,10 @@
    - 1.2061in + 1.31025in