Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
96.15% |
50 / 52 |
|
96.77% |
30 / 31 |
CRAP | |
0.00% |
0 / 1 |
| Artikelbuchung | |
96.15% |
50 / 52 |
|
96.77% |
30 / 31 |
33 | |
0.00% |
0 / 1 |
| getLfdnr | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getAuftrag | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setAuftrag | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getBuchungsart | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setBuchungsart | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getBuchungsdatum | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setBuchungsdatum | |
75.00% |
6 / 8 |
|
0.00% |
0 / 1 |
3.14 | |||
| getBewegung | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setBewegung | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getBestandneu | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setBestandneu | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getBestandlagerneu | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setBestandlagerneu | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getEkVkpreis | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setEkVkpreis | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getBemerkung | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setBemerkung | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getReservierungsbewegung | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setReservierungsbewegung | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getReserviertneu | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setReserviertneu | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getArtikel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setArtikel | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getLagerumbuchung | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setLagerumbuchung | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getLager | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setLager | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getBestellbewegung | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setBestellbewegung | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getBestelltneu | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setBestelltneu | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Satag\AmicronEntityBundle\Entity; |
| 6 | |
| 7 | use Doctrine\DBAL\Types\Types; |
| 8 | use Doctrine\ORM\Mapping as ORM; |
| 9 | use Satag\AmicronEntityBundle\Traits\CreatorEntity; |
| 10 | use Satag\AmicronEntityBundle\Traits\CreatorEntityInterface; |
| 11 | use Symfony\Component\Validator\Constraints as Assert; |
| 12 | |
| 13 | /** |
| 14 | * @see \Satag\AmicronEntityBundle\Tests\Entity\ArtikelbuchungTest |
| 15 | */ |
| 16 | #[ORM\Entity] |
| 17 | #[ORM\HasLifecycleCallbacks] |
| 18 | #[ORM\Table(name: 'ARTBUCH')] |
| 19 | #[ORM\Index(columns: ['artikellfdnr'], name: 'ARTBUCH_ARTIKELLFDNR_FK')] |
| 20 | #[ORM\Index(columns: ['lagerlfdnrumbuchung'], name: 'ARTBUCH_LAGERLFDNRUMBUCHUNG_FK')] |
| 21 | #[ORM\Index(columns: ['lagerlfdnr'], name: 'ARTBUCH_LAGERLFDNR_FK')] |
| 22 | class Artikelbuchung implements CreatorEntityInterface |
| 23 | { |
| 24 | use CreatorEntity; |
| 25 | |
| 26 | /** |
| 27 | * Abgang oder Zugang. |
| 28 | */ |
| 29 | final public const string ART_ABGANG_ZUGANG = 'AZ'; |
| 30 | |
| 31 | /** |
| 32 | * Inventurbuchung. |
| 33 | */ |
| 34 | final public const string ART_INVENTURBUCHUNG = 'Inv'; |
| 35 | |
| 36 | /** |
| 37 | * Umbuchung zwischen 2 Lagern. |
| 38 | */ |
| 39 | final public const string ART_UMBUCHUNG = 'Umb'; |
| 40 | |
| 41 | /** |
| 42 | * Reservierungsbuchung. |
| 43 | */ |
| 44 | final public const string ART_RESERVIERUNG = 'Res'; |
| 45 | |
| 46 | /** |
| 47 | * Bestellung. |
| 48 | */ |
| 49 | final public const string ART_BESTELLUNG = 'Bst'; |
| 50 | |
| 51 | #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)] |
| 52 | #[ORM\Id] |
| 53 | #[ORM\GeneratedValue(strategy: 'SEQUENCE')] |
| 54 | #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)] |
| 55 | public private(set) ?int $lfdnr = null; |
| 56 | |
| 57 | #[ORM\ManyToOne(targetEntity: Auftrag::class)] |
| 58 | #[ORM\JoinColumn(name: 'atrbstlfdnr', referencedColumnName: 'lfdnr', nullable: true)] |
| 59 | private ?Auftrag $auftrag = null; |
| 60 | |
| 61 | #[ORM\Column(name: 'buchungsart', type: Types::STRING, length: 4, nullable: true)] |
| 62 | #[Assert\Choice([null, 'AZ', 'Inv', 'Umb', 'Res', 'Bst'], message: 'Buchungsart is defined by constants ARTIKELBUCHUNG::ART_*')] |
| 63 | private ?string $buchungsart = null; |
| 64 | |
| 65 | #[ORM\Column(name: 'buchungsdatum', type: Types::DATETIME_IMMUTABLE, nullable: true)] |
| 66 | private ?\DateTimeImmutable $buchungsdatum = null; |
| 67 | |
| 68 | #[ORM\Column(name: 'bewegung', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 69 | private ?string $bewegung = null; |
| 70 | |
| 71 | #[ORM\Column(name: 'bestandneu', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 72 | private ?string $bestandneu = null; |
| 73 | |
| 74 | #[ORM\Column(name: 'bestandlagerneu', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 75 | private ?string $bestandlagerneu = null; |
| 76 | |
| 77 | #[ORM\Column(name: 'ekpreis', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 78 | private ?string $ekvkpreis = null; |
| 79 | |
| 80 | #[ORM\Column(name: 'bemerkung', type: Types::STRING, length: 70, nullable: true)] |
| 81 | private ?string $bemerkung = null; |
| 82 | |
| 83 | #[ORM\Column(name: 'reservierungsbewegung', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 84 | private ?string $reservierungsbewegung = null; |
| 85 | |
| 86 | #[ORM\Column(name: 'reserviertneu', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 87 | private ?string $reserviertneu = null; |
| 88 | |
| 89 | #[ORM\Column(name: 'bestellbewegung', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 90 | private ?string $bestellbewegung = null; |
| 91 | |
| 92 | #[ORM\Column(name: 'bestelltneu', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 93 | private ?string $bestelltneu = null; |
| 94 | |
| 95 | #[ORM\ManyToOne(targetEntity: Artikel::class)] |
| 96 | #[ORM\JoinColumn(name: 'artikellfdnr', referencedColumnName: 'lfdnr')] |
| 97 | private ?Artikel $artikel = null; |
| 98 | |
| 99 | #[ORM\ManyToOne(targetEntity: Lager::class)] |
| 100 | #[ORM\JoinColumn(name: 'lagerlfdnrumbuchung', referencedColumnName: 'lfdnr')] |
| 101 | private ?Lager $lagerumbuchung = null; |
| 102 | |
| 103 | #[ORM\ManyToOne(targetEntity: Lager::class)] |
| 104 | #[ORM\JoinColumn(name: 'lagerlfdnr', referencedColumnName: 'lfdnr')] |
| 105 | private ?Lager $lager = null; |
| 106 | |
| 107 | public function getLfdnr(): ?int |
| 108 | { |
| 109 | return $this->lfdnr; |
| 110 | } |
| 111 | |
| 112 | public function getAuftrag(): ?Auftrag |
| 113 | { |
| 114 | return $this->auftrag; |
| 115 | } |
| 116 | |
| 117 | public function setAuftrag(?Auftrag $auftrag): self |
| 118 | { |
| 119 | $this->auftrag = $auftrag; |
| 120 | |
| 121 | return $this; |
| 122 | } |
| 123 | |
| 124 | public function getBuchungsart(): ?string |
| 125 | { |
| 126 | return $this->buchungsart; |
| 127 | } |
| 128 | |
| 129 | public function setBuchungsart(?string $buchungsart): self |
| 130 | { |
| 131 | $this->buchungsart = $buchungsart; |
| 132 | |
| 133 | return $this; |
| 134 | } |
| 135 | |
| 136 | public function getBuchungsdatum(): ?\DateTimeImmutable |
| 137 | { |
| 138 | return $this->buchungsdatum; |
| 139 | } |
| 140 | |
| 141 | public function setBuchungsdatum(\DateTimeImmutable|\DateTime|null $buchungsdatum): self |
| 142 | { |
| 143 | if ($buchungsdatum !== null) { |
| 144 | $mutable = $buchungsdatum instanceof \DateTimeImmutable |
| 145 | ? \DateTime::createFromImmutable($buchungsdatum) |
| 146 | : $buchungsdatum; |
| 147 | $mutable->setTime(0, 0, 0, 0); |
| 148 | $this->buchungsdatum = \DateTimeImmutable::createFromMutable($mutable); |
| 149 | } else { |
| 150 | $this->buchungsdatum = null; |
| 151 | } |
| 152 | |
| 153 | return $this; |
| 154 | } |
| 155 | |
| 156 | public function getBewegung(): ?string |
| 157 | { |
| 158 | return $this->bewegung; |
| 159 | } |
| 160 | |
| 161 | public function setBewegung(?string $bewegung): self |
| 162 | { |
| 163 | $this->bewegung = $bewegung; |
| 164 | |
| 165 | return $this; |
| 166 | } |
| 167 | |
| 168 | public function getBestandneu(): ?string |
| 169 | { |
| 170 | return $this->bestandneu; |
| 171 | } |
| 172 | |
| 173 | public function setBestandneu(?string $bestandneu): self |
| 174 | { |
| 175 | $this->bestandneu = $bestandneu; |
| 176 | |
| 177 | return $this; |
| 178 | } |
| 179 | |
| 180 | public function getBestandlagerneu(): ?string |
| 181 | { |
| 182 | return $this->bestandlagerneu; |
| 183 | } |
| 184 | |
| 185 | public function setBestandlagerneu(?string $bestandlagerneu): self |
| 186 | { |
| 187 | $this->bestandlagerneu = $bestandlagerneu; |
| 188 | |
| 189 | return $this; |
| 190 | } |
| 191 | |
| 192 | public function getEkVkpreis(): ?string |
| 193 | { |
| 194 | return $this->ekvkpreis; |
| 195 | } |
| 196 | |
| 197 | public function setEkVkpreis(?string $ekvkpreis): self |
| 198 | { |
| 199 | $this->ekvkpreis = $ekvkpreis; |
| 200 | |
| 201 | return $this; |
| 202 | } |
| 203 | |
| 204 | public function getBemerkung(): ?string |
| 205 | { |
| 206 | return $this->bemerkung; |
| 207 | } |
| 208 | |
| 209 | public function setBemerkung(?string $bemerkung): self |
| 210 | { |
| 211 | $this->bemerkung = $bemerkung; |
| 212 | |
| 213 | return $this; |
| 214 | } |
| 215 | |
| 216 | public function getReservierungsbewegung(): ?string |
| 217 | { |
| 218 | return $this->reservierungsbewegung; |
| 219 | } |
| 220 | |
| 221 | public function setReservierungsbewegung(?string $reservierungsbewegung): self |
| 222 | { |
| 223 | $this->reservierungsbewegung = $reservierungsbewegung; |
| 224 | |
| 225 | return $this; |
| 226 | } |
| 227 | |
| 228 | public function getReserviertneu(): ?string |
| 229 | { |
| 230 | return $this->reserviertneu; |
| 231 | } |
| 232 | |
| 233 | public function setReserviertneu(?string $reserviertneu): self |
| 234 | { |
| 235 | $this->reserviertneu = $reserviertneu; |
| 236 | |
| 237 | return $this; |
| 238 | } |
| 239 | |
| 240 | public function getArtikel(): ?Artikel |
| 241 | { |
| 242 | return $this->artikel; |
| 243 | } |
| 244 | |
| 245 | public function setArtikel(?Artikel $artikel): self |
| 246 | { |
| 247 | $this->artikel = $artikel; |
| 248 | |
| 249 | return $this; |
| 250 | } |
| 251 | |
| 252 | public function getLagerumbuchung(): ?Lager |
| 253 | { |
| 254 | return $this->lagerumbuchung; |
| 255 | } |
| 256 | |
| 257 | public function setLagerumbuchung(?Lager $lagerumbuchung): self |
| 258 | { |
| 259 | $this->lagerumbuchung = $lagerumbuchung; |
| 260 | |
| 261 | return $this; |
| 262 | } |
| 263 | |
| 264 | public function getLager(): ?Lager |
| 265 | { |
| 266 | return $this->lager; |
| 267 | } |
| 268 | |
| 269 | public function setLager(?Lager $lager): self |
| 270 | { |
| 271 | $this->lager = $lager; |
| 272 | |
| 273 | return $this; |
| 274 | } |
| 275 | |
| 276 | public function getBestellbewegung(): ?string |
| 277 | { |
| 278 | return $this->bestellbewegung; |
| 279 | } |
| 280 | |
| 281 | public function setBestellbewegung(?string $bestellbewegung): self |
| 282 | { |
| 283 | $this->bestellbewegung = $bestellbewegung; |
| 284 | |
| 285 | return $this; |
| 286 | } |
| 287 | |
| 288 | public function getBestelltneu(): ?string |
| 289 | { |
| 290 | return $this->bestelltneu; |
| 291 | } |
| 292 | |
| 293 | public function setBestelltneu(?string $bestelltneu): self |
| 294 | { |
| 295 | $this->bestelltneu = $bestelltneu; |
| 296 | |
| 297 | return $this; |
| 298 | } |
| 299 | } |