@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | $this->pdf->setFont( 'dejavusans', '', 10 ); |
| 21 | 21 | |
| 22 | 22 | $vmargin = [ |
| 23 | - 'h1' => [ // HTML tag |
|
| 23 | + 'h1' => [// HTML tag |
|
| 24 | 24 | 0 => ['h' => 1.5, 'n' => 0], // space before = h * n |
| 25 | 25 | 1 => ['h' => 1.5, 'n' => 3] // space after = h * n |
| 26 | 26 | ], |
@@ -93,14 +93,14 @@ discard block |
||
| 93 | 93 | $data = [ |
| 94 | 94 | 'BCD', // required |
| 95 | 95 | '002', // Version 2 (required, 1=UTF-8, 2=ISO 8859-1, 3=ISO 8859-2, 4=ISO 8859-4, 5=ISO 8859-5, 6=ISO 8859-7, 7=ISO 8859-10, 8=ISO 8859-15) |
| 96 | - 1, // UTF-8 (required) |
|
| 96 | + 1, // UTF-8 (required) |
|
| 97 | 97 | 'SCT', // SEPA Credit Transfer (required) |
| 98 | - '', // BIC (optional) |
|
| 99 | - '', // Name of recipient (required, name of your company) |
|
| 100 | - '', // IBAN (required) |
|
| 101 | - $this->summaryBasket->getPrice()->getCurrencyId() . $total, // Currency and value (required) |
|
| 102 | - '', // Purpose (optional, 4 char code, https://wiki.windata.de/index.php?title=Purpose-SEPA-Codes) |
|
| 103 | - '', // ISO 11649 RF Creditor Reference (optional, 35 characters structured code) |
|
| 98 | + '', // BIC (optional) |
|
| 99 | + '', // Name of recipient (required, name of your company) |
|
| 100 | + '', // IBAN (required) |
|
| 101 | + $this->summaryBasket->getPrice()->getCurrencyId() . $total, // Currency and value (required) |
|
| 102 | + '', // Purpose (optional, 4 char code, https://wiki.windata.de/index.php?title=Purpose-SEPA-Codes) |
|
| 103 | + '', // ISO 11649 RF Creditor Reference (optional, 35 characters structured code) |
|
| 104 | 104 | $this->translate( 'controller/jobs', 'Invoice' ) . ' ' . $this->orderItem->getInvoiceNumber(), // Reference of order and other data (optional, max. 140 characters) |
| 105 | 105 | $this->summaryBasket->getCustomerReference(), // Notice to the customer (optional, max. 70 characters) |
| 106 | 106 | ]; |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $this->pdf->setFont( 'dejavusans', '', 10 ); |
| 20 | 20 | |
| 21 | 21 | $vmargin = [ |
| 22 | - 'h1' => [ // HTML tag |
|
| 22 | + 'h1' => [// HTML tag |
|
| 23 | 23 | 0 => ['h' => 1.5, 'n' => 0], // space before = h * n |
| 24 | 24 | 1 => ['h' => 1.5, 'n' => 3] // space after = h * n |
| 25 | 25 | ], |
@@ -254,10 +254,18 @@ |
||
| 254 | 254 | private $headerFcn; |
| 255 | 255 | private $footerFcn; |
| 256 | 256 | |
| 257 | - public function Footer() { return ( $fcn = $this->footerFcn ) ? $fcn( $this ) : null; } |
|
| 258 | - public function Header() { return ( $fcn = $this->headerFcn ) ? $fcn( $this ) : null; } |
|
| 259 | - public function setFooterFunction( \Closure $fcn ) { $this->footerFcn = $fcn; } |
|
| 260 | - public function setHeaderFunction( \Closure $fcn ) { $this->headerFcn = $fcn; } |
|
| 257 | + public function Footer() |
|
| 258 | + { |
|
| 259 | +return ( $fcn = $this->footerFcn ) ? $fcn( $this ) : null; } |
|
| 260 | + public function Header() |
|
| 261 | + { |
|
| 262 | +return ( $fcn = $this->headerFcn ) ? $fcn( $this ) : null; } |
|
| 263 | + public function setFooterFunction( \Closure $fcn ) |
|
| 264 | + { |
|
| 265 | +$this->footerFcn = $fcn; } |
|
| 266 | + public function setHeaderFunction( \Closure $fcn ) |
|
| 267 | + { |
|
| 268 | +$this->headerFcn = $fcn; } |
|
| 261 | 269 | }; |
| 262 | 270 | $pdf->setCreator( PDF_CREATOR ); |
| 263 | 271 | $pdf->setAuthor( 'Aimeos' ); |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | $this->object->run(); |
| 65 | 65 | |
| 66 | - $expected = dirname( __DIR__, 4) . '/tmp/logs/aimeos_' . date( 'Y-m-d' ) . '.log'; |
|
| 66 | + $expected = dirname( __DIR__, 4 ) . '/tmp/logs/aimeos_' . date( 'Y-m-d' ) . '.log'; |
|
| 67 | 67 | $this->assertFileExists( $expected ); |
| 68 | 68 | |
| 69 | 69 | unlink( $expected ); |
@@ -265,9 +265,12 @@ discard block |
||
| 265 | 265 | { |
| 266 | 266 | foreach( $codes as $code ) |
| 267 | 267 | { |
| 268 | - try { |
|
| 268 | + try |
|
| 269 | + { |
|
| 269 | 270 | $newOrder->addCoupon( $code ); |
| 270 | - } catch( \Aimeos\MShop\Plugin\Provider\Exception | \Aimeos\MShop\Coupon\Exception $e ) { |
|
| 271 | + } |
|
| 272 | + catch( \Aimeos\MShop\Plugin\Provider\Exception | \Aimeos\MShop\Coupon\Exception $e ) |
|
| 273 | + { |
|
| 271 | 274 | $newOrder->deleteCoupon( $code ); |
| 272 | 275 | } |
| 273 | 276 | } |
@@ -383,7 +386,9 @@ discard block |
||
| 383 | 386 | $context->setUserId( $order->getCustomerId() ); |
| 384 | 387 | $context->setGroupIds( $customerItem->getGroups() ); |
| 385 | 388 | } |
| 386 | - catch( \Exception $e ) {} // Subscription without account |
|
| 389 | + catch( \Exception $e ) |
|
| 390 | + { |
|
| 391 | +} // Subscription without account |
|
| 387 | 392 | |
| 388 | 393 | return $context; |
| 389 | 394 | } |
@@ -569,9 +574,11 @@ discard block |
||
| 569 | 574 | } |
| 570 | 575 | catch( \Exception $e ) |
| 571 | 576 | { |
| 572 | - if( $e->getCode() < 1 ) // not a soft error |
|
| 577 | + if( $e->getCode() < 1 ) { |
|
| 578 | + // not a soft error |
|
| 573 | 579 | { |
| 574 | 580 | $item->setReason( \Aimeos\MShop\Subscription\Item\Iface::REASON_PAYMENT ); |
| 581 | + } |
|
| 575 | 582 | |
| 576 | 583 | if( $this->ends() ) { |
| 577 | 584 | $item->setDateEnd( date_create()->format( 'Y-m-d' ) ); |
@@ -327,7 +327,9 @@ discard block |
||
| 327 | 327 | |
| 328 | 328 | return $currentid; |
| 329 | 329 | } |
| 330 | - catch( \Aimeos\MShop\Exception $e ) {} // not found, create new |
|
| 330 | + catch( \Aimeos\MShop\Exception $e ) |
|
| 331 | + { |
|
| 332 | +} // not found, create new |
|
| 331 | 333 | } |
| 332 | 334 | |
| 333 | 335 | $item = $this->process( $manager->create(), $node ); |
@@ -365,13 +367,11 @@ discard block |
||
| 365 | 367 | |
| 366 | 368 | $currentid = $this->importNode( $node, $domains, $parentid, $childMap ); |
| 367 | 369 | $total++; |
| 368 | - } |
|
| 369 | - elseif( $xml->nodeType === \XMLReader::ELEMENT && $xml->name === 'catalog' ) |
|
| 370 | + } elseif( $xml->nodeType === \XMLReader::ELEMENT && $xml->name === 'catalog' ) |
|
| 370 | 371 | { |
| 371 | 372 | $this->importTree( $xml, $domains, $currentid, $childMap ); |
| 372 | 373 | $childMap = []; |
| 373 | - } |
|
| 374 | - elseif( $xml->nodeType === \XMLReader::END_ELEMENT && $xml->name === 'catalog' ) |
|
| 374 | + } elseif( $xml->nodeType === \XMLReader::END_ELEMENT && $xml->name === 'catalog' ) |
|
| 375 | 375 | { |
| 376 | 376 | \Aimeos\MShop::create( $this->context(), 'catalog' )->delete( $map ); |
| 377 | 377 | break; |