-- double to decimal
This commit is contained in:
@@ -5206,7 +5206,7 @@ Partial Class Compras_Compras
|
||||
'QUEMA SALDOS DE INV-COMPRA | MERCANCIA RECIBIDA POR ADELANTADO (OC) | PP 176
|
||||
If OCVinculada And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" Then
|
||||
For Each Row As DataRow In TmpDT.FiltraParametros("CveTipoPS = 2").Rows
|
||||
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Row("CveOrdenCompraDetalle").ToString.ToEntero, -1, -1, Row("CveCompraDetalle").ToString.ToEntero, Row("Cantidad").ToString.ToDouble) Then
|
||||
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Row("CveOrdenCompraDetalle").ToString.ToEntero, -1, -1, Row("CveCompraDetalle").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal) Then
|
||||
ErrorSaldosInvComp = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -3689,7 +3689,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If Not ErrorMovInv And CveOCSurtir > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Dr("CveOrdenCompraDetalle").ToString.ToEntero, Dr("CveMovimientoDetalle").ToString.ToEntero, Dr("Cantidad").ToString.ToDouble, -1, -1) Then
|
||||
If Not ObjOC.OrdenesCompraDetalleSaldosInvCompraAdd(Dr("CveOrdenCompraDetalle").ToString.ToEntero, Dr("CveMovimientoDetalle").ToString.ToEntero, Dr("Cantidad").ToString.ToDecimal, -1, -1) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
@@ -294,158 +294,158 @@
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
<script>
|
||||
function Ir() {
|
||||
try {
|
||||
parent.CargaDatosCotizaciones();
|
||||
parent.CargaDatosCotizaciones();
|
||||
parent.tb_remove();
|
||||
|
||||
|
||||
} catch (ex) {
|
||||
console.log(ex.message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ClientValidateFechaEntrega(source, arguments) {
|
||||
var txtCantidadSurtir = document.getElementById(source.txtCantidadSurtir);
|
||||
|
||||
var txtCantidadSurtir = document.getElementById(source.txtCantidadSurtir);
|
||||
|
||||
if (txtCantidadSurtir.value == 0) {
|
||||
arguments.IsValid = false;
|
||||
} else {
|
||||
if (arguments.Value == "" || arguments.Value == "__/__/____")
|
||||
{ arguments.IsValid = false; }
|
||||
else
|
||||
if (arguments.Value == "" || arguments.Value == "__/__/____")
|
||||
{ arguments.IsValid = false; }
|
||||
else
|
||||
{ arguments.IsValid = true; }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ClientValidatePU(source, arguments) {
|
||||
|
||||
|
||||
arguments.IsValid = true
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function isNumeric(n) {
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CalculaImporte(Cant, tPU, Imp) {
|
||||
var Cantidad = ToDouble(Cant.value);
|
||||
var PU = ToDouble(tPU.value);
|
||||
var Importe = Cantidad * PU;
|
||||
|
||||
var Cantidad = ToDouble(Cant.value);
|
||||
var PU = ToDouble(tPU.value);
|
||||
var Importe = Cantidad * PU;
|
||||
|
||||
Imp.value = ToDouble(Importe);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function validacionRow(objControl, tipo) {
|
||||
|
||||
var eRow;
|
||||
|
||||
|
||||
var eRow;
|
||||
|
||||
if (tipo == 1) {
|
||||
eRow = $(objControl).parent().parent();
|
||||
} else if (tipo == 2) {
|
||||
eRow = $(objControl).parent().parent().parent();
|
||||
}
|
||||
|
||||
var arregloControles = $(eRow).attr("data-controles").split(',');
|
||||
var arregloValidadores = $(eRow).attr("data-validadores").split(',');
|
||||
var activarValidadores = false;
|
||||
var ControlConValor = "";
|
||||
|
||||
var controleslen = arregloControles.length;
|
||||
var validadoreslen = arregloValidadores.length;
|
||||
|
||||
}
|
||||
|
||||
var arregloControles = $(eRow).attr("data-controles").split(',');
|
||||
var arregloValidadores = $(eRow).attr("data-validadores").split(',');
|
||||
var activarValidadores = false;
|
||||
var ControlConValor = "";
|
||||
|
||||
var controleslen = arregloControles.length;
|
||||
var validadoreslen = arregloValidadores.length;
|
||||
|
||||
for (var i = 0; i < controleslen; i++) {
|
||||
|
||||
var controlName = String.format("{0}{1}", "#", arregloControles[i]);
|
||||
|
||||
controlName = controlName.replace("'", "")
|
||||
|
||||
|
||||
var controlName = String.format("{0}{1}", "#", arregloControles[i]);
|
||||
|
||||
controlName = controlName.replace("'", "")
|
||||
|
||||
if ($(controlName).val().length > 0) {
|
||||
|
||||
activarValidadores = true;
|
||||
$(controlName).IsValid = false;
|
||||
console.log('control con valor ' + $(controlName).val() + ' ' + $(controlName).val().length + ' ' + controlName);
|
||||
|
||||
activarValidadores = true;
|
||||
$(controlName).IsValid = false;
|
||||
console.log('control con valor ' + $(controlName).val() + ' ' + $(controlName).val().length + ' ' + controlName);
|
||||
break;
|
||||
|
||||
|
||||
} else {
|
||||
$(controlName).IsValid = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (activarValidadores) {
|
||||
|
||||
|
||||
for (var v = 0; v < validadoreslen; v++) {
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
try {
|
||||
|
||||
document.getElementById(ValidatorName).disabled = false;
|
||||
|
||||
document.getElementById(ValidatorName).disabled = false;
|
||||
ValidatorEnable($get(ValidatorName), true);
|
||||
|
||||
|
||||
} catch (err) {
|
||||
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
procesoCorrecto = false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (procesoCorrecto) {
|
||||
console.log('validadores activados');
|
||||
} else {
|
||||
console.log('Error al activar validadores');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
for (var v = 0; v < validadoreslen; v++) {
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
|
||||
|
||||
var ValidatorName = arregloValidadores[v];
|
||||
var procesoCorrecto = true;
|
||||
|
||||
ValidatorName = ValidatorName.replace("'", "");
|
||||
|
||||
|
||||
try {
|
||||
document.getElementById(ValidatorName).disabled = true;
|
||||
document.getElementById(ValidatorName).disabled = true;
|
||||
ValidatorEnable($get(ValidatorName), false);
|
||||
} catch (err) {
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
console.log(ValidatorName + " - " + err.message);
|
||||
procesoCorrecto = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (procesoCorrecto) {
|
||||
console.log('Validadores desactivados');
|
||||
} else {
|
||||
console.log('Error al desactivar validadores');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function FechaActualddMMyyy() {
|
||||
var today = new Date();
|
||||
var dd = today.getDate();
|
||||
var mm = today.getMonth() + 1;
|
||||
var yyyy = today.getFullYear();
|
||||
var today = new Date();
|
||||
var dd = today.getDate();
|
||||
var mm = today.getMonth() + 1;
|
||||
var yyyy = today.getFullYear();
|
||||
if (dd < 10) {
|
||||
dd = '0' + dd;
|
||||
}
|
||||
}
|
||||
if (mm < 10) {
|
||||
mm = '0' + mm;
|
||||
}
|
||||
}
|
||||
return today = dd + '/' + mm + '/' + yyyy;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -208,8 +208,8 @@ Partial Class PopOCCotizacionesDetalle
|
||||
End If
|
||||
|
||||
For Each dr As GridViewRow In GvDC.Rows
|
||||
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble,
|
||||
dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble,
|
||||
TieneError = Not objCotizacion.AddCotizacionDetalle(objCotizacion.CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.DataKey("Cantidad").ToDecimal,
|
||||
dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToDecimal,
|
||||
If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1",
|
||||
dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToString.ToEntero)
|
||||
If TieneError = True Then Exit For
|
||||
@@ -230,12 +230,12 @@ Partial Class PopOCCotizacionesDetalle
|
||||
|
||||
For Each dr As GridViewRow In GvDC.Rows
|
||||
If dr.DataKey("CveCotizacionDetalle").ToEntero > 0 Then
|
||||
TieneError = Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.FCTextBox("txtCantidadSurtir").Text.ToDouble, dr.FCTextBox("txtFechaEntrega").Text, dr.FCTextBox("txtObservacion").Text.ToString)
|
||||
TieneError = Not objCotizacion.UpdateCotizacionDetalle(dr.DataKey("CveCotizacionDetalle").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.FCTextBox("txtCantidadSurtir").Text.ToDecimal, dr.FCTextBox("txtFechaEntrega").Text, dr.FCTextBox("txtObservacion").Text.ToString)
|
||||
Else
|
||||
Dim strTemp = dr.DataKey("CveOrdenCompraDetalle").ToString
|
||||
|
||||
If dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble > 0 Then
|
||||
If dr.FCTextBox("TxtPU").Text.ToDouble > 0 Then TieneError = Not objCotizacion.AddCotizacionDetalle(CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDouble, dr.DataKey("Cantidad").ToDouble, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDouble, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToEntero)
|
||||
If dr.FCTextBox("TxtPU").Text.ToDouble > 0 Then TieneError = Not objCotizacion.AddCotizacionDetalle(CveCotizacion, dr.DataKey("CvePS").ToEntero, dr.FCTextBox("TxtPU").Text.ToDecimal, dr.DataKey("Cantidad").ToDecimal, dr.DataKey("CveUnidadMedida").ToEntero, dr.FCTextBox("txtCantidadSurtir").Text.ToString.ToDecimal, If(dr.FCTextBox("txtFechaEntrega").Text.Trim = "" Or dr.FCTextBox("txtFechaEntrega").Text = "__/__/____", "-1", dr.FCTextBox("txtFechaEntrega").Text), dr.FCTextBox("txtObservacion").Text.ToString, dr.DataKey("CveOrdenCompraDetalle").ToEntero)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user