mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'fix/margenes-maquinas-format' into 'main'
fix decimals number See merge request jjimenez/safekat!544
This commit is contained in:
@ -543,7 +543,7 @@
|
||||
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: 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(){
|
||||
// $(this).attr('type','text')
|
||||
// let autoNumericInstance = AutoNumeric.getAutoNumericElement(this)
|
||||
|
||||
Reference in New Issue
Block a user