定制 pixiucz/invoices 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

pixiucz/invoices

Composer 安装命令:

composer require pixiucz/invoices

包简介

Empty

README 文档

README

  • Require package via composer
composer require pixiucz/invoices
  • And then register InvoicesServiceProvider in your config\app.php (laravel) or in boot method of your October's Plugin.php
Pixiucz\Invoices\InvoicesServiceProvider::class,
  • Once installed, you are required to run migrations – either by running
php artisan migrate

or using provided cli command

php artisan invoices:migrate

(this command will migrate only package’s table)

  • You have to create at least one named pattern, that will be used on invoices. You can create pattern using
php artisan invoices:makePattern “name_of_pattern” “pattern”
  • Your pattern have to be string with two slots -> {year} where correct year will be inserted and {number} for invoice number.
    • Example:
    php artisan invoices:makePattern "eshop" "My-eshop-invoice-{year}/{number}"
    

Basic usage

  • Once instantiated, InvoiceGenerator provides public method generateInvoice
  • This method requires two parameters, two other are optional
  1. String name of pattern (invoice line) (required)
  2. Array of all variables that you want to be printed in provided tempalte. (required)
  3. String path to your htm file that will serve as template. This template should use Twig syntax and at very least define {{ invoice_number }} where generated invoice number will be printed. (optional)
  4. int invoice number, this will bypass inner invoice number generator (optional)
  • Method returns array with 'invoice_number' and rendered 'pdf' key-value pairs.

Example

$invoice = $invoiceGenerator->generateInvoice("eshop", $templateVariables);

Format of array with variables (all optional)

  • Company
    • name
    • zip
    • address
    • ico
    • dic
    • ic_dph
    • bank
    • account_number
    • iban
    • swift
  • delivery_address
    • first_name
    • last_name
    • address
    • zip
    • city
    • country
  • billing_address
    • first_name
    • last_name
    • address
    • zip
    • city
    • country
    • ic
    • dic
  • updated_at
  • variants
    • variant
      • ean
      • name
      • quantity
      • price
      • price_without_tax
      • sum_without_tax
      • tax
      • sum
  • delivery_option
    • name
    • price
    • price_without_tax
    • tax
  • sum
    • sum_without_tax
    • sum_tax_only
    • sum
  • currency (currency symbol)
  • status [‘canceled’, ‘refunded’] -> leave empty when neither of these

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: HTML

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固