diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb
index 8b8334f0d..8d840b5a5 100644
--- a/App_Code/Modelos.vb
+++ b/App_Code/Modelos.vb
@@ -4105,6 +4105,11 @@ Namespace Modelos
CvePrePoliza = ObjConta.AddPrePolizas("Modelos/CancelarDocumento", CvePlantillaPoliza, ObjFactura.Total, ObjFactura.Total, ObjFactura.CveMoneda, Now, ObjFactura.Cliente.Nombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
ObjFactura.CvePrePoliza = CvePrePoliza
+ If ObjFactura.CvePrePoliza <= 0 Then
+ ErrorCancelar = True
+ MensajeError = "Ocurrió un error al generar la prepoliza de cancelación."
+ End If
+
'CANCELAR PAGOS
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
If Not ErrorCancelar Then
@@ -4315,6 +4320,7 @@ Namespace Modelos
If Not ErrorCancelar AndAlso RealizarDevolucionAlmacen AndAlso CveMovimiento > 0 Then
Dim MensajeBitacora = "Devuelta"
If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: {1} ", CveMovimiento, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
+ MensajeError = "Ocurrió un error al agregar la bitacora."
ErrorCancelar = True
End If
End If
@@ -4327,12 +4333,16 @@ Namespace Modelos
If Not ErrorCancelar Then
If ObjFactura.CveContrato > 0 AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Ant") Then
ObjFactura.GuardarContratoAvanceEstimaciones(ObjContrato, ErrorList, -1, True)
- ErrorCancelar = ErrorList.Count > 0
- MensajeError = "Ocurrió un error al cancelar las estimaciones del contrato."
+ If ErrorList.Count > 0 Then
+ ErrorCancelar = True
+ MensajeError = "Ocurrió un error al cancelar las estimaciones del contrato."
+ End If
ElseIf ObjFactura.CveContrato > 0 AndAlso ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
ObjFactura.GuardarContratoAvanceEstimaciones(ObjContrato, ErrorList, 1, True)
- ErrorCancelar = ErrorList.Count > 0
- MensajeError = "Ocurrió un error al cancelar los avances del contrato."
+ If ErrorList.Count > 0 Then
+ ErrorCancelar = True
+ MensajeError = "Ocurrió un error al cancelar los avances del contrato."
+ End If
End If
End If
diff --git a/GPS/Rastreo.aspx b/GPS/Rastreo.aspx
index ed844e803..18559083e 100644
--- a/GPS/Rastreo.aspx
+++ b/GPS/Rastreo.aspx
@@ -1,41 +1,41 @@
-<%@ Page Title="" Language="VB" MasterPageFile="~/SiteGPS.master" AutoEventWireup="false" ValidateRequest="false" EnableEventValidation="false" CodeFile="Rastreo.aspx.vb" Inherits="GPS_Rastreo" %>
-
-
-
-
-
-
-
-
-
-
-
+ }*/
+
+ #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;
+ }
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Valor
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Valor
+
+
+
+
+
+
+
+
+
+
<%--
@@ -365,8 +365,8 @@
- --%>
-
+ --%>
+
<%----%>
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
Fecha Inicio:
-
-
+
+
+
Fecha Fin:
-
-
-
+
+
+
+
<%--
Fecha
@@ -421,479 +424,533 @@
-
--%>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Minutos Tiempo Muerto:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
Minutos Tiempo Muerto:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Fecha I.:
-
-
+
+
+
Fecha F.:
-
-
-
-
-
-
-
-
-
- Realizar Seguimiento
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ Realizar Seguimiento
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --%>
+
+
+
Fecha I.:
-
+
+
<%--
- --%>
+ --%>
Fecha F.:
-
+
+
<%--
- --%>
-
-
+
Aplica Días:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Fecha I.:
-
-
+
+
+
Fecha F.:
-
-
-
-
+
Aplica Días:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<%--
- --%>
-
-
-
+ --%>
+
+
+
-
-
-
-
+
+
+
+
+
+
+
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()