Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 118 |
|
0.00% |
0 / 66 |
CRAP | |
0.00% |
0 / 1 |
| Adressgruppe | |
0.00% |
0 / 118 |
|
0.00% |
0 / 66 |
6006 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| __toString | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
| addKinder | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| getAnzahl | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAnzahl | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getAnzahlvondatum | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAnzahlvondatum | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| getBemerkung | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setBemerkung | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getBezeichnung | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setBezeichnung | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getFreifeld1zahl | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFreifeld1zahl | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getFreifeld2zahl | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFreifeld2zahl | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getFreifeld3 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFreifeld3 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getFreifeld4 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFreifeld4 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getKinder | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getLfdnr | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isVip | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isMarkiert | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setMarkiert | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setName | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getPreisgruppestatus | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPreisgruppestatus | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getPreisgruppe | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPreisgruppe | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabattgruppe1Prozent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabattgruppe1Prozent | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabattgruppe10Prozent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabattgruppe10Prozent | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabattgruppe2Prozent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabattgruppe2Prozent | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabattgruppe3Prozent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabattgruppe3Prozent | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabattgruppe4Prozent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabattgruppe4Prozent | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabattgruppe5Prozent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabattgruppe5Prozent | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabattgruppe6Prozent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabattgruppe6Prozent | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabattgruppe7Prozent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabattgruppe7Prozent | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabattgruppe8Prozent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabattgruppe8Prozent | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabattgruppe9Prozent | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabattgruppe9Prozent | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabattgruppe | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabattgruppe | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getSortierung | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setSortierung | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getUmsatz | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setUmsatz | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getVater | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setVater | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
| removeKinder | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| setVip | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| addAdresse | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
12 | |||
| addAdressgruppeAdresse | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| removeAdresse | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
12 | |||
| removeAdressgruppeAdresse | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
2 | |||
| getAdressen | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| getAdressgruppenAdressen | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Satag\AmicronEntityBundle\Entity; |
| 6 | |
| 7 | use Doctrine\Common\Collections\ArrayCollection; |
| 8 | use Doctrine\Common\Collections\Collection; |
| 9 | use Doctrine\DBAL\Types\Types; |
| 10 | use Doctrine\ORM\Mapping as ORM; |
| 11 | use Satag\AmicronEntityBundle\Traits\BlameableEntity; |
| 12 | use Satag\AmicronEntityBundle\Traits\BlameableEntityInterface; |
| 13 | use Satag\AmicronEntityBundle\Traits\DecimalEntity; |
| 14 | use Satag\AmicronEntityBundle\Traits\PathEntity; |
| 15 | |
| 16 | #[ORM\Entity] |
| 17 | #[ORM\Table(name: 'GRUPPEN')] |
| 18 | #[ORM\Index(columns: ['vaterlfdnr'], name: 'GRUPPEN_VATERLFDNR_FK')] |
| 19 | class Adressgruppe extends AbstractAmicronEntity implements BlameableEntityInterface, \Stringable |
| 20 | { |
| 21 | use BlameableEntity; |
| 22 | use DecimalEntity; |
| 23 | use PathEntity; |
| 24 | |
| 25 | #[ORM\Column(name: 'anzahl', type: Types::INTEGER, nullable: true)] |
| 26 | private ?int $anzahl = null; |
| 27 | |
| 28 | #[ORM\Column(name: 'anzahlvondatum', type: Types::DATETIME_IMMUTABLE, nullable: true)] |
| 29 | private ?\DateTimeImmutable $anzahlvondatum = null; |
| 30 | |
| 31 | #[ORM\Column(name: 'bemerkung', type: Types::TEXT, nullable: true)] |
| 32 | private ?string $bemerkung = null; |
| 33 | |
| 34 | #[ORM\Column(name: 'bezeichnung', type: Types::STRING, length: 60, nullable: true)] |
| 35 | public ?string $bezeichnung = null; |
| 36 | |
| 37 | #[ORM\Column(name: 'freifeld1zahl', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 38 | private ?string $freifeld1zahl = null; |
| 39 | |
| 40 | #[ORM\Column(name: 'freifeld2zahl', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 41 | private ?string $freifeld2zahl = null; |
| 42 | |
| 43 | #[ORM\Column(name: 'freifeld3', type: Types::STRING, length: 255, nullable: true)] |
| 44 | public ?string $freifeld3 = null; |
| 45 | |
| 46 | #[ORM\Column(name: 'freifeld4', type: Types::STRING, length: 255, nullable: true)] |
| 47 | public ?string $freifeld4 = null; |
| 48 | |
| 49 | /** |
| 50 | * @var Collection<int, Adressgruppe> |
| 51 | */ |
| 52 | #[ORM\OneToMany(mappedBy: 'vater', targetEntity: Adressgruppe::class)] |
| 53 | private Collection $kinder; |
| 54 | |
| 55 | #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)] |
| 56 | #[ORM\Id] |
| 57 | #[ORM\GeneratedValue(strategy: 'SEQUENCE')] |
| 58 | #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)] |
| 59 | private ?int $lfdnr = null; |
| 60 | |
| 61 | #[ORM\Column(name: 'mark', type: Types::BOOLEAN, length: 1, nullable: true)] |
| 62 | private ?bool $markiert = null; |
| 63 | |
| 64 | #[ORM\Column(name: 'vip', type: Types::BOOLEAN, length: 1, nullable: true)] |
| 65 | private ?bool $vip = null; |
| 66 | |
| 67 | #[ORM\Column(name: 'preisgruppe', type: Types::STRING, length: 1, nullable: true)] |
| 68 | public ?string $preisgruppestatus = null; |
| 69 | |
| 70 | #[ORM\ManyToOne(targetEntity: Preisgruppe::class, cascade: ['persist'])] |
| 71 | #[ORM\JoinColumn(name: 'preisgruppenlfdnr', referencedColumnName: 'lfdnr')] |
| 72 | private ?Preisgruppe $preisgruppe = null; |
| 73 | |
| 74 | #[ORM\Column(name: 'rabattgr1', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 75 | private ?string $rabattgr1 = null; |
| 76 | |
| 77 | #[ORM\Column(name: 'rabattgr10', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 78 | private ?string $rabattgr10 = null; |
| 79 | |
| 80 | #[ORM\Column(name: 'rabattgr2', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 81 | private ?string $rabattgr2 = null; |
| 82 | |
| 83 | #[ORM\Column(name: 'rabattgr3', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 84 | private ?string $rabattgr3 = null; |
| 85 | |
| 86 | #[ORM\Column(name: 'rabattgr4', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 87 | private ?string $rabattgr4 = null; |
| 88 | |
| 89 | #[ORM\Column(name: 'rabattgr5', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 90 | private ?string $rabattgr5 = null; |
| 91 | |
| 92 | #[ORM\Column(name: 'rabattgr6', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 93 | private ?string $rabattgr6 = null; |
| 94 | |
| 95 | #[ORM\Column(name: 'rabattgr7', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 96 | private ?string $rabattgr7 = null; |
| 97 | |
| 98 | #[ORM\Column(name: 'rabattgr8', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 99 | private ?string $rabattgr8 = null; |
| 100 | |
| 101 | #[ORM\Column(name: 'rabattgr9', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 102 | private ?string $rabattgr9 = null; |
| 103 | |
| 104 | #[ORM\Column(name: 'rabattgruppe', type: Types::STRING, length: 20, nullable: true)] |
| 105 | public ?string $rabattgruppe = null; |
| 106 | |
| 107 | #[ORM\Column(name: 'sortierung', type: Types::STRING, length: 25, nullable: true)] |
| 108 | public ?string $sortierung = null; |
| 109 | |
| 110 | #[ORM\Column(name: 'umsatz', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 111 | private ?string $umsatz = null; |
| 112 | |
| 113 | #[ORM\ManyToOne(targetEntity: Adressgruppe::class, inversedBy: 'kinder')] |
| 114 | #[ORM\JoinColumn(name: 'vaterlfdnr', referencedColumnName: 'lfdnr')] |
| 115 | private ?Adressgruppe $vater = null; |
| 116 | |
| 117 | /** |
| 118 | * @var Collection<int, AdressgruppeAdresse> |
| 119 | */ |
| 120 | #[ORM\OneToMany(mappedBy: 'adressgruppe', targetEntity: AdressgruppeAdresse::class, cascade: ['persist'], orphanRemoval: true)] |
| 121 | private Collection $adressgruppenAdressen; |
| 122 | |
| 123 | public function __construct(#[ORM\Column(name: 'kurzbez', type: Types::STRING, length: 25, nullable: false)] |
| 124 | public string $name) |
| 125 | { |
| 126 | $this->kinder = new ArrayCollection(); |
| 127 | $this->adressgruppenAdressen = new ArrayCollection(); |
| 128 | } |
| 129 | |
| 130 | #[\Override] |
| 131 | public function __toString(): string |
| 132 | { |
| 133 | $path = $this->getPath(); |
| 134 | |
| 135 | return trim(\sprintf('%s %s (ID: %s)', $path ? $path . ' > ' : '', $this->name, $this->getLfdnr())); |
| 136 | } |
| 137 | |
| 138 | public function addKinder(self $gruppe): void |
| 139 | { |
| 140 | if ($this->kinder->contains($gruppe)) { |
| 141 | return; |
| 142 | } |
| 143 | $this->kinder[] = $gruppe; |
| 144 | $gruppe->setVater($this); |
| 145 | } |
| 146 | |
| 147 | public function getAnzahl(): ?int |
| 148 | { |
| 149 | return $this->anzahl; |
| 150 | } |
| 151 | |
| 152 | public function setAnzahl(?int $anzahl): self |
| 153 | { |
| 154 | $this->anzahl = $anzahl; |
| 155 | |
| 156 | return $this; |
| 157 | } |
| 158 | |
| 159 | public function getAnzahlvondatum(): ?\DateTimeImmutable |
| 160 | { |
| 161 | return $this->anzahlvondatum; |
| 162 | } |
| 163 | |
| 164 | public function setAnzahlvondatum(\DateTimeImmutable|\DateTime|null $anzahlvondatum): self |
| 165 | { |
| 166 | $this->anzahlvondatum = $anzahlvondatum instanceof \DateTime |
| 167 | ? \DateTimeImmutable::createFromMutable($anzahlvondatum) |
| 168 | : $anzahlvondatum; |
| 169 | |
| 170 | return $this; |
| 171 | } |
| 172 | |
| 173 | public function getBemerkung(): ?string |
| 174 | { |
| 175 | return $this->bemerkung; |
| 176 | } |
| 177 | |
| 178 | public function setBemerkung(?string $bemerkung): self |
| 179 | { |
| 180 | $this->bemerkung = $bemerkung; |
| 181 | |
| 182 | return $this; |
| 183 | } |
| 184 | |
| 185 | public function getBezeichnung(): ?string |
| 186 | { |
| 187 | return $this->bezeichnung; |
| 188 | } |
| 189 | |
| 190 | public function setBezeichnung(?string $bezeichnung): self |
| 191 | { |
| 192 | $this->bezeichnung = $bezeichnung; |
| 193 | |
| 194 | return $this; |
| 195 | } |
| 196 | |
| 197 | public function getFreifeld1zahl(): ?string |
| 198 | { |
| 199 | return $this->freifeld1zahl; |
| 200 | } |
| 201 | |
| 202 | public function setFreifeld1zahl(?string $freifeld1zahl): self |
| 203 | { |
| 204 | $this->freifeld1zahl = $freifeld1zahl; |
| 205 | |
| 206 | return $this; |
| 207 | } |
| 208 | |
| 209 | public function getFreifeld2zahl(): ?string |
| 210 | { |
| 211 | return $this->freifeld2zahl; |
| 212 | } |
| 213 | |
| 214 | public function setFreifeld2zahl(?string $freifeld2zahl): self |
| 215 | { |
| 216 | $this->freifeld2zahl = $freifeld2zahl; |
| 217 | |
| 218 | return $this; |
| 219 | } |
| 220 | |
| 221 | public function getFreifeld3(): ?string |
| 222 | { |
| 223 | return $this->freifeld3; |
| 224 | } |
| 225 | |
| 226 | public function setFreifeld3(?string $freifeld3): self |
| 227 | { |
| 228 | $this->freifeld3 = $freifeld3; |
| 229 | |
| 230 | return $this; |
| 231 | } |
| 232 | |
| 233 | public function getFreifeld4(): ?string |
| 234 | { |
| 235 | return $this->freifeld4; |
| 236 | } |
| 237 | |
| 238 | public function setFreifeld4(?string $freifeld4): self |
| 239 | { |
| 240 | $this->freifeld4 = $freifeld4; |
| 241 | |
| 242 | return $this; |
| 243 | } |
| 244 | |
| 245 | /** |
| 246 | * @return Collection<int, Adressgruppe> |
| 247 | */ |
| 248 | public function getKinder(): ArrayCollection|Collection |
| 249 | { |
| 250 | return $this->kinder; |
| 251 | } |
| 252 | |
| 253 | public function getLfdnr(): ?int |
| 254 | { |
| 255 | return $this->lfdnr; |
| 256 | } |
| 257 | |
| 258 | public function isVip(): ?bool |
| 259 | { |
| 260 | return $this->vip; |
| 261 | } |
| 262 | |
| 263 | public function isMarkiert(): ?bool |
| 264 | { |
| 265 | return $this->markiert; |
| 266 | } |
| 267 | |
| 268 | public function setMarkiert(?bool $markiert): self |
| 269 | { |
| 270 | $this->markiert = $markiert; |
| 271 | |
| 272 | return $this; |
| 273 | } |
| 274 | |
| 275 | public function getName(): string |
| 276 | { |
| 277 | return $this->name; |
| 278 | } |
| 279 | |
| 280 | public function setName(string $name): self |
| 281 | { |
| 282 | $this->name = $name; |
| 283 | |
| 284 | return $this; |
| 285 | } |
| 286 | |
| 287 | public function getPreisgruppestatus(): ?string |
| 288 | { |
| 289 | return $this->preisgruppestatus; |
| 290 | } |
| 291 | |
| 292 | public function setPreisgruppestatus(?string $preisgruppestatus): self |
| 293 | { |
| 294 | $this->preisgruppestatus = $preisgruppestatus; |
| 295 | |
| 296 | return $this; |
| 297 | } |
| 298 | |
| 299 | public function getPreisgruppe(): ?Preisgruppe |
| 300 | { |
| 301 | return $this->preisgruppe; |
| 302 | } |
| 303 | |
| 304 | public function setPreisgruppe(?Preisgruppe $preisgruppe): self |
| 305 | { |
| 306 | $this->preisgruppe = $preisgruppe; |
| 307 | |
| 308 | return $this; |
| 309 | } |
| 310 | |
| 311 | public function getRabattgruppe1Prozent(): ?string |
| 312 | { |
| 313 | return $this->rabattgr1; |
| 314 | } |
| 315 | |
| 316 | public function setRabattgruppe1Prozent(?string $prozent): self |
| 317 | { |
| 318 | $this->rabattgr1 = $prozent; |
| 319 | |
| 320 | return $this; |
| 321 | } |
| 322 | |
| 323 | public function getRabattgruppe10Prozent(): ?string |
| 324 | { |
| 325 | return $this->rabattgr10; |
| 326 | } |
| 327 | |
| 328 | public function setRabattgruppe10Prozent(?string $prozent): self |
| 329 | { |
| 330 | $this->rabattgr10 = $prozent; |
| 331 | |
| 332 | return $this; |
| 333 | } |
| 334 | |
| 335 | public function getRabattgruppe2Prozent(): ?string |
| 336 | { |
| 337 | return $this->rabattgr2; |
| 338 | } |
| 339 | |
| 340 | public function setRabattgruppe2Prozent(?string $prozent): self |
| 341 | { |
| 342 | $this->rabattgr2 = $prozent; |
| 343 | |
| 344 | return $this; |
| 345 | } |
| 346 | |
| 347 | public function getRabattgruppe3Prozent(): ?string |
| 348 | { |
| 349 | return $this->rabattgr3; |
| 350 | } |
| 351 | |
| 352 | public function setRabattgruppe3Prozent(?string $prozent): self |
| 353 | { |
| 354 | $this->rabattgr3 = $prozent; |
| 355 | |
| 356 | return $this; |
| 357 | } |
| 358 | |
| 359 | public function getRabattgruppe4Prozent(): ?string |
| 360 | { |
| 361 | return $this->rabattgr4; |
| 362 | } |
| 363 | |
| 364 | public function setRabattgruppe4Prozent(?string $prozent): self |
| 365 | { |
| 366 | $this->rabattgr4 = $prozent; |
| 367 | |
| 368 | return $this; |
| 369 | } |
| 370 | |
| 371 | public function getRabattgruppe5Prozent(): ?string |
| 372 | { |
| 373 | return $this->rabattgr5; |
| 374 | } |
| 375 | |
| 376 | public function setRabattgruppe5Prozent(?string $prozent): self |
| 377 | { |
| 378 | $this->rabattgr5 = $prozent; |
| 379 | |
| 380 | return $this; |
| 381 | } |
| 382 | |
| 383 | public function getRabattgruppe6Prozent(): ?string |
| 384 | { |
| 385 | return $this->rabattgr6; |
| 386 | } |
| 387 | |
| 388 | public function setRabattgruppe6Prozent(?string $prozent): self |
| 389 | { |
| 390 | $this->rabattgr6 = $prozent; |
| 391 | |
| 392 | return $this; |
| 393 | } |
| 394 | |
| 395 | public function getRabattgruppe7Prozent(): ?string |
| 396 | { |
| 397 | return $this->rabattgr7; |
| 398 | } |
| 399 | |
| 400 | public function setRabattgruppe7Prozent(?string $prozent): self |
| 401 | { |
| 402 | $this->rabattgr7 = $prozent; |
| 403 | |
| 404 | return $this; |
| 405 | } |
| 406 | |
| 407 | public function getRabattgruppe8Prozent(): ?string |
| 408 | { |
| 409 | return $this->rabattgr8; |
| 410 | } |
| 411 | |
| 412 | public function setRabattgruppe8Prozent(?string $prozent): self |
| 413 | { |
| 414 | $this->rabattgr8 = $prozent; |
| 415 | |
| 416 | return $this; |
| 417 | } |
| 418 | |
| 419 | public function getRabattgruppe9Prozent(): ?string |
| 420 | { |
| 421 | return $this->rabattgr9; |
| 422 | } |
| 423 | |
| 424 | public function setRabattgruppe9Prozent(?string $prozent): self |
| 425 | { |
| 426 | $this->rabattgr9 = $prozent; |
| 427 | |
| 428 | return $this; |
| 429 | } |
| 430 | |
| 431 | public function getRabattgruppe(): ?string |
| 432 | { |
| 433 | return $this->rabattgruppe; |
| 434 | } |
| 435 | |
| 436 | public function setRabattgruppe(?string $rabattgruppe): self |
| 437 | { |
| 438 | $this->rabattgruppe = $rabattgruppe; |
| 439 | |
| 440 | return $this; |
| 441 | } |
| 442 | |
| 443 | public function getSortierung(): ?string |
| 444 | { |
| 445 | return $this->sortierung; |
| 446 | } |
| 447 | |
| 448 | public function setSortierung(?string $sortierung): self |
| 449 | { |
| 450 | $this->sortierung = $sortierung; |
| 451 | |
| 452 | return $this; |
| 453 | } |
| 454 | |
| 455 | public function getUmsatz(): ?string |
| 456 | { |
| 457 | return $this->umsatz; |
| 458 | } |
| 459 | |
| 460 | public function setUmsatz(?string $umsatz): self |
| 461 | { |
| 462 | $this->umsatz = $umsatz; |
| 463 | |
| 464 | return $this; |
| 465 | } |
| 466 | |
| 467 | public function getVater(): ?self |
| 468 | { |
| 469 | return $this->vater; |
| 470 | } |
| 471 | |
| 472 | public function setVater(?self $vater): self |
| 473 | { |
| 474 | if ($vater !== $this) { |
| 475 | $this->vater = $vater; // disallow self reference |
| 476 | } |
| 477 | |
| 478 | return $this; |
| 479 | } |
| 480 | |
| 481 | public function removeKinder(self $gruppe): void |
| 482 | { |
| 483 | if (!$this->kinder->contains($gruppe)) { |
| 484 | return; |
| 485 | } |
| 486 | |
| 487 | $this->kinder->removeElement($gruppe); |
| 488 | // needed to update the owning side of the relationship! |
| 489 | $gruppe->setVater(null); |
| 490 | } |
| 491 | |
| 492 | public function setVip(?bool $vip): self |
| 493 | { |
| 494 | $this->vip = $vip; |
| 495 | |
| 496 | return $this; |
| 497 | } |
| 498 | |
| 499 | public function addAdresse(Adresse $adresse): void |
| 500 | { |
| 501 | foreach ($this->adressgruppenAdressen as $adressgruppeAdresse) { |
| 502 | if ($adressgruppeAdresse->getAdresse() === $adresse) { |
| 503 | return; |
| 504 | } |
| 505 | } |
| 506 | $this->addAdressgruppeAdresse(new AdressgruppeAdresse($this, $adresse)); |
| 507 | } |
| 508 | |
| 509 | private function addAdressgruppeAdresse(AdressgruppeAdresse $adressgruppeAdresse): void |
| 510 | { |
| 511 | if ($this->adressgruppenAdressen->contains($adressgruppeAdresse)) { |
| 512 | return; |
| 513 | } |
| 514 | |
| 515 | $this->adressgruppenAdressen->add($adressgruppeAdresse); |
| 516 | $adressgruppeAdresse->getAdresse()?->addAdressgruppeAdresse($adressgruppeAdresse); |
| 517 | } |
| 518 | |
| 519 | public function removeAdresse(Adresse $adresse): void |
| 520 | { |
| 521 | foreach ($this->adressgruppenAdressen as $adressgruppeAdresse) { |
| 522 | if ($adressgruppeAdresse->getAdresse() === $adresse) { |
| 523 | $this->removeAdressgruppeAdresse($adressgruppeAdresse); |
| 524 | |
| 525 | return; |
| 526 | } |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | public function removeAdressgruppeAdresse(AdressgruppeAdresse $adressgruppeAdresse): void |
| 531 | { |
| 532 | $this->adressgruppenAdressen->removeElement($adressgruppeAdresse); |
| 533 | |
| 534 | // update the owning sides |
| 535 | $adressgruppeAdresse->getAdresse()?->removeAdressgruppeAdresse($adressgruppeAdresse); |
| 536 | $adressgruppeAdresse->setAdressgruppe(null); |
| 537 | } |
| 538 | |
| 539 | /** |
| 540 | * @return Collection<int, Adresse> |
| 541 | */ |
| 542 | public function getAdressen(): Collection |
| 543 | { |
| 544 | $adressen = new ArrayCollection(); |
| 545 | foreach ($this->adressgruppenAdressen as $adressgruppeAdresse) { |
| 546 | $adressen->add($adressgruppeAdresse->getAdresse()); |
| 547 | } |
| 548 | |
| 549 | return $adressen; |
| 550 | } |
| 551 | |
| 552 | /** |
| 553 | * @return Collection<int, AdressgruppeAdresse> |
| 554 | */ |
| 555 | public function getAdressgruppenAdressen(): ArrayCollection|Collection |
| 556 | { |
| 557 | return $this->adressgruppenAdressen; |
| 558 | } |
| 559 | } |