No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

ProductPropertyTrait.php 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Lc\ShopBundle\Services\Price;
  6. trait ProductPropertyTrait
  7. {
  8. use PriceTrait ;
  9. /**
  10. * @ORM\Column(type="float", nullable=true)
  11. */
  12. protected $buyingPrice;
  13. /**
  14. * @ORM\Column(type="float", nullable=true)
  15. */
  16. protected $buyingPriceByRefUnit;
  17. /**
  18. * @ORM\Column(type="float", nullable=true)
  19. */
  20. protected $priceByRefUnit;
  21. /**
  22. * @ORM\Column(type="float", nullable=true)
  23. */
  24. protected $quantity;
  25. /**
  26. * @ORM\Column(type="float", nullable=true)
  27. */
  28. protected $availableQuantity;
  29. /**
  30. * @ORM\Column(type="float", nullable=true)
  31. */
  32. protected $availableQuantityDefault;
  33. /**
  34. * @ORM\Column(type="string", length=255, nullable=true)
  35. */
  36. protected $propertyExpirationDate;
  37. public function getBuyingPrice(): ?float
  38. {
  39. return $this->buyingPrice;
  40. }
  41. public function setBuyingPrice(?float $buyingPrice): self
  42. {
  43. $this->buyingPrice = $buyingPrice;
  44. return $this;
  45. }
  46. public function getBuyingPriceByRefUnit(): ?float
  47. {
  48. return $this->buyingPriceByRefUnit;
  49. }
  50. public function setBuyingPriceByRefUnit(?float $buyingPriceByRefUnit): self
  51. {
  52. $this->buyingPriceByRefUnit = $buyingPriceByRefUnit;
  53. return $this;
  54. }
  55. public function getPriceByRefUnit(): ?float
  56. {
  57. return $this->priceByRefUnit;
  58. }
  59. public function setPriceByRefUnit(?float $priceByRefUnit): self
  60. {
  61. $this->priceByRefUnit = $priceByRefUnit;
  62. return $this;
  63. }
  64. public function getQuantity(): ?float
  65. {
  66. return $this->quantity;
  67. }
  68. public function setQuantity(?float $quantity): self
  69. {
  70. $this->quantity = $quantity;
  71. return $this;
  72. }
  73. public function getQuantityInherited(): ?float
  74. {
  75. return $this->getQuantity() ;
  76. }
  77. public function getAvailableQuantity(): ?float
  78. {
  79. return $this->availableQuantity;
  80. }
  81. public function setAvailableQuantity(?float $availableQuantity): self
  82. {
  83. $this->availableQuantity = $availableQuantity;
  84. return $this;
  85. }
  86. public function getAvailableQuantityDefault(): ?float
  87. {
  88. return $this->availableQuantityDefault;
  89. }
  90. public function setAvailableQuantityDefault(?float $availableQuantityDefault): self
  91. {
  92. $this->availableQuantityDefault = $availableQuantityDefault;
  93. return $this;
  94. }
  95. public function getPropertyExpirationDate(): ?\DateTimeInterface
  96. {
  97. return $this->propertyExpirationDate;
  98. }
  99. public function setPropertyExpirationDate(?\DateTimeInterface $propertyExpirationDate): self
  100. {
  101. $this->propertyExpirationDate = $propertyExpirationDate;
  102. return $this;
  103. }
  104. }