This commit is contained in:
2025-09-30 21:24:37 +02:00
parent d603fb452a
commit b7b9cebacb
258 changed files with 416 additions and 601 deletions

214
src/Entity/Offer.php Executable file
View File

@@ -0,0 +1,214 @@
<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Offer
*
* @ORM\Table(name="offer")
* @ORM\Entity(repositoryClass="App\Repository\OfferRepository")
*/
class Offer
{
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(name="name", type="string")
*
*/
private $name;
/**
* @ORM\Column(name="ref", type="string", nullable=true)
*
*/
private $ref;
/**
* @ORM\Column(name="quantity", type="decimal", scale=2)
*
*/
private $quantity;
/**
* @ORM\Column(name="pu", type="decimal", scale=2)
*
*/
private $pu;
private $total;
/**
* @ORM\Column(name="validate", type="decimal", scale=2, nullable=true)
*
*/
private $validate;
/**
* @ORM\Column(name="cost", type="decimal", scale=2, nullable=true)
*
*/
private $cost;
/**
* @ORM\Column(name="active", type="boolean")
*
*/
private $active;
/**
* @ORM\Column(name="iddolibarr", type="string", nullable=true)
*
*/
private $iddolibarr;
/**
* @ORM\ManyToOne(targetEntity="Project", inversedBy="offers")
*/
private $project;
/**
* @ORM\ManyToOne(targetEntity="Service", inversedBy="offers")
*/
private $service;
public function getTotal()
{
return $this->quantity*$this->pu;
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getRef(): ?string
{
return $this->ref;
}
public function setRef(string $ref): self
{
$this->ref = $ref;
return $this;
}
public function getQuantity(): ?string
{
return $this->quantity;
}
public function setQuantity(string $quantity): self
{
$this->quantity = $quantity;
return $this;
}
public function getPu(): ?string
{
return $this->pu;
}
public function setPu(string $pu): self
{
$this->pu = $pu;
return $this;
}
public function getValidate(): ?string
{
return $this->validate;
}
public function setValidate(string $validate): self
{
$this->validate = $validate;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getProject(): ?Project
{
return $this->project;
}
public function setProject(?Project $project): self
{
$this->project = $project;
return $this;
}
public function getIddolibarr(): ?string
{
return $this->iddolibarr;
}
public function setIddolibarr(?string $iddolibarr): self
{
$this->iddolibarr = $iddolibarr;
return $this;
}
public function getCost(): ?string
{
return $this->cost;
}
public function setCost(?string $cost): self
{
$this->cost = $cost;
return $this;
}
public function getService(): ?Service
{
return $this->service;
}
public function setService(?Service $service): self
{
$this->service = $service;
return $this;
}
}