<?php
namespace AdminBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* ClientInvoices
*
*/
#[ORM\Table(name: 'client_invoices')]
#[ORM\Entity(repositoryClass: \AdminBundle\Repository\ClientInvoicesRepository::class)]
class ClientInvoices extends BaseEntity
{
const PAYMENT_PENDING = 0;
const PAYMENT_PAID = 1;
public static $invoiceApproval = array(
self::PAYMENT_PENDING => 'Payment Pending',
self::PAYMENT_PAID => 'Paid',
);
/**
* @var integer
*/
#[ORM\Column(name: 'id', type: 'integer', nullable: false)]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')]
protected $id;
/**
* @var float
*/
#[ORM\Column(name: 'invoice_amount', type: 'float', scale: 2)]
protected $invoiceAmount;
/**
* @var \DateTime
*/
#[ORM\Column(name: 'invoice_date', type: 'datetime')]
protected $invoiceDate;
/**
* @var string
*/
#[ORM\Column(name: 'pdf_file', type: 'string', length: 255, nullable: true)]
protected $pdfFile;
/**
* @var \DateTime
*/
#[ORM\Column(name: 'pdf_gen_date', type: 'datetime', nullable: true)]
protected $pdfGenDate;
/**
* @var \DateTime
*/
#[ORM\Column(name: 'sent_date', type: 'datetime', nullable: true)]
protected $sentDate;
/**
* @var boolean
*/
#[ORM\Column(name: 'status', type: 'boolean')]
protected $status = self::PAYMENT_PENDING;
/**
* @var Booking
*/
#[ORM\JoinColumn(name: 'booking', referencedColumnName: 'id')]
#[ORM\OneToOne(targetEntity: \AdminBundle\Entity\Booking::class, inversedBy: 'clientInvoice')]
protected $booking;
/**
* @var Account
*/
#[ORM\JoinColumn(name: 'client', referencedColumnName: 'id', nullable: true)]
#[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\Account::class, inversedBy: 'clientInvoices')]
protected $client;
/**
* @var Company
*/
#[ORM\JoinColumn(name: 'company', referencedColumnName: 'id', nullable: true)]
#[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\Company::class, inversedBy: 'clientInvoices')]
protected $company;
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @return string
*/
public function getInvoiceAmount()
{
return $this->invoiceAmount;
}
/**
* @param string $invoiceAmount
*/
public function setInvoiceAmount($invoiceAmount)
{
$this->invoiceAmount = $invoiceAmount;
}
/**
* @return \DateTime
*/
public function getInvoiceDate()
{
return $this->invoiceDate;
}
/**
* @param \DateTime $invoiceDate
*/
public function setInvoiceDate($invoiceDate)
{
$this->invoiceDate = $invoiceDate;
}
/**
* @return string
*/
public function getPdfFile()
{
return $this->pdfFile;
}
/**
* @param string $pdfFile
*/
public function setPdfFile($pdfFile)
{
$this->pdfFile = $pdfFile;
}
/**
* @return \DateTime
*/
public function getPdfGenDate()
{
return $this->pdfGenDate;
}
/**
* @param \DateTime $pdfGenDate
*/
public function setPdfGenDate($pdfGenDate)
{
$this->pdfGenDate = $pdfGenDate;
}
/**
* @return \DateTime
*/
public function getSentDate()
{
return $this->sentDate;
}
/**
* @param \DateTime $sentDate
*/
public function setSentDate($sentDate)
{
$this->sentDate = $sentDate;
}
/**
* @return Booking
*/
public function getBooking()
{
return $this->booking;
}
/**
* @param Booking $booking
*/
public function setBooking($booking)
{
$this->booking = $booking;
}
/**
* @return Account
*/
public function getClient()
{
return $this->client;
}
/**
* @param Account $clientUser
*/
public function setClient($clientUser)
{
$this->client = $clientUser;
}
/**
* @return bool
*/
public function isStatus()
{
return $this->status;
}
/**
* @param bool $status
*/
public function setStatus($status)
{
$this->status = $status;
}
/**
* @return Company
*/
public function getCompany()
{
return $this->company;
}
/**
* @param Company $company
*/
public function setCompany($company)
{
$this->company = $company;
}
}