Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BDE
nk20
Commits
d8c7018b
Commit
d8c7018b
authored
4 years ago
by
ynerant
Browse files
Options
Downloads
Patches
Plain Diff
FP is bugggy
parent
f47a0b8c
No related branches found
No related tags found
3 merge requests
!104
Beta
,
!98
Morefront
,
!91
Documents
Pipeline
#8371
passed with stages
in 5 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/treasury/templatetags/escape_tex.py
+0
-5
0 additions, 5 deletions
apps/treasury/templatetags/escape_tex.py
templates/treasury/invoice_sample.tex
+3
-2
3 additions, 2 deletions
templates/treasury/invoice_sample.tex
with
3 additions
and
7 deletions
apps/treasury/templatetags/escape_tex.py
+
0
−
5
View file @
d8c7018b
...
...
@@ -16,10 +16,5 @@ def do_latex_escape(value):
)
def
fp_value
(
value
):
return
value
.
replace
(
"
-
"
,
""
).
replace
(
"
-
"
,
"
neg
"
)
register
=
template
.
Library
()
register
.
filter
(
"
escape_tex
"
,
do_latex_escape
)
register
.
filter
(
"
fp_value
"
,
fp_value
)
This diff is collapsed.
Click to expand it.
templates/treasury/invoice_sample.tex
+
3
−
2
View file @
d8c7018b
...
...
@@ -31,7 +31,8 @@
\newcommand
{
\AfficheResultat
}{
%
\ListeProduits
\FPeval
{
\TotalTVA
}{
\TotalHT
*
\TVA
/ 100
}
\FPmul
{
\TotalTVA
}{
\TotalHT
}{
\TVA
}
\FPdiv
{
\TotalTVA
}{
\TotalTVA
}{
100
}
\FPadd
{
\TotalTTC
}{
\TotalHT
}{
\TotalTVA
}
\FPround
{
\TotalHT
}{
\TotalHT
}{
2
}
\FPround
{
\TotalTVA
}{
\TotalTVA
}{
2
}
...
...
@@ -98,7 +99,7 @@
% Liste des produits facturés : Désignation, quantité, prix unitaire HT
{
% for product in products %}
\AjouterProduit
{
{{
product.designation|safe|escape
_
tex
}}}
{
{{
product.quantity|safe|escape
_
tex
|fp
_
value
}}}
{
{{
product.amount
_
euros|safe|escape
_
tex
|fp
_
value
}}}
{
{{
product.total
_
euros|safe|escape
_
tex
|fp
_
value
}}}
\AjouterProduit
{
{
"
{
"
}}
{{
product.designation|safe|escape
_
tex
}}}
{
{
"
{
"
}}
{{
product.quantity|safe|escape
_
tex
}}}
{{
"
{
"
}}
{{
product.amount
_
euros|safe|escape
_
tex
}}}
{{
"
{
"
}}
{{
product.total
_
euros|safe|escape
_
tex
}}}
{
% endfor %}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment