承接 ayeo/gs1 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ayeo/gs1

最新稳定版本:1.1.0

Composer 安装命令:

composer require ayeo/gs1

包简介

Support for GS1 system

README 文档

README

Library supports gs1 systems. Provides ability to generate logistic labels and impose usage of valid gs1 objects. All functionality is availaible through Gs1Facade object. Library takes care about generating barcode, sscc numbers and calculating check digits.

Company and Location objects

Library is delivered only with location and company interfaces. You must use your own objects. That is done for purpose ypu probably want to work with existing classes. Example implementation below:

class MyCustomCompany implements CompanyInterface
{
    public function getGcp()
    {
       return new Model\Gcp('123456');
    }
    
    public function getName()
    {
       return "My Custom Name";
    }
    

    public function getLocation()
    {
        $location = new MyCustomLocation();
    } 
}
class MyCustomLocation implements LocationInterface
{
    public function getAddress()
    {
        $address = new Model\Address;
        $address->streetName = 'Secret Avenue';
        $address->buildingNumber = 10;
        $address->countryName = "England";
        $address->postcode = 'NG10 5GH';
    }

    public function getLocationNumber()
    {
        return '00';
    }
    
   
    public function getTelephoneNumber()
    {
        return '560 560 506';
    }
    
    
    public function getFaxNumber()
    {
        return '';
    }
    
    
    public function getWebsiteAddress()
    {
        return 'ayeo.pl';
    }
}

Content object

$content = new Model\Content;
$content->setName('test product');
$content->setBatchSymbol('abc12345');
$content->setGrossWeight(2);
$content->setGtin('1234512345123');
$content->setQuantity(120);
$content->setBestBefore(new DateTime);

Example use

$gs1 = new Gs1Facade($company);
$label = $gs1->buildLabel($content, $orderNumber = '000102', $logicticCounter = 232);

Label contains all nessecary data such as SSCC, barcode, GTIN, full company data etc

Custom Barcode structure

See code (docs to do)

统计信息

  • 总下载量: 16.18k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固