<?php
namespace App\Entity;
use App\Repository\ProjectOrderMetricsRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* TODO Replace project_order_metric@core -> order_metric@core
* @ORM\Entity(repositoryClass=ProjectOrderMetricsRepository::class)
*/
class ProjectOrderMetrics
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({
* "project_order_metric@core"
* })
*/
private $id;
/**
* @ORM\OneToOne(targetEntity=ProjectOrders::class, inversedBy="project_order_metrics", cascade={"persist", "remove"})
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $project_order;
/**
* @ORM\Column(type="float", nullable=true, options={"comment":"Bu order icin toplam calisma saatlerinin tutuldugu colon"})
* @Groups({
* "project_order_metric@core"
* })
* */
private $spent_hours;
/**
* @ORM\Column(type="float", nullable=true, options={"comment":"Bu order icin toplam calisma saatlerine ait maliyetlerin tutuldugu colon"})
* @Groups({
* "project_order_metric@core"
* })
*/
private $spent_costs;
/**
* @ORM\Column(type="float", nullable=true, options={"comment":"Bu order icin toplam harcanma maliyetlerinin tutuldugu colon"})
* @Groups({
* "project_order_metric@core"
* })
*/
private $expenses;
/**
* @ORM\Column(type="float", nullable=true, options={"comment":"Tamamlanma yüzdesine göre hak edilen tutar ile daha önce faturalandırılan tutar arasındaki fark ((order_price * last_feedback_status)/100 - already_billed)"})
* @Groups({
* "project_order_metric@core"
* })
*/
private $half_finished;
/**
* @ORM\Column(type="float", nullable=true, options={"comment":"Order backlog: Toplam hesaplanan tutar + tamamlanma yüzdesine göre hak edilen miktar eksi (işçilik maliyetleri + ek giderler). Henüz tahsil edilmemiş, ileride beklenen gelir."})
* @Groups({
* "project_order_metric@core"
* })
*/
private $backlog;
/**
* @ORM\Column(type="float", nullable=true, options={"comment":"Contribution Margin: Toplam gelirden (amount_calculated) işçilik maliyetleri (timesheet_costs), ek giderler (extra_costs) ve stoktan kullanılan maliyetler (costs_from_stock) çıkarılarak elde edilen katkı payı. Pozitif değer kârı, negatif değer zararı gösterir."})
* @Groups({
* "project_order_metric@core"
* })
*/
private $contribution_margin;
/**
* @ORM\Column(type="float", nullable=true)
* @Groups({
* "project_order_metric@core"
* })
*/
private $stock_expenses;
/**
* @deprecated use order_progress instead
* @ORM\Column(type="float", nullable=true)
* @Groups({
* "project_order_metric@core"
* })
*/
private $progress;
/**
* TODO @deprecated !
* TODO ReadMe!
* @deprecated
* @see This should from Invoices Table No (ProjectOrderInvoices)
* @ORM\Column(type="float", nullable=true, options={"comment": "Not paid invoices total"}, options={"comment": "Deprecated column use billing instead"})
* @Groups({
* "project_order_metric@core"
* })
*/
private $open_invoices;
/**
* TODO @deprecated !
* TODO ReadMe!
* @deprecated
* @see This should from Invoices Table No (ProjectOrderInvoices)
* @ORM\Column(type="float", nullable=true, options={"comment": "Paid invoices total"}, options={"comment": "Deprecated column use billing instead"})
* @Groups({
* "project_order_metric@core"
* })
*/
private $received_invoices;
/**
* TODO @deprecated !
* TODO ReadMe!
* @deprecated
* @see This should from Invoices Table No (ProjectOrderInvoices)
* @ORM\Column(type="float", nullable=true, options={"comment": "Invoices total"}, options={"comment": "Deprecated column use billing instead"})
* @Groups({
* "project_order_metric@core"
* })
*/
private $total_invoices;
/**
* TODO @deprecated !
* @deprecated
* @see use Billings
* @ORM\Column(type="float", nullable=true, options={"comment": "Not paid Undertakings total"}, options={"comment": "Deprecated column use billing instead"})
* @Groups({
* "project_order_metric@core"
* })
*/
private $open_undertakings;
/**
* TODO @deprecated !
* @deprecated
* @ORM\Column(type="float", nullable=true, options={"comment": "Paid Undertakings total"}, options={"comment": "Deprecated column use billing instead"})
* @Groups({
* "project_order_metric@core"
* })
*/
private $received_undertakings;
/**
* TODO @deprecated !
* @deprecated
* @ORM\Column(type="float", nullable=true, options={"comment": "Undertakings total"}, options={"comment": "Deprecated column use billing instead"})
* @Groups({
* "project_order_metric@core"
* })
*/
private $total_undertakings;
/**
* @ORM\Column(type="float", nullable=true)
* @Groups({
* "project_order_metric@core"
* })
*/
private $order_progress;
/**
* @ORM\Column(type="float", nullable=true)
* @Groups({
* "project_order_metric@core"
* })
*/
private $total_billings;
/**
* @ORM\Column(type="float", nullable=true)
* @Groups({
* "project_order_metric@core"
* })
*/
private $open_billings;
/**
* @ORM\Column(type="float", nullable=true)
* @Groups({
* "project_order_metric@core"
* })
*/
private $paid_billings;
public function getId(): ?int
{
return $this->id;
}
public function getProjectOrder(): ?ProjectOrders
{
return $this->project_order;
}
public function setProjectOrder(ProjectOrders $project_order): self
{
$this->project_order = $project_order;
return $this;
}
public function getSpentHours(): ?float
{
return $this->spent_hours;
}
public function setSpentHours(?float $spent_hours): self
{
$this->spent_hours = $spent_hours;
return $this;
}
public function getSpentCosts(): ?float
{
return $this->spent_costs;
}
public function setSpentCosts(?float $spent_costs): self
{
$this->spent_costs = $spent_costs;
return $this;
}
public function getExpenses(): ?float
{
return $this->expenses;
}
public function setExpenses(?float $expenses): self
{
$this->expenses = $expenses;
return $this;
}
public function getHalfFinished(): ?float
{
return $this->half_finished;
}
public function setHalfFinished(?float $half_finished): self
{
$this->half_finished = $half_finished;
return $this;
}
public function getBacklog(): ?float
{
return $this->backlog;
}
public function setBacklog(?float $backlog): self
{
$this->backlog = $backlog;
return $this;
}
public function getContributionMargin(): ?float
{
return $this->contribution_margin;
}
public function setContributionMargin(?float $contribution_margin): self
{
$this->contribution_margin = $contribution_margin;
return $this;
}
public function getStockExpenses(): ?float
{
return $this->stock_expenses;
}
public function setStockExpenses(?float $stock_expenses): self
{
$this->stock_expenses = $stock_expenses;
return $this;
}
public function getProgress(): ?float
{
return $this->progress;
}
public function setProgress(?float $progress): self
{
$this->progress = $progress;
return $this;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function getOpenInvoices(): ?float
{
return $this->open_invoices;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function setOpenInvoices(?float $open_invoices): self
{
$this->open_invoices = $open_invoices;
return $this;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function getReceivedInvoices(): ?float
{
return $this->received_invoices;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function setReceivedInvoices(?float $received_invoices): self
{
$this->received_invoices = $received_invoices;
return $this;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function getTotalInvoices(): ?float
{
return $this->total_invoices;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function setTotalInvoices(?float $total_invoices): self
{
$this->total_invoices = $total_invoices;
return $this;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function getOpenUndertakings(): ?float
{
return $this->open_undertakings;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function setOpenUndertakings(?float $open_undertakings): self
{
$this->open_undertakings = $open_undertakings;
return $this;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function getReceivedUndertakings(): ?float
{
return $this->received_undertakings;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function setReceivedUndertakings(?float $received_undertakings): self
{
$this->received_undertakings = $received_undertakings;
return $this;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function getTotalUndertakings(): ?float
{
return $this->total_undertakings;
}
/**
* TODO @deprecated !
* @deprecated
*/
public function setTotalUndertakings(?float $total_undertakings): self
{
$this->total_undertakings = $total_undertakings;
return $this;
}
public function getOrderProgress(): ?float
{
return $this->order_progress;
}
public function setOrderProgress(?float $order_progress): self
{
$this->order_progress = $order_progress;
return $this;
}
public function getTotalBillings(): ?float
{
return $this->total_billings;
}
public function setTotalBillings(?float $total_billings): self
{
$this->total_billings = $total_billings;
return $this;
}
public function getOpenBillings(): ?float
{
return $this->open_billings;
}
public function setOpenBillings(?float $open_billings): self
{
$this->open_billings = $open_billings;
return $this;
}
public function getPaidBillings(): ?float
{
return $this->paid_billings;
}
public function setPaidBillings(?float $paid_billings): self
{
$this->paid_billings = $paid_billings;
return $this;
}
}