making sure the bin uses the correct data when using libracart as an inventory control

This commit is contained in:
csawatzky 2025-08-12 16:20:04 -06:00
parent e5300b19f4
commit 3e6185be8f
8 changed files with 115 additions and 69 deletions

View file

@ -126,8 +126,11 @@ export class Bin {
}
public bushels(): number {
console.log(this)
let control = this.settings.inventory?.inventoryControl;
let bushels = this.settings.inventory?.grainBushels || 0
if (this.settings.inventory?.inventoryControl === pond.BinInventoryControl.BIN_INVENTORY_CONTROL_AUTOMATIC_LIDAR){
if (control === pond.BinInventoryControl.BIN_INVENTORY_CONTROL_AUTOMATIC_LIDAR ||
control === pond.BinInventoryControl.BIN_INVENTORY_CONTROL_LIBRACART){
bushels = this.status.grainBushels
}
return bushels