mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
fix decimals number
This commit is contained in:
@ -543,7 +543,7 @@
|
|||||||
return '<?= lang('MaquinasTarifasImpresions.colorhq') ?>';
|
return '<?= lang('MaquinasTarifasImpresions.colorhq') ?>';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 'data': 'precio',render : (d) => `<span class="autonumeric">${d}</span>` },
|
{ 'data': 'precio',render : (d) => `<span class="autonumeric-decimal" data-decimal-places="6">${d}</span>` },
|
||||||
{ 'data': 'margen',render : (d) => `<span class="autonumeric">${d}</span>` },
|
{ 'data': 'margen',render : (d) => `<span class="autonumeric">${d}</span>` },
|
||||||
{
|
{
|
||||||
data: actionBtns,
|
data: actionBtns,
|
||||||
|
|||||||
@ -26,6 +26,19 @@ export const initAutonumeric = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
$("span.autonumeric-decimal").each(function () {
|
||||||
|
let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
|
||||||
|
if (!autoNumericInstance) {
|
||||||
|
new AutoNumeric(this, {
|
||||||
|
digitGroupSeparator: ".",
|
||||||
|
decimalCharacter: ",",
|
||||||
|
allowDecimalPadding : 'floats',
|
||||||
|
decimalPlaces: $(this).data('decimal-places'),
|
||||||
|
unformatOnSubmit: true,
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
// $(':input[type="number"]').each(function(){
|
// $(':input[type="number"]').each(function(){
|
||||||
// $(this).attr('type','text')
|
// $(this).attr('type','text')
|
||||||
// let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
|
// let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
|
||||||
|
|||||||
Reference in New Issue
Block a user