Feature request: provide site-wide configuration to set 1 or more tracking categories.
Xero allows you to define multiple tracking categories. Each line item can select 1 option from each tracking category. You can then filter reports by tracking category options.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | tracking_category-4.patch | 12.84 KB | mradcliffe |
| #4 | interdiff.txt | 8.99 KB | mradcliffe |
| #2 | tracking_category.patch | 6.67 KB | cafuego |
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 :-)