Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sib-invoicing
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
Components
sib-invoicing
Commits
d24ef6f2
Commit
d24ef6f2
authored
3 years ago
by
Matthieu Fesselier
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: duplicate with new form structure
parent
a0988da9
No related branches found
No related tags found
1 merge request
!32
various bugfixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/functions.js
+9
-5
9 additions, 5 deletions
utils/functions.js
with
9 additions
and
5 deletions
utils/functions.js
+
9
−
5
View file @
d24ef6f2
...
...
@@ -64,12 +64,16 @@ export function cleanInvoiceBeforeDuplicate(invoice) {
invoice
.
invoicingDate
=
formatDateForPost
(
new
Date
());
delete
invoice
[
"
@id
"
];
delete
invoice
.
batches
[
"
@id
"
];
invoice
.
batches
.
forEach
((
batch
,
indexb
)
=>
{
delete
invoice
.
batches
[
indexb
][
"
@id
"
];
batch
.
tasks
.
forEach
((
task
,
indext
)
=>
{
delete
invoice
.
batches
[
indexb
].
tasks
[
indext
][
"
@id
"
];
if
(
invoice
.
batches
[
'
ldp:contains
'
])
{
invoice
.
batches
[
'
ldp:contains
'
].
forEach
((
batch
,
indexb
)
=>
{
delete
invoice
.
batches
[
'
ldp:contains
'
][
indexb
][
"
@id
"
];
if
(
batch
.
tasks
[
'
ldp:contains
'
])
{
batch
.
tasks
[
'
ldp:contains
'
].
forEach
((
task
,
indext
)
=>
{
delete
invoice
.
batches
[
'
ldp:contains
'
][
indexb
].
tasks
[
'
ldp:contains
'
][
indext
][
"
@id
"
];
});
}
});
}
);
}
return
invoice
;
}
...
...
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