|
|
@@ -60,14 +60,14 @@ $reference =
|
|
|
$download_filename = str_replace("/", "_", $reference) . " - " . $project->name . " - Invoice.pdf";
|
|
|
|
|
|
// Initialise for PDF generation
|
|
|
-$bill_to_address_parts = explode("\n", ADDRESS);
|
|
|
-
|
|
|
-$bill_from_address_parts = [
|
|
|
- "8 Market Street",
|
|
|
- "Liskeard",
|
|
|
- "Cornwall",
|
|
|
- "PL14 3JJ",
|
|
|
-];
|
|
|
+$bill_to_address_parts = array_filter([
|
|
|
+ $customer->address_1,
|
|
|
+ $customer->address_2,
|
|
|
+ $customer->city,
|
|
|
+ implode(", ", array_filter([$customer->county, $customer->postal_code])),
|
|
|
+]);
|
|
|
+
|
|
|
+$bill_from_address_parts = explode("\n", ADDRESS);
|
|
|
|
|
|
// A4 size: 210x297mm
|
|
|
$mpdf = new Mpdf();
|