Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
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
2
Merge Requests
2
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
cooperatic-foodcoops
third-party
Commits
20c595bf
Commit
20c595bf
authored
May 19, 2023
by
François C.
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '4612-cb-dej-issuer' into 'dev_cooperatic'
add db dej issuer in sales export See merge request
!224
parents
66fc8c7c
e2f17a91
Pipeline
#2741
passed with stage
in 1 minute 29 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
models.py
sales/models.py
+3
-2
sales.js
sales/static/js/sales.js
+10
-5
No files found.
sales/models.py
View file @
20c595bf
...
@@ -29,7 +29,7 @@ class CagetteSales(models.Model):
...
@@ -29,7 +29,7 @@ class CagetteSales(models.Model):
statements_orders
[
s
]
=
o
[
"name"
]
statements_orders
[
s
]
=
o
[
"name"
]
# Get payment lines
# Get payment lines
cond
=
[[
'id'
,
'in'
,
statements
]]
cond
=
[[
'id'
,
'in'
,
statements
]]
fields
=
[
"amount"
,
"journal_id"
,
"create_date"
]
fields
=
[
"amount"
,
"journal_id"
,
"create_date"
,
"meal_voucher_issuer"
]
payments
=
self
.
o_api
.
search_read
(
'account.bank.statement.line'
,
cond
,
fields
,
order
=
"create_date ASC"
,
limit
=
50000
)
payments
=
self
.
o_api
.
search_read
(
'account.bank.statement.line'
,
cond
,
fields
,
order
=
"create_date ASC"
,
limit
=
50000
)
try
:
try
:
for
payment
in
payments
:
for
payment
in
payments
:
...
@@ -41,7 +41,8 @@ class CagetteSales(models.Model):
...
@@ -41,7 +41,8 @@ class CagetteSales(models.Model):
"payments"
:
[
"payments"
:
[
{
{
"amount"
:
round
(
float
(
payment
[
"amount"
]),
2
),
"amount"
:
round
(
float
(
payment
[
"amount"
]),
2
),
"journal_id"
:
payment
[
"journal_id"
]
"journal_id"
:
payment
[
"journal_id"
],
"meal_voucher_issuer"
:
payment
[
"meal_voucher_issuer"
]
}
}
]
]
})
})
...
...
sales/static/js/sales.js
View file @
20c595bf
...
@@ -49,13 +49,11 @@ function display_orders(orders) {
...
@@ -49,13 +49,11 @@ function display_orders(orders) {
{
{
data
:
"partner"
,
data
:
"partner"
,
title
:
"Membre"
,
title
:
"Membre"
width
:
"40%"
},
},
{
{
data
:
"total_amount"
,
data
:
"total_amount"
,
title
:
"Montant dû"
,
title
:
"Montant dû"
,
className
:
"dt-body-center"
,
render
:
function
(
data
)
{
render
:
function
(
data
)
{
return
parseFloat
(
data
).
toFixed
(
2
)
+
' €'
;
return
parseFloat
(
data
).
toFixed
(
2
)
+
' €'
;
}
}
...
@@ -72,9 +70,16 @@ function display_orders(orders) {
...
@@ -72,9 +70,16 @@ function display_orders(orders) {
}
}
res
+=
"</ul>"
;
res
+=
"</ul>"
;
return
res
;
return
res
;
}
}
}
},
{
data
:
"payments[0].meal_voucher_issuer"
,
title
:
"Émetteur CB Déj"
,
render
:
function
(
data
)
{
return
data
===
'false'
||
data
==
false
?
''
:
data
;
}
},
],
],
order
:
[
order
:
[
[
[
...
...
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