Merge branch 'master' of http://rpimienta@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1739,7 +1739,7 @@ Celular: </Value>
|
|||||||
</Style>
|
</Style>
|
||||||
</TextRun>
|
</TextRun>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Parameters!VendedorMail.Value</Value>
|
<Value>SERVICIOSESPECIALIZADOSENTI@GMAIL.COM</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>bahnschrift</FontFamily>
|
<FontFamily>bahnschrift</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
@@ -1755,7 +1755,7 @@ Celular: </Value>
|
|||||||
<Top>0.86675cm</Top>
|
<Top>0.86675cm</Top>
|
||||||
<Left>0.31387cm</Left>
|
<Left>0.31387cm</Left>
|
||||||
<Height>1.8206cm</Height>
|
<Height>1.8206cm</Height>
|
||||||
<Width>6.29968cm</Width>
|
<Width>7.42333cm</Width>
|
||||||
<ZIndex>8</ZIndex>
|
<ZIndex>8</ZIndex>
|
||||||
<Style>
|
<Style>
|
||||||
<Border>
|
<Border>
|
||||||
|
|||||||
@@ -198,7 +198,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>|www.adsistemas.mx | julian@adsistemas.mx|</Value>
|
<Value>|www.adssistemas.mx | julian@adssistemas.mx|</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
<FontSize>8pt</FontSize>
|
<FontSize>8pt</FontSize>
|
||||||
|
|||||||
@@ -203,7 +203,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>www.adsistemas.mx|facturacion@adssistemas.mx</Value>
|
<Value>www.adssistemas.mx|facturacion@adssistemas.mx</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontStyle>Normal</FontStyle>
|
<FontStyle>Normal</FontStyle>
|
||||||
<FontFamily>Calibri</FontFamily>
|
<FontFamily>Calibri</FontFamily>
|
||||||
|
|||||||
@@ -8,14 +8,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#DivShipment {
|
|
||||||
z-index: 1999;
|
|
||||||
}
|
|
||||||
|
|
||||||
#DivStop {
|
|
||||||
z-index: 2000;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
@@ -257,11 +249,13 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVName" runat="server" ControlToValidate="TxtLocName" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Name''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVName" runat="server" ControlToValidate="TxtLocName" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Name''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtLocName.ClientID.ToString()%>">Name:</label>
|
<label for="<%= TxtLocName.ClientID.ToString()%>">Name:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<form method="post">
|
||||||
<asp:TextBox ID="TxtLocID" CssClass="form-control " runat="server"></asp:TextBox>
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtLocID" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Location''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<asp:TextBox ID="TxtLocID" CssClass="form-control " runat="server"></asp:TextBox>
|
||||||
<label for="<%= TxtLocID.ClientID.ToString()%>">Location ID:</label>
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtLocID" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Location''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
</div>
|
<label for="<%= TxtLocID.ClientID.ToString()%>">Location ID:</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
<div class="portlet light smmallpadding traspasorow bordered">
|
<div class="portlet light smmallpadding traspasorow bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
@@ -306,19 +300,27 @@
|
|||||||
<div class="row v-center">
|
<div class="row v-center">
|
||||||
<label class="col-md-12" style="color: gray">Early Arrival Time:</label>
|
<label class="col-md-12" style="color: gray">Early Arrival Time:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
<div class="row">
|
||||||
<asp:TextBox ID="TxtFechaStopI" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
<div class="col-md-12">
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaIStop" runat="server" ControlToValidate="TxtFechaStopI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Early Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaIStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
<asp:TextBox ID="TxtFechaStopI" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaIStop" runat="server" ControlToValidate="TxtFechaStopI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Early Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaIStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="row v-center">
|
<div class="row v-center">
|
||||||
<label class="col-md-12" style="color: gray">Late Arrival Time:</label>
|
<label class="col-md-12" style="color: gray">Late Arrival Time:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm" style="display: inline-block;">
|
<div class="row">
|
||||||
<asp:TextBox ID="TxtFechaStopF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
<div class="col-md-12">
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaFStop" runat="server" ControlToValidate="TxtFechaStopF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Late Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEF" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
<asp:TextBox ID="TxtFechaStopF" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVFechaFStop" runat="server" ControlToValidate="TxtFechaStopF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Late Arrival Time''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="VCEF" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFStop" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@@ -346,9 +348,16 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVStopRole" runat="server" ControlToValidate="DdlStopRole" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Stop Role''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVStopRole" runat="server" ControlToValidate="DdlStopRole" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Stop Role''</b> es necesario, por favor ingréselo." ValidationGroup="GrpStop"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= DdlStopRole.ClientID.ToString()%>">Stop Role:</label>
|
<label for="<%= DdlStopRole.ClientID.ToString()%>">Stop Role:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="row v-center">
|
||||||
<asp:TextBox ID="TxtLoc" CssClass="form-control " runat="server"></asp:TextBox>
|
<div class="col-md-9">
|
||||||
<label for="<%= TxtLoc.ClientID.ToString()%>">Search Location:</label>
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtLoc" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
|
<label for="<%= TxtLoc.ClientID.ToString()%>">Search Location:</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3 v-center">
|
||||||
|
<button type="button" class="btn btn-primary" onclick="BtnBuscar();">Buscar</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet light smmallpadding traspasorow bordered">
|
<div class="portlet light smmallpadding traspasorow bordered">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
@@ -510,6 +519,9 @@
|
|||||||
var markersEvent = [];
|
var markersEvent = [];
|
||||||
var markerEvent;
|
var markerEvent;
|
||||||
|
|
||||||
|
var searchBox;
|
||||||
|
var searchBoxEvent;
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initMap();
|
initMap();
|
||||||
Sys.Application.add_load(function (s, e) {
|
Sys.Application.add_load(function (s, e) {
|
||||||
@@ -517,9 +529,10 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#DivShipment').on('hidden.bs.modal', function () {
|
|
||||||
return false;
|
//$("form").submit(function (event) {
|
||||||
});
|
// event.preventDefault();
|
||||||
|
//});
|
||||||
|
|
||||||
function initMap() {
|
function initMap() {
|
||||||
|
|
||||||
@@ -544,65 +557,23 @@
|
|||||||
directionsDisplayEvent.setOptions({ suppressMarkers: true });
|
directionsDisplayEvent.setOptions({ suppressMarkers: true });
|
||||||
directionsDisplayEvent.setMap(mapEvent);
|
directionsDisplayEvent.setMap(mapEvent);
|
||||||
|
|
||||||
var searchBox = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc.ClientID%>"));
|
searchBox = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc.ClientID%>"));
|
||||||
var searchBoxEvent = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc2.ClientID%>"));
|
searchBoxEvent = new google.maps.places.SearchBox(document.getElementById("<%= TxtLoc2.ClientID%>"));
|
||||||
|
|
||||||
|
$("#<%= TxtLoc.ClientID%>").bind('keypress', function (e) {
|
||||||
|
if (e.keyCode == 13) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#<%= TxtLoc2.ClientID%>").bind('keypress', function (e) {
|
||||||
|
if (e.keyCode == 13) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
searchBox.addListener('places_changed', function () {
|
searchBox.addListener('places_changed', function () {
|
||||||
var places = searchBox.getPlaces();
|
var places = searchBox.getPlaces();
|
||||||
if (places.length == 0) {
|
BuscarDireccion(places);
|
||||||
return;
|
|
||||||
}
|
|
||||||
var bounds = new google.maps.LatLngBounds();
|
|
||||||
places.forEach(function (place) {
|
|
||||||
if (!place.geometry) {
|
|
||||||
console.log("Returned place contains no geometry");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var lat = place.geometry.location.lat();
|
|
||||||
var lng = place.geometry.location.lng();
|
|
||||||
|
|
||||||
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
|
||||||
|
|
||||||
getDirecciones(lat, lng);
|
|
||||||
|
|
||||||
var icon = {
|
|
||||||
url: 'http://maps.google.com/mapfiles/ms/micons/truck.png',
|
|
||||||
size: new google.maps.Size(71, 71),
|
|
||||||
origin: new google.maps.Point(0, 0),
|
|
||||||
anchor: new google.maps.Point(17, 34),
|
|
||||||
scaledSize: new google.maps.Size(25, 25)
|
|
||||||
};
|
|
||||||
|
|
||||||
marker = new google.maps.Marker({
|
|
||||||
map: map,
|
|
||||||
icon: icon,
|
|
||||||
title: place.name,
|
|
||||||
position: place.geometry.location,
|
|
||||||
draggable: true,
|
|
||||||
animation: google.maps.Animation.DROP
|
|
||||||
});
|
|
||||||
|
|
||||||
google.maps.event.addListener(marker, 'dragend', function () {
|
|
||||||
var pos = marker.getPosition();
|
|
||||||
getDirecciones(pos.lat(), pos.lng());
|
|
||||||
});
|
|
||||||
// Create a marker for each place.
|
|
||||||
deleteMarkers(markers);
|
|
||||||
markers.push(marker);
|
|
||||||
|
|
||||||
if (place.geometry.viewport) {
|
|
||||||
// Only geocodes have viewport.
|
|
||||||
bounds.union(place.geometry.viewport);
|
|
||||||
} else {
|
|
||||||
bounds.extend(place.geometry.location);
|
|
||||||
}
|
|
||||||
|
|
||||||
map.fitBounds(bounds);
|
|
||||||
map.setCenter(bounds.getCenter());
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
searchBoxEvent.addListener('places_changed', function () {
|
searchBoxEvent.addListener('places_changed', function () {
|
||||||
@@ -632,6 +603,67 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function BtnBuscar() {
|
||||||
|
var input = document.getElementById("<%= TxtLoc.ClientID%>");
|
||||||
|
|
||||||
|
google.maps.event.trigger(input, 'focus', {});
|
||||||
|
google.maps.event.trigger(input, 'keydown', { keyCode: 13 });
|
||||||
|
google.maps.event.trigger(this, 'focus', {});
|
||||||
|
}
|
||||||
|
function BuscarDireccion(places) {
|
||||||
|
if (places.length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var bounds = new google.maps.LatLngBounds();
|
||||||
|
places.forEach(function (place) {
|
||||||
|
if (!place.geometry) {
|
||||||
|
console.log("Returned place contains no geometry");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var lat = place.geometry.location.lat();
|
||||||
|
var lng = place.geometry.location.lng();
|
||||||
|
|
||||||
|
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
||||||
|
|
||||||
|
getDirecciones(lat, lng);
|
||||||
|
|
||||||
|
var icon = {
|
||||||
|
url: 'http://maps.google.com/mapfiles/ms/micons/truck.png',
|
||||||
|
size: new google.maps.Size(71, 71),
|
||||||
|
origin: new google.maps.Point(0, 0),
|
||||||
|
anchor: new google.maps.Point(17, 34),
|
||||||
|
scaledSize: new google.maps.Size(25, 25)
|
||||||
|
};
|
||||||
|
|
||||||
|
marker = new google.maps.Marker({
|
||||||
|
map: map,
|
||||||
|
icon: icon,
|
||||||
|
title: place.name,
|
||||||
|
position: place.geometry.location,
|
||||||
|
draggable: true,
|
||||||
|
animation: google.maps.Animation.DROP
|
||||||
|
});
|
||||||
|
|
||||||
|
google.maps.event.addListener(marker, 'dragend', function () {
|
||||||
|
var pos = marker.getPosition();
|
||||||
|
getDirecciones(pos.lat(), pos.lng());
|
||||||
|
});
|
||||||
|
// Create a marker for each place.
|
||||||
|
deleteMarkers(markers);
|
||||||
|
markers.push(marker);
|
||||||
|
|
||||||
|
if (place.geometry.viewport) {
|
||||||
|
// Only geocodes have viewport.
|
||||||
|
bounds.union(place.geometry.viewport);
|
||||||
|
} else {
|
||||||
|
bounds.extend(place.geometry.location);
|
||||||
|
}
|
||||||
|
|
||||||
|
map.fitBounds(bounds);
|
||||||
|
map.setCenter(bounds.getCenter());
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
function cargapin(lat, lng) {
|
function cargapin(lat, lng) {
|
||||||
setTimeout(function () { SetMapPinEvent(lat, lng) }, 1000);
|
setTimeout(function () { SetMapPinEvent(lat, lng) }, 1000);
|
||||||
}
|
}
|
||||||
@@ -682,22 +714,21 @@
|
|||||||
}
|
}
|
||||||
markers = [];
|
markers = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDirecciones(lat, lng) {
|
function getDirecciones(lat, lng) {
|
||||||
var url = '<%= ClsPaginas.UrlDirecciones%>' + 'nominatim/reverse.php?format=jsonv2&zoom=18&addressdetails=1&lat=' + lat + '&lon=' + lng;
|
var url = '<%= ClsPaginas.UrlDirecciones%>' + 'nominatim/reverse.php?format=jsonv2&zoom=18&addressdetails=1&lat=' + lat + '&lon=' + lng;
|
||||||
$.getJSON(url, function (data) {
|
$.getJSON(url, function (data) {
|
||||||
if (typeof (data.error) === 'undefined') {
|
if (typeof (data.error) === 'undefined') {
|
||||||
|
|
||||||
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
$("#<%= TxtLatLong.ClientID%>").val(lat + ',' + lng);
|
||||||
$("#<%= TxtAddress.ClientID%>").val(data.display_name);
|
$("#<%= TxtAddress.ClientID%>").val(data.display_name);
|
||||||
$("#<%= TxtCity.ClientID%>").val(data.address.city);
|
$("#<%= TxtCity.ClientID%>").val(data.address.city);
|
||||||
$("#<%= TxtState.ClientID%>").val(data.address.state);
|
$("#<%= TxtState.ClientID%>").val(data.address.state);
|
||||||
$("#<%= TxtContry.ClientID%>").val(data.address.country);
|
$("#<%= TxtContry.ClientID%>").val(data.address.country);
|
||||||
$("#<%= TxtPostalCode.ClientID%>").val(data.address.postcode);
|
$("#<%= TxtPostalCode.ClientID%>").val(data.address.postcode);
|
||||||
|
}
|
||||||
$('#DivShipment').modal({ backdrop: 'static', keyboard: false });
|
});
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script
|
||||||
|
|||||||
@@ -1311,31 +1311,32 @@ Partial Class Inventarios_RecepcionEntrega
|
|||||||
Dim TxtCantidad = GvDatos.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
Dim TxtCantidad = GvDatos.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
||||||
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
''VALIDA EXISTENCIA
|
''VALIDA EXISTENCIA
|
||||||
If TipoMovimiento = 1 Then
|
If Not TipoDocto.Contiene("Dev") Then
|
||||||
Dim ObjInventario As New ClsInventarios
|
If TipoMovimiento = 1 Then
|
||||||
Dim Existencia = ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
Dim ObjInventario As New ClsInventarios
|
||||||
ObjInventario.Dispose()
|
Dim Existencia = ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||||
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
ObjInventario.Dispose()
|
||||||
TxtCodigoPS.Text = ""
|
|
||||||
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If DtExistencias IsNot Nothing Then
|
|
||||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {Gvr.DataKey("CvePS")} AND CveUM = {Gvr.DataKey("CveUM").ToString.ToEntero}")
|
|
||||||
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
If DtExistencias IsNot Nothing Then
|
||||||
|
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {Gvr.DataKey("CvePS")} AND CveUM = {Gvr.DataKey("CveUM").ToString.ToEntero}")
|
||||||
|
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
||||||
|
TxtCodigoPS.Text = ""
|
||||||
|
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Gvr.DataKey("AplicaSerieLote") = "True" Then
|
If Gvr.DataKey("AplicaSerieLote") = "True" Then
|
||||||
TdSeriePS.Visible = True
|
TdSeriePS.Visible = True
|
||||||
TxtSeriePS.Focus()
|
TxtSeriePS.Focus()
|
||||||
|
|||||||
Reference in New Issue
Block a user