Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added PurchaseEntry + some other changes #15

Merged
merged 7 commits into from
Oct 3, 2015
Merged

Added PurchaseEntry + some other changes #15

merged 7 commits into from
Oct 3, 2015

Conversation

it-can
Copy link
Contributor

@it-can it-can commented Sep 17, 2015

I made several changes to your super library! Hopefully this wil make sense, if you have questions or comments let me know!

  1. I added the purchaseentry/PurchaseEntries and purchaseentry/PurchaseEntryLines
  2. Also removed a slash in url of the Transaction model
  3. Also this PR fixes UPDATE & DELETE requests, the Primary key value was never inserted in the URL, because it referenced only to the fieldname instead of the value.
  4. Also there was a bug in the addDivisionNumberToApiUrl() function if you called something like this:
// Get the journals from our administration
        try {
            $journals = new \Picqer\Financials\Exact\Journal($connection);
            $result   = $journals->get();
            foreach ($result as $journal) {
                echo 'Journal: ' . $journal->Description . '<br>';
            }

            $result   = $journals->get(); // do another get

        } catch (\Exception $e) {
            echo get_class($e) . ' : ' . $e->getMessage();
        }

it will show this error:

Guzzle\Http\Exception\ClientErrorResponseException [ Error ]:
Client error response [status code] 404 [reason phrase] Not Found [url] https://start.exactonline.nl/api/v1/123456/123456/financial/Journals

As you can see it will try to create a new base url in function addDivisionNumberToApiUrl() but it uses not the API url but the Guzzle baseurl (which is set to https://start.exactonline.nl/api/v1/123456)

@it-can it-can changed the title Added PurchaseEntry Added PurchaseEntry + some other changes Sep 21, 2015
@stephangroen
Copy link
Member

Thank you :)

Sorry for this late response, I will try and check this out in the weekend!

@it-can
Copy link
Contributor Author

it-can commented Oct 1, 2015

No problem!

stephangroen added a commit that referenced this pull request Oct 3, 2015
Added PurchaseEntry + some other changes
@stephangroen stephangroen merged commit c6c1a8b into picqer:master Oct 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants