1. Go to this page and download the library: Download ashraam/evoliz-php 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/ */
ashraam / evoliz-php example snippets
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Clients\Client;
$evoliz = new Evoliz($companyId, $publicKey, $secretKey, $endpoint);
$client_repository = new Client($evoliz);
// Create a new client
$client = $client_repository->create([
'name' => 'IT Consulting',
'type' => 'Professionnel',
'address' => [
'postcode' => 20000,
'town' => 'Ajaccio',
'country' => 'France',
'iso2' => 'FR'
]
]);
// Get the list of the clients of this company
$clients = $client_repository->list();
$evoliz = new Evoliz(12544, 'my_public_key', 'my_secret_key', 'https://my-custom-endpoint.com');
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Banks\BankAccount;
$banks_repository = new BankAccount(new Evoliz(...));
// Return a list of banks visible by the current user, according to visibility restriction set in user profile
$banks_repository->list();
// Return a bank details by its specific id, according to visibility restriction set in user profile
$banks_repository->get($contactId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Banks\BankItem;
$bank_items_repository = new BankItem(new Evoliz(...));
// Return a list of bank items visible by the current User, according to visibility restriction set in user profile
$bank_items_repository->list();
// Return a bank item by its speficied id
$bank_items_repository->get($bankItemId);
// Lock a bank item
$bank_items_repository->lock($bankItemId);
// Unlock a bank item
$bank_items_repository->unlock($bankItemId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Sales\Invoice;
$invoices_repository = new Invoice(new Evoliz(...));
// Return a list of invoices visible by the current User, according to visibility restriction set in user profile
$invoices_repository->list();
// Create a new draft invoice with given data. Totals, margins, retention, 'unit_price_vat_exclude' => 5.73
]
]
]);
// Return an invoice by its speficied id
$invoices_repository->get($invoiceId);
// Save the invoice with a definitive document number. The status must be “filled” and will be changed to “created”
$invoices_repository->save($invoiceId);
// Send an email with a link to the invoice
$invoices_repository->send($invoiceId, [
'to' => ['[email protected]']
]);
// Create a new payement with given data
$invoices_repository->payment($invoiceId, [
'paydate' => '2022-02-14',
'label' => 'Test paiement',
'paytypeid' => 1,
'amount' => 2
]);
// List all payments of the given invoice
$invoices_repository->payments($invoiceId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Sales\Quote;
$quote_repository = new Quote(new Evoliz(...));
// Return a list of quotes visible by the current User, according to visibility restriction set in user profile
$quote_repository->list();
// Create a new draft quote with given data. Totals, margins, retention, ty' => 4,
'unit_price_vat_exclude' => 5.73
]
]
]);
// Return a quote by its speficied id
$quote_repository->get($quoteId);
// Create a new invoice from the given quote
$quote_repository->invoice($quoteId);
// Send an email with a link to the quote
$quote_repository->send($quoteId, [
'to' => ['[email protected]'],
'subject' => 'The email subject'
]);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Sales\SaleOrder;
$sale_order_repository = new SaleOrder(new Evoliz(...));
// Return a list of sale orders visible by the current User, according to visibility restriction set in user profile
$sale_order_repository->list();
// Create a new sale order with given data. Totals, margins, 'vat_rate' => 20
]
]
]);
// Return a sale order by its speficied id
$sale_order_repository->get($orderId);
// Create a new invoice from the given sale order
$sale_order_repository->invoice($orderId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Sales\Delivery;
$delivery_repository = new Delivery(new Evoliz(...));
// Return a list of deliveries visible by the current User, according to visibility restriction set in user profile
$delivery_repository->list();
// Return a delivery by its speficied id
$delivery_repository->get($deliveryId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Sales\Payment;
$payments_repository = new Payment(new Evoliz(...));
// Return a list of payments visible by the current User, according to visibility restriction set in user profile
$payments_repository->list();
// Return a payment by its speficied id
$payments_repository->get($paymentId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Sales\Credit;
$credit_repository = new Credit(new Evoliz(...));
// Return a list of credits visible by the current User, according to visibility restriction set in user profile
$credit_repository->list();
// Return a credit by its speficied id
$credit_repository->get($creditId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Sales\Advance;
$advance_repository = new Advance(new Evoliz(...));
// Return a list of advances visible by the current User, according to visibility restriction set in user profile
$advance_repository->list();
// List all payments of the given advance
$advance_repository->payments($advanceId);
// Create a new payment with given data
$advance_repository->payment($advanceId, [
'paydate' => '2022-02-10',
'label' => 'My label',
'paytypeid' => 1,
'amount' => 100,
'comment' => 'My comment'
]);
// Return an advance by its speficied id
$advance_repository->get($advanceId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Sales\DocumentLink;
$documents_repository = new DocumentLink(new Evoliz(...));
// Return a list of documents links associated to the requested document
$documents_repository->get($documentType, $documentId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Purchases\Buy;
$buys = new Buy(new Evoliz(...));
// Return a list of buys visible by the current User, according to visibility restriction set in user profile
$buys->list();
// Return a buy by its speficied id
$buys->get($buyId);
// Update buy state to locked
$buys->lock($buyId);
// Update buy state to unlocked
$buys->unlock($buyId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Purchases\SupplierCredit;
$credits = new Buy(new Evoliz(...));
// Return a list of Supplier credits visible by the current User, according to visibility restriction set in user profile
$credits->list();
// Return a supplier credit by its speficied id
$credits->get($supplierCreditId);
// Update supplier credit state to locked
$credits->lock($supplierCreditId);
// Update supplier credit state to unlocked
$credits->unlock($supplierCreditId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Reports\Reports;
$reports = new Reports(new Evoliz(...));
// Get amount of overdue payments by period categories
$reports->payments();
// Get amount of overdue settlements by period categories
$reports->settlements();
// Get turnover report data
$reports->turnover();
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Journals\Journals;
$Journals = new Journals(new Evoliz(...));
// Get trial balance data
$journal->trial_balance();
// Get general ledger data
$journal->general_ledger();
// Get FEC journal entries
$journal->fec();
// Get banks journal entries
$journal->banks();
// Get Cashes journal entries
$journal->cash();
// Get sales journal entries
$journal->sales();
// Get purchases journal data
$journal->purchases();
// Get miscellaneous operations journal entries
$journal->miscellaneous();
// Get opening balance journal entries
$journal->opening_balance();
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Clients\Client;
$clients_repository = new Client(new Evoliz(...));
// Return the client list of the specified or current user company
$clients_repository->list();
// Create a new client with given data
$client = $clients_repository->create([
'name' => "IT Consulting",
'type' => "Professionnel",
'address' => [
'postcode' => 20000,
'town' => 'Ajaccio',
'country' => 'France',
'iso2' => 'FR'
],
'vat_number' => 'N/C'
]);
// Return a client by its speficied id
$clients_repository->get($clientId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Clients\ContactClient;
$contacts_repository = new ContactClient(new Evoliz(...));
// Return a client contact list
$contacts_repository->list();
// Create a new client contact with given data
$client = $contacts_repository->create([
'clientid' => 3045161,
'firstname' => 'Romain',
'lastname' => 'Bertolucci',
'email' => '[email protected]'
]);
// Return a client contact by it's id
$contacts_repository->get($contactId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Clients\Prospect;
$prospects_repository = new Prospect(new Evoliz(...));
// Return the prospect list of the specified or current user company
$prospects_repository->list();
// Return a prospect by it's id
$prospects_repository->get($prospectId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Clients\ContactProspect;
$contacts_repository = new ContactProspect(new Evoliz(...));
// Return a prospect contact list
$contacts_repository->list();
// Return a prospect contact by it's id
$contacts_repository->get($contactId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Clients\Article;
$articles_repository = new Article(new Evoliz(...));
// Return a list of articles
$articles_repository->list();
// Return article by it's id
$articles_repository->get($articleId);
// Create a new article
$articles_repository->create([
'reference' => 'ref-001',
'designation' => 'Article 001',
'nature' => 'product',
'unit_price' => 12
]);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Files\File;
$files_repository = new File(new Evoliz(...));
// Return file content encoded in base64
$files_repository->get($documentType, $documentId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Settings\PurchaseClassification;
$classifications = new PurchaseClassification(new Evoliz(...));
// Return a list of Purchases classifications
$classifications->list();
// Return a purchase classification by its specified Id
$classifications->get($classificationId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Settings\SaleClassification;
$classifications = new SaleClassification(new Evoliz(...));
// Return a list of sales classifications
$classifications->list();
// Return a sale classification by its specified Id
$classifications->get($classificationId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Settings\PurchaseAffectation;
$affectations = new PurchaseAffectation(new Evoliz(...));
// Return a list of purchases affectations
$affectations->list();
// Return a purchase affectation by its specified Id
$affectations->get($affectationId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Settings\SaleAffectation;
$affectations = new SaleAffectation(new Evoliz(...));
// Return a list of sales affectations
$affectations->list();
// Return a sale affectation by its specified Id
$affectations->get($affectationId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Settings\Analytics;
$analytics = new Analytics(new Evoliz(...));
// Return a list of analytics axis
$analytics->list();
// Return an analytic axis by its specified Id
$analytics->get($analyticId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Settings\Accounts;
$accounts = new Accounts(new Evoliz(...));
// Return a list of accounting classification visible by the current user.
$accounts->list();
// Create a new accounting classification with given data
$accounts->create([
'code' => '0001',
'label' => 'Test'
]);
// Return an accounting account by its specified Id.
$accounts->get($accountId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Settings\PaymentTypes;
$payment_types = new PaymentTypes(new Evoliz(...));
// Return a list of payment types
$payment_types->list();
// Return a payment type by its specified id
$payment_types->get($payTypeId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Settings\PaymentTerms;
$payment_terms = new PaymentTerms(new Evoliz(...));
// Return a list of payment types
$payment_terms->list();
// Return a payment type by its specified id
$payment_terms->get($payTermId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Settings\UnitCodes;
$units = new UnitCodes(new Evoliz(...));
// Return a list of units codes, used in various endpoints
$units->list();
// Return a unit code by its specified Id
$units->get($unitCodeId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Settings\VatRates;
$rates = new VatRates(new Evoliz(...));
// Return a list of vat rates visible by the current user
$rates->list();
// Return a vat rate by its specified Id
$rates->get($vatRateId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Apps\MyUnisoft;
$unisoft = new File(new Evoliz(...));
// Connect MyUnisoft application in company with api key
$unisoft->connect($myunisoft_api_key);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Administration\User;
$users_repository = new User(new Evoliz(...));
// Return a list of users visible by the current User, according to visibility restriction set in user profile.
$users_repository->list();
// Get the detail of a user by it's id
$users_repository->get($userId);
use Ashraam\Evoliz\Evoliz;
use Ashraam\Evoliz\Administration\Subscription;
$subscriptions_repository = new USubscriptionser(new Evoliz(...));
// Return the list of the company's subscriptions.
$subscriptions_repository->list();
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.