Open Glimbrant opened 3 years ago
Have anybody checked into this why you cant post order rows?
Sorry, been very busy.
We should definitely look into this! I'll try to steal some time tonight when kids sleeping =)
Any updates on this?
Reverting to version 1.0.12 will resolve the OrderRows issue. In the most recent release, you are now initialising the classes each time we call the functions, can that cause the issue?
@KasparRosin Thanks for the research, I wonder why that would cause this problem though. It's worth looking further into - checking now.
Is it possible for you to make two logs from the CreateTrait, in version 1.0.12, and in version 1.0.13?
Please don't use "live" data. Don't want leaks here.
In this function, in CreateTrait.php:
public function create (array $data)
{
$req = new FortieRequest();
$req->method('POST');
$req->path($this->basePath);
$req->wrapper($this->wrapper);
$req->setRequired($this->required_create);
$req->data($data);
return $this->send($req->build());
}
Can you log 1) the input $data and 2) the built $req->build()
Thanks. That'll make it easier to understand what's going on I think.
Trying to use the create function for the Orders Provider using $this->orders()->create($params)
array(2) { ["CustomerNumber"]=> string(5) "10810" ["OrderRows"]=> array(1) { [0]=> array(5) { ["ArticleNumber"]=> string(17) "ditte-malet-1000g" ["DeliveredQuantity"]=> float(1) ["Description"]=> string(11) "DITTE Malet" ["OrderedQuantity"]=> float(1) ["Unit"]=> string(2) "st" } } }
When posting the OrderRows always gets empty. Is something missing?