Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

102 rindas
2.2KB

  1. <?php
  2. namespace Lc\ShopBundle\Model ;
  3. use Lc\ShopBundle\Context\ReductionCatalogInterface;
  4. use Lc\ShopBundle\Context\UnitInterface;
  5. trait PriceTrait
  6. {
  7. /**
  8. * @ORM\Column(type="float", nullable=true)
  9. */
  10. protected $price;
  11. /**
  12. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UnitInterface")
  13. * @ORM\JoinColumn(nullable=true)
  14. */
  15. protected $unit;
  16. /**
  17. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\TaxRateInterface")
  18. * @ORM\JoinColumn(nullable=true)
  19. */
  20. protected $taxRate;
  21. /**
  22. * @ORM\Column(type="float", nullable=true)
  23. */
  24. protected $buyingPrice;
  25. public function getPriceInherited(): ?float
  26. {
  27. return $this->getPrice() ;
  28. }
  29. public function getUnitInherited(): ?Unit
  30. {
  31. return $this->getUnit() ;
  32. }
  33. public function getTaxRateInherited(): ?TaxRate
  34. {
  35. return $this->getTaxRate() ;
  36. }
  37. public function getBuyingPriceInherited(): ?float
  38. {
  39. return $this->getBuyingPrice() ;
  40. }
  41. public function getBuyingPrice(): ?float
  42. {
  43. return $this->buyingPrice;
  44. }
  45. public function setBuyingPrice(?float $buyingPrice): self
  46. {
  47. $this->buyingPrice = $buyingPrice;
  48. return $this;
  49. }
  50. public function getPrice(): ?float
  51. {
  52. return $this->price;
  53. }
  54. public function setPrice(?float $price): self
  55. {
  56. $this->price = $price;
  57. return $this;
  58. }
  59. public function getUnit(): ?Unit
  60. {
  61. return $this->unit;
  62. }
  63. public function setUnit(?Unit $unit): self
  64. {
  65. $this->unit = $unit;
  66. return $this;
  67. }
  68. public function getTaxRate(): ?TaxRate
  69. {
  70. return $this->taxRate;
  71. }
  72. public function setTaxRate(?TaxRate $taxRate): self
  73. {
  74. $this->taxRate = $taxRate;
  75. return $this;
  76. }
  77. }