Skip to content

Bill::create silently failing #506

Open
@hyphen81

Description

@hyphen81

I'm calling the Bill and/or VendorCredit facade like so:

Bill::create([
[
      'DocNumber' => '12345678',
      'TxnDate' => 2023-12-06,
      'Line' => [
        'DetailType' => 'AccountBasedExpenseLineDetail',
        'Amount' => 23.12,
        'AccountBasedExpenseLineDetail' => [
          'AccountRef' => [
            'value' => 150
          ]
        ]
      ],
      'VendorRef' => [
        'value' => 175
      ]
    ]
])

However, nothing gets returned. I added some logging to the bill class, and I can see the data that's passed in is correct, but it never gets to the second log statement. It seems to be silently failing somewhere and I can't figure out where.

Seems to be something in the FacadeHelper::reflectArrayToObject method.

 Log::debug($data);
        $BillObject = FacadeHelper::reflectArrayToObject("Bill", $data, $throwException);
        Log::debug($BillObject); <-- never gets here

Has anyone else run into this?

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