Skip to content

afiphp/afiphp

Repository files navigation

Webservices AFIP

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Afiphp allows you to operate with web services regarding AFIP, mainly related to electronic invoicing.

Installation

You can install the package via composer:

composer require afiphp/afiphp

Usage

use Afiphp\Webservices\WsFev1;
use Afiphp\Entities\Customer;
use Afiphp\Entities\Invoice;
use Afiphp\Enums\InvoiceType;
use Afiphp\Enums\IdentityDocumentType;

$wsfe = new WsFev1('20111111112', __DIR__ . '/resources');
$invoice = Invoice::createProductInvoice(
        InvoiceType::FACTURA_A,
        2, // sales point
        150, // taxed amount
        0, // untaxed amount
        0, // exempt amount
        new Customer(IdentityDocumentType::CUIT, '20111111112')
    )
    ->addTax(
        5, // code
        150, // taxable base
        31.5 // amount
    );
$cae = $wsfe->createCaeFromInvoice($invoice);
echo $cae->number;

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages