Update pdf invoice for uptra
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 16 May 2019 17:52:59 +0000 (13:52 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 16 May 2019 17:52:59 +0000 (13:52 -0400)
tighten up spacing in tables

lib/GlmPDFInvoice.php

index aab4a66..7ff846d 100644 (file)
@@ -68,9 +68,6 @@ class GlmPDFInvoice extends Cezpdf
      */
     public function createPdf( $invoices, $outputStyle = 'stream' )
     {
-        // $config = $this->config;
-        // echo '<pre>$config: ' . print_r( $config, true ) . '</pre>';
-        // exit;
         $accountNumberLabel = $this->config['billing_terms']['account_number'];
         $showAccountNumber  = $this->config['settings']['invoice_show_account_number'];
         $showInvoiceNumber  = $this->config['settings']['invoice_show_invoice_number'];
@@ -102,7 +99,8 @@ class GlmPDFInvoice extends Cezpdf
                     $this->config['settings']['company_state'],
                     $this->config['settings']['company_zip']
                 ),
-                $this->pdf_font_size
+                $this->pdf_font_size,
+                array( 'spacing' => .9 )
             );
             // Company Phone
             $this->ezText( $this->config['settings']['company_phone'], $this->pdf_font_size );
@@ -132,6 +130,7 @@ class GlmPDFInvoice extends Cezpdf
                 array( 'header' => '', 'value' => '' ),
                 '',
                 array(
+                    'rowGap'       => 1,
                     'fontSize'     => $this->pdf_font_size,
                     'showHeadings' => 0,
                     'showLines'    => 0,
@@ -145,6 +144,7 @@ class GlmPDFInvoice extends Cezpdf
             $this->ezSetY( $endAddressSaveY );
             $this->ezText( '', $this->pdf_font_size );
             $this->ezText( '<b>Bill To:</b>', $this->pdf_header_font_2 );
+            $this->ezText( '', $this->pdf_font_size );
             // Billing Information.
             $this->ezText(
                 sprintf(
@@ -155,7 +155,8 @@ class GlmPDFInvoice extends Cezpdf
                     $account['billing_state'],
                     $account['billing_zip']
                 ),
-                $this->pdf_font_size
+                $this->pdf_font_size,
+                array( 'spacing' => .9 )
             );
             // $this->ezText( '', $this->pdf_font_size );
 
@@ -193,6 +194,7 @@ class GlmPDFInvoice extends Cezpdf
                 array( 'created' => '<b>Date</b>', 'name' => '<b>Description</b>', 'amount' => '<b>Rate</b>' ),
                 '',
                 array(
+                    'rowGap'       => 1,
                     'showHeadings' => 1,
                     'showLines'    => 4,
                     'width'        => 560,
@@ -217,6 +219,7 @@ class GlmPDFInvoice extends Cezpdf
                 array( 'created' => '<b>Date</b>', 'name' => '<b>Description</b>', 'amount' => '<b>Rate</b>' ),
                 '',
                 array(
+                    'rowGap'       => 1,
                     'showHeadings' => 0,
                     'showLines'    => 4,
                     'width'        => 560,
@@ -243,7 +246,9 @@ class GlmPDFInvoice extends Cezpdf
                     array( 'terms' => '<b>Payment Terms</b>' ),
                     '',
                     array(
+                        'rowGap'       => 1,
                         'fontSize'     => $this->pdf_font_size,
+                        'rowGap'       => 1,
                         'showHeadings' => 1,
                         'showLines'    => 4,
                         'width'        => 530,
@@ -336,6 +341,7 @@ class GlmPDFInvoice extends Cezpdf
                 array( 'header' => 'Header', 'value' => 'Value' ),
                 '',
                 array(
+                    'rowGap'       => 1,
                     'fontSize'     => $this->pdf_font_size,
                     'showHeadings' => 0,
                     'showLines'    => 0,
@@ -359,6 +365,7 @@ class GlmPDFInvoice extends Cezpdf
                     array( 'header' => 'Header', 'value' => 'Value' ),
                     '',
                     array(
+                    'rowGap'       => 1,
                         'fontSize'     => $this->pdf_font_size,
                         'showHeadings' => 0,
                         'showLines'    => 0,
@@ -384,6 +391,7 @@ class GlmPDFInvoice extends Cezpdf
                 array( 'header' => 'Header', 'value' => 'Value' ),
                 '',
                 array(
+                    'rowGap'       => 1,
                     'fontSize'     => $this->pdf_font_size,
                     'showHeadings' => 0,
                     'showLines'    => 0,