Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OSE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
open-source
OSE
Commits
bf28cc95
Commit
bf28cc95
authored
4 months ago
by
Florian Joriot
Browse files
Options
Downloads
Patches
Plain Diff
Correction création contrat et calcul tbl
parent
77260d1a
Branches
Branches containing commit
Tags
6.0.2
Tags containing commit
No related merge requests found
Pipeline
#35221
passed
4 months ago
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
module/Contrat/src/Processus/ContratProcessus.php
+14
-2
14 additions, 2 deletions
module/Contrat/src/Processus/ContratProcessus.php
module/Contrat/src/Tbl/Process/ContratProcess.php
+15
-11
15 additions, 11 deletions
module/Contrat/src/Tbl/Process/ContratProcess.php
with
29 additions
and
13 deletions
module/Contrat/src/Processus/ContratProcessus.php
+
14
−
2
View file @
bf28cc95
...
...
@@ -142,8 +142,20 @@ class ContratProcessus extends AbstractProcessus
$contrat
->
setStructure
(
$structure
);
$contrat
->
setTotalHetd
(
$volumeHoraire
[
'hetdTotal'
]);
$contrat
->
setDebutValidite
(
$volumeHoraire
[
'dateDebut'
]);
$contrat
->
setFinValidite
(
$volumeHoraire
[
'dateFin'
]);
try
{
$dateDebut
=
new
\DateTime
(
$volumeHoraire
[
'dateDebut'
]);
}
catch
(
\Exception
$e
)
{
$dateDebut
=
null
;
}
$contrat
->
setDebutValidite
(
$dateDebut
);
try
{
$dateFin
=
new
\DateTime
(
$volumeHoraire
[
'dateFin'
]);
}
catch
(
\Exception
$e
)
{
$dateFin
=
null
;
}
$contrat
->
setFinValidite
(
$dateFin
);
$contrat
->
setTypeContrat
(
$this
->
getServiceTypeContrat
()
->
getByCode
(
$volumeHoraire
[
'typeContratCode'
]));
if
(
$volumeHoraire
[
'contratParentId'
]
==
NULL
)
{
$contrat
->
setNumeroAvenant
(
0
);
...
...
This diff is collapsed.
Click to expand it.
module/Contrat/src/Tbl/Process/ContratProcess.php
+
15
−
11
View file @
bf28cc95
...
...
@@ -331,13 +331,16 @@ class ContratProcess implements ProcessInterface
}
$sql
=
"WITH contrat_et_avenants AS (
SELECT
c.id AS contrat_id_principal,
c.debut_validite AS date_debut,
c.fin_validite AS date_fin_contrat,
c.structure_id AS parent_structure_id,
CASE pm.valeur
WHEN 'contrat_mis_mission'
THEN c.structure_id
ELSE NULL
END AS parent_structure_id,
vtblc.mission_id AS mission_id_principal,
ap.fin_validite AS date_fin_avenant,
i.id intervenant_id,
...
...
@@ -345,6 +348,7 @@ class ContratProcess implements ProcessInterface
FROM
contrat c
JOIN INTERVENANT i ON c.intervenant_id = i.id
JOIN parametre pm ON pm.nom = 'contrat_mis'
LEFT JOIN
contrat ap ON c.id = ap.contrat_id AND (ap.histo_destruction IS NULL)
LEFT JOIN
...
...
@@ -407,10 +411,10 @@ WHERE
foreach
(
$avenantNecessaireDate
as
$avenant
)
{
$newAvenant
=
[];
$newAvenant
[
'INTERVENANT_ID'
]
=
(
int
)
$avenant
[
'INTERVENANT_ID'
];
$newAvenant
[
'ANNEE_ID'
]
=
(
int
)
$avenant
[
'ANNEE_ID'
];
$newAvenant
[
'STRUCTURE_ID'
]
=
(
int
)
$avenant
[
'STRUCTURE_ID'
];
$newAvenant
[
'CONTRAT_PARENT_ID'
]
=
(
int
)
$avenant
[
'CONTRAT_PARENT_ID'
];
$newAvenant
[
'INTERVENANT_ID'
]
=
(
int
)
(
$avenant
[
'INTERVENANT_ID'
]
??
NULL
)
;
$newAvenant
[
'ANNEE_ID'
]
=
(
int
)
(
$avenant
[
'ANNEE_ID'
]
??
NULL
)
;
$newAvenant
[
'STRUCTURE_ID'
]
=
(
int
)
(
$avenant
[
'STRUCTURE_ID'
]
??
NULL
)
;
$newAvenant
[
'CONTRAT_PARENT_ID'
]
=
(
int
)
(
$avenant
[
'CONTRAT_PARENT_ID'
]
??
NULL
)
;
$newAvenant
[
'UUID'
]
=
'avenant_'
.
$newAvenant
[
'INTERVENANT_ID'
]
.
'_'
.
$newAvenant
[
'CONTRAT_PARENT_ID'
];
...
...
@@ -418,8 +422,8 @@ WHERE
$newAvenant
[
'SIGNE'
]
=
0
;
$newAvenant
[
'TERMINE'
]
=
0
;
$newAvenant
[
'TYPE_CONTRAT_ID'
]
=
2
;
$newAvenant
[
'MISSION_ID'
]
=
(
int
)
$avenant
[
'MISSION_ID'
];
$newAvenant
[
'TYPE_SERVICE_ID'
]
=
(
int
)
$avenant
[
'TYPE_SERVICE_ID'
];
$newAvenant
[
'MISSION_ID'
]
=
(
int
)
(
$avenant
[
'MISSION_ID'
]
??
NULL
);
;
$newAvenant
[
'TYPE_SERVICE_ID'
]
=
(
int
)
(
$avenant
[
'TYPE_SERVICE_ID'
]
??
NULL
);
;
$newAvenant
[
'AUTRES'
]
=
0
;
$newAvenant
[
'AUTRE_LIBELLE'
]
=
NULL
;
$newAvenant
[
'CM'
]
=
0
;
...
...
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