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