Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Asistencia
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Billy Larru
Asistencia
Commits
a71b8208
Commit
a71b8208
authored
Aug 10, 2018
by
Billy Larru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formateando monto y diferencia total en proyectado comparativo
parent
ebf32b33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
comparativo_proyeccion_policias.js
src/main/webapp/js/pages/comparativo_proyeccion_policias.js
+25
-8
No files found.
src/main/webapp/js/pages/comparativo_proyeccion_policias.js
View file @
a71b8208
...
...
@@ -180,17 +180,17 @@ function seleccionarCriterio() {
function
buscar
()
{
let
datos
=
[];
let
criterioPersonal
=
$
(
"#cboCriterioPersonal"
).
val
();
if
(
criterioPersonal
===
"dni"
||
criterioPersonal
===
"nombres"
)
{
if
(
criterioPersonal
===
"dni"
||
criterioPersonal
===
"nombres"
)
{
let
busquedaPersonal
=
$
(
"#txtBusquedaPersonal"
).
val
();
datos
=
_
.
filter
(
data
,
p
=>
p
[
criterioPersonal
].
toLowerCase
().
startsWith
(
busquedaPersonal
.
toLowerCase
()));
debugger
;
}
else
{
}
else
{
datos
=
data
;
}
$
(
"#tblProyectadoComparativo"
).
DataTable
().
destroy
();
$
(
"#tblProyectadoComparativo"
).
DataTable
({
"language"
:
{
...
...
@@ -276,8 +276,25 @@ function buscar() {
{
data
:
"salida_proyectada"
,
className
:
"text-center"
},
{
data
:
"marcacion_salida"
,
className
:
'text-center'
},
// {data: "diferencia_salida", className: 'text-center'},
{
data
:
"diferencia_total"
,
className
:
'text-center'
},
{
data
:
"monto"
,
className
:
'text-center'
,
render
:
monto
=>
parseFloat
(
monto
).
toFixed
(
2
)},
{
data
:
"diferencia_total"
,
className
:
'text-center'
,
render
:
data
=>
`
${
data
}
min`
},
{
data
:
"monto"
,
className
:
'text-center'
,
render
:
monto
=>
{
let
label
;
if
(
monto
>
0
){
label
=
"text-sucess"
;
}
else
if
(
monto
<
0
){
label
=
"text-danger"
;
}
else
{
label
=
""
;
}
let
numeroReal
=
parseFloat
(
monto
).
toFixed
(
2
);
return
`<label class="
${
label
}
">
${
numeroReal
}
</label>`
;
}
},
{
data
:
"observacion"
,
className
:
'text-center'
},
],
fnInitComplete
:
function
(
settings
,
data
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment