private function isShipmentAmountInvoiced(Invoice\InvoiceInterface $invoice)
    {
        /** @var Invoice\InvoiceSubjectInterface $sale */
        $sale = $invoice->getSale();

        // Abort if another invoice has a shipment line
        foreach ($sale->getInvoices() as $i) {
            if ($i === $invoice) {
                continue;
            }
            if ($i->hasLineByType(Document\DocumentLineTypes::TYPE_SHIPMENT)) {
                return true;
            }
        }

        return false;
    }