diff --git a/app/Policies/ContactPolicy.php b/app/Policies/ContactPolicy.php new file mode 100644 index 000000000000..2aab428a006f --- /dev/null +++ b/app/Policies/ContactPolicy.php @@ -0,0 +1,7 @@ +contactRepo = $contactRepo; + } + + /** + * @return ContactRepository + */ + protected function getRepo() + { + return $this->contactRepo; + } + + /** + * @param $data + * @param null $contact + * + * @return mixed|null + */ + public function save($data, $contact = null) + { + if (isset($data['client_id']) && $data['client_id']) { + $data['client_id'] = Client::getPrivateId($data['client_id']); + } + + return $this->contactRepo->save($data, $contact); + } + +} diff --git a/docs/configure.rst b/docs/configure.rst index 652294ffd92f..31fbc989a36f 100644 --- a/docs/configure.rst +++ b/docs/configure.rst @@ -59,6 +59,8 @@ If you require contacts to enter a password to see their invoice you'll need to You can install PhantomJS to generate the PDF locally, to enable it add ``PHANTOMJS_BIN_PATH=/usr/local/bin/phantomjs``. +We suggest using version >= 2.1.1, users have reported seeing 'Error: 0' with older versions. + .. TIP:: To determine the path you can run ``which phantomjs`` from the command line. Custom Fonts