if ($po->can_send) { # po can be sent } # later if ($po->can_cancel) { # po can be cancelled }