Set up
This commit is contained in:
@@ -215,9 +215,12 @@ func (d *WorkflowExecution) bookEach(executionsID string, wfID string, dt tools.
|
|||||||
if s := priced.GetLocationStart(); s != nil && s.After(time.Now()) {
|
if s := priced.GetLocationStart(); s != nil && s.After(time.Now()) {
|
||||||
start = *s
|
start = *s
|
||||||
}
|
}
|
||||||
durationS := priced.GetExplicitDurationInS()
|
// Prefer LocationEnd set by Planify; fall back to ExplicitDurationInS only
|
||||||
|
// when Planify did not compute an end (open-ended / service resources).
|
||||||
var endDate *time.Time
|
var endDate *time.Time
|
||||||
if durationS > 0 {
|
if locEnd := priced.GetLocationEnd(); locEnd != nil {
|
||||||
|
endDate = locEnd
|
||||||
|
} else if durationS := priced.GetExplicitDurationInS(); durationS > 0 {
|
||||||
e := start.Add(time.Duration(durationS) * time.Second)
|
e := start.Add(time.Duration(durationS) * time.Second)
|
||||||
endDate = &e
|
endDate = &e
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user