Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
adsib
nsiaf
Commits
2e5647c6
Commit
2e5647c6
authored
Feb 19, 2021
by
root
Browse files
adicionar_columna_con_revalorizacion_UFV_ADSIB
parent
4278e740
Pipeline
#589
failed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/views/materials/reports_ufv.html.haml
View file @
2e5647c6
...
...
@@ -33,7 +33,7 @@
%th
.text-center
{
rowspan:
2
}
CÓDIGO
%th
.text-center
{
rowspan:
2
}
DESCRIPCIÓN DE MATERIAL
%th
.text-center
{
rowspan:
2
}
UNIDAD
%th
.text-center
{
colspan:
2
}
SALDO AL
#{
params
[
:desde
]
}
%th
.text-center
{
colspan:
3
}
SALDO AL
#{
params
[
:desde
]
}
%th
.text-center
{
colspan:
3
}
ENTRADA
%th
.text-center
{
colspan:
2
}
CANTIDADES
%th
.text-center
{
rowspan:
2
}
COSTO UNITARIO Bs.
...
...
@@ -45,6 +45,7 @@
%tr
.vertical-align.info
%th
.text-center
EN CANT.
%th
.text-center
EN BOL.
%th
.text-center
INCREMENTO
%th
.text-center
EXIST EN ALMAC.
%th
.text-center
FECHA DE INGRESO
%th
.text-center
VALOR UFV AL INGRESO
...
...
@@ -57,6 +58,12 @@
-
total_incremento_rei
=
0.0
-
ufv_final
=
Ufv
.
where
(
"fecha = ?"
,
@hasta
.
to_s
[
0
,
10
]).
first
-
ufv_final_valor
=
(
ufv_final!
=
nil
)?
ufv_final
.
valor
:
0
-# calculo extra - ini
-
ufv_inicial
=
Ufv
.
where
(
"fecha = ?"
,
@desde
.
to_s
[
0
,
10
]).
first
-
ufv_inicial_valor
=
(
ufv_inicial!
=
nil
)?
ufv_inicial
.
valor
:
0
-
t_incremento
=
0.0
-
valor_unitario
=
0.0
-# calculo extra - fin
-# para calcular salidas
-
cantidad_salida
=
0
...
...
@@ -71,7 +78,7 @@
-
@materials
.
each
do
|
material
|
%tr
.double-thick
%th
.text-center
=
material
.
code
%th
{
colspan:
1
4
}=
material
.
description
.
to_s
.
upcase
%th
{
colspan:
1
7
}=
material
.
description
.
to_s
.
upcase
-# %th.number= number_with_delimiter material.subarticles.estado_activo.total(@hasta)
-
material
.
subarticles
.
estado_activo
.
each
do
|
subarticle
|
-
i_kardex
=
subarticle
.
saldo_inicial
(
@desde
)
...
...
@@ -109,18 +116,27 @@
-
saldo_anterior_gestion
=
entrada
.
cantidad
*
entrada
.
costo_unitario
-
total_saldo_anterior_gestion
+=
saldo_anterior_gestion
%td
.number
{
title:
saldo_anterior_gestion
}=
number_with_delimiter
saldo_anterior_gestion
%td
-#tnina1
-
ufv_ingreso
=
Ufv
.
where
(
"fecha = ?"
,
entrada
.
fecha_ingreso
).
first
-
ufv_ingreso_valor
=
(
ufv_ingreso!
=
nil
)?
ufv_ingreso
.
valor
:
0
-
factor_ingreso
=
ufv_inicial_valor
/
ufv_ingreso_valor
-
incremento_ingreso
=
(
saldo_anterior_gestion
*
factor_ingreso
)
-
saldo_anterior_gestion
-
valor_unitario
=
(
saldo_anterior_gestion
*
factor_ingreso
)
/
entrada
.
cantidad
-
t_incremento
+=
incremento_ingreso
%td
.number
=
number_with_delimiter
incremento_ingreso
-
else
%td
.number
{
colspan:
3
}=
mostrar_entero_float
entrada
.
cantidad
%td
.number
{
colspan:
4
}=
mostrar_entero_float
entrada
.
cantidad
-
if
entrada
.
cantidad
>
0
-# %td.number{title: entrada.costo_unitario}= number_with_delimiter entrada.costo_unitario
-#tnina1_1
-
if
i_ent
<
i_kardex
.
items
.
length
%td
-# FECHA DE INCORPORACION
%td
.text-center
=
entrada
.
fecha
.
to_s
[
0
,
10
]
-# VALOR UFV AL INGRESO
-
ufv_ingreso
=
Ufv
.
where
(
"fecha = ?"
,
entrada
.
fecha
).
first
-
ufv_ingreso_valor
=
(
ufv_ingreso!
=
nil
)?
ufv_ingreso
.
valor
:
0
%td
.number
{
title:
ufv_ingreso_valor
}=
number_with_delimiter
ufv_ingreso_valor
,
5
-# calculamos las salidas para esta entrada
-
stockExistente
=
entrada
.
cantidad
-
if
index_salida
<
salidas
.
length
...
...
@@ -143,9 +159,13 @@
-# - suma_stock_saldo += stock_saldo
%td
.number
=
mostrar_entero_float
stock_saldo
-# COSTO UNITARIO
%td
.number
{
title:
entrada
.
costo_unitario
}=
number_with_delimiter
entrada
.
costo_unitario
-
if
i_ent
<
i_kardex
.
items
.
length
%td
.number
{
title
:'c1.:'
}=
number_with_delimiter
valor_unitario
-
else
-
valor_unitario
=
entrada
.
costo_unitario
%td
.number
{
title
:'c1:'
}=
number_with_delimiter
valor_unitario
-# SALDO AL 31-12-2018 Bs.
-
saldo_bs
=
entrada
.
costo
_unitario
*
stock_saldo
-
saldo_bs
=
valor
_unitario
*
stock_saldo
-
total_saldo_inicial
+=
saldo_bs
%td
.number
{
title:
saldo_bs
}=
number_with_delimiter
saldo_bs
-
else
...
...
@@ -157,11 +177,18 @@
-
stock_saldo
=
entrada
.
cantidad
-
stock_saliente
%td
.number
=
mostrar_entero_float
stock_saldo
-# COSTO UNITARIO
%td
.number
{
title:
entrada
.
costo_unitario
}=
number_with_delimiter
entrada
.
costo_unitario
-
costo_total_salida
=
stock_saliente
*
entrada
.
costo_unitario
-
if
index_salida
<
salidas
.
length
%td
.number
{
title:
'c2.'
}=
number_with_delimiter
valor_unitario
-
else
-
if
i_ent
<
i_kardex
.
items
.
length
%td
.number
{
title:
'c2..'
}=
number_with_delimiter
valor_unitario
-
else
-
valor_unitario
=
entrada
.
costo_unitario
%td
.number
{
title:
'c2'
}=
number_with_delimiter
valor_unitario
-
costo_total_salida
=
stock_saliente
*
valor_unitario
-# - suma_costo_total_salidas += costo_total_salida
-# SALDO AL 31-12-2018 Bs.
-
saldo_bs
=
entrada
.
costo
_unitario
*
stock_saldo
-
saldo_bs
=
valor
_unitario
*
stock_saldo
-
total_saldo_inicial
+=
saldo_bs
%td
.number
{
title:
saldo_bs
}=
number_with_delimiter
saldo_bs
-
if
saldo_bs
>
0
...
...
@@ -193,7 +220,19 @@
-
saldo_anterior_gestion
=
entrada
.
cantidad
*
entrada
.
costo_unitario
-
total_saldo_anterior_gestion
+=
saldo_anterior_gestion
%td
.number
{
title:
saldo_anterior_gestion
}=
number_with_delimiter
saldo_anterior_gestion
%td
-#tnina2
-
if
saldo_anterior_gestion
>
0
-
ufv_ingreso
=
Ufv
.
where
(
"fecha = ?"
,
entrada
.
fecha_ingreso
).
first
-
ufv_ingreso_valor
=
(
ufv_ingreso!
=
nil
)?
ufv_ingreso
.
valor
:
0
-
factor_ingreso
=
ufv_inicial_valor
/
ufv_ingreso_valor
-
incremento_ingreso
=
(
saldo_anterior_gestion
*
factor_ingreso
)
-
saldo_anterior_gestion
-
valor_unitario
=
(
saldo_anterior_gestion
*
factor_ingreso
)
/
entrada
.
cantidad
-
t_incremento
+=
incremento_ingreso
%td
.number
=
number_with_delimiter
incremento_ingreso
%td
-
else
%td
%td
-
else
%td
.number
{
colspan:
3
}=
mostrar_entero_float
entrada
.
cantidad
-
if
entrada
.
cantidad
>
0
...
...
@@ -227,9 +266,9 @@
-# - suma_stock_saldo += stock_saldo
%td
.number
=
mostrar_entero_float
stock_saldo
-# COSTO UNITARIO
%td
.number
{
title:
entrada
.
costo_unitario
}=
number_with_delimiter
entrada
.
costo
_unitario
%td
.number
{
title:
'c3'
}=
number_with_delimiter
valor
_unitario
-# SALDO AL 31-12-2018 Bs.
-
saldo_bs
=
entrada
.
costo
_unitario
*
stock_saldo
-
saldo_bs
=
valor
_unitario
*
stock_saldo
-
total_saldo_inicial
+=
saldo_bs
%td
.number
{
title:
saldo_bs
}=
number_with_delimiter
saldo_bs
-
else
...
...
@@ -241,11 +280,11 @@
-
stock_saldo
=
entrada
.
cantidad
-
stock_saliente
%td
.number
=
mostrar_entero_float
stock_saldo
-# COSTO UNITARIO
%td
.number
{
title:
entrada
.
costo_unitario
}=
number_with_delimiter
entrada
.
costo
_unitario
-
costo_total_salida
=
stock_saliente
*
entrada
.
costo
_unitario
%td
.number
{
title:
'c4'
}=
number_with_delimiter
valor
_unitario
-
costo_total_salida
=
stock_saliente
*
valor
_unitario
-# - suma_costo_total_salidas += costo_total_salida
-# SALDO AL 31-12-2018 Bs.
-
saldo_bs
=
entrada
.
costo
_unitario
*
stock_saldo
-
saldo_bs
=
valor
_unitario
*
stock_saldo
-
total_saldo_inicial
+=
saldo_bs
%td
.number
{
title:
saldo_bs
}=
number_with_delimiter
saldo_bs
-
if
saldo_bs
>
0
...
...
@@ -272,6 +311,7 @@
%tr
%th
.text-center
{
colspan:
4
}
TOTALES
%th
.number
{
title:
total_saldo_anterior_gestion
}=
number_with_delimiter
total_saldo_anterior_gestion
%th
.number
{
title:
t_incremento
}=
number_with_delimiter
t_incremento
%th
{
colspan:
6
}
%th
.number
{
title:
total_saldo_inicial
}=
number_with_delimiter
total_saldo_inicial
%th
{
colspan:
2
}
...
...
public/robots.txt
deleted
100644 → 0
View file @
4278e740
# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
#
# To ban all spiders from the entire site uncomment the next two lines:
# User-agent: *
# Disallow: /
public/swf/copy_csv_xls_pdf.swf
deleted
100644 → 0
View file @
4278e740
File deleted
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