It can be simplified to:
public function canEditQty()
{
return !$this->getInvoice()->getOrder()->getPayment()->canCapture()
|| $this->getInvoice()->getOrder()->getPayment()->canCapturePartial();
}
It can be simplified to:
public function canEditQty()
{
return !$this->getInvoice()->getOrder()->getPayment()->canCapture()
|| $this->getInvoice()->getOrder()->getPayment()->canCapturePartial();
}