src/Entity/Idempiere/MaterialManagement/StorageOnHand.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Idempiere\MaterialManagement;
  3. /**
  4. * @author rbellorin@sumagroups.com
  5. * @version 2026-02-26
  6. */
  7. use App\Entity\Idempiere\MProduct;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10. * @ORM\Entity(repositoryClass=StorageOnHandRepository::class, readOnly=true)
  11. * @ORM\Table(name="m_storageonhand")
  12. */
  13. class StorageOnHand
  14. {
  15. /**
  16. * @ORM\Id
  17. * @ORM\Column(type="integer")
  18. */
  19. private int $ad_client_id;
  20. /**
  21. * @ORM\Id
  22. * @ORM\Column(type="integer")
  23. */
  24. private int $ad_org_id;
  25. /**
  26. * @ORM\Column(type="string", length=1)
  27. */
  28. private string $isactive;
  29. /**
  30. * @ORM\Id
  31. * @ORM\Column(type="integer")
  32. */
  33. private int $m_locator_id;
  34. /**
  35. * Parte del ID compuesto (y evita el warning).
  36. *
  37. * @ORM\Id
  38. * @ORM\ManyToOne(targetEntity=MProduct::class, inversedBy="storagesOnHand")
  39. * @ORM\JoinColumn(name="m_product_id", referencedColumnName="m_product_id", nullable=false)
  40. */
  41. private MProduct $product;
  42. /**
  43. * @ORM\Column(type="integer")
  44. */
  45. private int $qtyonhand;
  46. /**
  47. * @ORM\Column(type="string", length=40)
  48. */
  49. private string $m_storageonhand_uu;
  50. /**
  51. * Parte del ID compuesto (y evita el warning).
  52. *
  53. * @ORM\Id
  54. * @ORM\ManyToOne(targetEntity=Locator::class, inversedBy="storagesOnHand")
  55. * @ORM\JoinColumn(name="m_locator_id", referencedColumnName="m_locator_id", nullable=false)
  56. */
  57. private Locator $locator;
  58. // Getters
  59. public function getAdClientId(): int { return $this->ad_client_id; }
  60. public function getAdOrgId(): int { return $this->ad_org_id; }
  61. public function getIsactive(): string { return $this->isactive; }
  62. public function isActive(): bool { return $this->isactive === 'Y'; }
  63. public function getMLocatorId(): int { return $this->m_locator_id; }
  64. public function getProduct(): MProduct { return $this->product; }
  65. public function getMProductId(): int { return (int) $this->product->getMProductId(); }
  66. public function getQtyOnHand(): int { return $this->qtyonhand; }
  67. public function getStorageOnHandUu(): string { return $this->m_storageonhand_uu; }
  68. public function getLocator(): Locator { return $this->locator; }
  69. }