From c468fb3b2e8f094a151d8e241ceb495444c00137 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Thu, 28 Nov 2019 14:13:22 -0700 Subject: [PATCH 01/25] iva 19 --- Compras/ReembolsosComprobaciones.aspx | 2 +- Compras/ReembolsosComprobaciones.aspx.vb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Compras/ReembolsosComprobaciones.aspx b/Compras/ReembolsosComprobaciones.aspx index 9eb840af9..391e282bf 100644 --- a/Compras/ReembolsosComprobaciones.aspx +++ b/Compras/ReembolsosComprobaciones.aspx @@ -291,7 +291,7 @@ - + diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 13a2a7759..3a8a1022d 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -701,7 +701,7 @@ Partial Class Compras_ReembolsosComprobaciones 'Agrego el IVA If gvr.DataKey("IVADeducible").ToDecimal > 0 Then Dim ImporteIVA As Decimal = gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago - If ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteIVA, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteIVA), ImporteMX:=(ImporteIVA) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then + If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteIVA, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteIVA), ImporteMX:=(ImporteIVA) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then MsgError = "Detalle" End If End If From 780af51c986f522d7f500cee080dfe6cdad60655 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Thu, 28 Nov 2019 14:14:38 -0700 Subject: [PATCH 02/25] Revert "iva 19" This reverts commit c468fb3b2e8f094a151d8e241ceb495444c00137. --- Compras/ReembolsosComprobaciones.aspx | 2 +- Compras/ReembolsosComprobaciones.aspx.vb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Compras/ReembolsosComprobaciones.aspx b/Compras/ReembolsosComprobaciones.aspx index 391e282bf..9eb840af9 100644 --- a/Compras/ReembolsosComprobaciones.aspx +++ b/Compras/ReembolsosComprobaciones.aspx @@ -291,7 +291,7 @@ - + diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 3a8a1022d..13a2a7759 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -701,7 +701,7 @@ Partial Class Compras_ReembolsosComprobaciones 'Agrego el IVA If gvr.DataKey("IVADeducible").ToDecimal > 0 Then Dim ImporteIVA As Decimal = gvr.DataKey("IVADeducible").ToDecimal * PorcentajePago - If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteIVA, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteIVA), ImporteMX:=(ImporteIVA) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then + If ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteIVA, Referencia, 19, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(IdCtaContIVAAcreditable > 0, IdCtaContIVAAcreditable, IdCtaIVAAcreditable), -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteIVA), ImporteMX:=(ImporteIVA) * tipoCambio, CveCuenta:=CveCuentaIVAAcreditable, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, CvePersonal:=CvePersonal, PorcentajeImpuesto:=PorcentajeIVA) Then MsgError = "Detalle" End If End If From f70ae96d140873dfd89fe6f1af8be63c92f188e9 Mon Sep 17 00:00:00 2001 From: janeth arvizu Date: Tue, 3 Dec 2019 10:48:36 -0700 Subject: [PATCH 03/25] Correciones de Empresa 120 Promotora Inmobiliaria --- AC/RepEstadoActividades.aspx.vb | 3 +++ AC/RepSituacionFinanciera.aspx.vb | 3 +++ AC/Reportes/RepSituacionFinanciera.rdlc | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/AC/RepEstadoActividades.aspx.vb b/AC/RepEstadoActividades.aspx.vb index f2cd112c1..f26d16383 100644 --- a/AC/RepEstadoActividades.aspx.vb +++ b/AC/RepEstadoActividades.aspx.vb @@ -332,6 +332,9 @@ Partial Class AC_RepEstadoActividades If (UsuarioActual.CveEmpresa = 48 And ChkFirma.Checked) Then params.Add(New ReportParameter("pFirma1", String.Format("Lic. Damian A. Benitez Alcantar{0}Director Administrativo", vbCrLf))) params.Add(New ReportParameter("pFirma2", String.Format("Ing. Soraida Mesinas Reyes{0}Director General", vbCrLf))) + ElseIf (UsuarioActual.CveEmpresa = 120 And ChkFirma.Checked) Then + params.Add(New ReportParameter("pFirma1", String.Format("C.P.NEFTALI PEÑA MIRANDA{0}Subdirector de Contabilidad", vbCrLf))) + params.Add(New ReportParameter("pFirma2", String.Format("Dra. María Antonieta Laso López{0}Director General", vbCrLf))) ElseIf (ChkFirma.Checked) Then params.Add(New ReportParameter("pFirma1", String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf))) params.Add(New ReportParameter("pFirma2", String.Format("ING. Soraida Mesinas Reyes{0} Director General", vbCrLf))) diff --git a/AC/RepSituacionFinanciera.aspx.vb b/AC/RepSituacionFinanciera.aspx.vb index 36109f21b..57265aeff 100644 --- a/AC/RepSituacionFinanciera.aspx.vb +++ b/AC/RepSituacionFinanciera.aspx.vb @@ -642,6 +642,9 @@ Partial Class AC_SituacionFinanciera If (UsuarioActual.CveEmpresa = 48 And ChkFirma.Checked) Then params.Add(New ReportParameter("pFirma1", String.Format("Lic. Damian A. Benitez Alcantar{0}Director Administrativo", vbCrLf))) params.Add(New ReportParameter("pFirma2", String.Format("Ing. Soraida Mesinas Reyes{0}Director General", vbCrLf))) + ElseIf (UsuarioActual.CveEmpresa = 120 And ChkFirma.Checked) Then + params.Add(New ReportParameter("pFirma1", String.Format("C.P.NEFTALI PEÑA MIRANDA{0}Subdirector de Contabilidad", vbCrLf))) + params.Add(New ReportParameter("pFirma2", String.Format("Dra. María Antonieta Laso López{0}Director General", vbCrLf))) ElseIf (ChkFirma.Checked) Then params.Add(New ReportParameter("pFirma1", String.Format("C.P. Izelda Angulo Peraza{0} Subdirector de Contabilidad", vbCrLf))) params.Add(New ReportParameter("pFirma2", String.Format("ING. Soraida Mesinas Reyes{0} Director General", vbCrLf))) diff --git a/AC/Reportes/RepSituacionFinanciera.rdlc b/AC/Reportes/RepSituacionFinanciera.rdlc index 25eb158bd..2b815de3f 100644 --- a/AC/Reportes/RepSituacionFinanciera.rdlc +++ b/AC/Reportes/RepSituacionFinanciera.rdlc @@ -2980,7 +2980,7 @@ - + Director Administrativo - 4.50688cm + 2.76063cm true true @@ -1019,8 +1019,8 @@ Textbox2 - 3.36021cm - 6.16434cm + 0.49389cm + 10.80759cm 0.9616cm 8.02269cm @@ -1097,7 +1097,7 @@ Textbox3 - 3.85438cm + 1.92292cm 0.62818cm 0.6cm 18.2021cm @@ -1112,44 +1112,6 @@ 2pt - - true - true - - - - - Director administrativo - - - - Textbox2 - 0.49389cm - 9.9076cm - 0.99688cm - 8.02269cm - 3 - - =Microsoft.VisualBasic.Interaction.Iif((Globals!PageNumber = Globals!TotalPages) And (Parameters!pFirma1.Value <> ""), False, True) - - - - - - - 2pt - 2pt - 2pt - 2pt - - - 3.73062cm + 2.27541cm true true @@ -2883,7 +2883,7 @@ Textbox3 - 3.13062cm + 1.41083cm 16.37931cm 0.6cm 3.95896cm @@ -2952,8 +2952,8 @@ Textbox2 - 2.73374cm - 6.03938cm + 0.07056cm + 10.88047cm 0.99688cm 8.02269cm 2 @@ -2973,45 +2973,6 @@ 2pt - - true - true - - - - - Director Administrativo - - - - - Textbox2 - 0.10582cm - 10.37435cm - 0.99688cm - 8.02269cm - 3 - - =Microsoft.VisualBasic.Interaction.Iif((Globals!PageNumber = Globals!TotalPages) And (Parameters!pFirma1.Value <> ""), False, True) - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - -
  • - - + }*/ + + #showdiv1 { + left: 0 !important; + width: 100% !important; + } + + #ShowDiv3:hover { + line-height: 34px !important; + -webkit-transition: line-height ease 1s; + -moz-transition: line-height ease 1s; + -o-transition: line-height ease 1s; + transition: line-height ease 1s; + } + + #map { + position: fixed !important; + } + + .pac-container.pac-logo { + z-index: 100000; + } + + #iw-container { + margin-bottom: 10px; + } + + #iw-container .iw-title { + font-family: 'Open Sans Condensed', sans-serif; + font-size: 22px; + font-weight: 400; + padding: 10px; + background-color: #48b5e9; + color: white; + margin: 0; + border-radius: 2px 2px 0 0; + } + + #iw-container .iw-content { + font-size: 13px; + line-height: 18px; + font-weight: 400; + margin-right: 1px; + padding: 15px 5px 20px 15px; + max-height: 140px; + overflow-y: auto; + overflow-x: hidden; + } + + .iw-content img { + float: right; + margin: 0 5px 5px 10px; + } + + .iw-subTitle { + font-size: 16px; + font-weight: 700; + padding: 5px 0; + } + + .iw-bottom-gradient { + position: absolute; + width: 326px; + height: 25px; + bottom: 10px; + right: 18px; + background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); + background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); + background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); + background: -ms-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); + } + + .modal.fade:not(.in).left .modal-dialog { + -webkit-transform: translate3d(-25%, 0, 0); + transform: translate3d(-25%, 0, 0); + } + + .modal.fade:not(.in).right .modal-dialog { + -webkit-transform: translate3d(25%, 0, 0); + transform: translate3d(25%, 0, 0); + } + + .modal.fade:not(.in).bottom .modal-dialog { + -webkit-transform: translate3d(0, 25%, 0); + transform: translate3d(0, 25%, 0); + } + + /* Alternative Angles */ + .modal.fade:not(.in).top-left .modal-dialog { + -webkit-transform: translate3d(-25%, -25%, 0); + transform: translate3d(-25%, -25%, 0); + } + + .modal.fade:not(.in).top-right .modal-dialog { + -webkit-transform: translate3d(25%, -25%, 0); + transform: translate3d(25%, -25%, 0); + } + + .modal.fade:not(.in).bottom-left .modal-dialog { + -webkit-transform: translate3d(-25%, 25%, 0); + transform: translate3d(-25%, 25%, 0); + } + + .modal.fade:not(.in).bottom-right .modal-dialog { + -webkit-transform: translate3d(25%, 25%, 0); + transform: translate3d(25%, 25%, 0); + } + + .minicolors { + position: relative; + MARGIN-TOP: 10PX; + WIDTH: 20%; + } + + table.dataTable, + table.dataTable th, + table.dataTable td { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + } + + .dataTables_scrollBody > .dataTable > thead { + display: none !important; + } + + tr td:nth-child(4) { + text-align: center; + } + + .form-horizontal .control-label { + text-align: left; + } + + + +
  • + + - - - -
  • -
  • - - + + + +
  • +
  • + + - - - -
  • -
  • - - + + + +
  • +
  • + + - - - -
  • -
  • - - + + + +
  • +
  • + + - - - -
  • -
  • - - + + + +
  • +
  • + + - - - -
  • -
  • - - - - - -
  • -
  • - - + + + +
  • +
  • + + + + + +
  • +
  • + + - - - -
  • -
  • - - + + + +
  • +
  • + + - - - -
  • -
  • - - + + + +
  • +
  • + + - - - -
  • -
  • - - + + + +
  • +
  • + + - - - -
  • -
    - - - - - - - - - - - - - - - - - - - - -
    - - - - - - + + + + + + + + + + + +
    + <%-- - --%> - - - + --%> + + + - - - - + + + + + + + diff --git a/GPS/Rastreo.aspx.vb b/GPS/Rastreo.aspx.vb index 2e88f4ec5..e0566065a 100644 --- a/GPS/Rastreo.aspx.vb +++ b/GPS/Rastreo.aspx.vb @@ -617,10 +617,16 @@ Partial Class GPS_Rastreo AddRowPosiciones(Vehiculo, Coord, row("SPD").ToString.ToDouble, Fecha, row("CveDispositivo").ToString.ToEntero, row("TiempoDetenido").ToString.ToDouble) Next + If ChkTrazarGeocercas.Checked Then Dim Dispositivos As String = Equipos.Replace(";", ",").Remove(Equipos.Length - 1, 1) CargaGeocercas(Dispositivos) + End If + + If ChkTrazarGeorutas.Checked Then + MostarGeoRutas() End If + RegistraScript("setTimeout(function(){ $('#LnkMostarGeocercas').css('display', 'block'); },1000);") Else Alert($"No se encontraron resultados", TipoMensaje.MsgAdvertencia) @@ -715,6 +721,21 @@ Partial Class GPS_Rastreo SbJS.Append(" VerGeocercas(); },1000);") RegistraScript(SbJS.ToString) End If + End Sub + Private Sub MostarGeoRutas() + Dim count = 0 + RegistraScript($"initGeoRutas();", count.ToString()) + + For Each GvRow As GridViewRow In GvGeorutas.Rows + If GvRow.RowType = DataControlRowType.DataRow Then + If GvRow.FCCheckBox("ChkRutas").Checked Then + count += 1 + Dim Coord As String = SQLToGmaps(GvRow.DataKey("Coordenadas").ToString, "LINESTRING") + RegistraScript($"creaPolylineRuta({Coord}, '{GvRow.DataKey("Color").ToString}', '{GvRow.DataKey("GeoReferencia")}')", count.ToString()) + End If + End If + Next + End Sub Protected Sub TimmerRefresh_Tick(sender As Object, e As EventArgs) @@ -1136,6 +1157,7 @@ Partial Class GPS_Rastreo dvDispositivos.Visible = True dvTrazo.Visible = False dvTrazoGeo.Visible = True + dvTrazoRutas.Visible = True ChkTrazarGeocercas.Visible = True dvMinutos.Visible = False RegistraScript("$('#dvConsulta').modal();TerminaDibujado();") @@ -1148,7 +1170,8 @@ Partial Class GPS_Rastreo dvDispositivos.Visible = True txtFechaF.Text = "" dvTrazo.Visible = False - dvTrazoGeo.Visible = False + dvTrazoGeo.Visible = False + dvTrazoRutas.Visible = False dvMinutos.Visible = False BtnRastrear.ValidationGroup = "GrpFechas" RegistraScript("$('#dvConsulta').modal();TerminaDibujado();") @@ -1160,6 +1183,7 @@ Partial Class GPS_Rastreo txtFechaF.Text = "" dvTrazo.Visible = False dvTrazoGeo.Visible = False + dvTrazoRutas.Visible = False dvDispositivos.Visible = True dvMinutos.Visible = False GvDispositivos.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("Estatus = 1 AND LimiteVelocidad = 1") @@ -1175,7 +1199,8 @@ Partial Class GPS_Rastreo txtFechaF.Text = "" dvDispositivos.Visible = True dvTrazo.Visible = False - dvTrazoGeo.Visible = False + dvTrazoGeo.Visible = False + dvTrazoRutas.Visible = False dvMinutos.Visible = True dvEventos.Visible = False BtnRastrear.ValidationGroup = "GrpFechas" @@ -1188,6 +1213,7 @@ Partial Class GPS_Rastreo dvDispositivos.Visible = True dvTrazo.Visible = False dvTrazoGeo.Visible = False + dvTrazoRutas.Visible = False dvMinutos.Visible = False dvEventos.Visible = False BtnRastrear.ValidationGroup = "GrpFechas" @@ -1198,6 +1224,7 @@ Partial Class GPS_Rastreo dvDispositivos.Visible = True dvTrazo.Visible = False dvTrazoGeo.Visible = False + dvTrazoRutas.Visible = False dvMinutos.Visible = False dvEventos.Visible = False BtnRastrear.ValidationGroup = "xx" @@ -1208,6 +1235,7 @@ Partial Class GPS_Rastreo dvMinutos.Visible = False dvTrazo.Visible = True dvTrazoGeo.Visible = True + dvTrazoRutas.Visible = True dvEventos.Visible = False BtnRastrear.ValidationGroup = "xx" RegistraScript("$('#dvConsulta').modal();TerminaDibujado();") @@ -1219,7 +1247,8 @@ Partial Class GPS_Rastreo dvDispositivos.Visible = True dvMinutos.Visible = False dvTrazo.Visible = True - dvTrazoGeo.Visible = True + dvTrazoGeo.Visible = True + dvTrazoRutas.Visible = True dvEventos.Visible = False BtnRastrear.ValidationGroup = "xx" RegistraScript("$('#dvConsulta').modal();TerminaDibujado();") @@ -1229,7 +1258,8 @@ Partial Class GPS_Rastreo dvDispositivos.Visible = False dvMinutos.Visible = False dvTrazo.Visible = False - dvTrazoGeo.Visible = False + dvTrazoGeo.Visible = False + dvTrazoRutas.Visible = False dvEventos.Visible = False BtnRastrear.ValidationGroup = "xx" RegistraScript("$('#dvConsulta').modal();TerminaDibujado();") @@ -1246,6 +1276,11 @@ Partial Class GPS_Rastreo RegistraScript("$('#dvConsulta').modal();TerminaDibujado();") myModalLabel2.InnerHtml = "Contador de pasajeros" End If + If dvTrazoRutas.Visible Then + CargaGeoRutas() + Else + RegistraScript("$('#LnkMostarGeoRutas').css('display', 'none');") + End If If opcion <> "Speed" AndAlso opcion <> "TPS" AndAlso Filtrado Then CargaDispositivos() Filtrado = False @@ -2122,5 +2157,24 @@ Partial Class GPS_Rastreo End Try End Using Return retorno - End Function + End Function +#Region "G E O R U T A S" + Protected Sub ChkTrazarGeorutas_CheckedChanged(sender As Object, e As EventArgs) + If ChkTrazarGeorutas.Checked Then + RegistraScript("$('#DivGeoRutas').modal('show');") + End If + End Sub + + Private Sub CargaGeoRutas() + Dim ObjGPS As New ClsGPS + If ObjGPS.GeoReferenciaGet(-1, 1, "Ruta", UsuarioActual.CveCliente) Then + GvGeorutas.DataSource = ObjGPS.DtResultados + End If + ObjGPS.Dispose() + GvGeorutas.DataBind() + + UpGeorutas.Update() + End Sub +#End Region + End Class diff --git a/GPS/Rastreo/JS/GeoRutas.js b/GPS/Rastreo/JS/GeoRutas.js new file mode 100644 index 000000000..0cd74aafc --- /dev/null +++ b/GPS/Rastreo/JS/GeoRutas.js @@ -0,0 +1,145 @@ +//REGION GEORUTAS +var markersRutas = []; +var polylinesGeoRutas = []; +var polybounds = []; + +function initGeoRutas() { + NuevaConsultaGeoRutas(); + var upRutasDiv = document.createElement('div'); + var upRutas = new ControlGeoRutas(upRutasDiv, map); + + map.controls[google.maps.ControlPosition.TOP_LEFT].push(upRutasDiv); +} + +function creaPolylineRuta(coords, color, GeoCerca) { + var polyline = new google.maps.Polyline({ + path: coords, + strokeColor: color, + strokeOpacity: 0.8, + strokeWeight: 2, + fillOpacity: 0.35 + }); + + polyline.setMap(map); + polylinesGeoRutas.push(polyline); + polybounds.push(coords[0]); + polybounds.push(coords[coords.length - 1]); + CreaMarcadorPoligonoRuta(coords, GeoCerca); +} + +function CreaMarcadorPoligonoRuta(coords, GeoCerca) { + var bounds = new google.maps.LatLngBounds(); + for (i = 0; i < coords.length; i++) { + bounds.extend(coords[i]); + } + + var marker = new google.maps.Marker({ + position: bounds.getCenter(), + title: GeoCerca, + map: map + }); + + var infowindow = new google.maps.InfoWindow({ + content: '

    ' + GeoCerca + '

    ' + }); + + marker.addListener('click', function () { + closeLastOpenedInfoWindow(); + infowindow.open(map, marker); + lastOpenedInfoWindow = infowindow; + }); + + markersRutas.push(marker); +} + +function NuevaConsultaGeoRutas() { + + for (var i = 0; i < polylinesGeoRutas.length; i++) { + polylinesGeoRutas[i].setMap(null); + } + + for (var i = 0; i < markersRutas.length; i++) { + markersRutas[i].setMap(null); + } + + polylinesGeoRutas = []; + polybounds = []; + markersRutas = []; +} + +function ControlGeoRutas(controlDiv, map) { + + // Set CSS for the control border. + var controlUI = document.createElement('div'); + controlUI.style.marginLeft = '10px'; + controlUI.style.zIndex = '0'; + controlUI.style.cursor = 'pointer'; + // controlUI.style.position = 'absolute'; + controlUI.style.left = "0px"; + controlUI.style.width = "150px"; + controlUI.style.marginTop = "10px" + controlUI.style.top = "0px"; + controlUI.className = 'gmnoprint'; + + controlDiv.appendChild(controlUI); + + var ControlSub1 = document.createElement('div') + ControlSub1.style.float = 'left'; + ControlSub1.className = 'gm-style-mtc' + controlUI.appendChild(ControlSub1) + + var ControlSub2 = document.createElement('div') + ControlSub2.style.direction = 'ltr'; + ControlSub2.style.overflow = 'hidden'; + ControlSub2.id = "LnkMostarGeoRutas" + ControlSub2.style.textAlign = 'center'; + ControlSub2.style.position = 'relative'; + ControlSub2.style.color = 'rgb(0,0,0)'; + ControlSub2.style.fontFamily = ' "Open Sans", sans-serif; '; + ControlSub2.style.msUserSelect = 'none;'; + ControlSub2.style.fontSize = '11px' + ControlSub2.style.display = 'block' + ControlSub2.style.backgroundColor = 'rgb(255,255,255)' + ControlSub2.style.padding = '11px' + ControlSub2.style.backgroundClip = 'padding-box' + ControlSub2.style.minWidth = '28px' + ControlSub2.style.fontWeight = '500' + ControlSub2.style.boxShadow = '0 1px 4px -1px rgba(0,0,0,.3)'; + ControlSub2.innerHTML = 'Mostrar GeoRutas' + ControlSub1.appendChild(ControlSub2) + + ControlSub1.addEventListener('click', function () { + VerGeoRutas(); + }); + +} + +var IsRutasVisibles = false; + +function VerGeoRutas() { + if (IsRutasVisibles) { + HideGeoRutas(); + IsRutasVisibles = false; + } else { + CargaGeoRutas(); + IsRutasVisibles = true; + } +} + +function HideGeoRutas() { + for (var i = 0; i < polylinesGeoRutas.length; i++) { + polylinesGeoRutas[i].setMap(null); + } + for (var j = 0; j < markersRutas.length; j++) { + markersRutas[j].setMap(null); + } +} + +function CargaGeoRutas() { + for (var i = 0; i < polylinesGeoRutas.length; i++) { + polylinesGeoRutas[i].setMap(map); + } + for (var j = 0; j < markersRutas.length; j++) { + markersRutas[j].setMap(map); + } +} \ No newline at end of file diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 806acee32..b72868eac 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -4362,7 +4362,7 @@
    + DataKeyNames="CveVenta, SubTotal, IVA,Total, CveContrato,Surtido" AllowPaging="False"> @@ -4377,11 +4377,12 @@ + + DataKeyNames="CveVentaDetalle, PU, Total, Cantidad, CveContrato,Surtido" AllowPaging="False"> @@ -4406,6 +4407,7 @@ +
    diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 1e5a1e1b4..5fa28cc1e 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -22485,6 +22485,25 @@ Partial Class Ventas Exit Sub End If + 'VERIFICA QUE LAS FACTURAS TENGAN EL MISMO ESTATUS EN ALMACEN (NO MEZCLAR REMISIONES 'SURTIDAS' CON 'NO SURTIDAS') + If dtSeleccionadas.COUNT("Surtido", "Surtido = 'Si'") > 0 AndAlso dtSeleccionadas.COUNT("Surtido", "Surtido = 'No'") > 0 Then + Dim SbRem As New StringBuilder + SbRem.Append("Solo debe seleccionar remisiones con el mismo estatus de almacen. Por favor verifique y vuelva a intentar.
    ") + + SbRem.Append("Remisiones Surtidas:
    ") + For Each RowSurtida As DataRow In dtSeleccionadas.FiltraParametros("Surtido = 'Si'", DistinctColumns:={"Folio"}).Rows + SbRem.AppendFormat("{0}
    ", RowSurtida("Folio")) + Next + + SbRem.Append("Remisiones No Surtidas:
    ") + For Each RowSurtida As DataRow In dtSeleccionadas.FiltraParametros("Surtido = 'No'", DistinctColumns:={"Folio"}).Rows + SbRem.AppendFormat("{0}
    ", RowSurtida("Folio")) + Next + + Alert(SbRem.ToString(), TipoMensaje.MsgAdvertencia) + Exit Sub + End If + DdlMoneda.SelectedValue = GlobalDTMonedas.FiltroPrimeroValor("CveMoneda", $"Abreviatura = '{dtSeleccionadas.FiltroPrimeroValor("Abreviatura")}'") DdlMoneda.Enabled = False CambiaMoneda() From 3e807fa19a394a281bce94ca2f3a8bb45907a6b8 Mon Sep 17 00:00:00 2001 From: rrene Date: Tue, 3 Dec 2019 18:41:31 -0700 Subject: [PATCH 14/25] - agregar IVA, incluyendo IEPS --- App_Code/CFDITimbre.vb | 1 + Ventas/PV.aspx | 6 +++--- Ventas/PV.aspx.vb | 28 +++++++++++++++++----------- Ventas/Ventas.aspx.vb | 9 ++++++--- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/App_Code/CFDITimbre.vb b/App_Code/CFDITimbre.vb index 832bf7f19..6c4ae3256 100644 --- a/App_Code/CFDITimbre.vb +++ b/App_Code/CFDITimbre.vb @@ -306,6 +306,7 @@ Public Class CFDIConceptos Public Property ClaveUnidad As String = "" Public Property Impuestos As List(Of CFDIConceptosImpuestos) Public Property Descuento As Decimal = 0.00D + Public Property ImporteGravaIVAAdicional As Decimal = 0.00D 'caso IEPS Sub New() Impuestos = New List(Of CFDIConceptosImpuestos) diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index 87304968c..97130d96a 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -2793,7 +2793,7 @@ -
    +