if ($po->status->name eq 'Pending') {
# po can be sent
}
# later
if ($po->status->name eq 'Pending' || $po->status->name eq 'Sent') {
# po can be cancelled
}
####
if ($po->can_send) {
# po can be sent
}
# later
if ($po->can_cancel) {
# po can be cancelled
}