Closed (fixed)
Project:
Commerce Xero
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
19 Feb 2013 at 03:21 UTC
Updated:
4 Mar 2015 at 22:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mradcliffeA couple of options:
Comment #2
cafuego commentedIn the attached patch I've mashed it into the bank account setting for each account (ie: per payment method). That shouldn't stop anyone from optionally overriding it in a rule or via an alter hook for a transaction or invoice or what have you.
Note that because I'm not set up yet to actually process transactions, I don't know if the created transaction in Xero is tagged appropriately. Probably not (yet). The Drupal UI side works fine, though.
Comment #3
smokrisThanks for the patch, @cafuego.
It doesn't seem to be posting the tracking category to Xero. Here's an excerpt of the actual Xero POST request after applying the patch on #2:
…but (based on the the Xero API Previewer output for a Bank Transaction with a tracking category set) it needs to look like this:
Comment #4
mradcliffeThanks for the feedback.
I went ahead and added a couple of things to the original patch. The admin page allows to select the tracking option from an optgroup of categories. And that supports multiple tracking categories. Finally the tracking category, if set, will be added to bank transactions. I don't think I can do that for invoices automatically because there could be multiple line items.
Setting tracking category and option via the alter hooks for invoices and bank transactions is still an alternative.
Comment #6
cafuego commentedThanks! Yup, I'm doing that via an alter hook on invoice items and it's worked fine sofar :-)