pondersource / prejournal

An experimental bookkeeping tool that sits between source documents and journals
https://prejournal.org
MIT License
2 stars 2 forks source link

forward-latest-invoice command #177

Open michielbdejong opened 1 year ago

michielbdejong commented 1 year ago

Something like php src/cli-single.php forward-latest-invoice heroku quickbooks Add the command in src/run-command.php and add a file for it in src/commands/ It should be the latest complete invoice, not the currently accumulating usage for the next invoice (depending on Heroku API). It should hopefully be idempotent (depending on Quickbooks API).

ishifoev commented 1 year ago

https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/invoice

michielbdejong commented 1 year ago

no, that's outgoing invoices. for incoming invoices we should use https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/bill#bill

michielbdejong commented 1 year ago

Probably need to create a vendor ID for Heroku in Quickbooks first?

ishifoev commented 1 year ago

https://developer.intuit.com/app/developer/qbo/docs/api/accounting/most-commonly-used/vendor#create-a-vendor

ishifoev commented 1 year ago

Yes we need first vendor for Heroku before, that will be work.

ishifoev commented 1 year ago

I think sanbox testing more usable only for US currency and other things. When you are working with Quickbooks Online for production for pondersource not include all of this features.

"response": {
  "Fault": {
   "Error": [
    {
     "Message": "Feature Not Supported Error",
     "Detail": "Feature Not Supported Error : We're sorry. This feature is not included in your QuickBooks Online Simple Start subscription.",
     "code": "5030",
     "element": ""
    }
   ],
   "type": "ValidationFault"
  },
ishifoev commented 1 year ago

When you are creating Account the AccountType need be Expense the other one you can't create billl. Very complex API honestly

ishifoev commented 1 year ago

When you are creating Vendor you need only in body use CompanyName and GivenName enough. I think it will be Heroku.

ishifoev commented 1 year ago

The interesting part is they have a validation if some account or vendor exist you can just this id return and in Bill use when sending invoice.

ishifoev commented 1 year ago

We can use accessToken instead client_id and client_secret because we are not using UI interface. The problem accessToken is they will work only for one hour after it you need to refresh access token and get new token. But for test working I think it will be okay.

ishifoev commented 1 year ago

179