0

I am using https://github.com/dharyk/codeigniter-xero to integrate Xero to my website. It is very helpful when adding invoices to Xero or adding a contact.

But it cannot add Purchase orders. I am using $this->xero->PurchaseOrders($new_po); to add a purchase order. But its giving me the following error:

An uncaught Exception was encountered

Type: XeroException

Message: The selected method does not exist. Please use one of the following methods: Accounts, BankTransactions, BrandingThemes, Contacts, CreditNotes, Currencies, Employees, ExpenseClaims, Invoices, Items, Journals, ManualJournals, Organisation, Payments, Receipts, TaxRates, TrackingCategories, Users

Filename: /home/path-to-files/application/libraries/Xero.php

Line Number: 167

I think its because this library was written long back and purchase orders came later(just thinking).

Is there any way so that I can add Purchase order method to this library?

Any other suggestions are also welcomed.

Thanks

user974172
  • 75
  • 2
  • 8

1 Answers1

3

The code is open source so you can do the work yourself. The last commit to that SDK was 4 years ago however so it's probably no longer maintained (purchase orders released maybe 2+ years ago). If you don't want to move away from that SDK to another one that's maintained, you should fork the repository and add the new functionality to your fork. I wouldn't think the original maintainer will be accepting pull requests if the repo is dead but you could always open one once you've got the new functionality you want in there anyway.

MJMortimer
  • 865
  • 5
  • 10