feat: ajout totalHt, totalTva, totalTtc sur Devis
src/Entity/Devis.php: - totalHt: decimal(10,2) default 0.00, montant hors taxes du devis - totalTva: decimal(10,2) default 0.00, montant de la TVA - totalTtc: decimal(10,2) default 0.00, montant toutes taxes comprises - Getters/setters pour les 3 champs migrations/Version20260402203631.php: - Ajout colonnes total_ht, total_tva, total_ttc sur la table devis Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
35
migrations/Version20260402203631.php
Normal file
35
migrations/Version20260402203631.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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 Version20260402203631 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 devis ADD total_ht NUMERIC(10, 2) DEFAULT \'0.00\' NOT NULL');
|
||||
$this->addSql('ALTER TABLE devis ADD total_tva NUMERIC(10, 2) DEFAULT \'0.00\' NOT NULL');
|
||||
$this->addSql('ALTER TABLE devis ADD total_ttc NUMERIC(10, 2) DEFAULT \'0.00\' NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE devis DROP total_ht');
|
||||
$this->addSql('ALTER TABLE devis DROP total_tva');
|
||||
$this->addSql('ALTER TABLE devis DROP total_ttc');
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,15 @@ class Devis
|
||||
#[ORM\Column(length: 128)]
|
||||
private string $hmac;
|
||||
|
||||
#[ORM\Column(type: 'decimal', precision: 10, scale: 2, options: ['default' => '0.00'])]
|
||||
private string $totalHt = '0.00';
|
||||
|
||||
#[ORM\Column(type: 'decimal', precision: 10, scale: 2, options: ['default' => '0.00'])]
|
||||
private string $totalTva = '0.00';
|
||||
|
||||
#[ORM\Column(type: 'decimal', precision: 10, scale: 2, options: ['default' => '0.00'])]
|
||||
private string $totalTtc = '0.00';
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $submitterSiteconseilId = null;
|
||||
|
||||
@@ -82,6 +91,36 @@ class Devis
|
||||
return $this->hmac;
|
||||
}
|
||||
|
||||
public function getTotalHt(): string
|
||||
{
|
||||
return $this->totalHt;
|
||||
}
|
||||
|
||||
public function setTotalHt(string $totalHt): void
|
||||
{
|
||||
$this->totalHt = $totalHt;
|
||||
}
|
||||
|
||||
public function getTotalTva(): string
|
||||
{
|
||||
return $this->totalTva;
|
||||
}
|
||||
|
||||
public function setTotalTva(string $totalTva): void
|
||||
{
|
||||
$this->totalTva = $totalTva;
|
||||
}
|
||||
|
||||
public function getTotalTtc(): string
|
||||
{
|
||||
return $this->totalTtc;
|
||||
}
|
||||
|
||||
public function setTotalTtc(string $totalTtc): void
|
||||
{
|
||||
$this->totalTtc = $totalTtc;
|
||||
}
|
||||
|
||||
public function getSubmitterSiteconseilId(): ?int
|
||||
{
|
||||
return $this->submitterSiteconseilId;
|
||||
|
||||
Reference in New Issue
Block a user