dev-master
9999999-devMRP invoices XML export.
MIT
The Requires
- php >=5.4
- ext-mbstring @dev
- nette/tester 2.0.1
by Pavol Biely
Wallogit.com
2017 © Pedro Peláez
MRP invoices XML export.
MRP invoices XML export., (*2)
Use composer to install this package., (*3)
$invoice = new Mrp\Invoice();
$invoice->addRow(['idfak' => 1, 'cislo' => '1201700001', 'ico' => '12345678', ...]);
$invoiceItem = new Mrp\InvoiceItem();
$invoiceItem->addRow(['idr' => 1, 'idfak' => 1, 'cenamj' => 50, ...]);
$invoiceItem->addRow(['idr' => 2, 'idfak' => 1, 'cenamj' => 200, ...]);
$address = new Mrp\Address();
$address->addRow(['idradr' => 1, 'firma' => 'Company', 'ico' => '11112222', ...]);
$bankAccount = new Mrp\BankAccount();
$bankAccount->addRow(['idr' => '1', 'idradr' => '1', ...]);
$zip = new ZipArchive();
if ($zip->open('export.zip', ZipArchive::CREATE) === true) {
$zip->addFromString('mrp/FAKVY.XML', $invoice->getXml());
$zip->addFromString('mrp/FAKVYPOL.XML', $invoiceItem->getXml());
$zip->addFromString('mrp/FV_ADRES.XML', $address->getXml());
$zip->addFromString('mrp/FV_ADRESBAN.XML', $bankAccount->getXml());
$zip->close();
}
You can find input fields for addRow() method on MRP website. Please use all array keys as lowercase., (*4)
Tests are build with Nette Tester. You can run it like this:, (*5)
tester.bat -c php.ini-win --coverage coverage.html --coverage-src ../src
MIT License (c) Pavol Biely, (*6)
Read the provided LICENSE file for details., (*7)
MRP invoices XML export.
MIT