2017 © Pedro PelĂĄez
 

library szamlazzhuclient

Nem hivatalos SzĂĄmlĂĄzz.hu PHP kliens.

image

clapp/szamlazzhuclient

Nem hivatalos SzĂĄmlĂĄzz.hu PHP kliens.

  • Sunday, October 22, 2017
  • by dsge
  • Repository
  • 6 Watchers
  • 7 Stars
  • 57 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 2 Open issues
  • 4 Versions
  • 21 % Grown

The README.md

Clapp/SzamlazzhuClient Build Status Coverage

Nem hivatalos SzĂĄmlĂĄzz.hu PHP kliens. KĂ­sĂ©rleti verziĂł, production-ben nem ajĂĄnlott. HasznĂĄlat csak sajĂĄt felelƑssĂ©gre., (*1)

Telepítés

composer require clapp/szamlazzhuclient:1.*@beta

EgyszerƱ minta

$invoice = new Clapp\SzamlazzhuClient\Invoice();

$invoice->customerName = "Foo Bar";
$invoice->customerBillingPostcode = "1234";
$invoice->customerBillingCity = "Budapest";
$invoice->customerBillingAddress = "Foo utca 1.";

$invoice->merchantBankName = "FooBank";
$invoice->merchantBankAccountNumber = "12345678-12345678-12345678";

$invoice->items = [
    [
        'name' => 'Minta Termék',
        'quantity' => 2,
        'quantityUnit' => 'db',
        'netUnitPrice' => 100,
        'vatRate' => '25',
        'netValue' => 200,
        'vatValue' => 50,
        'grossValue' => 250,
    ],
    [
        'name' => 'Minta Termék 2',
        'quantity' => 1,
        'quantityUnit' => 'db',
        'netUnitPrice' => 100,
        'vatRate' => '25',
        'netValue' => 100,
        'vatValue' => 25,
        'grossValue' => 125,
    ],
];

$invoice->paymentMethod = 'utånvétel';
$invoice->currency = 'HUF';
$invoice->language = 'hu';

$invoice->signatureDate = '2016-01-02';
$invoice->settlementDate = '05/10/2015';
$invoice->dueDate = '2016-01-02';

try {
    /**
     * szĂĄmla mezƑinek ellenƑrzĂ©se
     */
    $invoice->validate();
}catch(Illuminate\Validation\ValidationException $e){
    /**
     * hibás vagy hiányzó mezƑk
     */
    // var_dump( $e->validator->getMessages() );
}

$client = new Clapp\SzamlazzhuClient\SzamlazzhuClient();
$client->username = /* Szåmlåzz.hu felhasznålónév */;
$client->password = /* SzĂĄmlĂĄzz.hu jelszĂł */;

try {
    $pdfContents = $client->generateInvoicePdf($invoice);
}catch(Clapp\SzamlazzhuClient\SzamlazzhuApiException $e){
    // var_dump( $e->getCode(), $e->getMessage() ); //API-bĂłl szĂĄrmazĂł hibakĂłd Ă©s hibaĂŒzenet
}
file_put_contents("szamlam.pdf", $pdfContents);

Tovåbbi mintåk és hasznålat

Github wikiben, (*2)

DokumentĂĄciĂł

Github wikiben, (*3)

The Versions

22/10 2017
22/10 2017

v1.0.0-beta3

1.0.0.0-beta3

Nem hivatalos SzĂĄmlĂĄzz.hu PHP kliens.

  Sources   Download

proprietary

The Requires

 

The Development Requires

by Clapp

14/06 2016
14/06 2016