| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555 |
- <?php
- namespace AppBundle\Entity\Billing;
- use AppBundle\Entity\AccessAndFunction\Access;
- use AppBundle\Entity\Booking\EducationalProject;
- use AppBundle\Entity\Product\EquipmentLoan;
- use Doctrine\ORM\Mapping as ORM;
- use Dunglas\ApiBundle\Annotation\Iri;
- use Symfony\Component\Serializer\Annotation\Groups;
- use Symfony\Component\Validator\Constraints as Assert;
- use AppBundle\Entity\Traits\TimestampableEntity;
- use AppBundle\Entity\Traits\CreatorUpdaterEntity;
- use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
- /**
- * Une ligne de facturation
- * @see BillAccounting
- *
- * @Iri("http://schema.org/BillLine")
- */
- #[ORM\Entity]
- class BillLine
- {
- use TimestampableEntity;
- use CreatorUpdaterEntity;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer')]
- #[ORM\Id]
- #[ORM\GeneratedValue(strategy: 'AUTO')]
- #[Groups(['billline', 'billaccounting_list', 'bill_list', 'build_bills'])]
- private $id;
- /**
- * @var Bill
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\BillAccounting', inversedBy: 'billLines')]
- #[ORM\JoinColumn(nullable: false)]
- #[Assert\NotNull]
- #[Groups(['billline'])]
- private $bill;
- /**
- * @var Access
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'billLines')]
- #[Groups(['billline', 'billaccounting_list_billlines', 'bill_list_billlines', 'billpayment_list_bill', 'billaccounting_list_bill', 'billcredit_list_bill', 'build_bills_billlines'])]
- private $access;
- /**
- * @var EducationalProject
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', inversedBy: 'billLines')]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $educationalProject;
- /**
- * @var EquipmentLoan
- */
- #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Product\EquipmentLoan', inversedBy: 'billLines')]
- #[Groups(['billline'])]
- private $equipmentLoan;
- /**
- * @var string
- */
- #[ORM\Column(type: 'text', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $intangibleName;
- /**
- * @var string
- *
- * @Iri("https://schema.org/description")
- */
- #[ORM\Column(type: 'text', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $intangibleDescription;
- /**
- * @var string
- */
- #[ORM\Column(type: 'text', nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['billline'])]
- private $intangibleDomain;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $quantity;
- /**
- * @var float
- */
- #[ORM\Column(type: 'float', nullable: true)]
- #[Assert\Type(type: 'float')]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $unitPrice;
- /**
- * @var float
- */
- #[ORM\Column(type: 'float', nullable: true)]
- #[Assert\Type(type: 'float')]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $vat;
- /**
- * @var float
- */
- #[ORM\Column(type: 'float', nullable: true)]
- #[Assert\Type(type: 'float')]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $totalPrice;
- /**
- * @var array
- */
- #[ORM\Column(type: 'json_array', nullable: true)]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $reductions;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $accountingCode;
- /**
- * @var string
- */
- #[ORM\Column(type: 'string', length: 200, nullable: true)]
- #[Assert\Type(type: 'string')]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $accountingCodelabel;
- /**
- * @var int
- */
- #[ORM\Column(type: 'integer', nullable: true)]
- #[Assert\Type(type: 'integer', message: 'invalid-integer')]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $nature;
- /**
- * @var array
- */
- #[ORM\Column(type: 'json_array', nullable: true)]
- #[Groups(['billline'])]
- private $educations;
- /**
- * @var bool
- */
- #[ORM\Column(type: 'boolean', options: ['default' => true])]
- #[Assert\Type(type: 'boolean')]
- #[Assert\NotNull]
- #[Groups(['billline', 'build_bills_billlines'])]
- private $showInBill = true;
- /**
- * Constructor
- */
- public function __construct()
- {
- }
- /**
- * Sets id.
- *
- * @param int $id
- *
- * @return $this
- */
- public function setId($id)
- {
- $this->id = $id;
- return $this;
- }
- /**
- * Gets id.
- *
- * @return int
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set intangibleName
- *
- * @param string $intangibleName
- *
- * @return BillLine
- */
- public function setIntangibleName($intangibleName)
- {
- $this->intangibleName = $intangibleName;
- return $this;
- }
- /**
- * Get intangibleName
- *
- * @return string
- */
- public function getIntangibleName()
- {
- return $this->intangibleName;
- }
- /**
- * Set intangibleDescription
- *
- * @param string $intangibleDescription
- *
- * @return BillLine
- */
- public function setIntangibleDescription($intangibleDescription)
- {
- $this->intangibleDescription = $intangibleDescription;
- return $this;
- }
- /**
- * Get intangibleDescription
- *
- * @return string
- */
- public function getIntangibleDescription()
- {
- return $this->intangibleDescription;
- }
- /**
- * Set quantity
- *
- * @param integer $quantity
- *
- * @return BillLine
- */
- public function setQuantity($quantity)
- {
- $this->quantity = $quantity;
- return $this;
- }
- /**
- * Get quantity
- *
- * @return integer
- */
- public function getQuantity()
- {
- return $this->quantity;
- }
- /**
- * Set unitPrice
- *
- * @param float $unitPrice
- *
- * @return BillLine
- */
- public function setUnitPrice($unitPrice)
- {
- $this->unitPrice = floatval($unitPrice);
- return $this;
- }
- /**
- * Get unitPrice
- *
- * @return float
- */
- public function getUnitPrice()
- {
- return $this->unitPrice;
- }
- /**
- * Set bill
- *
- * @param $bill
- *
- * @return BillLine
- */
- public function setBill($bill)
- {
- $this->bill = $bill;
- return $this;
- }
- /**
- * Get bill
- *
- * @return
- */
- public function getBill()
- {
- return $this->bill;
- }
- /**
- * Set access
- *
- * @param \AppBundle\Entity\AccessAndFunction\Access $access
- *
- * @return BillLine
- */
- public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
- {
- $this->access = $access;
- return $this;
- }
- /**
- * Get access
- *
- * @return \AppBundle\Entity\AccessAndFunction\Access
- */
- public function getAccess()
- {
- return $this->access;
- }
- /**
- * Set vat
- *
- * @param float $vat
- *
- * @return BillLine
- */
- public function setVat($vat)
- {
- $this->vat = floatval($vat);
- return $this;
- }
- /**
- * Get vat
- *
- * @return float
- */
- public function getVat()
- {
- return $this->vat;
- }
- /**
- * Set totalPrice
- *
- * @param float $totalPrice
- *
- * @return BillLine
- */
- public function setTotalPrice($totalPrice)
- {
- $this->totalPrice = floatval($totalPrice);
- return $this;
- }
- /**
- * Get totalPrice
- *
- * @return float
- */
- public function getTotalPrice()
- {
- return $this->totalPrice;
- }
- /**
- * Set reductions
- *
- * @param array $reductions
- *
- * @return BillLine
- */
- public function setReductions($reductions)
- {
- $this->reductions = $reductions;
- return $this;
- }
- /**
- * Get reductions
- *
- * @return array
- */
- public function getReductions()
- {
- return $this->reductions;
- }
- /**
- * Set accountingCode
- *
- * @param integer $accountingCode
- *
- * @return BillLine
- */
- public function setAccountingCode($accountingCode)
- {
- $this->accountingCode = $accountingCode;
- return $this;
- }
- /**
- * Get accountingCode
- *
- * @return integer
- */
- public function getAccountingCode()
- {
- return $this->accountingCode;
- }
- /**
- * Set nature
- *
- * @param integer $nature
- *
- * @return BillLine
- */
- public function setNature($nature)
- {
- $this->nature = $nature;
- return $this;
- }
- /**
- * Get nature
- *
- * @return integer
- */
- public function getNature()
- {
- return $this->nature;
- }
- /**
- * Set educationalProject
- *
- * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
- *
- * @return BillLine
- */
- public function setEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject = null)
- {
- $this->educationalProject = $educationalProject;
- return $this;
- }
- /**
- * Get educationalProject
- *
- * @return \AppBundle\Entity\Booking\EducationalProject
- */
- public function getEducationalProject()
- {
- return $this->educationalProject;
- }
- /**
- * Set equipmentLoan
- *
- * @param \AppBundle\Entity\Product\EquipmentLoan $equipmentLoan
- *
- * @return BillLine
- */
- public function setEquipmentLoan(\AppBundle\Entity\Product\EquipmentLoan $equipmentLoan = null)
- {
- $this->equipmentLoan = $equipmentLoan;
- return $this;
- }
- /**
- * Get equipmentLoan
- *
- * @return \AppBundle\Entity\Product\EquipmentLoan
- */
- public function getEquipmentLoan()
- {
- return $this->equipmentLoan;
- }
- /**
- * Set educations
- *
- * @param array $educations
- *
- * @return BillLine
- */
- public function setEducations($educations)
- {
- $this->educations = $educations;
- return $this;
- }
- /**
- * Get educations
- *
- * @return array
- */
- public function getEducations()
- {
- return $this->educations;
- }
- /**
- * Set accountingCodelabel
- *
- * @param string $accountingCodelabel
- *
- * @return BillLine
- */
- public function setAccountingCodelabel($accountingCodelabel)
- {
- $this->accountingCodelabel = $accountingCodelabel;
- return $this;
- }
- /**
- * Get accountingCodelabel
- *
- * @return string
- */
- public function getAccountingCodelabel()
- {
- return $this->accountingCodelabel;
- }
- /**
- * Set intangibleDomain
- *
- * @param string $intangibleDomain
- *
- * @return BillLine
- */
- public function setIntangibleDomain($intangibleDomain)
- {
- $this->intangibleDomain = $intangibleDomain;
- return $this;
- }
- /**
- * Get intangibleDomain
- *
- * @return string
- */
- public function getIntangibleDomain()
- {
- return $this->intangibleDomain;
- }
- /**
- * Set showInBill
- *
- * @param boolean $showInBill
- *
- * @return BillLine
- */
- public function setShowInBill($showInBill)
- {
- $this->showInBill = $showInBill;
- return $this;
- }
- /**
- * Get showInBill
- *
- * @return boolean
- */
- public function getShowInBill()
- {
- return $this->showInBill;
- }
- }
|