diff --git a/app/models/InventoryModel.php b/app/models/InventoryModel.php index 3c01505..f581c57 100644 --- a/app/models/InventoryModel.php +++ b/app/models/InventoryModel.php @@ -372,6 +372,20 @@ class InventoryModel extends \Asatru\Database\Model { } } + /** + * @param $items + * @return string + * @throws \Exception + */ + public static function exportItemsAsPdf($items) + { + try { + throw new \Exception('Not yet implemented'); + } catch (\Exception $e) { + throw $e; + } + } + /** * @param $items * @param $format @@ -387,6 +401,8 @@ class InventoryModel extends \Asatru\Database\Model { $file = static::exportItemsAsJson($items); } else if ($format === 'csv') { $file = static::exportItemsAsCsv($items); + } else if ($format === 'pdf') { + $file = static::exportItemsAsPdf($items); } else { throw new \Exception('Unsupported format: ' . $format); } diff --git a/app/views/layout.php b/app/views/layout.php index c3b5926..f938ef4 100644 --- a/app/views/layout.php +++ b/app/views/layout.php @@ -804,6 +804,7 @@