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

Offer to add ProjectApiConnector to master and issue on using dim3 (projectcode) SalesTransaction #177

Open
KBS-devs opened this issue Jun 4, 2020 · 3 comments

Comments

@KBS-devs
Copy link

KBS-devs commented Jun 4, 2020

Hi Guys,

First of all thanks for this awesome code set.

We are implementing this codeset but are missing some features that we require for our project. The master branche does not provide a ProjectAPIConnector. We have created this module following the module structure of this project and are more than happy to have this code be added to the master branche.

Also we have discovered that there are some issues with the current SalesTransaction and SalesTransactionLine. According to the Twinfield API docs the project code can be set as the Dim3 property. The ThreeDimFiels provides a setDim3() but is not used on the TransactionMapper.

Modifing the TransactionMapper allowed us to nicely add the projectcode and have if stored into Twinfield. The response of Twinfield reports back success including the newly added SalesTransaction.

Unfortunatly php-twinfield lib fails on handling this succesful Twinfield response. After investigation we have discovered that Twinfield itself do not follow their own API documentation.

When a SalesTransactionLine has a project code (dim3) assigned it behaves more like a TOTAL line than an DETAIL line. For example, according to the API docs matchstatus can only be 'notmatchable' for DETAIL lines. However Twinfield XML response reports back with matcstatus 'available' on a DETAIL line causing php-twinfield to throw an exception while mapping the response. There are many other props like setMatchStatus that now throw exceptions on a succesfull XML response from Twinfield.

A suggestion for this issue could be to not check input that have been provided by Twinfield during mapping. An other could be to check the dim3 value and prevent exception throw when dim3 is set. Making it of course important that dim3 needs to be set first.

@willemstuursma
Copy link
Contributor

Hi @KBS-devs. I'm open for pull requests.

Please be aware I am not a Twinfield employee and I maintain this library in my free time.

Multiple small PRs have the best chance of landing.

@KBS-devs
Copy link
Author

KBS-devs commented Jun 8, 2020 via email

@willemstuursma
Copy link
Contributor

Hi @KBS-devs, I'd like to point you to the Github help page on this topic: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants