Skip to content

Error on Updating substitute Invoice #38

@PatrickJager

Description

@PatrickJager

For a customer I had to add an substitute invoice (with pdf) to the substitude order.
The flow would be like: PDF in exact -> sync start -> create substitute order if not exist->create substitute invoice if not exist -> update substitute invoice to add pdf.

But on doing so, I got the following error:
Changing values did not change. POST works fine. So for now I am only able to add a single document to one invoice else I have to create a new invoice. (which is fine for now).

"Fatal Error: 'Uncaught TypeError: Argument 1 passed to Dealer4Dealer\\SubstituteOrders\\Model\\Invoice::setBillingAddress() must implement interface Dealer4Dealer\\SubstituteOrders\\Api\\Data\\OrderAddressInterface, null given, called in \/var\/www\/clients\/client6\/web11\/web\/vendor\/dealer4dealer\/module-substituteorders\/Model\/InvoiceManagement.php on line 155 and defined in \/var\/www\/clients\/client6\/web11\/web\/vendor\/dealer4dealer\/module-substituteorders\/Model\/Invoice.php:325\nStack trace:\n#0 \/var\/www\/clients\/client6\/web11\/web\/vendor\/dealer4dealer\/module-substituteorders\/Model\/InvoiceManagement.php(155): Dealer4Dealer\\SubstituteOrders\\Model\\Invoice->setBillingAddress(NULL)\n#1 [internal function]: Dealer4Dealer\\SubstituteOrders\\Model\\InvoiceManagement->putInvoice(Object(Dealer4Dealer\\SubstituteOrders\\Model\\Invoice))\n#2 \/var\/www\/clients\/client6\/web11\/web\/vendor\/magento\/module-webapi\/Controller\/Rest\/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)\n#3 \/var\/www\/clients\/client6\/web11\/web\/vendor\/magento\/module-webapi\/Con' in '\/var\/www\/clients\/client6\/web11\/web\/vendor\/dealer4dealer\/module-substituteorders\/Model\/Invoice.php' on line 325"

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