From 8349ec2938f40b0a69b71f5ae9dad2b7bf23d661 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 1 Aug 2016 12:25:46 +0200 Subject: Generate invoice from detailed offer view --- include/offers-overview.php | 4 ++-- include/offers.php | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/offers-overview.php b/include/offers-overview.php index 65aea29..090a036 100644 --- a/include/offers-overview.php +++ b/include/offers-overview.php @@ -73,11 +73,11 @@ require_once(__DIR__ . '/../login.php'); " - . (($invoiceFile instanceof file) + . ((!is_null($invoiceFile)) ? " " - : "") + : "") . "
diff --git a/include/offers.php b/include/offers.php index 6379f62..9facf3c 100644 --- a/include/offers.php +++ b/include/offers.php @@ -146,10 +146,19 @@ require('./header.php'); ['Eligible for online payment', 'btn-success'] : ['Not eligible for online payment', 'btn-default']; $header .= " - {$accepted[0]} - {$eligible[0]} - Send invoice to contact - Delete + + \t"; + if (is_null($offer->getInvoiceFile())) { + $header .= ""; + } else { + $header .= " + + + "; + } + $header .= " + + "; } catch (PDOException $e) { $alert = "
The offer with id $id could not be found.
"; -- cgit v1.2.3