Giter VIP home page Giter VIP logo

Comments (14)

stephangroen avatar stephangroen commented on July 17, 2024

Hi :) What PHP version are you using? What issues did you get?

from exact-php-client.

sebastianberm avatar sebastianberm commented on July 17, 2024

I've been using PHP 5.4.36.
For some reason, the system mentioned, for example, the ID 'ID' to be invalid, until I modified it to this.
I'll issue a pull request when I've got everything working 👍

from exact-php-client.

 avatar commented on July 17, 2024

On 1 august 2015 Exact Online NL will start with Oauth2. I have to change my old way of form authentication NOW.... within 8 days !!!! Running on PHP 5.3 I will try to use this modules... Stephan. I will let you know if it works.... if not I have a little time to change things.... Maybe I have to upgrade to PHP 5.5 or 5.6 but even then I don't know if my app will work.... So problems allover....

from exact-php-client.

stephangroen avatar stephangroen commented on July 17, 2024

@sebastianberm Thanks!

@MHermsen I don't officially support 5.3, because its already EOL. You could try using it though, but there might be issues. Ofcourse, upgrading PHP to 5.5 or 5.6 is recommended because of obvious reasons.

from exact-php-client.

sebastianberm avatar sebastianberm commented on July 17, 2024

@MHermsen This won't work with 5.3, as it uses traits which were introduced in 5.4. You should probably contact someone to accomplish this for you.

@stephangroen Have you tried adding invoices with invoicelines? - that part is a bit missing in the documentation (both of this package and of Exact). So far, I've added support for Contacts & SalesEntries, and have tried to expand the filter to support OData a bit better, but that's still a no go so far.
I've asked Exact support for a working example on how to craft a request that will add an SalesEntry with SalesEntryLines (same for SalesInvoice with SalesInvoiceLines).

I do know this package is the most complete one, I've been able to find so far :).
(this shouldn't be in a Github issue... 👎)

from exact-php-client.

stephangroen avatar stephangroen commented on July 17, 2024

@sebastianberm This is the way I create an invoice with invoicelines:

        $salesInvoice = new SalesInvoice($this->connection());
        $salesInvoice->InvoiceTo = $customer_code;
        $salesInvoice->OrderedBy = $customer_code;
        $salesInvoice->YourRef = $orderId;
        $salesInvoice->SalesInvoiceLines = $items;

where $items in an array consisting of the following:

            $items[] = [
                'Item'      => $itemId,
                'Quantity'  => $orderproduct['amount'],
                'UnitPrice' => $orderproduct['price']
            ];

Here $itemId is the ID as returned by Exact (Item entity in this client).

I have not implemented the full Exact API yet, because I didn't need it in my project. A pull request with added entities and enhancements is always welcome :)

I'm currently working on changing this library to Guzzle 6 (will of course be a new version) so it supports PSR-7, which is easier to integrate when used with other packages. This does have the added dependancy of PHP >5.5 though.

from exact-php-client.

stephangroen avatar stephangroen commented on July 17, 2024

Would be nice to be able to have a collection of Item models, which you can create and add to a SalesInvoice as well and/or be able to just do something like $salesInvoice->addItem($item);. But haven't got to that.

from exact-php-client.

sebastianberm avatar sebastianberm commented on July 17, 2024

Ah... as an array... Well, that is something I didn't try last Saturday while coding an example.
Ehh, I'll try and figure something out ;-).

from exact-php-client.

stephangroen avatar stephangroen commented on July 17, 2024

I'll update the docs to reflect this :)

from exact-php-client.

sebastianberm avatar sebastianberm commented on July 17, 2024

I've filed a PR for most changes now. There are a few things not yet in the PR though.
I don't know if I want to file the Document system without documentation. (I've got it working for myself though. Our invoicing system will now automatically also add a PDF version of the current invoice to Exact.)
(I should go and sell these integrations ;-))

from exact-php-client.

stephangroen avatar stephangroen commented on July 17, 2024

@sebastianberm Nice, thank you. I see you made some nice additions in SalesInvoiceLines as well. I haven't looked into the Document system tbh. Is it undocumented at Exact or do you mean it needs to be documented for this client?

At Picqer we use quite some open source software to build our product, so we try to give back and contribute as much as we can. Therefor we contribute to other open source projects and open source some stuff ourselves :) There are quite some companies selling integrations like this though.

from exact-php-client.

sebastianberm avatar sebastianberm commented on July 17, 2024

@stephangroen The documentation API is a "ramp" (in both Dutch & English). It's hard to understand at first, due to the fact only the API arguments themselves have been documented, and when you finally get it, you need to understand you need to do stuff in the right order...

At Sebsoft, we try to do the same. See for example all the Moodle plugins and addons we've released (and are supporting) :).

from exact-php-client.

 avatar commented on July 17, 2024

@sebastianberm mail send with attach... maybe you have a solution ?

from exact-php-client.

stephangroen avatar stephangroen commented on July 17, 2024

@MHermsen Please continue your conversation by email with @sebastianberm direclty. This is not the right place for this.

@sebastianberm Yeah, I had to ask several questions to Exact to know exactly what some arguments where. The lack of documentation in general prevents an easy use of the API.

If you would like to send a PR for the document system, I would be happy to merge it if we can provide some documentation on how to use it with this client. Ofcourse you don't have to.

from exact-php-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.