fix for the bulk purchase

This commit is contained in:
phyzical 2022-04-11 08:10:58 +08:00
parent 758b0e1127
commit 1718b55c27

@ -257,7 +257,7 @@ export function BulkPurchase(corp: ICorporation, warehouse: Warehouse, material:
if (isNaN(amt) || amt < 0) { if (isNaN(amt) || amt < 0) {
throw new Error(`Invalid input amount`); throw new Error(`Invalid input amount`);
} }
if (amt * matSize <= maxAmount) { if (amt > maxAmount) {
throw new Error(`You do not have enough warehouse size to fit this purchase`); throw new Error(`You do not have enough warehouse size to fit this purchase`);
} }
const cost = amt * material.bCost; const cost = amt * material.bCost;