* Get current stock. * @param baseIdx - index of the base (economy) * @param oppositeIdx - index of the opposite base (economy) * @param currentStock - true for current, false for default (by default) * @return - the stock */
| 898 | * @return - the stock |
| 899 | */ |
| 900 | int TransactionControl::Trade::getStock(const int baseIdx, const int oppositeIdx, |
| 901 | bool currentStock) const |
| 902 | { |
| 903 | return initialStock[baseIdx] - shipmentsFrom(baseIdx, oppositeIdx) - |
| 904 | (currentStock ? getOrder(baseIdx, oppositeIdx) : 0); |
| 905 | } |
| 906 | |
| 907 | /** |
| 908 | * ScrollBar support. Set current value. |