fix the amt issue for modal also

This commit is contained in:
phyzical
2022-04-02 20:17:30 +08:00
parent a8689cb28b
commit 10fafd39f3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -260,7 +260,7 @@ export function BulkPurchase(corp: ICorporation, warehouse: Warehouse, material:
if (isNaN(amt) || amt < 0) {
throw new Error(`Invalid input amount`);
}
if (amt >= maxAmount) {
if (amt > maxAmount) {
throw new Error(`You do not have enough warehouse size to fit this purchase`);
}
const cost = amt * material.bCost;