@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | ZipArchive::CREATE | ZipArchive::OVERWRITE |
| 283 | 283 | ); |
| 284 | 284 | if ($create === true) { |
| 285 | - // Create recursive directory iterator |
|
| 285 | + // Create recursive directory iterator |
|
| 286 | 286 | $files = new RecursiveIteratorIterator( |
| 287 | 287 | new RecursiveDirectoryIterator($this->templateExtractDir, FilesystemIterator::SKIP_DOTS), |
| 288 | 288 | RecursiveIteratorIterator::LEAVES_ONLY |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | public function convert(): self |
| 312 | 312 | { |
| 313 | 313 | $this->convertionFile = $this->convertor |
| 314 | - ->convert($this->outputTemplateFile); |
|
| 314 | + ->convert($this->outputTemplateFile); |
|
| 315 | 315 | return $this; |
| 316 | 316 | } |
| 317 | 317 | |
@@ -25,49 +25,49 @@ |
||
| 25 | 25 | $convertor |
| 26 | 26 | ); |
| 27 | 27 | $l->setTemplateFile(dirname(__FILE__) . '/invoice.docx') |
| 28 | - ->setData([ |
|
| 29 | - 'company' => [ |
|
| 30 | - 'name' => 'Galaxy Finance', |
|
| 31 | - 'address' => 'PK 15 Road of Boali', |
|
| 32 | - 'phone' => '+236-72000000', |
|
| 33 | - ], |
|
| 34 | - 'customer' => [ |
|
| 35 | - 'name' => 'Banabool Kitoko', |
|
| 36 | - 'phone' => '+236-75111111', |
|
| 37 | - 'email' => '[email protected]', |
|
| 38 | - ], |
|
| 39 | - 'invoice' => [ |
|
| 40 | - 'no' => '2021090500033', |
|
| 41 | - 'date' => '2021-09-05 11:25:08', |
|
| 42 | - 'sub_total' => '3,450 FCFA', |
|
| 43 | - 'tax' => '19 %', |
|
| 44 | - 'total_amount' => '4,105 FCFA', |
|
| 45 | - 'due_days' => 15, |
|
| 46 | - ], |
|
| 47 | - 'items' => [ |
|
| 48 | - [ |
|
| 49 | - 'no' => 1, |
|
| 50 | - 'name' => 'Savon', |
|
| 51 | - 'price' => 250, |
|
| 52 | - 'quantity' => 2, |
|
| 53 | - 'total' => 500, |
|
| 54 | - ], |
|
| 55 | - [ |
|
| 56 | - 'no' => 2, |
|
| 57 | - 'name' => 'Sucre', |
|
| 58 | - 'price' => 500, |
|
| 59 | - 'quantity' => 5, |
|
| 60 | - 'total' => 2500, |
|
| 61 | - ], |
|
| 62 | - [ |
|
| 63 | - 'no' => 3, |
|
| 64 | - 'name' => 'Omo', |
|
| 65 | - 'price' => 150, |
|
| 66 | - 'quantity' => 3, |
|
| 67 | - 'total' => 450, |
|
| 68 | - ] |
|
| 69 | - ], |
|
| 70 | - ]); |
|
| 28 | + ->setData([ |
|
| 29 | + 'company' => [ |
|
| 30 | + 'name' => 'Galaxy Finance', |
|
| 31 | + 'address' => 'PK 15 Road of Boali', |
|
| 32 | + 'phone' => '+236-72000000', |
|
| 33 | + ], |
|
| 34 | + 'customer' => [ |
|
| 35 | + 'name' => 'Banabool Kitoko', |
|
| 36 | + 'phone' => '+236-75111111', |
|
| 37 | + 'email' => '[email protected]', |
|
| 38 | + ], |
|
| 39 | + 'invoice' => [ |
|
| 40 | + 'no' => '2021090500033', |
|
| 41 | + 'date' => '2021-09-05 11:25:08', |
|
| 42 | + 'sub_total' => '3,450 FCFA', |
|
| 43 | + 'tax' => '19 %', |
|
| 44 | + 'total_amount' => '4,105 FCFA', |
|
| 45 | + 'due_days' => 15, |
|
| 46 | + ], |
|
| 47 | + 'items' => [ |
|
| 48 | + [ |
|
| 49 | + 'no' => 1, |
|
| 50 | + 'name' => 'Savon', |
|
| 51 | + 'price' => 250, |
|
| 52 | + 'quantity' => 2, |
|
| 53 | + 'total' => 500, |
|
| 54 | + ], |
|
| 55 | + [ |
|
| 56 | + 'no' => 2, |
|
| 57 | + 'name' => 'Sucre', |
|
| 58 | + 'price' => 500, |
|
| 59 | + 'quantity' => 5, |
|
| 60 | + 'total' => 2500, |
|
| 61 | + ], |
|
| 62 | + [ |
|
| 63 | + 'no' => 3, |
|
| 64 | + 'name' => 'Omo', |
|
| 65 | + 'price' => 150, |
|
| 66 | + 'quantity' => 3, |
|
| 67 | + 'total' => 450, |
|
| 68 | + ] |
|
| 69 | + ], |
|
| 70 | + ]); |
|
| 71 | 71 | $l->process(); |
| 72 | 72 | $l->convert(); |
| 73 | 73 | |