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
79d992f1
Commit
79d992f1
authored
Feb 04, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quick fix
parent
d378cd28
Pipeline
#1761
failed with stage
in 1 minute 36 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
envelops.js
envelops/static/js/envelops.js
+3
-1
views.py
envelops/views.py
+1
-1
No files found.
envelops/static/js/envelops.js
View file @
79d992f1
...
@@ -325,7 +325,7 @@ function delete_envelop(envelop) {
...
@@ -325,7 +325,7 @@ function delete_envelop(envelop) {
* @param {String} index
* @param {String} index
*/
*/
function
archive_envelop
(
type
,
index
)
{
function
archive_envelop
(
type
,
index
)
{
if
(
is_time_to
(
'archive_envelop'
,
1
000
))
{
if
(
is_time_to
(
'archive_envelop'
,
5
000
))
{
$
(
'#envelop_cashing_error'
).
hide
();
$
(
'#envelop_cashing_error'
).
hide
();
$
(
'#envelop_cashing_success'
).
hide
();
$
(
'#envelop_cashing_success'
).
hide
();
// Loading on
// Loading on
...
@@ -382,6 +382,8 @@ function archive_envelop(type, index) {
...
@@ -382,6 +382,8 @@ function archive_envelop(type, index) {
alert
(
'Erreur serveur. Merci de ne pas ré-encaisser l
\'
enveloppe qui a causé l
\'
erreur.'
);
alert
(
'Erreur serveur. Merci de ne pas ré-encaisser l
\'
enveloppe qui a causé l
\'
erreur.'
);
}
}
});
});
}
else
{
alert
(
"Par sécurité, il faut attendre 5s entre l'encaissement de deux enveloppes."
)
}
}
}
}
...
...
envelops/views.py
View file @
79d992f1
...
@@ -52,7 +52,7 @@ def archive_envelop(request):
...
@@ -52,7 +52,7 @@ def archive_envelop(request):
# Immediately save a token than this payment has been saved
# Immediately save a token than this payment has been saved
# If an error occurs, this payment won't be saved again
# If an error occurs, this payment won't be saved again
envelop
[
'envelop_content'
][
partner_id
][
'payment_id'
]
=
res
[
'payment_id'
]
envelop
[
'envelop_content'
][
partner_id
][
'payment_id'
]
=
res
[
'payment_id'
]
updated_envelop
=
m
.
c_db
.
updateDoc
(
envelop
)
;
updated_envelop
=
m
.
c_db
.
updateDoc
(
envelop
)
envelop
[
'_rev'
]
=
updated_envelop
[
'_rev'
]
envelop
[
'_rev'
]
=
updated_envelop
[
'_rev'
]
else
:
else
:
# Handling error when saving payment, return data to display error message
# Handling error when saving payment, return data to display error message
...
...
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