fhindsthejewellers / gb-customs-form
Takes Product and Shipment information and passes back an FPDF object containing CN22 or CN23 GB customs forms
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.0
- setasign/fpdi-fpdf: >=1.6
Requires (Dev)
- phpunit/phpunit: 6.*
This package is auto-updated.
Last update: 2025-03-15 02:02:29 UTC
README
This library is under development and the interface is not stable!
This library produces FPDF objects containing CN22 or CN23 forms.
Have a look in the examples folder.
The basic syntax is as follows:
$form = new \fhindsthejewellers\GBCustomsForm\CustomsManager($products,$details);
$type = $form->GetType();
$pdf = $form->GetPDF();
Where $products is an array of products and $details is an array of details about the parcel
The CustomsManager class also provides a couple of static methods:
- IsCn22FormPossible(array) : bool - Tells you if these products will allow you to make the simplar CN22 form. CN23 needs more information passed in the $details array.
- ValidateProductArray(array) : array - This will pass back your product array and tell you if the names are too long