fhindsthejewellers/gb-customs-form

获取产品和运输信息,并返回包含CN22或CN23 GB海关表格的FPDF对象

dev-master 2021-01-14 16:44 UTC

This package is auto-updated.

Last update: 2024-09-15 01:01:21 UTC


README

该库正在开发中,接口不稳定!

该库生成包含CN22或CN23表格的FPDF对象。

请查看示例文件夹。

基本语法如下

$form = new \fhindsthejewellers\GBCustomsForm\CustomsManager($products,$details);

$type = $form->GetType();

$pdf = $form->GetPDF();

其中 $products 是产品数组,$details 是包裹详细信息数组

CustomsManager 类还提供了一些静态方法

  • IsCn22FormPossible(array) : bool - 告诉您这些产品是否允许您制作简化CN22表格。CN23需要在 $details 数组中传递更多信息。
  • ValidateProductArray(array) : array - 这将返回您的产品数组,并告诉您名称是否过长