1. Go to this page and download the library: Download byrokrat/accounting library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
byrokrat / accounting example snippets
useMoney\Formatter\DecimalMoneyFormatter;
useMoney\Currencies\ISOCurrencies;
$moneyFormatter = new DecimalMoneyFormatter(new ISOCurrencies());
usebyrokrat\accounting\Template\TransactionTemplate;
usebyrokrat\accounting\Template\VerificationTemplate;
$template = new VerificationTemplate(
description: '{description}',
transactionDate: '{date}',
transactions: [
new TransactionTemplate(
account: '1920',
amount: '{bank_amount}'
),
new TransactionTemplate(
account: '{income_account}',
amount: '{income_amount}'
)
]
);
usebyrokrat\accounting\Container;
usebyrokrat\accounting\Dimension\Account;
$accounts = new Container(
new Account(id: '1920', description: 'Bank'),
new Account(id: '3000', description: 'Incomes'),
new Account(id: '3010', description: 'Sales'),
);