[ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 116, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1b' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 126, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1c' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL1C', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 446, 'y' => 137, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1d' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL1D', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 446, 'y' => 148, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1e' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 172, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1f' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL1F', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 446, 'y' => 184, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1g' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 200, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1h' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL1H', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 516, 'y' => 211, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1i' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 222, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1j' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 234, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1ji' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 245, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1k' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL1K', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 516, 'y' => 262, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l1l' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL1L', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 516, 'y' => 272, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2a' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 300, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2ai' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 324, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2aii' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL2AII', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 446, 'y' => 336, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2aiii' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 351, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2b' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 368, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2c' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL2C', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 446, 'y' => 384, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2d' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL2D', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 516, 'y' => 396, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2e' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 407, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2ei' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 431, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2eii' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL2EII', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 446, 'y' => 442, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2eiii' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 458, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2f' => [ 'page' => 1, 'template_page' => 1, 'coordinates' => [ 'x' => 446, 'y' => 476, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2g' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL2G', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 446, 'y' => 491, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2h' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL2H', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 516, 'y' => 503, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2i' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL2I', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 516, 'y' => 514, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2j' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL2J', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 516, 'y' => 537, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], 'l2k' => [ 'page' => 1, 'template_page' => 1, 'function' => [ 'calc' => 'calcL2K', 'draw' => [ 'drawNormal' ] ], 'coordinates' => [ 'x' => 516, 'y' => 561, 'h' => 10, 'w' => 45, 'halign' => 'C', ], ], ]; if ( isset( $template_schema[$name] ) ) { return $name; } else { return $template_schema; } } function calcL1C( $value = null, $schema = null ) { $this->l1c = $this->MoneyFormat( bcadd( $this->l1a, $this->l1b ) ); return $this->l1c; } function calcL1D( $value = null, $schema = null ) { $this->l1d = $this->MoneyFormat( bcmul( $this->l1c, $this->credit_percent ) ); return $this->l1d; } function calcL1F( $value = null, $schema = null ) { $this->l1f = $this->MoneyFormat( bcsub( $this->l1d, $this->l1e ) ); return $this->l1f; } function calcL1H( $value = null, $schema = null ) { $this->l1h = $this->MoneyFormat( bcadd( $this->l1f, $this->l1g ) ); return $this->l1h; } function calcL1K( $value = null, $schema = null ) { $this->l1k = $this->MoneyFormat( bcadd( $this->l1i, bcadd( $this->l1j, $this->l1ji ) ) ); return $this->l1k; } function calcL1L( $value = null, $schema = null ) { $this->l1l = $this->MoneyFormat( bcsub( $this->l1h, $this->l1k ) ); return $this->l1l; } function calcL2AII( $value = null, $schema = null ) { $this->l2aii = $this->MoneyFormat( bcadd( $this->l2a, $this->l2ai ) ); return $this->l2aii; } function calcL2C( $value = null, $schema = null ) { $this->l2c = $this->MoneyFormat( bcmul( $this->l2aii, $this->employer_medicare_rate ) ); return $this->l2c; } function calcL2D( $value = null, $schema = null ) { $this->l2d = $this->MoneyFormat( bcadd( $this->l2aii, bcadd( $this->l2aiii, bcadd( $this->l2b, $this->l2c ) ) ) ); return $this->l2d; } function calcL2EII( $value = null, $schema = null ) { $this->l2eii = $this->MoneyFormat( bcadd( $this->l2e, $this->l2ei ) ); return $this->l2eii; } function calcL2G( $value = null, $schema = null ) { $this->l2g = $this->MoneyFormat( bcmul( $this->l2eii, $this->employer_medicare_rate ) ); return $this->l2g; } function calcL2H( $value = null, $schema = null ) { $this->l2h = $this->MoneyFormat( bcadd( $this->l2eii, bcadd( $this->l2eiii, bcadd( $this->l2f, $this->l2g ) ) ) ); return $this->l2h; } function calcL2I( $value = null, $schema = null ) { $this->l2i = $this->MoneyFormat( bcadd( $this->l2d, $this->l2h ) ); return $this->l2i; } function calcL2J( $value = null, $schema = null ) { $this->l2j = min( $this->l1l, $this->l2i ); return $this->l2j; } function calcL2K( $value = null, $schema = null ) { $this->l2k = $this->MoneyFormat( bcsub( $this->l2i, $this->l2j ) ); return $this->l2k; } function _outputPDF( $type ) { //Initialize PDF with template. $pdf = $this->getPDFObject(); if ( $this->getShowBackground() == true ) { $pdf->setSourceFile( $this->getTemplateDirectory() . DIRECTORY_SEPARATOR . $this->pdf_template ); $this->template_index[1] = $pdf->ImportPage( 1 ); } if ( $this->year == '' ) { $this->year = $this->getYear(); } //Get location map, start looping over each variable and drawing $template_schema = $this->getTemplateSchema(); if ( is_array( $template_schema ) ) { $template_page = null; foreach ( $template_schema as $field => $schema ) { $this->Draw( $this->$field, $schema ); } } return true; } } ?>