PHP code example of mgbg / nra-audit-generator
1. Go to this page and download the library: Download mgbg/nra-audit-generator 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/ */
mgbg / nra-audit-generator example snippets
$shop = new \Audit\Shop($eik, $shopUniqueNumber, $domain, $shopCreatedAt, $isMarketplace, $yearOfOdit, $monthOfOdit);
$order = new \Audit\Order($orderUniqueNumber, $orderDate, $documentNumber, $documentDate, $totalDiscount, $paymentType, $items, $virtualPosNumber, $transactionNumber, $paymentProcessrIdentifier);
$item = new \Audit\Item($name, $quantity, $price, $vatRate = 20);
$order->addItem($item);
$shop->addOrder($order);
$returnedOrder = new \Audit\ReturnedOrder($orderNumber, $orderAmount, $orderDate, $returnMethod);
$shop->addReturnedOrder($returnedOrder);
$xml = (string) \Audit\XmlConverter::convert($shop);
\Audit\PaymentTypes\WithoutPostPayment::class; //1
\Audit\PaymentTypes\VirtualPOSTerminal::class; //2
\Audit\PaymentTypes\WithPostPayment::class; //3
\Audit\PaymentTypes\PaymentService::class; //4
\Audit\PaymentTypes\Other::class; //5
\Audit\PaymentTypes\ReflectedWithReceipt::class; //6
\Audit\ReturnMethods\IBAN::class; //1
\Audit\ReturnMethods\Card::class; //2
\Audit\ReturnMethods\Cash::class; //3
\Audit\ReturnMethods\Other::class; //4