@@ -31,49 +31,49 @@ |
||
| 31 | 31 | ); |
| 32 | 32 | |
| 33 | 33 | $l->setTemplateFile(dirname(__FILE__) . '/invoice.docx') |
| 34 | - ->setData([ |
|
| 35 | - 'company' => [ |
|
| 36 | - 'name' => 'Galaxy Finance', |
|
| 37 | - 'address' => 'PK 15 Road of Boali', |
|
| 38 | - 'phone' => '+236-72000000', |
|
| 39 | - ], |
|
| 40 | - 'customer' => [ |
|
| 41 | - 'name' => 'Banabool Kitoko', |
|
| 42 | - 'phone' => '+236-75111111', |
|
| 43 | - 'email' => '[email protected]', |
|
| 44 | - ], |
|
| 45 | - 'invoice' => [ |
|
| 46 | - 'no' => '2021090500033', |
|
| 47 | - 'date' => '2021-09-05 11:25:08', |
|
| 48 | - 'sub_total' => '3,450 FCFA', |
|
| 49 | - 'tax' => '19 %', |
|
| 50 | - 'total_amount' => '4,105 FCFA', |
|
| 51 | - 'due_days' => 15, |
|
| 52 | - ], |
|
| 53 | - 'items' => [ |
|
| 54 | - [ |
|
| 55 | - 'no' => 1, |
|
| 56 | - 'name' => 'Savon', |
|
| 57 | - 'price' => 250, |
|
| 58 | - 'quantity' => 2, |
|
| 59 | - 'total' => 500, |
|
| 60 | - ], |
|
| 61 | - [ |
|
| 62 | - 'no' => 2, |
|
| 63 | - 'name' => 'Sucre', |
|
| 64 | - 'price' => 500, |
|
| 65 | - 'quantity' => 5, |
|
| 66 | - 'total' => 2500, |
|
| 67 | - ], |
|
| 68 | - [ |
|
| 69 | - 'no' => 3, |
|
| 70 | - 'name' => 'Omo', |
|
| 71 | - 'price' => 150, |
|
| 72 | - 'quantity' => 3, |
|
| 73 | - 'total' => 450, |
|
| 74 | - ] |
|
| 75 | - ], |
|
| 76 | - ]); |
|
| 34 | + ->setData([ |
|
| 35 | + 'company' => [ |
|
| 36 | + 'name' => 'Galaxy Finance', |
|
| 37 | + 'address' => 'PK 15 Road of Boali', |
|
| 38 | + 'phone' => '+236-72000000', |
|
| 39 | + ], |
|
| 40 | + 'customer' => [ |
|
| 41 | + 'name' => 'Banabool Kitoko', |
|
| 42 | + 'phone' => '+236-75111111', |
|
| 43 | + 'email' => '[email protected]', |
|
| 44 | + ], |
|
| 45 | + 'invoice' => [ |
|
| 46 | + 'no' => '2021090500033', |
|
| 47 | + 'date' => '2021-09-05 11:25:08', |
|
| 48 | + 'sub_total' => '3,450 FCFA', |
|
| 49 | + 'tax' => '19 %', |
|
| 50 | + 'total_amount' => '4,105 FCFA', |
|
| 51 | + 'due_days' => 15, |
|
| 52 | + ], |
|
| 53 | + 'items' => [ |
|
| 54 | + [ |
|
| 55 | + 'no' => 1, |
|
| 56 | + 'name' => 'Savon', |
|
| 57 | + 'price' => 250, |
|
| 58 | + 'quantity' => 2, |
|
| 59 | + 'total' => 500, |
|
| 60 | + ], |
|
| 61 | + [ |
|
| 62 | + 'no' => 2, |
|
| 63 | + 'name' => 'Sucre', |
|
| 64 | + 'price' => 500, |
|
| 65 | + 'quantity' => 5, |
|
| 66 | + 'total' => 2500, |
|
| 67 | + ], |
|
| 68 | + [ |
|
| 69 | + 'no' => 3, |
|
| 70 | + 'name' => 'Omo', |
|
| 71 | + 'price' => 150, |
|
| 72 | + 'quantity' => 3, |
|
| 73 | + 'total' => 450, |
|
| 74 | + ] |
|
| 75 | + ], |
|
| 76 | + ]); |
|
| 77 | 77 | $l->process(); |
| 78 | 78 | $l->convert(); |
| 79 | 79 | |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | ZipArchive::CREATE | ZipArchive::OVERWRITE |
| 85 | 85 | ); |
| 86 | 86 | if ($create === true) { |
| 87 | - // Create recursive directory iterator |
|
| 87 | + // Create recursive directory iterator |
|
| 88 | 88 | $files = new RecursiveIteratorIterator( |
| 89 | 89 | new RecursiveDirectoryIterator( |
| 90 | 90 | $folder, |