Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 207 |
|
0.00% |
0 / 115 |
CRAP | |
0.00% |
0 / 1 |
| Auftragsposition | |
0.00% |
0 / 207 |
|
0.00% |
0 / 115 |
16512 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| __toString | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
| getLfdnr | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getArtikelnr | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
| setArtikelnr | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
| getBezeichnung | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setBezeichnung | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| addKind | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| addSeriennummer | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
12 | |||
| getAuftragspositionenSeriennummern | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| addAuftragspositionSeriennummer | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
6 | |||
| getAbschlagposart | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAbschlagposart | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getArt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setArt | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getArtikel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setArtikel | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getArtikelart | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setArtikelart | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getAuftrag | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAuftrag | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getAuftragspositionrueckstand | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAuftragspositionrueckstand | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getEan | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setEan | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getEkpreis | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setEkpreis | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getEpreis | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setEpreis | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getErtrag | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setErtrag | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getErtragskto | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setErtragskto | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getFortgefuehrtid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFortgefuehrtid | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getFreifeld1 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFreifeld1 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getFreifeld2 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFreifeld2 | |
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 | |||
| getGewichtprostueck | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setGewichtprostueck | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getGpreis | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setGpreis | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getGpreisnetto | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setGpreisnetto | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getJahr | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setJahr | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getKinder | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getLager | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setLager | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getLieferantartikelnr | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setLieferantartikelnr | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getLiefertermin | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setLiefertermin | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| getMenge | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setMenge | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getMengeneinheit | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setMengeneinheit | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getMonat | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setMonat | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getPos | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPos | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getPosdruck | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPosdruck | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getPositionanzeigen | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPositionanzeigen | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getPositionbuchen | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPositionbuchen | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getPreisanzeigen | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPreisanzeigen | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getPreiseinheit | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPreiseinheit | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getProvision | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setProvision | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getProvisionsbetrag | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setProvisionsbetrag | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getQuartal | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setQuartal | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getRabatt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRabatt | |
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 | |||
| getRetourartikel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setRetourartikel | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getSeriennranzahl | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setSeriennranzahl | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getSeriennummern | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| getSteuersatz | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setSteuersatz | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getStuecklistemenge | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setStuecklistemenge | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getText | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setText | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getVater | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setVater | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| getWoche | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setWoche | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| isGebucht | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isPositionanzeigen | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isPositionbuchen | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isPreisanzeigen | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isReserviert | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isSeriennraktiv | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isSkontierbar | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| removeKind | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| removeSeriennummer | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
12 | |||
| removeAuftragspositionSeriennummer | |
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
6 | |||
| setGebucht | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setReserviert | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setSeriennraktiv | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setSkontierbar | |
0.00% |
0 / 2 |
|
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\SteuersatzEntity; |
| 15 | use Symfony\Component\Validator\Constraints as Assert; |
| 16 | |
| 17 | /** |
| 18 | * @see \Satag\AmicronEntityBundle\Tests\Entity\AuftragspositionTest |
| 19 | */ |
| 20 | #[ORM\Entity] |
| 21 | #[ORM\HasLifecycleCallbacks] |
| 22 | #[ORM\Table(name: 'ATRPOS')] |
| 23 | #[ORM\Index(columns: ['fortgefuehrtid'], name: 'ATRPOS_FORTGEFUEHRTID_IDX')] |
| 24 | #[ORM\Index(columns: ['woche', 'jahr', 'monat'], name: 'IDX_ARTPOS_DAT')] |
| 25 | #[ORM\Index(columns: ['pos'], name: 'IDX_ATRPOS_POS')] |
| 26 | #[ORM\Index(columns: ['artikellfdnr'], name: 'ATRPOS_ARTIKELLFDNR_FK')] |
| 27 | #[ORM\Index(columns: ['atrposrueckstandlfdnr'], name: 'ATRPOS_ATRPOSRUECKSTANDLFDNR_FK')] |
| 28 | #[ORM\Index(columns: ['auftraglfdnr'], name: 'ATRPOS_AUFTRAGLFDNR_FK')] |
| 29 | #[ORM\Index(columns: ['lagerlfdnr'], name: 'ATRPOS_LAGERLFDNR_FK')] |
| 30 | #[ORM\Index(columns: ['retourartikellfdnr'], name: 'ATRPOS_RETOURARTIKELLFDNR_FK')] |
| 31 | class Auftragsposition implements BlameableEntityInterface, \Stringable |
| 32 | { |
| 33 | use BlameableEntity; |
| 34 | use DecimalEntity; |
| 35 | use SteuersatzEntity; |
| 36 | |
| 37 | final public const string ART_ALTERNATIVPOSITON = 'AP'; |
| 38 | final public const string ART_BEMERKUNG = 'Bem'; |
| 39 | final public const string ART_ENDRABATT = 'ER'; |
| 40 | final public const string ART_POSITION = 'Pos'; |
| 41 | final public const string ART_TEXT = 'Text'; |
| 42 | final public const string ART_ZWISCHENSUMME = 'ZB'; |
| 43 | final public const string ART_ZWISCHENSUMME_BEREICH = 'ZSB'; |
| 44 | |
| 45 | #[ORM\Column(name: 'abschlagposart', type: Types::INTEGER, nullable: true)] |
| 46 | private ?int $abschlagposart = null; |
| 47 | |
| 48 | #[ORM\Column(name: 'art', type: Types::STRING, length: 4, nullable: true)] |
| 49 | #[Assert\Choice([null, 'AP', 'Bem', 'Pos', 'Text', 'ZS', 'ZSB', 'ER'], message: 'User one auf Auftragspostion::POS_* Constants')] |
| 50 | private ?string $art = null; |
| 51 | |
| 52 | #[ORM\ManyToOne(targetEntity: Artikel::class)] |
| 53 | #[ORM\JoinColumn(name: 'artikellfdnr', referencedColumnName: 'lfdnr')] |
| 54 | private ?Artikel $artikel = null; |
| 55 | |
| 56 | #[ORM\Column(name: 'artikelart', type: Types::STRING, length: 1, nullable: true)] |
| 57 | #[Assert\Choice([null, 'M', 'L', 'S', 'G'], message: 'Artikel Art is defined by constants in => ARTIKEL::ART_*')] |
| 58 | private ?string $artikelart = null; |
| 59 | |
| 60 | #[ORM\Column(name: 'artikelnr', type: Types::STRING, length: 20, nullable: true)] |
| 61 | private ?string $artikelnr = null; |
| 62 | |
| 63 | #[ORM\ManyToOne(targetEntity: Auftrag::class, cascade: ['persist'], inversedBy: 'auftragspositionen')] |
| 64 | #[Assert\Valid] |
| 65 | #[ORM\JoinColumn(name: 'auftraglfdnr', referencedColumnName: 'lfdnr')] |
| 66 | private ?Auftrag $auftrag = null; |
| 67 | |
| 68 | /** |
| 69 | * @var Collection<int, AuftragspositionSeriennummer> |
| 70 | */ |
| 71 | #[ORM\OneToMany(mappedBy: 'auftragsposition', targetEntity: AuftragspositionSeriennummer::class, cascade: ['persist'], orphanRemoval: true)] |
| 72 | private Collection $auftragspositionen_seriennummern; |
| 73 | |
| 74 | #[ORM\ManyToOne(targetEntity: Auftragspositionrueckstand::class, cascade: ['persist'])] |
| 75 | #[ORM\JoinColumn(name: 'atrposrueckstandlfdnr', referencedColumnName: 'lfdnr')] |
| 76 | private ?Auftragspositionrueckstand $auftragspositionrueckstand = null; |
| 77 | |
| 78 | #[ORM\Column(name: 'bezeichnung', type: Types::STRING, length: 80, nullable: true)] |
| 79 | private ?string $bezeichnung = null; |
| 80 | |
| 81 | #[ORM\Column(name: 'ean', type: Types::STRING, length: 30, nullable: true)] |
| 82 | private ?string $ean = null; |
| 83 | |
| 84 | #[ORM\Column(name: 'ekpreis', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 85 | private ?string $ekpreis = null; |
| 86 | |
| 87 | #[ORM\Column(name: 'epreis', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 88 | private ?string $epreis = null; |
| 89 | |
| 90 | #[ORM\Column(name: 'ertrag', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 91 | private ?string $ertrag = null; |
| 92 | |
| 93 | #[ORM\Column(name: 'ertragskto', type: Types::STRING, length: 6, nullable: true)] |
| 94 | private ?string $ertragskto = null; |
| 95 | |
| 96 | #[ORM\Column(name: 'fortgefuehrtid', type: Types::INTEGER, nullable: true)] |
| 97 | private ?int $fortgefuehrtid = null; |
| 98 | |
| 99 | #[ORM\Column(name: 'freifeld1', type: Types::STRING, length: 255, nullable: true)] |
| 100 | private ?string $freifeld1 = null; |
| 101 | |
| 102 | #[ORM\Column(name: 'freifeld2', type: Types::STRING, length: 255, nullable: true)] |
| 103 | private ?string $freifeld2 = null; |
| 104 | |
| 105 | #[ORM\Column(name: 'freifeld3', type: Types::STRING, length: 255, nullable: true)] |
| 106 | private ?string $freifeld3 = null; |
| 107 | |
| 108 | #[ORM\Column(name: 'freifeld4', type: Types::STRING, length: 255, nullable: true)] |
| 109 | private ?string $freifeld4 = null; |
| 110 | |
| 111 | #[ORM\Column(name: 'artgebucht', type: Types::BOOLEAN, length: 1, nullable: true)] |
| 112 | private ?bool $gebucht = null; |
| 113 | |
| 114 | #[ORM\Column(name: 'gewichtprostueck', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 115 | private ?string $gewichtprostueck = null; |
| 116 | |
| 117 | #[ORM\Column(name: 'gpreis', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 118 | private ?string $gpreis = null; |
| 119 | |
| 120 | #[ORM\Column(name: 'gpreisnetto', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 121 | private ?string $gpreisnetto = null; |
| 122 | |
| 123 | #[ORM\Column(name: 'jahr', type: Types::INTEGER, nullable: true)] |
| 124 | private ?int $jahr = null; |
| 125 | |
| 126 | #[ORM\Column(name: 'liefertermin', type: Types::DATETIME_IMMUTABLE, nullable: true)] |
| 127 | private ?\DateTimeImmutable $liefertermin = null; |
| 128 | |
| 129 | /** |
| 130 | * @var Collection<int, Auftragsposition> |
| 131 | */ |
| 132 | #[ORM\OneToMany(mappedBy: 'vater', targetEntity: Auftragsposition::class, cascade: ['persist'], orphanRemoval: true)] |
| 133 | private Collection $kinder; |
| 134 | |
| 135 | #[ORM\ManyToOne(targetEntity: Lager::class, cascade: ['persist'])] |
| 136 | #[ORM\JoinColumn(name: 'lagerlfdnr', referencedColumnName: 'lfdnr')] |
| 137 | private ?Lager $lager = null; |
| 138 | |
| 139 | #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)] |
| 140 | #[ORM\Id] |
| 141 | #[ORM\GeneratedValue(strategy: 'SEQUENCE')] |
| 142 | #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)] |
| 143 | public private(set) ?int $lfdnr = null; |
| 144 | |
| 145 | #[ORM\Column(name: 'lieferantartikelnr', type: Types::STRING, length: 30, nullable: true)] |
| 146 | private ?string $lieferantartikelnr = null; |
| 147 | |
| 148 | #[ORM\Column(name: 'menge', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 149 | private ?string $menge = null; |
| 150 | |
| 151 | #[ORM\Column(name: 'mengeneinheit', type: Types::STRING, length: 8, nullable: true)] |
| 152 | private ?string $mengeneinheit = null; |
| 153 | |
| 154 | #[ORM\Column(name: 'monat', type: Types::INTEGER, nullable: true)] |
| 155 | private ?int $monat = null; |
| 156 | |
| 157 | #[ORM\Column(name: 'pos', type: Types::INTEGER, nullable: false)] |
| 158 | private int $pos = 0; |
| 159 | |
| 160 | #[ORM\Column(name: 'posdruck', type: Types::INTEGER, nullable: true)] |
| 161 | private ?int $posdruck = null; |
| 162 | |
| 163 | #[ORM\Column(name: 'positionanzeigen', type: Types::BOOLEAN, length: 1, nullable: true)] |
| 164 | private ?bool $positionanzeigen = null; |
| 165 | |
| 166 | #[ORM\Column(name: 'positionbuchen', type: Types::BOOLEAN, length: 1, nullable: true)] |
| 167 | private ?bool $positionbuchen = null; |
| 168 | |
| 169 | #[ORM\Column(name: 'preisanzeigen', type: Types::BOOLEAN, length: 1, nullable: true)] |
| 170 | private ?bool $preisanzeigen = null; |
| 171 | |
| 172 | #[ORM\Column(name: 'preiseinheit', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 173 | private ?string $preiseinheit = null; |
| 174 | |
| 175 | #[ORM\Column(name: 'provision', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 176 | private ?string $provision = null; |
| 177 | |
| 178 | #[ORM\Column(name: 'provisionsbetrag', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 179 | private ?string $provisionsbetrag = null; |
| 180 | |
| 181 | #[ORM\Column(name: 'quartal', type: Types::INTEGER, nullable: true)] |
| 182 | private ?int $quartal = null; |
| 183 | |
| 184 | #[ORM\Column(name: 'rabatt', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 185 | private ?string $rabatt = null; |
| 186 | |
| 187 | #[ORM\Column(name: 'rabattgruppe', type: Types::STRING, length: 2, nullable: true)] |
| 188 | private ?string $rabattgruppe = null; |
| 189 | |
| 190 | #[ORM\Column(name: 'artreserviert', type: Types::BOOLEAN, length: 1, nullable: true)] |
| 191 | private ?bool $reserviert = null; |
| 192 | |
| 193 | #[ORM\ManyToOne(targetEntity: Retourartikel::class, cascade: ['persist'])] |
| 194 | #[ORM\JoinColumn(name: 'retourartikellfdnr', referencedColumnName: 'lfdnr')] |
| 195 | #[Assert\Valid] |
| 196 | private ?Retourartikel $retourartikel = null; |
| 197 | |
| 198 | #[ORM\Column(name: 'seriennraktiv', type: Types::BOOLEAN, length: 1, nullable: true)] |
| 199 | private ?bool $seriennraktiv = null; |
| 200 | |
| 201 | #[ORM\Column(name: 'seriennranz', type: Types::INTEGER, nullable: true)] |
| 202 | private ?int $seriennranzahl = null; |
| 203 | |
| 204 | #[ORM\Column(name: 'skontierbar', type: Types::BOOLEAN, length: 1, nullable: true)] |
| 205 | private ?bool $skontierbar = null; |
| 206 | |
| 207 | #[ORM\Column(name: 'steuersatz', type: Types::STRING, length: 2, nullable: true)] |
| 208 | private ?string $steuersatz = null; |
| 209 | |
| 210 | #[ORM\Column(name: 'stuecklistemenge', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 211 | private ?string $stuecklistemenge = null; |
| 212 | |
| 213 | #[ORM\Column(name: 'text', type: Types::TEXT, nullable: true)] |
| 214 | private ?string $text = null; |
| 215 | |
| 216 | #[ORM\ManyToOne(targetEntity: Auftragsposition::class, cascade: ['persist'], inversedBy: 'kinder')] |
| 217 | #[ORM\JoinColumn(name: 'hauptartatrposlfdnr', referencedColumnName: 'lfdnr')] |
| 218 | private ?Auftragsposition $vater = null; |
| 219 | |
| 220 | #[ORM\Column(name: 'woche', type: Types::INTEGER, nullable: true)] |
| 221 | private ?int $woche = null; |
| 222 | |
| 223 | public function __construct( |
| 224 | ) { |
| 225 | $this->kinder = new ArrayCollection(); |
| 226 | $this->auftragspositionen_seriennummern = new ArrayCollection(); |
| 227 | } |
| 228 | |
| 229 | public function __toString(): string |
| 230 | { |
| 231 | return \sprintf( |
| 232 | '\\\\apos:%s (%s %s)', |
| 233 | $this->lfdnr, |
| 234 | $this->getArtikelnr(), |
| 235 | $this->getBezeichnung() |
| 236 | ); |
| 237 | } |
| 238 | |
| 239 | public function getLfdnr(): ?int |
| 240 | { |
| 241 | return $this->lfdnr; |
| 242 | } |
| 243 | |
| 244 | public function getArtikelnr(): ?string |
| 245 | { |
| 246 | if ($this->artikelnr) { |
| 247 | return trim($this->artikelnr); |
| 248 | } |
| 249 | |
| 250 | return $this->artikelnr; |
| 251 | } |
| 252 | |
| 253 | /** |
| 254 | * @return $this |
| 255 | */ |
| 256 | public function setArtikelnr(?string $artikelnr): self |
| 257 | { |
| 258 | $this->artikelnr = $artikelnr === null ? null : Artikel::padArtikelnr($artikelnr); |
| 259 | |
| 260 | return $this; |
| 261 | } |
| 262 | |
| 263 | public function getBezeichnung(): ?string |
| 264 | { |
| 265 | return $this->bezeichnung; |
| 266 | } |
| 267 | |
| 268 | public function setBezeichnung(?string $bezeichnung): self |
| 269 | { |
| 270 | $this->bezeichnung = $bezeichnung; |
| 271 | |
| 272 | return $this; |
| 273 | } |
| 274 | |
| 275 | public function addKind(self $kind): void |
| 276 | { |
| 277 | if ($this->kinder->contains($kind)) { |
| 278 | return; |
| 279 | } |
| 280 | $this->kinder->add($kind); |
| 281 | $kind->setVater($this); |
| 282 | } |
| 283 | |
| 284 | public function addSeriennummer(Seriennummer $seriennummer): void |
| 285 | { |
| 286 | foreach ($this->getAuftragspositionenSeriennummern() as $auftragspositionSeriennummer) { |
| 287 | if ($auftragspositionSeriennummer->getSeriennummer() === $seriennummer) { |
| 288 | return; |
| 289 | } |
| 290 | } |
| 291 | $auftragspositionSeriennummer = new AuftragspositionSeriennummer(); |
| 292 | $auftragspositionSeriennummer->setAuftragsposition($this); |
| 293 | $auftragspositionSeriennummer->setSeriennummer($seriennummer); |
| 294 | $this->addAuftragspositionSeriennummer($auftragspositionSeriennummer); |
| 295 | } |
| 296 | |
| 297 | /** |
| 298 | * @return Collection<int, AuftragspositionSeriennummer> |
| 299 | */ |
| 300 | public function getAuftragspositionenSeriennummern(): ArrayCollection|Collection |
| 301 | { |
| 302 | return $this->auftragspositionen_seriennummern; |
| 303 | } |
| 304 | |
| 305 | public function addAuftragspositionSeriennummer(AuftragspositionSeriennummer $auftragspositionSeriennummer): void |
| 306 | { |
| 307 | if ($this->auftragspositionen_seriennummern->contains($auftragspositionSeriennummer)) { |
| 308 | return; |
| 309 | } |
| 310 | |
| 311 | $this->auftragspositionen_seriennummern[] = $auftragspositionSeriennummer; |
| 312 | $auftragspositionSeriennummer->setAuftragsposition($this); |
| 313 | $auftragspositionSeriennummer->getSeriennummer()?->addAuftragspositionSeriennummer( |
| 314 | $auftragspositionSeriennummer |
| 315 | ); |
| 316 | } |
| 317 | |
| 318 | public function getAbschlagposart(): ?int |
| 319 | { |
| 320 | return $this->abschlagposart; |
| 321 | } |
| 322 | |
| 323 | public function setAbschlagposart(?int $abschlagposart): self |
| 324 | { |
| 325 | $this->abschlagposart = $abschlagposart; |
| 326 | |
| 327 | return $this; |
| 328 | } |
| 329 | |
| 330 | public function getArt(): ?string |
| 331 | { |
| 332 | return $this->art; |
| 333 | } |
| 334 | |
| 335 | /** |
| 336 | * Must be either AP for Alternativposition, Bem for Bemerkunh, Pos for Auftragspositon, Text, ZS for Zwischenumme or ZSB for Zwischensumme Bereich. |
| 337 | * |
| 338 | * @param $art string|null |
| 339 | * |
| 340 | * @return $this |
| 341 | */ |
| 342 | public function setArt(?string $art): self |
| 343 | { |
| 344 | $this->art = $art; |
| 345 | |
| 346 | return $this; |
| 347 | } |
| 348 | |
| 349 | public function getArtikel(): ?Artikel |
| 350 | { |
| 351 | return $this->artikel; |
| 352 | } |
| 353 | |
| 354 | public function setArtikel(?Artikel $artikel): self |
| 355 | { |
| 356 | $this->artikel = $artikel; |
| 357 | |
| 358 | return $this; |
| 359 | } |
| 360 | |
| 361 | public function getArtikelart(): ?string |
| 362 | { |
| 363 | return $this->artikelart; |
| 364 | } |
| 365 | |
| 366 | public function setArtikelart(?string $artikelart): self |
| 367 | { |
| 368 | $this->artikelart = $artikelart; |
| 369 | |
| 370 | return $this; |
| 371 | } |
| 372 | |
| 373 | public function getAuftrag(): ?Auftrag |
| 374 | { |
| 375 | return $this->auftrag; |
| 376 | } |
| 377 | |
| 378 | public function setAuftrag(?Auftrag $auftrag): self |
| 379 | { |
| 380 | $this->auftrag = $auftrag; |
| 381 | |
| 382 | return $this; |
| 383 | } |
| 384 | |
| 385 | public function getAuftragspositionrueckstand(): ?Auftragspositionrueckstand |
| 386 | { |
| 387 | return $this->auftragspositionrueckstand; |
| 388 | } |
| 389 | |
| 390 | public function setAuftragspositionrueckstand(?Auftragspositionrueckstand $auftragspositionrueckstand): self |
| 391 | { |
| 392 | $this->auftragspositionrueckstand = $auftragspositionrueckstand; |
| 393 | |
| 394 | return $this; |
| 395 | } |
| 396 | |
| 397 | public function getEan(): ?string |
| 398 | { |
| 399 | return $this->ean; |
| 400 | } |
| 401 | |
| 402 | public function setEan(?string $ean): self |
| 403 | { |
| 404 | $this->ean = $ean; |
| 405 | |
| 406 | return $this; |
| 407 | } |
| 408 | |
| 409 | public function getEkpreis(): ?string |
| 410 | { |
| 411 | return $this->ekpreis; |
| 412 | } |
| 413 | |
| 414 | public function setEkpreis(?string $ekpreis): self |
| 415 | { |
| 416 | $this->ekpreis = $ekpreis; |
| 417 | |
| 418 | return $this; |
| 419 | } |
| 420 | |
| 421 | public function getEpreis(): ?string |
| 422 | { |
| 423 | return $this->epreis; |
| 424 | } |
| 425 | |
| 426 | public function setEpreis(?string $epreis): self |
| 427 | { |
| 428 | $this->epreis = $epreis; |
| 429 | |
| 430 | return $this; |
| 431 | } |
| 432 | |
| 433 | public function getErtrag(): ?string |
| 434 | { |
| 435 | return $this->ertrag; |
| 436 | } |
| 437 | |
| 438 | public function setErtrag(?string $ertrag): self |
| 439 | { |
| 440 | $this->ertrag = $ertrag; |
| 441 | |
| 442 | return $this; |
| 443 | } |
| 444 | |
| 445 | public function getErtragskto(): ?string |
| 446 | { |
| 447 | return $this->ertragskto; |
| 448 | } |
| 449 | |
| 450 | public function setErtragskto(?string $ertragskto): self |
| 451 | { |
| 452 | $this->ertragskto = $ertragskto; |
| 453 | |
| 454 | return $this; |
| 455 | } |
| 456 | |
| 457 | public function getFortgefuehrtid(): ?int |
| 458 | { |
| 459 | return $this->fortgefuehrtid; |
| 460 | } |
| 461 | |
| 462 | public function setFortgefuehrtid(?int $fortgefuehrtid): self |
| 463 | { |
| 464 | $this->fortgefuehrtid = $fortgefuehrtid; |
| 465 | |
| 466 | return $this; |
| 467 | } |
| 468 | |
| 469 | public function getFreifeld1(): ?string |
| 470 | { |
| 471 | return $this->freifeld1; |
| 472 | } |
| 473 | |
| 474 | public function setFreifeld1(?string $freifeld1): self |
| 475 | { |
| 476 | $this->freifeld1 = $freifeld1; |
| 477 | |
| 478 | return $this; |
| 479 | } |
| 480 | |
| 481 | public function getFreifeld2(): ?string |
| 482 | { |
| 483 | return $this->freifeld2; |
| 484 | } |
| 485 | |
| 486 | public function setFreifeld2(?string $freifeld2): self |
| 487 | { |
| 488 | $this->freifeld2 = $freifeld2; |
| 489 | |
| 490 | return $this; |
| 491 | } |
| 492 | |
| 493 | public function getFreifeld3(): ?string |
| 494 | { |
| 495 | return $this->freifeld3; |
| 496 | } |
| 497 | |
| 498 | public function setFreifeld3(?string $freifeld3): self |
| 499 | { |
| 500 | $this->freifeld3 = $freifeld3; |
| 501 | |
| 502 | return $this; |
| 503 | } |
| 504 | |
| 505 | public function getFreifeld4(): ?string |
| 506 | { |
| 507 | return $this->freifeld4; |
| 508 | } |
| 509 | |
| 510 | public function setFreifeld4(?string $freifeld4): self |
| 511 | { |
| 512 | $this->freifeld4 = $freifeld4; |
| 513 | |
| 514 | return $this; |
| 515 | } |
| 516 | |
| 517 | public function getGewichtprostueck(): ?string |
| 518 | { |
| 519 | return $this->gewichtprostueck; |
| 520 | } |
| 521 | |
| 522 | public function setGewichtprostueck(?string $gewichtprostueck): self |
| 523 | { |
| 524 | $this->gewichtprostueck = $gewichtprostueck; |
| 525 | |
| 526 | return $this; |
| 527 | } |
| 528 | |
| 529 | public function getGpreis(): ?string |
| 530 | { |
| 531 | return $this->gpreis; |
| 532 | } |
| 533 | |
| 534 | public function setGpreis(?string $gpreis): self |
| 535 | { |
| 536 | $this->gpreis = $gpreis; |
| 537 | |
| 538 | return $this; |
| 539 | } |
| 540 | |
| 541 | public function getGpreisnetto(): ?string |
| 542 | { |
| 543 | return $this->gpreisnetto; |
| 544 | } |
| 545 | |
| 546 | public function setGpreisnetto(?string $gpreisnetto): self |
| 547 | { |
| 548 | $this->gpreisnetto = $gpreisnetto; |
| 549 | |
| 550 | return $this; |
| 551 | } |
| 552 | |
| 553 | public function getJahr(): ?int |
| 554 | { |
| 555 | return $this->jahr; |
| 556 | } |
| 557 | |
| 558 | public function setJahr(?int $jahr): self |
| 559 | { |
| 560 | $this->jahr = $jahr; |
| 561 | |
| 562 | return $this; |
| 563 | } |
| 564 | |
| 565 | /** |
| 566 | * @return Collection<int, Auftragsposition> |
| 567 | */ |
| 568 | public function getKinder(): Collection |
| 569 | { |
| 570 | return $this->kinder; |
| 571 | } |
| 572 | |
| 573 | public function getLager(): ?Lager |
| 574 | { |
| 575 | return $this->lager; |
| 576 | } |
| 577 | |
| 578 | public function setLager(?Lager $lager): self |
| 579 | { |
| 580 | $this->lager = $lager; |
| 581 | |
| 582 | return $this; |
| 583 | } |
| 584 | |
| 585 | public function getLieferantartikelnr(): ?string |
| 586 | { |
| 587 | return $this->lieferantartikelnr; |
| 588 | } |
| 589 | |
| 590 | public function setLieferantartikelnr(?string $lieferantartikelnr): self |
| 591 | { |
| 592 | $this->lieferantartikelnr = $lieferantartikelnr; |
| 593 | |
| 594 | return $this; |
| 595 | } |
| 596 | |
| 597 | public function getLiefertermin(): ?\DateTimeImmutable |
| 598 | { |
| 599 | return $this->liefertermin; |
| 600 | } |
| 601 | |
| 602 | public function setLiefertermin(\DateTimeImmutable|\DateTime|null $dateTime): static |
| 603 | { |
| 604 | $this->liefertermin = $dateTime instanceof \DateTime |
| 605 | ? \DateTimeImmutable::createFromMutable($dateTime) |
| 606 | : $dateTime; |
| 607 | |
| 608 | return $this; |
| 609 | } |
| 610 | |
| 611 | public function getMenge(): ?string |
| 612 | { |
| 613 | return $this->menge; |
| 614 | } |
| 615 | |
| 616 | public function setMenge(?string $menge): self |
| 617 | { |
| 618 | $this->menge = $menge; |
| 619 | |
| 620 | return $this; |
| 621 | } |
| 622 | |
| 623 | public function getMengeneinheit(): ?string |
| 624 | { |
| 625 | return $this->mengeneinheit; |
| 626 | } |
| 627 | |
| 628 | public function setMengeneinheit(?string $mengeneinheit): self |
| 629 | { |
| 630 | $this->mengeneinheit = $mengeneinheit; |
| 631 | |
| 632 | return $this; |
| 633 | } |
| 634 | |
| 635 | public function getMonat(): ?int |
| 636 | { |
| 637 | return $this->monat; |
| 638 | } |
| 639 | |
| 640 | public function setMonat(?int $monat): self |
| 641 | { |
| 642 | $this->monat = $monat; |
| 643 | |
| 644 | return $this; |
| 645 | } |
| 646 | |
| 647 | public function getPos(): int |
| 648 | { |
| 649 | return $this->pos; |
| 650 | } |
| 651 | |
| 652 | public function setPos(int $pos): self |
| 653 | { |
| 654 | $this->pos = $pos; |
| 655 | |
| 656 | return $this; |
| 657 | } |
| 658 | |
| 659 | public function getPosdruck(): ?int |
| 660 | { |
| 661 | return $this->posdruck; |
| 662 | } |
| 663 | |
| 664 | public function setPosdruck(?int $posdruck): self |
| 665 | { |
| 666 | $this->posdruck = $posdruck; |
| 667 | |
| 668 | return $this; |
| 669 | } |
| 670 | |
| 671 | public function getPositionanzeigen(): bool |
| 672 | { |
| 673 | return (bool) $this->positionanzeigen; |
| 674 | } |
| 675 | |
| 676 | public function setPositionanzeigen(bool $positionanzeigen): self |
| 677 | { |
| 678 | $this->positionanzeigen = $positionanzeigen; |
| 679 | |
| 680 | return $this; |
| 681 | } |
| 682 | |
| 683 | public function getPositionbuchen(): bool |
| 684 | { |
| 685 | return (bool) $this->positionbuchen; |
| 686 | } |
| 687 | |
| 688 | public function setPositionbuchen(bool $positionbuchen): self |
| 689 | { |
| 690 | $this->positionbuchen = $positionbuchen; |
| 691 | |
| 692 | return $this; |
| 693 | } |
| 694 | |
| 695 | public function getPreisanzeigen(): bool |
| 696 | { |
| 697 | return (bool) $this->preisanzeigen; |
| 698 | } |
| 699 | |
| 700 | public function setPreisanzeigen(bool $preisanzeigen): self |
| 701 | { |
| 702 | $this->preisanzeigen = $preisanzeigen; |
| 703 | |
| 704 | return $this; |
| 705 | } |
| 706 | |
| 707 | public function getPreiseinheit(): ?string |
| 708 | { |
| 709 | return $this->preiseinheit; |
| 710 | } |
| 711 | |
| 712 | public function setPreiseinheit(?string $preiseinheit): self |
| 713 | { |
| 714 | $this->preiseinheit = $preiseinheit; |
| 715 | |
| 716 | return $this; |
| 717 | } |
| 718 | |
| 719 | public function getProvision(): ?string |
| 720 | { |
| 721 | return $this->provision; |
| 722 | } |
| 723 | |
| 724 | public function setProvision(?string $provision): self |
| 725 | { |
| 726 | $this->provision = $provision; |
| 727 | |
| 728 | return $this; |
| 729 | } |
| 730 | |
| 731 | public function getProvisionsbetrag(): ?string |
| 732 | { |
| 733 | return $this->provisionsbetrag; |
| 734 | } |
| 735 | |
| 736 | public function setProvisionsbetrag(?string $provisionsbetrag): self |
| 737 | { |
| 738 | $this->provisionsbetrag = $provisionsbetrag; |
| 739 | |
| 740 | return $this; |
| 741 | } |
| 742 | |
| 743 | public function getQuartal(): ?int |
| 744 | { |
| 745 | return $this->quartal; |
| 746 | } |
| 747 | |
| 748 | public function setQuartal(?int $quartal): self |
| 749 | { |
| 750 | $this->quartal = $quartal; |
| 751 | |
| 752 | return $this; |
| 753 | } |
| 754 | |
| 755 | public function getRabatt(): ?string |
| 756 | { |
| 757 | return $this->rabatt; |
| 758 | } |
| 759 | |
| 760 | public function setRabatt(?string $rabatt): self |
| 761 | { |
| 762 | $this->rabatt = $rabatt; |
| 763 | |
| 764 | return $this; |
| 765 | } |
| 766 | |
| 767 | public function getRabattgruppe(): ?string |
| 768 | { |
| 769 | return $this->rabattgruppe; |
| 770 | } |
| 771 | |
| 772 | public function setRabattgruppe(?string $rabattgruppe): self |
| 773 | { |
| 774 | $this->rabattgruppe = $rabattgruppe; |
| 775 | |
| 776 | return $this; |
| 777 | } |
| 778 | |
| 779 | public function getRetourartikel(): ?Retourartikel |
| 780 | { |
| 781 | return $this->retourartikel; |
| 782 | } |
| 783 | |
| 784 | public function setRetourartikel(?Retourartikel $retourartikel): self |
| 785 | { |
| 786 | $this->retourartikel = $retourartikel; |
| 787 | |
| 788 | return $this; |
| 789 | } |
| 790 | |
| 791 | public function getSeriennranzahl(): ?int |
| 792 | { |
| 793 | return $this->seriennranzahl; |
| 794 | } |
| 795 | |
| 796 | public function setSeriennranzahl(?int $seriennranzahl): self |
| 797 | { |
| 798 | $this->seriennranzahl = $seriennranzahl; |
| 799 | |
| 800 | return $this; |
| 801 | } |
| 802 | |
| 803 | /** |
| 804 | * @return ArrayCollection<int, Seriennummer> |
| 805 | */ |
| 806 | public function getSeriennummern(): ArrayCollection |
| 807 | { |
| 808 | $seriennummern = new ArrayCollection(); |
| 809 | foreach ($this->getAuftragspositionenSeriennummern() as $auftragspositionSeriennummer) { |
| 810 | $seriennummern->add($auftragspositionSeriennummer->getSeriennummer()); |
| 811 | } |
| 812 | |
| 813 | return $seriennummern; |
| 814 | } |
| 815 | |
| 816 | public function getSteuersatz(): ?string |
| 817 | { |
| 818 | return $this->fromSteuerDbValue($this->steuersatz); |
| 819 | } |
| 820 | |
| 821 | /** |
| 822 | * @return $this |
| 823 | */ |
| 824 | public function setSteuersatz(string|int|null $steuersatz): self |
| 825 | { |
| 826 | $this->steuersatz = $this->toSteuerDbValue($steuersatz); |
| 827 | |
| 828 | return $this; |
| 829 | } |
| 830 | |
| 831 | public function getStuecklistemenge(): ?string |
| 832 | { |
| 833 | return $this->stuecklistemenge; |
| 834 | } |
| 835 | |
| 836 | public function setStuecklistemenge(?string $stuecklistemenge): self |
| 837 | { |
| 838 | $this->stuecklistemenge = $stuecklistemenge; |
| 839 | |
| 840 | return $this; |
| 841 | } |
| 842 | |
| 843 | public function getText(): ?string |
| 844 | { |
| 845 | return $this->text; |
| 846 | } |
| 847 | |
| 848 | public function setText(?string $text): self |
| 849 | { |
| 850 | $this->text = $text; |
| 851 | |
| 852 | return $this; |
| 853 | } |
| 854 | |
| 855 | public function getVater(): ?self |
| 856 | { |
| 857 | return $this->vater; |
| 858 | } |
| 859 | |
| 860 | public function setVater(?self $vater): self |
| 861 | { |
| 862 | if ($vater !== $this) { |
| 863 | $this->vater = $vater; // disallow self reference |
| 864 | $vater?->addKind($this); |
| 865 | } |
| 866 | |
| 867 | return $this; |
| 868 | } |
| 869 | |
| 870 | public function getWoche(): ?int |
| 871 | { |
| 872 | return $this->woche; |
| 873 | } |
| 874 | |
| 875 | public function setWoche(?int $woche): self |
| 876 | { |
| 877 | $this->woche = $woche; |
| 878 | |
| 879 | return $this; |
| 880 | } |
| 881 | |
| 882 | public function isGebucht(): bool |
| 883 | { |
| 884 | return (bool) $this->gebucht; |
| 885 | } |
| 886 | |
| 887 | public function isPositionanzeigen(): bool |
| 888 | { |
| 889 | return (bool) $this->positionanzeigen; |
| 890 | } |
| 891 | |
| 892 | public function isPositionbuchen(): bool |
| 893 | { |
| 894 | return (bool) $this->positionbuchen; |
| 895 | } |
| 896 | |
| 897 | public function isPreisanzeigen(): bool |
| 898 | { |
| 899 | return (bool) $this->preisanzeigen; |
| 900 | } |
| 901 | |
| 902 | public function isReserviert(): bool |
| 903 | { |
| 904 | return (bool) $this->reserviert; |
| 905 | } |
| 906 | |
| 907 | public function isSeriennraktiv(): bool |
| 908 | { |
| 909 | return (bool) $this->seriennraktiv; |
| 910 | } |
| 911 | |
| 912 | public function isSkontierbar(): bool |
| 913 | { |
| 914 | return (bool) $this->skontierbar; |
| 915 | } |
| 916 | |
| 917 | public function removeKind(self $kind): void |
| 918 | { |
| 919 | if (!$this->kinder->contains($kind)) { |
| 920 | return; |
| 921 | } |
| 922 | |
| 923 | $this->kinder->removeElement($kind); |
| 924 | $kind->setVater(null); |
| 925 | } |
| 926 | |
| 927 | public function removeSeriennummer(Seriennummer $seriennummer): void |
| 928 | { |
| 929 | foreach ($this->getAuftragspositionenSeriennummern() as $auftragspositionSeriennummer) { |
| 930 | if ($auftragspositionSeriennummer->getSeriennummer() === $seriennummer) { |
| 931 | $this->removeAuftragspositionSeriennummer($auftragspositionSeriennummer); |
| 932 | |
| 933 | return; |
| 934 | } |
| 935 | } |
| 936 | } |
| 937 | |
| 938 | public function removeAuftragspositionSeriennummer(AuftragspositionSeriennummer $auftragspositionSeriennummer): void |
| 939 | { |
| 940 | if (!$this->auftragspositionen_seriennummern->contains($auftragspositionSeriennummer)) { |
| 941 | return; |
| 942 | } |
| 943 | |
| 944 | $this->auftragspositionen_seriennummern->removeElement($auftragspositionSeriennummer); |
| 945 | |
| 946 | // need to update the owning side(s) |
| 947 | $auftragspositionSeriennummer->getSeriennummer()?->removeAuftragspositionSeriennummer( |
| 948 | $auftragspositionSeriennummer |
| 949 | ); |
| 950 | $auftragspositionSeriennummer->setAuftragsposition(null); |
| 951 | } |
| 952 | |
| 953 | public function setGebucht(?bool $gebucht): self |
| 954 | { |
| 955 | $this->gebucht = $gebucht; |
| 956 | |
| 957 | return $this; |
| 958 | } |
| 959 | |
| 960 | public function setReserviert(bool $reserviert): self |
| 961 | { |
| 962 | $this->reserviert = $reserviert; |
| 963 | |
| 964 | return $this; |
| 965 | } |
| 966 | |
| 967 | public function setSeriennraktiv(bool $seriennraktiv): self |
| 968 | { |
| 969 | $this->seriennraktiv = $seriennraktiv; |
| 970 | |
| 971 | return $this; |
| 972 | } |
| 973 | |
| 974 | public function setSkontierbar(?bool $skontierbar): self |
| 975 | { |
| 976 | $this->skontierbar = $skontierbar; |
| 977 | |
| 978 | return $this; |
| 979 | } |
| 980 | } |