Skip to content

Commit

Permalink
fix ordernumber
Browse files Browse the repository at this point in the history
  • Loading branch information
Mads Møller committed Apr 5, 2019
1 parent e8f0efe commit b7549e4
Showing 1 changed file with 28 additions and 4 deletions.
32 changes: 28 additions & 4 deletions src/Generator/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,26 +185,50 @@ public function getOrderNumber()
* @return Orders
* @throws EdifactException
*/
public function setOrderNumber($orderNumber, $documentType = '120')
public function setOrderNumber($orderNumber, $documentType = '220')
{
$this->isAllowed($documentType, [
'120',
'126',
'220',
'221',
'224',
'225',
'226',
'227',
'228',
'126',
'248',
'258',
'348',
'350',
'400',
'401',
'402',
'447',
'452',
'YA8',
'YS8',
'YK8',
'248',
'447'
'22B',
'22E',
'23E'
]);
$this->orderNumber = ['BGM', $documentType, $orderNumber, '9'];
return $this;
}

/**
* Order number without documentType validation
* @param $orderNumber
* @param string $documentType
* @return $this
*/
public function setCustomOrderNumber($orderNumber, $documentType = '220')
{
$this->orderNumber = ['BGM', $documentType, $orderNumber, '9'];
return $this;
}

/**
* @return array
*/
Expand Down

0 comments on commit b7549e4

Please sign in to comment.