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,8 +151,9 @@ class Article(RawBaseModel):
|
|||
for unit in self.ArticleUnit:
|
||||
if unit.AltEnhetOrderStd == "1" and not spec_conv:
|
||||
return unit
|
||||
elif (spec_conv and (unit.AltEnhetOmrFaktor == spec_conv or
|
||||
unit.ArticleAlternativeUnit.AltEnhetOmrFaktor == spec_conv)):
|
||||
elif (spec_conv and unit.AltEnhetOrder == "1" and (
|
||||
unit.AltEnhetOmrFaktor == spec_conv or
|
||||
unit.ArticleAlternativeUnit.AltEnhetOmrFaktor == spec_conv)):
|
||||
return unit
|
||||
|
||||
def get_unit_conv(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue