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
3
Merge Requests
3
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
ac341f87
Commit
ac341f87
authored
a year ago
by
Yvon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow conventionnement to be null
parent
3d14875f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
12 deletions
+68
-12
Prestataire.php
src/Entity/Prestataire.php
+6
-12
Version20240221094447.php
src/Migrations/Version20240221094447.php
+31
-0
Version20240221094604.php
src/Migrations/Version20240221094604.php
+31
-0
No files found.
src/Entity/Prestataire.php
View file @
ac341f87
...
...
@@ -345,14 +345,8 @@ class Prestataire extends AccountableObject implements AccountableInterface
/**
* @var float
*
* @ORM\Column(name="conventionnement", type="decimal", scale=2)
* @ORM\Column(name="conventionnement", type="decimal", scale=2
, nullable=true
)
* @Assert\Type("numeric")
* @Assert\GreaterThanOrEqual(
* value = 0
* )
* @Assert\LessThanOrEqual(
* value = 1
* )
*/
protected
$conventionnement
;
...
...
@@ -1171,19 +1165,19 @@ class Prestataire extends AccountableObject implements AccountableInterface
}
/**
* @return
float
* @return
mixed
*/
public
function
getConventionnement
()
:
?
float
public
function
getConventionnement
()
{
return
number_format
(
$this
->
conventionnement
,
2
)
;
return
$this
->
conventionnement
!==
null
?
number_format
(
$this
->
conventionnement
,
2
)
:
null
;
}
/**
* @param
float
$conventionnement
* @param
mixed
$conventionnement
*
* @return Prestataire
*/
public
function
setConventionnement
(
float
$conventionnement
)
public
function
setConventionnement
(
$conventionnement
)
{
$this
->
conventionnement
=
$conventionnement
;
...
...
This diff is collapsed.
Click to expand it.
src/Migrations/Version20240221094447.php
0 → 100644
View file @
ac341f87
<?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
Version20240221094447
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 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 CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\''
);
}
}
This diff is collapsed.
Click to expand it.
src/Migrations/Version20240221094604.php
0 → 100644
View file @
ac341f87
<?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
Version20240221094604
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 CHANGE iban iban LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:personal_data)\', CHANGE conventionnement conventionnement NUMERIC(10, 2) DEFAULT NULL'
);
}
public
function
down
(
Schema
$schema
)
:
void
{
// this down() migration is auto-generated, please modify it to your needs
$this
->
addSql
(
'ALTER TABLE prestataire CHANGE iban iban LONGTEXT CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_general_ci` COMMENT \'(DC2Type:personal_data)\', CHANGE conventionnement conventionnement NUMERIC(10, 2) NOT NULL'
);
}
}
This diff is collapsed.
Click to expand it.
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