@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | public function getIDString(): string |
| 117 | 117 | { |
| 118 | - return 'PL' . $this->getID(); |
|
| 118 | + return 'PL'.$this->getID(); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | |
| 269 | 269 | public function setAmount(float $new_amount): PartLot |
| 270 | 270 | { |
| 271 | - $this->amount = $new_amount; |
|
| 271 | + $this->amount = $new_amount; |
|
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | */ |
| 275 | 275 | public function getIDString(): string |
| 276 | 276 | { |
| 277 | - return 'P' . sprintf('%06d', $this->getID()); |
|
| 277 | + return 'P'.sprintf('%06d', $this->getID()); |
|
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | /********************************************************************************* |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | { |
| 702 | 702 | //TODO: Find a method to do this natively in SQL, the current method could be a bit slow |
| 703 | 703 | $sum = 0; |
| 704 | - foreach($this->getPartLots() as $lot) { |
|
| 704 | + foreach ($this->getPartLots() as $lot) { |
|
| 705 | 705 | //Dont use the instock value, if it is unkown |
| 706 | 706 | if ($lot->isInstockUnknown()) { |
| 707 | 707 | continue; |
@@ -710,7 +710,7 @@ discard block |
||
| 710 | 710 | $sum += $lot->getAmount(); |
| 711 | 711 | } |
| 712 | 712 | |
| 713 | - if(!$this->useFloatAmount()) { |
|
| 713 | + if (!$this->useFloatAmount()) { |
|
| 714 | 714 | return $sum; |
| 715 | 715 | } |
| 716 | 716 | |
@@ -30,15 +30,15 @@ |
||
| 30 | 30 | |
| 31 | 31 | /** Migrate the part locations for parts with known instock */ |
| 32 | 32 | $this->addSql( |
| 33 | - 'INSERT INTO part_lots (id_part, id_store_location, amount, instock_unknown, last_modified, datetime_added) ' . |
|
| 34 | - 'SELECT parts.id, parts.id_storelocation, parts.instock, 0, NOW(), NOW() FROM parts ' . |
|
| 33 | + 'INSERT INTO part_lots (id_part, id_store_location, amount, instock_unknown, last_modified, datetime_added) '. |
|
| 34 | + 'SELECT parts.id, parts.id_storelocation, parts.instock, 0, NOW(), NOW() FROM parts '. |
|
| 35 | 35 | 'WHERE parts.instock >= 0 AND parts.id_storelocation IS NOT NULL' |
| 36 | 36 | ); |
| 37 | 37 | |
| 38 | 38 | //Migrate part locations for parts with unknown instock |
| 39 | 39 | $this->addSql( |
| 40 | - 'INSERT INTO part_lots (id_part, id_store_location, amount, instock_unknown, last_modified, datetime_added) ' . |
|
| 41 | - 'SELECT parts.id, parts.id_storelocation, 0, 1, NOW(), NOW() FROM parts ' . |
|
| 40 | + 'INSERT INTO part_lots (id_part, id_store_location, amount, instock_unknown, last_modified, datetime_added) '. |
|
| 41 | + 'SELECT parts.id, parts.id_storelocation, 0, 1, NOW(), NOW() FROM parts '. |
|
| 42 | 42 | 'WHERE parts.instock = -2 AND parts.id_storelocation IS NOT NULL' |
| 43 | 43 | ); |
| 44 | 44 | |