File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ public function setMatchStatus(?string $matchStatus): BaseTransactionLine
126
126
{
127
127
if (
128
128
$ matchStatus !== null &&
129
- $ this ->getLineType () === LineType::VAT () &&
129
+ $ this ->getLineType ()-> equals ( LineType::VAT () ) &&
130
130
$ matchStatus != self ::MATCHSTATUS_NOTMATCHABLE
131
131
) {
132
132
throw Exception::invalidMatchStatusForLineType ($ matchStatus , $ this );
@@ -144,7 +144,7 @@ public function setMatchStatus(?string $matchStatus): BaseTransactionLine
144
144
*/
145
145
public function setMatchLevel (?int $ matchLevel ): BaseTransactionLine
146
146
{
147
- if ($ matchLevel !== null && ! $ this ->getLineType ()->equals (LineType::TOTAL ())) {
147
+ if ($ matchLevel !== null && $ this ->getLineType ()->equals (LineType::VAT ())) {
148
148
throw Exception::invalidFieldForLineType ('matchLevel ' , $ this );
149
149
}
150
150
@@ -160,7 +160,7 @@ public function setMatchLevel(?int $matchLevel): BaseTransactionLine
160
160
*/
161
161
public function setBaseValueOpen (?Money $ baseValueOpen ): BaseTransactionLine
162
162
{
163
- if ($ baseValueOpen !== null && ! $ this ->getLineType ()->equals (LineType::TOTAL ())) {
163
+ if ($ baseValueOpen !== null && $ this ->getLineType ()->equals (LineType::VAT ())) {
164
164
throw Exception::invalidFieldForLineType ('baseValueOpen ' , $ this );
165
165
}
166
166
You can’t perform that action at this time.
0 commit comments