peec/angrerett

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (1.0.0) of this package.

Angrerett skjema generering.

1.0.0 2016-06-02 11:39 UTC

This package is not auto-updated.

Last update: 2018-01-03 13:15:47 UTC


README

Generate angrerett schemas with PHP ( see http://www.signform.no/dss/statlige-blanketter?view=forms&id=12 ) .

This library uses mikehaertl/php-pdftk and dompdf/dompdf libraries behind the scenes.

Supports the following schemas:

  • Q-0321B
  • Q-0320B
  • Q-0319B

Requirements

  • The pdftk command must be installed and working on your system. Note: This library is written for pdftk 2.x versions. You should be able to use it with pdftk 1.x but not all methods will work there. For details consult the man page of pdftk on your system.
    apt-get install pdftk
    

Install

composer install peec/angrerett

Usage

See example folder for more samples.

$ar = new \Peec\Angrerett\Angrerett();

$request = new Peec\Angrerett\Data\Q0320BData();
$request->setCompanyName('Noe AS');
$request->setOrgNumber('12345678911');
$request->setAddress('Min bedrfitsadresse 32');
$request->setEmail('angrerett@minbedrift.no');
$request->setPhone('81549300');
$request->setServices('Bankkort');
$request->setCustomerBirthDate(\DateTime::createFromFormat('d.m.Y', '16.08.1989'));
$request->setAppointmentDate(\DateTime::createFromFormat('d.m.Y', '24.08.2015'));
$request->setDeliveredAt(\DateTime::createFromFormat('d.m.Y', '25.08.2015'));
$request->setRefNumber('1000123');


$q = $ar->Q0320B($request);

/** Save to a pdf.  */
$q->saveAs('Q-0319B.pdf');