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
2c47bab3
Commit
2c47bab3
authored
May 17, 2023
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add db dej issuer in sales export
parent
5790b181
Pipeline
#2732
passed with stage
in 1 minute 33 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
models.py
sales/models.py
+3
-2
sales.js
sales/static/js/sales.js
+11
-4
No files found.
sales/models.py
View file @
2c47bab3
...
...
@@ -29,7 +29,7 @@ class CagetteSales(models.Model):
statements_orders
[
s
]
=
o
[
"name"
]
# Get payment lines
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
)
try
:
for
payment
in
payments
:
...
...
@@ -41,7 +41,8 @@ class CagetteSales(models.Model):
"payments"
:
[
{
"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 @
2c47bab3
...
...
@@ -50,12 +50,12 @@ function display_orders(orders) {
{
data
:
"partner"
,
title
:
"Membre"
,
width
:
"40%"
//
width: "40%"
},
{
data
:
"total_amount"
,
title
:
"Montant dû"
,
className
:
"dt-body-center"
,
//
className:"dt-body-center",
render
:
function
(
data
)
{
return
parseFloat
(
data
).
toFixed
(
2
)
+
' €'
;
}
...
...
@@ -72,9 +72,16 @@ function display_orders(orders) {
}
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
:
[
[
...
...
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