PHP code example of agustinzamar / laravel-arca-sdk
1. Go to this page and download the library: Download agustinzamar/laravel-arca-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
agustinzamar / laravel-arca-sdk example snippets
Arca::getInvoiceTypes()
Arca::getRecipientVatConditions();
$pointOfSale = 1; // Your point of sale number
Arca::getLastInvoiceNumber($pointOfSale, InvoiceType::FACTURA_A);
$pointOfSale = 1; // Your point of sale number
$invoiceNumber = 123; // Invoice number to query
Arca::getInvoiceDetails($pointOfSale, InvoiceType::FACTURA_C, $invoiceNumber);
$pointOfSale = 1; // Your point of sale number
$nextInvoiceNumber = Arca::getLastInvoiceNumber($pointOfSale, InvoiceType::FACTURA_C);
$request = new CreateInvoiceRequest(
concept: InvoiceConcept::GOODS,
pointOfSale: $pointOfSale,
identification: new Identification(
type: IdentificationType::CUIT,
number: 20111111112
),
invoiceType: InvoiceType::FACTURA_C,
invoiceFrom: $nextInvoiceNumber,
invoiceTo: $nextInvoiceNumber,
total: 150.0,
net: 150.0,
exempt: 0.0,
nonTaxableConceptsAmount: 0.0,
vatCondition: 1,
currency: Currency::ARS,
currencyQuote: 1.0,
invoiceDate: now()->addDays(3),
);
Arca::generateInvoice($request);
// Or automatically generate next invoice
$request = new CreateInvoiceRequest(
concept: InvoiceConcept::GOODS,
pointOfSale: 12,
identification: new Identification(
type: IdentificationType::CUIT,
number: 20111111112
),
invoiceType: InvoiceType::FACTURA_C,
total: 150.0,
net: 150.0,
exempt: 0.0,
nonTaxableConceptsAmount: 0.0,
vatCondition: 1,
currency: Currency::ARS,
currencyQuote: 1.0,
invoiceDate: now()->addDays(3),
);
Arca::generateNextInvoice($request);