From 6d1cbc8aba7f85b9c42318bb11c6ad105ccb0a0c Mon Sep 17 00:00:00 2001 From: GoldenGnu Date: Sun, 27 Oct 2024 14:50:10 +0100 Subject: [PATCH] Bug Fix: Delivered industry jobs was included in assets and stockpiles (Issue #480) --- .../nikr/eve/jeveasset/data/api/my/MyIndustryJob.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java b/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java index c72dfa2eb..4cf9c3a45 100644 --- a/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java +++ b/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java @@ -288,18 +288,17 @@ public final boolean isDone() { } public final boolean isNotDeliveredToAssets() { - return getStatus() != IndustryJobStatus.ARCHIVED //if ARCHIVED -> unknown if delivered or not -> false + return !isDone() //if not done -> not delivered to assets -> true && (owner.getAssetLastUpdate() == null //if null -> never updated -> not delivered to assets -> true || getCompletedDate() == null //if null -> not completed -> not delivered to assets -> true - || owner.getAssetLastUpdate().before(getCompletedDate() //if assets last updated before completed date -> not delivered to assets -> true - )); + || owner.getAssetLastUpdate().before(getCompletedDate()) //if assets last updated before completed date -> not delivered to assets -> true + ); } public final boolean isRemovedFromAssets() { return owner.getAssetLastUpdate() != null //if null -> never updated -> not removed from assets -> false && getStartDate() != null //if null -> not started -> not removed from assets -> false - && owner.getAssetLastUpdate().after(getStartDate() //if assets last updated after started date -> removed from assets -> true - ); + && owner.getAssetLastUpdate().after(getStartDate()); //if assets last updated after started date -> removed from assets -> true } public final boolean isManufacturing() {