Render a schedule rule with the mapped payee id; fixes crash

This commit is contained in:
James Long 2022-10-04 10:23:02 -04:00
parent c9a543310d
commit d98b8c1d73

View file

@ -238,9 +238,9 @@ function ScheduleValue({ value }) {
field="rule"
data={schedules}
describe={s => {
let { payee } = extractScheduleConds(s._conditions);
return payee
? `${byId[payee.value].name} (${s.next_date})`
let payeeId = s._payee;
return payeeId
? `${byId[payeeId].name} (${s.next_date})`
: `Next: ${s.next_date}`;
}}
/>