Merge branch 'develop' into fix-so-on-hold

This commit is contained in:
Sagar Sharma 2023-02-14 16:01:43 +05:30 committed by GitHub
commit 447310702e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -175,7 +175,9 @@ def prepare_data(data, so_elapsed_time, filters):
# update existing entry
so_row = sales_order_map[so_name]
so_row["required_date"] = max(getdate(so_row["delivery_date"]), getdate(row["delivery_date"]))
so_row["delay"] = min(so_row["delay"], row["delay"])
so_row["delay"] = (
min(so_row["delay"], row["delay"]) if row["delay"] and so_row["delay"] else so_row["delay"]
)
# sum numeric columns
fields = [