I had started working on an integration with Xero using the Xero API module. However I had used a different method to you had used by creating Xero Invoices for Commerce Orders and then was going to add Xero Payments for Commerce Payment Transaction, however I have now thought that this would only work in two solutions.
From the Xero API Guide there are recommended limits on for different items:
The API also has a daily call limit and a maximum POST limit, this can both be handled using the Drupal Queue API.
Drupal Commerce's financial reporting systems for accounts have not yet been fully developed and in the development of this module I believe there is opportunity to implement some of those requirements.
The closest example in Xero's integration guides to an e-commerce site is that for EPOS systems, How to integrate my Point of Sale (POS) system with Xero. Xero recommends posting daily totals to Xero as an invoice including both sales and payments in the invoice with a balance of zero.
The concept of an End of Day report, also know as a Z-read, is common in POS and is done when each POS is closed calculating the cash in the draw and other transactions. This isn't done in Commerce though, the Commerce Reporting module has gone some way to providing this information but still the orders are never 'closed' in Commerce.
My ideas for a development plan are as follows; the project is split in to sub module providing integrations with different parts of the Xero API. Then the main module or further sub-modules will control how the data is posted to Xero and what data is included.
If Commerce Tax is enable there needs to be a method to link the Commerce Tax Rate with the Xero Tax Type. If it is not enabled the Xero Tax Type should default to 'NONE'
As has been set up there needs to be a link between each payment method and the destination bank/clearing account
There needs to be a default income account for orders and the possibility of of setting different income accounts for line items.
Will provide methods to POST User/Commerce Profiles to Xero Contacts
Will provide methods to POST Commerce Products to Xero Items
Will provide methods to POST Commerce Orders to Xero Invoices
If Contact is enabled the Xero Contact will be included
If Inventory is enabled the Xero Items will be included
Will add more later, but out of time for today.
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.