2017 © Pedro Peláez
 

library mrp

MRP invoices XML export.

image

pavolbiely/mrp

MRP invoices XML export.

  • Thursday, May 31, 2018
  • by pavolbiely
  • Repository
  • 1 Watchers
  • 0 Stars
  • 950 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 65 % Grown

The README.md

MRP

Build Status Coverage Status, (*1)

MRP invoices XML export., (*2)

Usage

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)

How to run tests?

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

Minimum requirements

  • PHP 5.4+
  • ext-zip
  • ext-mbstring

License

MIT License (c) Pavol Biely, (*6)

Read the provided LICENSE file for details., (*7)

The Versions

31/05 2018

dev-master

9999999-dev

MRP invoices XML export.

  Sources   Download

MIT

The Requires

 

by Pavol Biely