Skip to content

Commit 8218c2e

Browse files
authored
Merge pull request #226 from RobinGeuze/detailCanBeMatchable
Allow matchable statusses other than notmatchable for the detail line
2 parents 34daa95 + 6c6a336 commit 8218c2e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/SalesTransactionLine.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ public function setValue(Money $value): BaseTransactionLine
115115
}
116116

117117
/**
118-
* Payment status of the sales transaction. If line type detail or vat always notmatchable. Read-only attribute.
118+
* Payment status of the sales transaction. If line type detail or vat always notmatchable, according to the documentation.
119+
* However, in practice this appears to be untrue for detail, see issue #177. Read-only attribute.
119120
*
120121
* @param string|null $matchStatus
121122
* @return $this
@@ -125,7 +126,7 @@ public function setMatchStatus(?string $matchStatus): BaseTransactionLine
125126
{
126127
if (
127128
$matchStatus !== null &&
128-
in_array($this->getLineType(), [LineType::DETAIL(), LineType::VAT()]) &&
129+
$this->getLineType() === LineType::VAT() &&
129130
$matchStatus != self::MATCHSTATUS_NOTMATCHABLE
130131
) {
131132
throw Exception::invalidMatchStatusForLineType($matchStatus, $this);

0 commit comments

Comments
 (0)