PHP code example of baytek / sage50

1. Go to this page and download the library: Download baytek/sage50 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/ */

    

baytek / sage50 example snippets

 php
$journal = new Journal(new Carbon, 'BAT-2118-000001', 'Account Payable Entry number one');

$journal->addAllocation('2300', -1819.06, 'PST');
$journal->addAllocation('2302', -291.70,  'HST');
$journal->addAllocation('2304', -499.64,  'PREMIUM TAX');

$journal->allocateDiff('1210');

header('content-type: text/plain');
echo $journal;