{"action":"created","issue":{"url":"https://api.github.com/repos/eileenmcnaughton/nz.co.fuzion.accountsync/issues/1","labels_url":"https://api.github.com/repos/eileenmcnaughton/nz.co.fuzion.accountsync/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/eileenmcnaughton/nz.co.fuzion.accountsync/issues/1/comments","events_url":"https://api.github.com/repos/eileenmcnaughton/nz.co.fuzion.accountsync/issues/1/events","html_url":"https://github.com/eileenmcnaughton/nz.co.fuzion.accountsync/issues/1","id":29997048,"number":1,"title":"TODO feedback","user":{"login":"JoeMurray","id":300943,"avatar_url":"https://avatars.githubusercontent.com/u/300943?v=3","gravatar_id":"","url":"https://api.github.com/users/JoeMurray","html_url":"https://github.com/JoeMurray","followers_url":"https://api.github.com/users/JoeMurray/followers","following_url":"https://api.github.com/users/JoeMurray/following{/other_user}","gists_url":"https://api.github.com/users/JoeMurray/gists{/gist_id}","starred_url":"https://api.github.com/users/JoeMurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoeMurray/subscriptions","organizations_url":"https://api.github.com/users/JoeMurray/orgs","repos_url":"https://api.github.com/users/JoeMurray/repos","events_url":"https://api.github.com/users/JoeMurray/events{/privacy}","received_events_url":"https://api.github.com/users/JoeMurray/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-03-23T20:26:34Z","updated_at":"2015-01-25T20:19:56Z","closed_at":null,"body":"1) Accounting packages I know all allow their chart of accounts to be exported. I think there should be an extension to import a chart of accounts into civicrm_financial_account and possibly at same time (or in future version of child extension) create related records in civicrm_financial_type table. I think creating and changing the chart of accounts and then synchronizing it to CiviCRM is an infrequent use case that is better left out of scope for this extension.\r\n\r\n3a) Overpayments and CiviAccounts. I recommend manually adjusting in CiviCRM so that the amount paid is reduced to the amount that is currently owing. \r\n\r\n3b) Assuming that what you mean by total amount of contribution <> sum(line items) is not a case where there is an amount still owing or a case where a refund is due, then this is a situation where a new line item needs to be added to resolve the discrepancy.\r\n\r\n4) What is an account sync contact?\r\n\r\nThoughts: yes, it makes sense to me to prevent contributions and contacts who have made contributions from being deleted.\r\n\r\nHTH."},"comment":{"url":"https://api.github.com/repos/eileenmcnaughton/nz.co.fuzion.accountsync/issues/comments/71390980","html_url":"https://github.com/eileenmcnaughton/nz.co.fuzion.accountsync/issues/1#issuecomment-71390980","issue_url":"https://api.github.com/repos/eileenmcnaughton/nz.co.fuzion.accountsync/issues/1","id":71390980,"user":{"login":"eileenmcnaughton","id":336308,"avatar_url":"https://avatars.githubusercontent.com/u/336308?v=3","gravatar_id":"","url":"https://api.github.com/users/eileenmcnaughton","html_url":"https://github.com/eileenmcnaughton","followers_url":"https://api.github.com/users/eileenmcnaughton/followers","following_url":"https://api.github.com/users/eileenmcnaughton/following{/other_user}","gists_url":"https://api.github.com/users/eileenmcnaughton/gists{/gist_id}","starred_url":"https://api.github.com/users/eileenmcnaughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileenmcnaughton/subscriptions","organizations_url":"https://api.github.com/users/eileenmcnaughton/orgs","repos_url":"https://api.github.com/users/eileenmcnaughton/repos","events_url":"https://api.github.com/users/eileenmcnaughton/events{/privacy}","received_events_url":"https://api.github.com/users/eileenmcnaughton/received_events","type":"User","site_admin":false},"created_at":"2015-01-25T20:19:56Z","updated_at":"2015-01-25T20:19:56Z","body":"The intention is that civixero should be specific & that civiaccountsync should be the generic part of it.\r\n\r\nThe api that run are civixero ones ie.https://github.com/eileenmcnaughton/nz.co.fuzion.civixero/tree/master/api/v3/Civixero\r\ncivicrm_api('civixero', 'contactpull', array());\r\n\r\nWhich calls https://github.com/eileenmcnaughton/nz.co.fuzion.civixero/blob/master/CRM/Civixero/Contact.php#L36 - as you have highlighted.\r\n\r\nAt this point in the code \r\n1) it is Xero specific code - ie. in the civixero extensions not civiaccountsync\r\n2) if is working with an array of data that has been retrieved from Xero & is translating it into the fields civicrm account sync stores. The mapping you have makes sense.\r\n\r\nI suspect that the issue may be that CiviXero is very Civi-to-accounts centric. Ie. we have been putting contacts into Xero from CiviCRM but with contacts in the accounting system already we usually just store them to the civicrm_accounts_contact table. From there we usually match some contacts with CiviCRM contacts (usually as part of an initial set-up) but we don't normally put all the accounts contacts into CiviCRM. (The account sync table is primarily for tracking mappings)\r\n\r\nBut, for your purpose (& in civixero in the future) I would probably add another api to take the contacts out of the account_contact table & create contacts. There could be a generic version of this e.g civicrm_api('accountsync', 'contactsync', array()) which would work off display name only (& perhaps email if we tease that out into a field);\r\n\r\nBut within the extensions a more detailed version could be created because they would know how to interpret the data in the accounts_data field\r\n\r\n\r\n\r\n"}}