Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
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
6
Merge Requests
6
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
agplv3
kohinos-tav
Commits
3d14875f
Commit
3d14875f
authored
Feb 20, 2024
by
Yvon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add presta conventionnement percentage
parent
6921115c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
1 deletions
+83
-1
PrestataireAdmin.php
src/Admin/PrestataireAdmin.php
+17
-1
Prestataire.php
src/Entity/Prestataire.php
+35
-0
Version20240220094817.php
src/Migrations/Version20240220094817.php
+31
-0
No files found.
src/Admin/PrestataireAdmin.php
View file @
3d14875f
...
@@ -352,6 +352,23 @@ class PrestataireAdmin extends AbstractAdmin
...
@@ -352,6 +352,23 @@ class PrestataireAdmin extends AbstractAdmin
->
end
()
->
end
()
->
end
()
->
end
()
;
;
if
(
$this
->
getConfigurationPool
()
->
getContainer
()
->
getParameter
(
'presta_self_init_and_eval'
))
{
$formMapper
->
tab
(
'Prestataire'
)
->
with
(
'Prestataire'
,
[
'class'
=>
'col-md-6'
])
->
add
(
'conventionnement'
,
ChoiceType
::
class
,
[
'choices'
=>
[
'50 %'
=>
0.5
,
'75 %'
=>
0.75
,
'100 %'
=>
1
,
],
'required'
=>
false
,
])
->
end
()
->
end
();
}
// @TODO : add tags model transformer if add new from text
// @TODO : add tags model transformer if add new from text
// ->get('etats')
// ->get('etats')
// ->addModelTransformer(new CallbackTransformer(
// ->addModelTransformer(new CallbackTransformer(
...
@@ -730,7 +747,6 @@ class PrestataireAdmin extends AbstractAdmin
...
@@ -730,7 +747,6 @@ class PrestataireAdmin extends AbstractAdmin
'label'
=>
'Cotisation à jour'
,
'label'
=>
'Cotisation à jour'
,
'template'
=>
'@kohinos/bundles/SonataAdminBundle/CRUD/list_presta_cotisation.html.twig'
,
'template'
=>
'@kohinos/bundles/SonataAdminBundle/CRUD/list_presta_cotisation.html.twig'
,
]
]
)
)
->
add
(
'users'
,
null
,
[
->
add
(
'users'
,
null
,
[
'label'
=>
'Gestionnaires [Cotisation à jour]'
,
'label'
=>
'Gestionnaires [Cotisation à jour]'
,
...
...
src/Entity/Prestataire.php
View file @
3d14875f
...
@@ -342,6 +342,21 @@ class Prestataire extends AccountableObject implements AccountableInterface
...
@@ -342,6 +342,21 @@ class Prestataire extends AccountableObject implements AccountableInterface
*/
*/
private
$lastTransactionsExportDatetime
;
private
$lastTransactionsExportDatetime
;
/**
* @var float
*
* @ORM\Column(name="conventionnement", type="decimal", scale=2)
* @Assert\Type("numeric")
* @Assert\GreaterThanOrEqual(
* value = 0
* )
* @Assert\LessThanOrEqual(
* value = 1
* )
*/
protected
$conventionnement
;
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
users
=
new
ArrayCollection
();
$this
->
users
=
new
ArrayCollection
();
...
@@ -1154,4 +1169,24 @@ class Prestataire extends AccountableObject implements AccountableInterface
...
@@ -1154,4 +1169,24 @@ class Prestataire extends AccountableObject implements AccountableInterface
return
$this
;
return
$this
;
}
}
/**
* @return float
*/
public
function
getConventionnement
()
:
?
float
{
return
number_format
(
$this
->
conventionnement
,
2
);
}
/**
* @param float $conventionnement
*
* @return Prestataire
*/
public
function
setConventionnement
(
float
$conventionnement
)
{
$this
->
conventionnement
=
$conventionnement
;
return
$this
;
}
}
}
src/Migrations/Version20240220094817.php
0 → 100644
View file @
3d14875f
<?php
declare
(
strict_types
=
1
);
namespace
DoctrineMigrations
;
use
Doctrine\DBAL\Schema\Schema
;
use
Doctrine\Migrations\AbstractMigration
;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final
class
Version20240220094817
extends
AbstractMigration
{
public
function
getDescription
()
:
string
{
return
''
;
}
public
function
up
(
Schema
$schema
)
:
void
{
// this up() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE prestataire ADD conventionnement NUMERIC(10, 2) NOT NULL, CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\''
);
}
public
function
down
(
Schema
$schema
)
:
void
{
// this down() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE prestataire DROP conventionnement, CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\''
);
}
}
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