Make sure alt unit is an order unit when using amount per piece
This commit is contained in:
parent
1a7ada9d56
commit
f649b5f953
1 changed files with 3 additions and 2 deletions
|
|
@ -151,7 +151,8 @@ class Article(RawBaseModel):
|
||||||
for unit in self.ArticleUnit:
|
for unit in self.ArticleUnit:
|
||||||
if unit.AltEnhetOrderStd == "1" and not spec_conv:
|
if unit.AltEnhetOrderStd == "1" and not spec_conv:
|
||||||
return unit
|
return unit
|
||||||
elif (spec_conv and (unit.AltEnhetOmrFaktor == spec_conv or
|
elif (spec_conv and unit.AltEnhetOrder == "1" and (
|
||||||
|
unit.AltEnhetOmrFaktor == spec_conv or
|
||||||
unit.ArticleAlternativeUnit.AltEnhetOmrFaktor == spec_conv)):
|
unit.ArticleAlternativeUnit.AltEnhetOmrFaktor == spec_conv)):
|
||||||
return unit
|
return unit
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue