Bug fixes

This commit is contained in:
Oliver Walters 2021-04-20 15:49:16 +10:00
parent 5a44a50f3b
commit 715d912137
2 changed files with 2 additions and 2 deletions

View File

@ -745,7 +745,7 @@ class Build(MPTTModel):
raise ValidationError(_("Build output does not match Build Order"))
# Unallocate all build items against the output
self.unallocateStock(output)
self.unallocateOutput(output)
# Remove the build output from the database
output.delete()

View File

@ -212,7 +212,7 @@ class BuildOutputCreate(AjaxUpdateView):
# Calculate the required quantity
quantity = max(0, build.remaining - build.incomplete_count)
initials['quantity'] = quantity
initials['output_quantity'] = quantity
return initials