Skip to content

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

Open
@KBS-devs

Description

@KBS-devs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions