src/Entity/InvoiceItem.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\InvoiceItemRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassInvoiceItemRepository::class)]
  7. #[ORM\HasLifecycleCallbacks]
  8. class InvoiceItem extends BaseEntity
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $productName null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $measurement null;
  18.     // quantity = müşteriye teslim edilen toplam miktar
  19.     #[ORM\Column(typeTypes::DECIMALprecision19scale4)]
  20.     private ?string $quantity null;
  21.     // unitPriceFob = Ürünün birim fiyatı maliyeti
  22.     #[ORM\Column(typeTypes::DECIMALprecision19scale4)]
  23.     private ?string $unitPriceFob null;
  24.     // unitPriceNavlun = Ürünün nakliye gideri birim maliyeti. Toplam maliyet = unitPriceFob + unitPriceNavlun
  25.     #[ORM\Column(typeTypes::DECIMALprecision19scale4)]
  26.     private ?string $unitPriceNavlun null;
  27.     // totalUnitPrice = Ürünün toplam maliyeti
  28.     #[ORM\Column(typeTypes::DECIMALprecision19scale4)]
  29.     private ?string $totalUnitPrice null;
  30.     // totalPurchasePrice = Ürünün müşteriye toplam satış miktarı
  31.     #[ORM\Column(typeTypes::DECIMALprecision19scale4)]
  32.     private ?string $totalPurchasePrice null;
  33.     // totalUnitPurchasePrice = Müşteriye satış birim fiyatı
  34.     #[ORM\Column(typeTypes::DECIMALprecision19scale4)]
  35.     private ?string $totalUnitPurchasePrice null;
  36.     #[ORM\ManyToOne(inversedBy'invoiceItems')]
  37.     private ?Invoice $invoice null;
  38.     // tax = Vergi yüzdelik
  39.     #[ORM\Column(typeTypes::DECIMALprecision10scale'0')]
  40.     private ?string $tax null;
  41.     // discount = Yapılan indirim yüzdelik
  42.     #[ORM\Column(typeTypes::DECIMALprecision10scale'0')]
  43.     private ?string $discount null;
  44.     // unAllocatedQuantity = Müşteriye teslim edilmeyen ancak satılan miktar. Yani toplam satılan miktar = quantity + unAllocatedQuantity
  45.     #[ORM\Column(typeTypes::DECIMALprecision19scale4)]
  46.     private ?string $unAllocatedQuantity null;
  47.     #[ORM\ManyToOne(targetEntityProduct::class, inversedBy'invoiceItems')]
  48.     private Product $product;
  49.     #[ORM\Column(typeTypes::DECIMALprecision19scale4)]
  50.     private ?string $baseUnitQuantity null;
  51.     #[ORM\ManyToOne(inversedBy'invoiceItems')]
  52.     #[ORM\JoinColumn(nullabletrueonDelete'SET NULL')]
  53.     private ?MeasurementUnits $selectedUnit null;
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getProductName(): ?string
  59.     {
  60.         return $this->productName;
  61.     }
  62.     public function setProductName(string $productName): static
  63.     {
  64.         $this->productName $productName;
  65.         return $this;
  66.     }
  67.     public function getMeasurement(): ?string
  68.     {
  69.         return $this->measurement;
  70.     }
  71.     public function setMeasurement(string $measurement): static
  72.     {
  73.         $this->measurement $measurement;
  74.         return $this;
  75.     }
  76.     public function getQuantity(): ?string
  77.     {
  78.         return $this->quantity;
  79.     }
  80.     public function setQuantity(string $quantity): static
  81.     {
  82.         $this->quantity $quantity;
  83.         return $this;
  84.     }
  85.     public function getUnitPriceFob(): ?string
  86.     {
  87.         return $this->unitPriceFob;
  88.     }
  89.     public function setUnitPriceFob(string $unitPriceFob): static
  90.     {
  91.         $this->unitPriceFob $unitPriceFob;
  92.         return $this;
  93.     }
  94.     public function getUnitPriceNavlun(): ?string
  95.     {
  96.         return $this->unitPriceNavlun;
  97.     }
  98.     public function setUnitPriceNavlun(string $unitPriceNavlun): static
  99.     {
  100.         $this->unitPriceNavlun $unitPriceNavlun;
  101.         return $this;
  102.     }
  103.     public function getTotalUnitPrice(): ?string
  104.     {
  105.         return $this->totalUnitPrice;
  106.     }
  107.     public function setTotalUnitPrice(string $totalUnitPrice): static
  108.     {
  109.         $this->totalUnitPrice $totalUnitPrice;
  110.         return $this;
  111.     }
  112.     public function getTotalPurchasePrice(): ?string
  113.     {
  114.         return $this->totalPurchasePrice;
  115.     }
  116.     public function setTotalPurchasePrice(string $totalPurchasePrice): static
  117.     {
  118.         $this->totalPurchasePrice $totalPurchasePrice;
  119.         return $this;
  120.     }
  121.     public function getTotalUnitPurchasePrice(): ?string
  122.     {
  123.         return $this->totalUnitPurchasePrice;
  124.     }
  125.     public function setTotalUnitPurchasePrice(string $totalUnitPurchasePrice): static
  126.     {
  127.         $this->totalUnitPurchasePrice $totalUnitPurchasePrice;
  128.         return $this;
  129.     }
  130.     public function getInvoice(): ?Invoice
  131.     {
  132.         return $this->invoice;
  133.     }
  134.     public function setInvoice(?Invoice $invoice): static
  135.     {
  136.         $this->invoice $invoice;
  137.         return $this;
  138.     }
  139.     public function getTax(): ?string
  140.     {
  141.         return $this->tax;
  142.     }
  143.     public function setTax(string $tax): static
  144.     {
  145.         $this->tax $tax;
  146.         return $this;
  147.     }
  148.     public function getDiscount(): ?string
  149.     {
  150.         return $this->discount;
  151.     }
  152.     public function setDiscount(string $discount): static
  153.     {
  154.         $this->discount $discount;
  155.         return $this;
  156.     }
  157.     public function getUnAllocatedQuantity(): ?string
  158.     {
  159.         return $this->unAllocatedQuantity;
  160.     }
  161.     public function setUnAllocatedQuantity(string $unAllocatedQuantity): static
  162.     {
  163.         $this->unAllocatedQuantity $unAllocatedQuantity;
  164.         return $this;
  165.     }
  166.     public function getProduct(): Product
  167.     {
  168.         return $this->product;
  169.     }
  170.     public function setProduct(Product $product): void
  171.     {
  172.         $this->product $product;
  173.     }
  174.     public function getBaseUnitQuantity(): ?string
  175.     {
  176.         return $this->baseUnitQuantity;
  177.     }
  178.     public function setBaseUnitQuantity(?string $baseUnitQuantity): static
  179.     {
  180.         $this->baseUnitQuantity $baseUnitQuantity;
  181.         return $this;
  182.     }
  183.     public function getSelectedUnit(): ?MeasurementUnits
  184.     {
  185.         return $this->selectedUnit;
  186.     }
  187.     public function setSelectedUnit(?MeasurementUnits $selectedUnit): static
  188.     {
  189.         $this->selectedUnit $selectedUnit;
  190.         return $this;
  191.     }
  192. }