'That invoice no longer exists.'])); } $client_id = intval($doc['client_id']); enforceClientAccess(); $doc_number = billingNumber($doc_type, $doc); // Without the card fee it was paid with - that was for the payment (billingWithoutCardFees()) [$copy_lines, $card_fees] = billingWithoutCardFees(billingItems('invoice', intval($doc['invoice_id']))); $lines = count($copy_lines); ob_start(); ?>