waynerobinson / xeroizer

Xero accounting system API library.
http://waynerobinson.github.com/xeroizer
Other
238 stars 311 forks source link

Allocate Prepayments to Invoice #387

Open phyllipy opened 7 years ago

phyllipy commented 7 years ago

There is currently no way to allocate prepayments to invoices. https://developer.xero.com/documentation/api/prepayments

rjaus commented 6 years ago

Hey @phyllipy. The credit note model already has functionality for creating allocations, it's the same for Prepayments. I've made the same functionality available for the Prepayments model.

Branch: https://github.com/waynerobinson/xeroizer/blob/prepayment_allocation/lib/xeroizer/models/prepayment.rb

There are some limitations tho (on both CreditNotes & Prepayments) due to the implementation (not the API).

Only one allocation can be made. The allocate function continues to allocate the initial allocation.

Appreciate it if you want to have a go at refactoring it.

phyllipy commented 6 years ago

Hey @rjaus ! Been a while, any news on this? otherwise I'd be happy to refactor it =)