galdi/boleto-bundle

Galdi BoletoBundle

该软件包的官方仓库似乎已不存在,因此该软件包已被冻结。

安装: 208

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 3

类型:symfony-bundle

v1.0 2013-08-16 16:22 UTC

This package is not auto-updated.

Last update: 2020-01-19 17:08:40 UTC


README

欢迎来到 GaldiBoletoBundle - 重新享受创建工资单的乐趣!

基本文档

  • 安装_
  • 创建您的第一个工资单!_

安装

步骤 1) 使用 composer 获取软件包


Add on composer.json (see https://composer.php.ac.cn/)

::

    "require" :  {
        // ...
        "galdi/boleto-bundle": "dev-master",
    }

And run:

::

    composer update galdi/boleto-bundle

Step 2) Register the bundle
~~~~~~~~~~~~~~~~~~~~~~~~~~~

To start using the bundle, register it in your Kernel:

::

    <?php
    // app/AppKernel.php

    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Galdi\BoletoBundle\GaldiBoletoBundle(),
        );
        // ...
    }

And run the console command to install its assets:

::

     php app/console assets:install


Step 3) Configure the bundle
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This step is not required, but if you skip this step, you may need to
provide the same information in your PHP code.

::

    # app/config/config.yml
    # GaldiBoleto Configuration:
    galdi_boleto:
        cedants:
            mybusiness:
                name: My Enterprise Inc.
                cnpj: 01.234.567/0001-89
                bank: CEF
                branch: 1234
                code: 345678
        paths:
            default:
                favicon: bundles/mysite/images/favicon.ico
        payslips:
            cef:
                wallet: RG
                instructions: |
                    - Sr. Caixa, após o vencimento, cobrar multa de 2%% e juros de mora de 0,33%% ao dia
                    - Receber até 30 dias após o vencimento


Create your first payslip!
--------------------------

To create a payslip, get the ``galdi_boleto.view`` service and call its
``render`` function, passing the payslip data as an array argument.

An example would look like this:

::

    <?php
    // src/Acme/DemoBundle/Controller/Payment.php
    namespace Acme\DemoBundle\Controller;
    
    use Symfony\Bundle\FrameworkBundle\Controller\Controller;
    use Symfony\Component\HttpFoundation\Response;
    
    class PaymentController extends Controller
    {
        public function payslipAction()
        {
            $data = array(
                'payer_name'              => 'John Doe',
                'payer_address_line1'     => 'Success Street, 108',
                'payer_address_line2'     => 'Success City, SS',
                'payslip_value'           => number_format('180', 2, ',', ''),
                'payslip_due_date'        => date('d/m/Y'),
                'payslip_document_number' => '1567',
                'payslip_description'     => 'Premium Hosting',
            );
            return new Response($this->get('galdi_boleto.view')->render($data));
        }
    }