From 0e3587de42f1c7366976e09e8443baa76a6d688e Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 10 Jun 2022 14:40:43 -0700 Subject: [PATCH 01/25] Enviar datos del sub reporte al web service del rdlc --- App_Code/ClsPaginas.vb | 20 +- App_WebReferences/WSRDLC2/Reference.svcmap | 31 ++ App_WebReferences/WSRDLC2/WebService.disco | 6 + App_WebReferences/WSRDLC2/WebService.wsdl | 312 ++++++++++++++++++ .../WSRDLC2/configuration.svcinfo | 10 + .../WSRDLC2/configuration91.svcinfo | 201 +++++++++++ 6 files changed, 573 insertions(+), 7 deletions(-) create mode 100644 App_WebReferences/WSRDLC2/Reference.svcmap create mode 100644 App_WebReferences/WSRDLC2/WebService.disco create mode 100644 App_WebReferences/WSRDLC2/WebService.wsdl create mode 100644 App_WebReferences/WSRDLC2/configuration.svcinfo create mode 100644 App_WebReferences/WSRDLC2/configuration91.svcinfo diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index b4a2ef02c..8c2c21688 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6012,11 +6012,17 @@ Public Class ClsPaginas RutaReporte = String.Format("{0}{1}", bdir, RutaReporte) End If - If EsProduccion AndAlso SubReportData Is Nothing Then + If EsProduccion Then - Dim wsreport As New WSRDLC.WebServiceSoapClient - Dim params As New List(Of WSRDLC.ReportParameter) - Dim reportobjects As New List(Of WSRDLC.ReportObjects) + Dim wsreport As New WSRDLC2.WebServiceSoapClient + Dim params As New List(Of WSRDLC2.ReportParameter) + Dim reportobjects As New List(Of WSRDLC2.ReportObjects) + + Dim jsonData As String = Nothing + + If SubReportData IsNot Nothing Then + jsonData = Newtonsoft.Json.JsonConvert.SerializeObject(SubReportData) + End If Dim ds As New DataSet For Each rpds As ReportDataSource In DataSource @@ -6026,7 +6032,7 @@ Public Class ClsPaginas dt.TableName = rpds.Name ds.Tables.Add(dt) Else - Dim ojext As New WSRDLC.ReportObjects + Dim ojext As New WSRDLC2.ReportObjects ojext.Name = rpds.Name ojext.Value = rpds.Value reportobjects.Add(ojext) @@ -6034,7 +6040,7 @@ Public Class ClsPaginas Next For Each rpds As ReportParameter In Parametros - Dim param As New WSRDLC.ReportParameter + Dim param As New WSRDLC2.ReportParameter param.Name = rpds.Name 'SI ES TEXTO, QUITAR TABS Y OTROS ESPACIOS QUE DEN PROBLEMAS AL MANDAR LA PETICION @@ -6047,7 +6053,7 @@ Public Class ClsPaginas params.Add(param) Next - Bytes = wsreport.StreamNEWPDFBytes(RutaReporte, ds, reportobjects.ToArray(), params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario) + Bytes = wsreport.StreamNEWPDFBytes(RutaReporte, ds, reportobjects.ToArray(), params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario, jsonData) wsreport = Nothing params = Nothing ds.Dispose() : ds = Nothing diff --git a/App_WebReferences/WSRDLC2/Reference.svcmap b/App_WebReferences/WSRDLC2/Reference.svcmap new file mode 100644 index 000000000..070b96bcb --- /dev/null +++ b/App_WebReferences/WSRDLC2/Reference.svcmap @@ -0,0 +1,31 @@ + + + + false + true + + false + false + false + + + true + Auto + true + true + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/WSRDLC2/WebService.disco b/App_WebReferences/WSRDLC2/WebService.disco new file mode 100644 index 000000000..4b396211d --- /dev/null +++ b/App_WebReferences/WSRDLC2/WebService.disco @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/App_WebReferences/WSRDLC2/WebService.wsdl b/App_WebReferences/WSRDLC2/WebService.wsdl new file mode 100644 index 000000000..b23b74472 --- /dev/null +++ b/App_WebReferences/WSRDLC2/WebService.wsdl @@ -0,0 +1,312 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/WSRDLC2/configuration.svcinfo b/App_WebReferences/WSRDLC2/configuration.svcinfo new file mode 100644 index 000000000..23094d5e1 --- /dev/null +++ b/App_WebReferences/WSRDLC2/configuration.svcinfo @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/WSRDLC2/configuration91.svcinfo b/App_WebReferences/WSRDLC2/configuration91.svcinfo new file mode 100644 index 000000000..c794b474d --- /dev/null +++ b/App_WebReferences/WSRDLC2/configuration91.svcinfo @@ -0,0 +1,201 @@ + + + + + + + WebServiceSoap1 + + + + + + + + + + + + + + + + + + + + + StrongWildcard + + + + + + 65536 + + + + + + + + + System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + System.Text.UTF8Encoding + + + Buffered + + + + + + Text + + + System.ServiceModel.Configuration.BasicHttpSecurityElement + + + None + + + System.ServiceModel.Configuration.HttpTransportSecurityElement + + + None + + + None + + + System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement + + + Never + + + TransportSelected + + + (Collection) + + + + + + System.ServiceModel.Configuration.BasicHttpMessageSecurityElement + + + UserName + + + Default + + + + + + + + + http://localhost:7999/WebService.asmx + + + + + + basicHttpBinding + + + WebServiceSoap1 + + + WSRDLC2.WebServiceSoap + + + System.ServiceModel.Configuration.AddressHeaderCollectionElement + + + <Header /> + + + System.ServiceModel.Configuration.IdentityElement + + + System.ServiceModel.Configuration.UserPrincipalNameElement + + + + + + System.ServiceModel.Configuration.ServicePrincipalNameElement + + + + + + System.ServiceModel.Configuration.DnsElement + + + + + + System.ServiceModel.Configuration.RsaElement + + + + + + System.ServiceModel.Configuration.CertificateElement + + + + + + System.ServiceModel.Configuration.CertificateReferenceElement + + + My + + + LocalMachine + + + FindBySubjectDistinguishedName + + + + + + False + + + WebServiceSoap1 + + + + + + + + + + + \ No newline at end of file From 68aa589b9b4bf3b35846a66c8ac9fa21560b4b48 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 10 Jun 2022 14:41:50 -0700 Subject: [PATCH 02/25] CFDI4.0, uso cfdi y regimen fiscal sin obligaciones fiscales en RFC generico --- Ventas/Ventas.aspx.vb | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index e70410c16..363fd8033 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6198,6 +6198,14 @@ Partial Class Ventas DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33) End If DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI) + 'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES + If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then + 'S01 Sin efectos fiscales. + DdlUsoCFDI.SelectedValueExist("23") + DdlUsoCFDI.Enabled = False + RegimenFiscalCliente = "616" + ClienteCodigoRegimenFiscal = "616" + End If End If @@ -7150,6 +7158,15 @@ Partial Class Ventas DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString()) DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString()) + 'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES + If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then + 'S01 Sin efectos fiscales. + DdlUsoCFDI.SelectedValueExist("23") + DdlUsoCFDI.Enabled = False + RegimenFiscalCliente = "616" + ClienteCodigoRegimenFiscal = "616" + End If + End If If CveVenta < 0 Then TxtAtencionA.Text = ObjCliente.DtResultados.Rows(0)("Contacto").ToString() @@ -7183,6 +7200,15 @@ Partial Class Ventas DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33) DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI) + 'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES + If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1") AndAlso LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then + 'S01 Sin efectos fiscales. + DdlUsoCFDI.SelectedValueExist("23") + DdlUsoCFDI.Enabled = False + RegimenFiscalCliente = "616" + ClienteCodigoRegimenFiscal = "616" + End If + End If End If @@ -34462,7 +34488,7 @@ Partial Class Ventas Private Sub CreaDTMercancias() DtMercancias = New DataTable() DtMercancias.Columns.Add(New DataColumn("Consec", GetType(Integer))) - DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Integer))) + DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Decimal))) DtMercancias.Columns.Add(New DataColumn("CvePS", GetType(Integer))) DtMercancias.Columns.Add(New DataColumn("CveUnidadMedida", GetType(Integer))) DtMercancias.Columns.Add(New DataColumn("CodigoPS", GetType(String))) From 5d1d5e1d55e8555291341a2a75aa1681e6fc086b Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 10 Jun 2022 14:42:18 -0700 Subject: [PATCH 03/25] E13. Bordes en formato de carta porte --- Empresas/13/Formatos/CartaPorteTimbrado.rdlc | 41 +++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/Empresas/13/Formatos/CartaPorteTimbrado.rdlc b/Empresas/13/Formatos/CartaPorteTimbrado.rdlc index 3bf625808..9ed1afae5 100644 --- a/Empresas/13/Formatos/CartaPorteTimbrado.rdlc +++ b/Empresas/13/Formatos/CartaPorteTimbrado.rdlc @@ -92,6 +92,11 @@ + + Black + + 1pt + 2pt 2pt 2pt @@ -126,6 +131,11 @@ + + Black + + 1pt + 2pt 2pt 2pt @@ -160,6 +170,11 @@ + + Black + + 1pt + 2pt 2pt 2pt @@ -194,6 +209,11 @@ + + Black + + 1pt + 2pt 2pt 2pt @@ -228,6 +248,11 @@ + + Black + + 1pt + 2pt 2pt 2pt @@ -466,6 +491,11 @@ + + Black + + 1pt + 2pt 2pt 2pt @@ -627,6 +657,7 @@ + Black 1pt @@ -675,6 +706,7 @@ + Black 1pt @@ -720,6 +752,7 @@ 5pt + Black 1pt @@ -761,6 +794,7 @@ 5pt + Black 1pt @@ -801,6 +835,7 @@ 5pt + Black 1pt @@ -1062,6 +1097,7 @@ + Black 1pt @@ -1086,7 +1122,7 @@ DataSet2 6.1698cm 0.06623cm - 0.90895cm + 0.90896cm 20.38566cm 2 + Black 1pt @@ -1267,6 +1304,7 @@ 5pt + Black 1pt @@ -1408,6 +1446,7 @@ + Black 1pt From 62ad28120dba7a02c1c13f8dc8ae13f97a5d0cf7 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 10 Jun 2022 15:56:40 -0700 Subject: [PATCH 04/25] =?UTF-8?q?--=20no=20carga=20informaci=C3=B3n=20al?= =?UTF-8?q?=20inciiar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/RepComplementoPago.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bancos/RepComplementoPago.aspx.vb b/Bancos/RepComplementoPago.aspx.vb index 3e3926d25..e085cea94 100644 --- a/Bancos/RepComplementoPago.aspx.vb +++ b/Bancos/RepComplementoPago.aspx.vb @@ -98,7 +98,7 @@ Partial Class Bancos_RepComplementoPago End If End If - CargaDatos() + 'CargaDatos() End If End Sub @@ -171,7 +171,7 @@ Partial Class Bancos_RepComplementoPago MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo")) End If Else - Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje) + Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}
", gvr.DataKey("Folio"), Banco.Mensaje) Banco.RollBack() End If Catch ex As Exception From 05272c0c4b6fde7fcacb17cf73620483f716248b Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 10 Jun 2022 15:57:15 -0700 Subject: [PATCH 05/25] =?UTF-8?q?--=20cancelaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/IE.aspx | 9 ++ Bancos/IE.aspx.vb | 219 +++++----------------------------------------- 2 files changed, 32 insertions(+), 196 deletions(-) diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 768a9a830..4fbf00ce7 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -1248,6 +1248,15 @@ +
+
+ Cuenta Devolución: + + - + + +
+
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index e845a08e3..3a6231c59 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -6,6 +6,7 @@ Imports Extensiones Imports System.Web.Services Imports System.IO Imports Microsoft.Reporting.WebForms +Imports System.Xml Partial Class Bancos_IE Inherits ClsPaginas @@ -629,6 +630,13 @@ Partial Class Bancos_IE Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then + + 'PDFReciboDePagos(-1, 1336198, 87212, False) '--pago20 + 'PDFReciboDePagos(-1, 1361624, 87916, False) '--pago20 + + ''PDFReciboDePagos(-1, 1304037, 87219, False) + 'Exit Sub + Me.CveCorte = -1 Folio = "" IDCtaBeneficiario = 0 @@ -1833,7 +1841,6 @@ Partial Class Bancos_IE dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveTipoCuenta <> 1") ' quito las cajas chicas End If - If pCveMoneda > 0 Then dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", pCveMoneda)) End If @@ -4226,191 +4233,6 @@ Partial Class Bancos_IE #End Region - ''[IPP] IFs REEMPLAZADOS - MIRAS DE ELIMINAR 2018/08/15 - 'If Not Opcion.Contiene("DEV", "INGPC", "DevDinV") AndAlso MsgError = "" Then - - 'Dim TipoMovimiento As Boolean = True - - 'If Opcion.Contiene("ANTC") Then - ' TipoMovimiento = False - ' End If - - ''MOVIMIENTOS EGRESOS - 'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtImporte.Text.ToDouble, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then - 'Dim IVA As Double = 0 ' TxtImporte.Text.ToDouble * HdnProvPorIVA.Value.ToDouble - 'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, TxtImporte.Text.ToDouble - IVA - CIF, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario, CveIEDevolucion:=DdlIEAcreedor.SelectedValue.ToEntero) Then - 'If IVA > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, IVA, Ref, 19, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then - ' MsgError = "Detalle" - ' End If - ''intereses pagados - 'If CIF > 0 AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, CIF, Ref, 46, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveOC:=CveOrdenCompra, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=CIF, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario, CveIEDevolucion:=DDlCheques.SelectedValue.ToEntero) Then - ' MsgError = "Detalle" - ' End If - 'Else - ' MsgError = "no se pudo insertar el detalle de la póliza2" - ' End If - 'Else - ' MsgError = "no se pudo insertar el detalle de la póliza" - ' End If - - - 'If Opcion.Contiene("EGSSINFACT") AndAlso CveSolicitudViatico > 0 AndAlso MsgError = "" Then - 'If Not ObjIE.UpdateSolicitudesViaticosIE(CveSolicitudViatico, CveIE) Then - ' MsgError = "Ocurrió un Error al vincular el egreso con la solicitud de viatico." - ' End If - 'End If - - ''MOVIMIENTOS INGRESOS - DEVOLUCIONES - 'ElseIf Opcion.Contiene("DEV") AndAlso MsgError = "" Then - 'Dim CveIEOtro As Integer = If(CveProveedor > 0 Or CvePersonal > 0, DdlIEDevolucion.SelectedValue.ToEntero, CveIE) - - 'If CveCliente > 0 AndAlso Not DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDouble = 0 Then - ''RMF- CASO DONDE HAY UNA DEVOLUCION Y TENGO QUE AFECTAR LAS FACTURAS QUE SE HABIAN MARCADO COMO PAGADAS TENGO QUE REGRESARLAS A PENDIENTES - 'Dim Mov As New ClsMovimientos - 'If Mov.GetMovimientosIE(2, DdlIEDevolucion.SelectedValue.ToEntero, -1, Now, Now, 1, 0, UsuarioActual.CveEmpresa) Then - 'Dim DtIE As DataTable = Mov.DtResultados - 'For Each dr As DataRow In DtIE.Rows - - 'If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, If(dr("TipoMovto").ToString.ToEntero = 1, False, True), If(dr("CveConceptoContable").ToString.ToEntero.Contiene(66), -TxtImporte.Text.ToDouble, dr("Importe").ToString.ToDouble), "", dr("CveConceptoContable").ToString.ToEntero, "", Now, IDCtaBeneficiario, -1, CveIE, CveCliente:=dr("CveCliente").ToString.ToEntero, CveVenta:=dr("CveVenta").ToString.ToEntero, ImporteMX:=If(dr("CveConceptoContable").ToString.ToEntero.Contiene(66), -TxtImporte.Text.ToDouble, -dr("Importe").ToString.ToDouble), ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario) Then - ' MsgError = "no se pudo insertar el detalle de la póliza 2" - ' End If - 'Next - ' ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta) - - ' End If - ' Mov.Dispose() - - ' 'Devolucion de INGxC Formato Charlie - ' ElseIf CveCliente > 0 AndAlso DivIvaIxC.Visible Then - - 'Dim Mov As New ClsMovimientos - ' 'INGxC - ' ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(TxtImporte.Text.ToDouble - TxtIvaIxC.Text.ToDouble), Ref, 66, Conc, Now, IDCtaContable, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-(TxtImporte.Text.ToDouble - TxtIvaIxC.Text.ToDouble), ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta) - - ' If TxtIvaIxC.Text.ToDouble > 0 Then - ' 'Iva - ' ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDouble, Ref, 61, Conc, Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtIvaIxC.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) - ' End If - - ' 'Bancos - ' ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, -TxtImporte.Text.ToDouble, Ref, 30, Conc, Now, IDCtaBeneficiario, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario) - ' Mov.Dispose() - - ' Else - 'If ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, TxtImporte.Text.ToDouble, Ref, CveConceptoContable, Conc, Now, IDCtaContable, -1, CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaConta) Then - 'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDouble, Ref, CveConceptoCompra, Conc, Now, IDCtaBeneficiario, -1, CveIE:=If(CveIEOtro < 0, CveIE, CveIEOtro), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtImporte.Text.ToDouble, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=CveCuentaBeneficiario) Then - ' MsgError = "no se pudo insertar el detalle de la póliza 2" - ' End If - 'Else - ' MsgError = "no se pudo insertar el detalle de la póliza" - ' End If - - 'End If - - ''Nuevo INGxC Formato Charlie - 'ElseIf Opcion.Contiene("INGPC") AndAlso MsgError = "" Then - - 'Dim ConceptoContable As Integer - 'Dim TipoMovimiento As Boolean - 'Dim importeMovimiento As Decimal - 'Dim FechaMovimiento As Date = Now - 'Dim Concepto As String = "" - 'Dim Referencia As String = TxtPagueseA.Text - - 'Dim importeMX As Decimal - 'Dim Multiplicador As Integer - - 'If ObjMov.GetPlantillaConceptos(UsuarioActual.CveEmpresa, CvePlantillaPoliza) Then - 'For Each Row As DataRow In ObjMov.DtResultados.Rows - - ' ConceptoContable = Row("CveConcepto").ToString.ToEntero - ' TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False) - ' importeMovimiento = 0 - ' Multiplicador = (Row("Multiplicador").ToString.ToEntero) - ' Concepto = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, TxtPagueseA.Text, "", TxtFolio.Text) - - ' Select Case ConceptoContable - - 'Case 10 - 'If RBL.SelectedValue = "P" AndAlso CveProveedor > 0 Then - ' importeMovimiento = TxtImporte.Text.ToDecimal - ' importeMX = importeMovimiento - ' End If - - 'Case 28 - 'If RBL.SelectedValue = "FE" AndAlso CvePersonal > 0 Then - ' importeMovimiento = TxtImporte.Text.ToDecimal - ' importeMX = importeMovimiento - ' End If - - 'Case 37 - 'If RBL.SelectedValue = "DD" AndAlso CveProveedor > 0 Then - ' importeMovimiento = TxtImporte.Text.ToDecimal - ' importeMX = importeMovimiento - ' End If - - 'Case 41 - 'If RBL.SelectedValue = "AC" AndAlso CveProveedor > 0 Then - ' importeMovimiento = TxtImporte.Text.ToDecimal - ' importeMX = importeMovimiento - ' End If - - 'Case 50 - 'If RBL.SelectedValue = "DP" AndAlso CveProveedor > 0 Then - ' importeMovimiento = TxtImporte.Text.ToDecimal - ' importeMX = importeMovimiento - ' End If - - 'Case 66 - 'If RBL.SelectedValue = "C" AndAlso CveCliente > 0 Then - ' importeMovimiento = TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal - ' importeMX = importeMovimiento - - ' 'Agregamos el IVA - ' If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then - 'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, 61, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then - ' MsgError = "Ocurrió un Error al registrar el asiento del ingreso." - ' End If - 'End If - 'If tCveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then - ''Agregamos complementaria - 'Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal - - 'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 226, Concepto, FechaMovimiento, IDCtaBeneficiarioComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=0) Then - ' MsgError = "Ocurrió un Error al registrar el asiento del ingreso." - ' End If - - 'End If - - 'End If - - 'Case 30 - ' importeMovimiento = TxtImporte.Text.ToDecimal - ' importeMX = importeMovimiento - - ' If tCveMoneda > 1 AndAlso UsuarioActual.CveEmpresa = 119 Then - ''Agregamos complementaria - 'Dim TC As Decimal = TxtTipoCambio.Text.ToDecimal - - 'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, 0, Concepto, 204, Concepto, FechaMovimiento, IDCtaContableComplementaria, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=(importeMovimiento * TC - importeMovimiento).RoundSQL, ImporteME:=importeMovimiento, TipoCambio:=TC, CveCuenta:=UsuarioActual.Empresa.CveCuentaIVAxTrasladar) Then - ' MsgError = "Ocurrió un Error al registrar el asiento del ingreso." - ' End If - - 'End If - - 'End Select - - 'If importeMovimiento <> 0 Then - 'If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Concepto, ConceptoContable, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCuenta:=If(ConceptoContable = 30, CveCuentaConta, CveCuentaBeneficiario)) Then - ' MsgError = "Ocurrió un Error al registrar el asiento del ingreso." - ' End If - 'End If - - 'Next - - 'End If - 'End If - Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click Dim IE As New ClsBancos @@ -4496,7 +4318,7 @@ Partial Class Bancos_IE End If Try - If (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC)) Then + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (IDPoliza > 0 AndAlso (UsuarioActual.Empresa.UsaAC)) Then If ObjAC Is Nothing Then ErrorCancelar = True @@ -4592,8 +4414,9 @@ Partial Class Bancos_IE Dim TipoMovimiento As Integer = 1 Dim CveTipoTransaccionCancelacion As Integer = DdlTipoTransaccionCancelacion.SelectedValue.ToEntero + Dim CveCuentaDevolucion As Integer = DdlDevolucionCuenta.SelectedValue.ToEntero - If ChkGeneraCancelacion.Checked AndAlso GeneraCancelacionEnCero Then + If ChkGeneraCancelacion.Checked Then GeneraCancelacionEnCero = False TipoMovimiento = 2 @@ -4608,7 +4431,7 @@ Partial Class Bancos_IE If Not GeneraCancelacionEnCero Then 'CANCELA IE MES ANTERIOR CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, TipoMovimiento:=TipoMovimiento, - CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion) + CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion, CveCuentaDevolucion:=CveCuentaDevolucion) If CvePrePolizaCancelacion <= 0 Then ErrorCancelar = True MensajeError = "Error al cancelar IE MES ANTERIOR" @@ -4624,7 +4447,7 @@ Partial Class Bancos_IE Else 'CANCELA IE MES ACTUAL CvePrePolizaCancelacion = Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, False, IdPolizaNueva, FolioPolizaNueva, TxtFechaCancelacion.Text.ToDate, - CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion) + CveTipoTransaccionCancelacion:=CveTipoTransaccionCancelacion, CveCuentaDevolucion:=CveCuentaDevolucion) If CvePrePolizaCancelacion <= 0 Then ErrorCancelar = True MensajeError = "Error al cancelar IE MES ACTUAL" @@ -4681,7 +4504,7 @@ Partial Class Bancos_IE Dim ObjCancelacion As New Timbrado If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then - If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then + If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, Date.Now, "", 1) Then CargaComplementosPago() RegistraScript("$('#ModalCancelarComplemetno').modal('hide');") ErrorCancelarComplemento = False @@ -4692,7 +4515,7 @@ Partial Class Bancos_IE Dim respCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) If respCancelacion.Verificado Then - If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then + If Banc.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then CargaComplementosPago() RegistraScript("$('#ModalCancelarComplemetno').modal('hide');") ErrorCancelarComplemento = False @@ -6758,7 +6581,7 @@ Partial Class Bancos_IE If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then - If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then + If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, Date.Now, "", 1) Then CargaComplementosPago() Alert("El complemento se cancelo correctamente.") End If @@ -6768,7 +6591,7 @@ Partial Class Bancos_IE Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) If resp.Verificado Then - If ObjBanco.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then + If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPagoCancelar, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then Alert("El complemento se cancelo correctamente.") End If @@ -6969,17 +6792,21 @@ Partial Class Bancos_IE TipoMovto = "Egs" End If - GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs'") - DdlTipoTransaccionCancelacion.Items.Clear() DdlTipoTransaccionCancelacion.DataSource = GlobalDTTipoTransacciones.FiltraParametros($"Tipo ='{TipoMovto}' AND Estatus = 1") DdlTipoTransaccionCancelacion.DataBind() DdlTipoTransaccionCancelacion.Items.Insert(0, New ListItem("Seleccione una", "-1")) + DdlDevolucionCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) + DdlDevolucionCuenta.DataBind() + DdlDevolucionCuenta.Items.Insert(0, New ListItem("-", "-1")) + If ChkGeneraCancelacion.Checked Then DVTipoTransacciónCancelar.Visible = True + DVTipoTransacciónCancelar2.Visible = True Else DVTipoTransacciónCancelar.Visible = False + DVTipoTransacciónCancelar2.Visible = False End If UpEliminarCotizacion.Update() From 7a2b7b3ee7278bbef2fd594b58f21a36c9300cd1 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 10 Jun 2022 16:35:25 -0700 Subject: [PATCH 06/25] - --- Bancos/IE.aspx.vb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 663af2a18..d0db00f91 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -6589,7 +6589,6 @@ Partial Class Bancos_IE End If Else - Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) If resp.Verificado Then @@ -6600,11 +6599,11 @@ Partial Class Bancos_IE Else Alert("Se presento un error al cancelar el complemento.", TipoMensaje.MsgError) End If - End If + End If - ObjBanco.Dispose() - CargaComplementosPago() + ObjBanco.Dispose() + CargaComplementosPago() End Sub From 0ccdd7504a8f004e80ffc801c12d8e85fc995b93 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Fri, 10 Jun 2022 20:17:01 -0700 Subject: [PATCH 07/25] Crear a partir de cuando tiene carta porte --- Ventas/Ventas.aspx | 1383 +++++++++++++++++++++-------------------- Ventas/Ventas.aspx.vb | 323 +++++----- 2 files changed, 876 insertions(+), 830 deletions(-) diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index e11a85891..a079de52a 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -2218,328 +2218,332 @@ - + <%--
- + + + +
-
-
-
-
-
- - CARTA PORTE -
-
-
-
-
- -
- +
--%> +
+
+
+
+
+
+
+ + CARTA PORTE +
+
+
-
-
- - -
- -
- -
-
-
-
- -
- - - - <%----%> -
-
-
-
- -
- - - - <%----%> -
-
-
-
- -
-
    -
  • -
    - -
    -
  • -
-
- -
-
    -
  • -
    - -
    -
  • -
-
-
-
-
-
-
- -
- - - -
-
-
-
- -
- - - - -
-
-
-
- -
- -
-
-
-
-
- -
- - - -
-
-
-
- -
- -
-
-
-
- -
- -
-
-
-
-
-
-
-
-
-
- - Mercancias -
-
-
- -
-
-
- -
-
-
-
- - - - -   - - - - - - - - - - - -
-
-
-
-
-
-
-
+
+ +
+
+
+
+ + +
+ +
+ +
+
+
+
+ +
+ + + +
+
+
+
+ +
+ + + +
+
+
+
+ +
+
    +
  • +
    + +
    +
  • +
+
+ +
+
    +
  • +
    + +
    +
  • +
+
+
+
+
+
+
+ +
+ + + +
+
+
+
+ +
+ + + + +
+
+
+
+ +
+ +
+
+
+
+
+ +
+ + + +
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+ + Mercancias +
+
+
+ +
+
+
+ +
+
+
+
+ + + + +   + + + + + + + + + + + +
+
+
+
+
+
+
+
-
-
-
-
-
- - COMERCIO EXTERIOR -
-
-
-
-
- -
- +
+
+
+
+
+
+ + COMERCIO EXTERIOR +
+
+
- - - -
-
-
- - FEMSA - -
-
-
-
-
- -
- -
-
- - -
-
-
-
-
-
-
-
- - FORD - -
-
-
-
-
- -
- + + + + + + + + + + + +
-
-
-
- -
-
-
- - 7Eleven +
+
+
+
+
+
+ + 7Eleven +
+
+
-
-
+
+ +
+ +
+
+ + +
+
+
+
+
+
+
+
+
+
+
+
+ + Detallista +
+
+
+
+
+ +
+ +
+
+ +
- - -
-
-
-
-
- - Detallista - -
-
-
-
-
- -
- +
+
+
+
+
+
+ + Complementos INE +
+
+
- - -
-
-
-
-
-
-
- - Complementos INE -
-
-
-
-
-
- -
-
-