<?php
namespace App\Entity\Client;
use App\Entity\Company;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\ContractProduct;
use PhpOffice\PhpSpreadsheet\Shared\Date;
/**
* Contrat client
*
* @ORM\Table(name="billing_infos")
* @ORM\Entity
*/
class BillingInfos
{
const BILLING_MODE_TTC = 'ttc';
const BILLING_MODE_HT = 'ht';
const SEND_MODE_EMAIL = 'email';
const SEND_MODE_COURRIER = 'courrier';
const PAY_MODE_SEPA = 'sepa';
const PAY_MODE_CB = 'cb';
const PAY_MODE_VIREMENT = 'virement';
const PAY_MODE_CHEQUES = 'cheques';
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var Company
*
* @ORM\ManyToOne(targetEntity=Company::class)
* @ORM\JoinColumn(name="company_id", referencedColumnName="id")
*/
private $company;
/**
* @var string
*
* @ORM\Column(name="billing_mode", type="string", length=255, nullable=true)
*/
private $billingMode;
/**
* @var string
*
* @ORM\Column(type="datetime", nullable=true)
*/
private $dateSignatureMandat;
/**
* @var string
*
* @ORM\Column(name="email", type="string", nullable=true)
*/
private $email;
/**
* @var string
*
* @ORM\Column(name="phone", type="string", nullable=true)
*/
private $phone;
/**
* @var string
*
* @ORM\Column(name="discount", type="float", nullable=true)
*/
private $discount = 0;
/**
* @var string
*
* @ORM\Column(name="send_mode", type="string", nullable=true)
*/
private $sendMode = self::SEND_MODE_COURRIER;
/**
* @var string
*
* @ORM\Column(name="pay_mode", type="string", nullable=true)
*/
private $payMode;
/**
* @var string
*
* @ORM\Column(name="esthetique", type="boolean", nullable=true)
*/
private $esthetique = false;
/**
* @var string
*
* @ORM\Column(name="account", type="string", nullable=true)
*/
private $account;
/**
* @var string
*
* @ORM\Column(name="bankName", type="string", nullable=true)
*/
private $bankName;
/**
* @var string
*
* @ORM\Column(name="iban", type="string", nullable=true)
*/
private $iban;
/**
* @var string
*
* @ORM\Column(name="bic", type="string", nullable=true)
*/
private $bic;
/**
* @var string
*
* @ORM\Column(name="rum", type="string", nullable=true)
*/
private $rum;
public function __toString()
{
return (string) $this->email;
}
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
*/
public function setId(int $id): void
{
$this->id = $id;
}
/**
* @return Company
*/
public function getCompany(): ?Company
{
return $this->company;
}
/**
* @param Company $company
*/
public function setCompany(Company $company): void
{
$this->company = $company;
}
/**
* @return string
*/
public function getBillingMode(): ?string
{
return $this->billingMode;
}
/**
* @param string $billingMode
*/
public function setBillingMode($billingMode): void
{
$this->billingMode = $billingMode;
}
/**
* @return string
*/
public function getEmail(): ?string
{
return $this->email;
}
/**
* @param string $email
*/
public function setEmail(string $email): void
{
$this->email = $email;
}
/**
* @return string
*/
public function getPhone(): ?string
{
return $this->phone;
}
/**
* @param string $phone
*/
public function setPhone($phone): void
{
$this->phone = $phone;
}
/**
* @return string
*/
public function getDiscount()
{
return $this->discount ?? 0;
}
/**
* @param string $discount
*/
public function setDiscount($discount): void
{
$this->discount = $discount;
}
/**
* @return string
*/
public function getSendMode(): ?string
{
return $this->sendMode;
}
/**
* @param string $sendMode
*/
public function setSendMode(?string $sendMode): void
{
$this->sendMode = $sendMode;
}
/**
* @return string
*/
public function getPayMode(): ?string
{
return $this->payMode;
}
/**
* @param string $payMode
*/
public function setPayMode(?string $payMode): void
{
$this->payMode = $payMode;
}
/**
* @return string
*/
public function getAccount(): ?string
{
return $this->account;
}
/**
* @param string $account
*/
public function setAccount(string $account): void
{
$this->account = $account;
}
/**
* @return string
*/
public function getBankName(): ?string
{
return $this->bankName;
}
/**
* @param string $bankName
*/
public function setBankName(string $bankName): void
{
$this->bankName = $bankName;
}
/**
* @return string
*/
public function getIban(): ?string
{
return $this->iban;
}
/**
* @param string $iban
*/
public function setIban(string $iban): void
{
$this->iban = $iban;
}
/**
* @return string
*/
public function getBic(): ?string
{
return $this->bic;
}
/**
* @param string $bic
*/
public function setBic(string $bic): void
{
$this->bic = $bic;
}
/**
* @return string
*/
public function getRum(): ?string
{
return $this->rum;
}
/**
* @param string $rum
*/
public function setRum(?string $rum): void
{
$this->rum = $rum;
}
/**
* @return string
*/
public function getPayModeString(): ?string
{
switch ($this->payMode) {
case self::PAY_MODE_SEPA:
return 'Sepa';
case self::PAY_MODE_VIREMENT:
return 'Virement';
case self::PAY_MODE_CB:
return 'Carte bancaire';
case self::PAY_MODE_CHEQUES:
return 'Chèques';
}
return null;
}
/**
* @return string
*/
public function getEsthetique(): ?string
{
return $this->esthetique;
}
/**
* @param string $esthetique
*/
public function setEsthetique(string $esthetique): void
{
$this->esthetique = $esthetique;
}
/**
* @return string
*/
public function getDateSignatureMandat()
{
return $this->dateSignatureMandat;
}
/**
* @param \DateTime $dateSignatureMandat
*/
public function setDateSignatureMandat($dateSignatureMandat): void
{
$this->dateSignatureMandat = $dateSignatureMandat;
}
}