Giter Club home page Giter Club logo

dominio-payslip-import's Introduction

dominio-payslip-import

Latest Stable Version Build Status Codacy Badge StyleCI SensioLabsInsight License

Requisitos

  • PHP >= 7.0

Instale usando o composer Composer

composer require convenia/dominio-payslip-import

Uso

<?php 
use Convenia\Dominio\Payslip\Payslip;

$filePath = 'PATH/TO/TXT/FILE';

$payslip = new Payslip;
$payslip->importFromFile($filePath);

$events = $payslip->getEvents();

// Exemplo de retorno

Array
(
    [0] => Array
        (
            [company_code] => 412
            [employee_code] => 50
            [employee_name] => GANDALF THE GREY
            [company_name] => THE LORD OF THE RINGS
            [company_reg] => 22924567000158
            [role] => LEADER OF  THE FELLOWSHIP
            [cost_center] => BR23 SALES QUALIFYING OUT
            [company_department] => 1,000000
            [company_branch] => 1
            [admission_date] => 24/08/2015
            [rubrik_name] => DESCONTO PLANO DE SAÚDE
            [rubrik_code] => 8111
            [reference] => 1,00
            [event_value] => 1,00
            [event_type] => D
            [salary] => 2616,75
            [base_inss] => 2616,75
            [base_irrf] => 2328,91
            [base_fgts] => 2616,75
            [month_fgts] => 209,340000
            [level_irrf] => 7,50

        )

)

Retornar todos os eventos de um único funcionário

Após importar um arquivo você poderá retornar todos os eventos encontrados no arquivo com o método getEvents() ou retornar apenas os eventos de um determinado funcionário com o método find()

<?php 
use Convenia\Dominio\Payslip\Payslip;

$filePath = 'PATH/TO/TXT/FILE';

$payslip = new Payslip;
$payslip->importFromFile($filePath);

$events = $payslip->query()->find(13);

// Exemplo de retorno

Array
(
    [0] => Array
        (
            [company_code] => 412
            [employee_code] => 50
            [employee_name] => GANDALF THE GREY
            [company_name] => THE LORD OF THE RINGS
            [company_reg] => 22924567000158
            [role] => LEADER OF  THE FELLOWSHIP
            [cost_center] => BR23 SALES QUALIFYING OUT
            [company_department] => 1,000000
            [company_branch] => 1
            [admission_date] => 24/08/2015
            [rubrik_name] => DESCONTO PLANO DE SAÚDE
            [rubrik_code] => 8111
            [reference] => 1,00
            [event_value] => 1,00
            [event_type] => D
            [salary] => 2616,75
            [base_inss] => 2616,75
            [base_irrf] => 2328,91
            [base_fgts] => 2616,75
            [month_fgts] => 209,340000
            [level_irrf] => 7,50

        )
       
    [1] => Array
        (
            [company_code] => 412
            [employee_code] => 50
            [employee_name] => THORIN
            [company_name] => THE LORD OF THE RINGS
            [company_reg] => 22924567000158
            [role] => DWARF
            [cost_center] => BR23 SALES QUALIFYING OUT
            [company_department] => 1,000000
            [company_branch] => 1
            [admission_date] => 24/08/2015
            [rubrik_name] => DESCONTO PLANO DE SAÚDE
            [rubrik_code] => 8111
            [reference] => 1,00
            [event_value] => 1,00
            [event_type] => P
            [salary] => 2616,75
            [base_inss] => 2616,75
            [base_irrf] => 2328,91
            [base_fgts] => 2616,75
            [month_fgts] => 209,340000
            [level_irrf] => 7,50
        )
)

dominio-payslip-import's People

Contributors

edbizarro avatar euventura avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

mendesalexandre

dominio-payslip-import's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.