src/Entity/ProjectOrderMetrics.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjectOrderMetricsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * TODO Replace project_order_metric@core -> order_metric@core
  8.  * @ORM\Entity(repositoryClass=ProjectOrderMetricsRepository::class)
  9.  */
  10. class ProjectOrderMetrics
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      * @Groups({
  17.      *     "project_order_metric@core"
  18.      * })
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\OneToOne(targetEntity=ProjectOrders::class, inversedBy="project_order_metrics", cascade={"persist", "remove"})
  23.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  24.      */
  25.     private $project_order;
  26.     /**
  27.      * @ORM\Column(type="float", nullable=true, options={"comment":"Bu order icin toplam calisma saatlerinin tutuldugu colon"})
  28.      * @Groups({
  29.      *      "project_order_metric@core"
  30.      *  })
  31.      *  */
  32.     private $spent_hours;
  33.     /**
  34.      * @ORM\Column(type="float", nullable=true, options={"comment":"Bu order icin toplam calisma saatlerine ait maliyetlerin tutuldugu colon"})
  35.      * @Groups({
  36.      *      "project_order_metric@core"
  37.      *  })
  38.      */
  39.     private $spent_costs;
  40.     /**
  41.      * @ORM\Column(type="float", nullable=true, options={"comment":"Bu order icin toplam harcanma maliyetlerinin tutuldugu colon"})
  42.      * @Groups({
  43.      *      "project_order_metric@core"
  44.      *  })
  45.      */
  46.     private $expenses;
  47.     /**
  48.      * @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)"})
  49.      * @Groups({
  50.      *      "project_order_metric@core"
  51.      *  })
  52.      */
  53.     private $half_finished;
  54.     /**
  55.      * @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."})
  56.      * @Groups({
  57.      *      "project_order_metric@core"
  58.      *  })
  59.      */
  60.     private $backlog;
  61.     /**
  62.      * @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."})
  63.      * @Groups({
  64.      *      "project_order_metric@core"
  65.      *  })
  66.      */
  67.     private $contribution_margin;
  68.     /**
  69.      * @ORM\Column(type="float", nullable=true)
  70.      * @Groups({
  71.      *       "project_order_metric@core"
  72.      *   })
  73.      */
  74.     private $stock_expenses;
  75.     /**
  76.      * @deprecated use order_progress instead
  77.      * @ORM\Column(type="float", nullable=true)
  78.      * @Groups({
  79.      *      "project_order_metric@core"
  80.      *  })
  81.      */
  82.     private $progress;
  83.     /**
  84.      * TODO @deprecated !
  85.      * TODO ReadMe!
  86.      * @deprecated
  87.      * @see This should from Invoices Table No (ProjectOrderInvoices)
  88.      * @ORM\Column(type="float", nullable=true, options={"comment": "Not paid invoices total"}, options={"comment": "Deprecated column use billing instead"})
  89.      * @Groups({
  90.      *      "project_order_metric@core"
  91.      *  })
  92.      */
  93.     private $open_invoices;
  94.     /**
  95.      * TODO @deprecated !
  96.      * TODO ReadMe!
  97.      * @deprecated
  98.      * @see This should from Invoices Table No (ProjectOrderInvoices)
  99.      * @ORM\Column(type="float", nullable=true, options={"comment": "Paid invoices total"}, options={"comment": "Deprecated column use billing instead"})
  100.      * @Groups({
  101.      *      "project_order_metric@core"
  102.      *  })
  103.      */
  104.     private $received_invoices;
  105.     /**
  106.      * TODO @deprecated !
  107.      * TODO ReadMe!
  108.      * @deprecated
  109.      * @see This should from Invoices Table No (ProjectOrderInvoices)
  110.      * @ORM\Column(type="float", nullable=true, options={"comment": "Invoices total"}, options={"comment": "Deprecated column use billing instead"})
  111.      * @Groups({
  112.      *      "project_order_metric@core"
  113.      *  })
  114.      */
  115.     private $total_invoices;
  116.     /**
  117.      * TODO @deprecated !
  118.      * @deprecated
  119.      * @see use Billings
  120.      * @ORM\Column(type="float", nullable=true, options={"comment": "Not paid Undertakings total"}, options={"comment": "Deprecated column use billing instead"})
  121.      * @Groups({
  122.      *      "project_order_metric@core"
  123.      *  })
  124.      */
  125.     private $open_undertakings;
  126.     /**
  127.      * TODO @deprecated !
  128.      * @deprecated
  129.      * @ORM\Column(type="float", nullable=true, options={"comment": "Paid Undertakings total"}, options={"comment": "Deprecated column use billing instead"})
  130.      * @Groups({
  131.      *      "project_order_metric@core"
  132.      *  })
  133.      */
  134.     private $received_undertakings;
  135.     /**
  136.      * TODO @deprecated !
  137.      * @deprecated
  138.      * @ORM\Column(type="float", nullable=true, options={"comment": "Undertakings total"}, options={"comment": "Deprecated column use billing instead"})
  139.      * @Groups({
  140.      *      "project_order_metric@core"
  141.      *  })
  142.      */
  143.     private $total_undertakings;
  144.     /**
  145.      * @ORM\Column(type="float", nullable=true)
  146.      * @Groups({
  147.      *     "project_order_metric@core"
  148.      * })
  149.      */
  150.     private $order_progress;
  151.     /**
  152.      * @ORM\Column(type="float", nullable=true)
  153.      * @Groups({
  154.      *      "project_order_metric@core"
  155.      *  })
  156.      */
  157.     private $total_billings;
  158.     /**
  159.      * @ORM\Column(type="float", nullable=true)
  160.      * @Groups({
  161.      *      "project_order_metric@core"
  162.      *  })
  163.      */
  164.     private $open_billings;
  165.     /**
  166.      * @ORM\Column(type="float", nullable=true)
  167.      * @Groups({
  168.      *     "project_order_metric@core"
  169.      * })
  170.      */
  171.     private $paid_billings;
  172.     public function getId(): ?int
  173.     {
  174.         return $this->id;
  175.     }
  176.     public function getProjectOrder(): ?ProjectOrders
  177.     {
  178.         return $this->project_order;
  179.     }
  180.     public function setProjectOrder(ProjectOrders $project_order): self
  181.     {
  182.         $this->project_order $project_order;
  183.         return $this;
  184.     }
  185.     public function getSpentHours(): ?float
  186.     {
  187.         return $this->spent_hours;
  188.     }
  189.     public function setSpentHours(?float $spent_hours): self
  190.     {
  191.         $this->spent_hours $spent_hours;
  192.         return $this;
  193.     }
  194.     public function getSpentCosts(): ?float
  195.     {
  196.         return $this->spent_costs;
  197.     }
  198.     public function setSpentCosts(?float $spent_costs): self
  199.     {
  200.         $this->spent_costs $spent_costs;
  201.         return $this;
  202.     }
  203.     public function getExpenses(): ?float
  204.     {
  205.         return $this->expenses;
  206.     }
  207.     public function setExpenses(?float $expenses): self
  208.     {
  209.         $this->expenses $expenses;
  210.         return $this;
  211.     }
  212.     public function getHalfFinished(): ?float
  213.     {
  214.         return $this->half_finished;
  215.     }
  216.     public function setHalfFinished(?float $half_finished): self
  217.     {
  218.         $this->half_finished $half_finished;
  219.         return $this;
  220.     }
  221.     public function getBacklog(): ?float
  222.     {
  223.         return $this->backlog;
  224.     }
  225.     public function setBacklog(?float $backlog): self
  226.     {
  227.         $this->backlog $backlog;
  228.         return $this;
  229.     }
  230.     public function getContributionMargin(): ?float
  231.     {
  232.         return $this->contribution_margin;
  233.     }
  234.     public function setContributionMargin(?float $contribution_margin): self
  235.     {
  236.         $this->contribution_margin $contribution_margin;
  237.         return $this;
  238.     }
  239.     public function getStockExpenses(): ?float
  240.     {
  241.         return $this->stock_expenses;
  242.     }
  243.     public function setStockExpenses(?float $stock_expenses): self
  244.     {
  245.         $this->stock_expenses $stock_expenses;
  246.         return $this;
  247.     }
  248.     public function getProgress(): ?float
  249.     {
  250.         return $this->progress;
  251.     }
  252.     public function setProgress(?float $progress): self
  253.     {
  254.         $this->progress $progress;
  255.         return $this;
  256.     }
  257.     /**
  258.      * TODO @deprecated !
  259.      * @deprecated
  260.      */
  261.     public function getOpenInvoices(): ?float
  262.     {
  263.         return $this->open_invoices;
  264.     }
  265.     /**
  266.      * TODO @deprecated !
  267.      * @deprecated
  268.      */
  269.     public function setOpenInvoices(?float $open_invoices): self
  270.     {
  271.         $this->open_invoices $open_invoices;
  272.         return $this;
  273.     }
  274.     /**
  275.      * TODO @deprecated !
  276.      * @deprecated
  277.      */
  278.     public function getReceivedInvoices(): ?float
  279.     {
  280.         return $this->received_invoices;
  281.     }
  282.     /**
  283.      * TODO @deprecated !
  284.      * @deprecated
  285.      */
  286.     public function setReceivedInvoices(?float $received_invoices): self
  287.     {
  288.         $this->received_invoices $received_invoices;
  289.         return $this;
  290.     }
  291.     /**
  292.      * TODO @deprecated !
  293.      * @deprecated
  294.      */
  295.     public function getTotalInvoices(): ?float
  296.     {
  297.         return $this->total_invoices;
  298.     }
  299.     /**
  300.      * TODO @deprecated !
  301.      * @deprecated
  302.      */
  303.     public function setTotalInvoices(?float $total_invoices): self
  304.     {
  305.         $this->total_invoices $total_invoices;
  306.         return $this;
  307.     }
  308.     /**
  309.      * TODO @deprecated !
  310.      * @deprecated
  311.      */
  312.     public function getOpenUndertakings(): ?float
  313.     {
  314.         return $this->open_undertakings;
  315.     }
  316.     /**
  317.      * TODO @deprecated !
  318.      * @deprecated
  319.      */
  320.     public function setOpenUndertakings(?float $open_undertakings): self
  321.     {
  322.         $this->open_undertakings $open_undertakings;
  323.         return $this;
  324.     }
  325.     /**
  326.      * TODO @deprecated !
  327.      * @deprecated
  328.      */
  329.     public function getReceivedUndertakings(): ?float
  330.     {
  331.         return $this->received_undertakings;
  332.     }
  333.     /**
  334.      * TODO @deprecated !
  335.      * @deprecated
  336.      */
  337.     public function setReceivedUndertakings(?float $received_undertakings): self
  338.     {
  339.         $this->received_undertakings $received_undertakings;
  340.         return $this;
  341.     }
  342.     /**
  343.      * TODO @deprecated !
  344.      * @deprecated
  345.     */
  346.     public function getTotalUndertakings(): ?float
  347.     {
  348.         return $this->total_undertakings;
  349.     }
  350.     /**
  351.      * TODO @deprecated !
  352.      * @deprecated
  353.      */
  354.     public function setTotalUndertakings(?float $total_undertakings): self
  355.     {
  356.         $this->total_undertakings $total_undertakings;
  357.         return $this;
  358.     }
  359.     public function getOrderProgress(): ?float
  360.     {
  361.         return $this->order_progress;
  362.     }
  363.     public function setOrderProgress(?float $order_progress): self
  364.     {
  365.         $this->order_progress $order_progress;
  366.         return $this;
  367.     }
  368.     public function getTotalBillings(): ?float
  369.     {
  370.         return $this->total_billings;
  371.     }
  372.     public function setTotalBillings(?float $total_billings): self
  373.     {
  374.         $this->total_billings $total_billings;
  375.         return $this;
  376.     }
  377.     public function getOpenBillings(): ?float
  378.     {
  379.         return $this->open_billings;
  380.     }
  381.     public function setOpenBillings(?float $open_billings): self
  382.     {
  383.         $this->open_billings $open_billings;
  384.         return $this;
  385.     }
  386.     public function getPaidBillings(): ?float
  387.     {
  388.         return $this->paid_billings;
  389.     }
  390.     public function setPaidBillings(?float $paid_billings): self
  391.     {
  392.         $this->paid_billings $paid_billings;
  393.         return $this;
  394.     }
  395. }