Home Forums Support Create a quote instead of an invoice?

This topic contains 3 replies, has 3 voices, and was last updated by  promoocodes 2 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #21414

    [email protected]
    Participant

    Self hosted, latest version.

    I’m currently creating invoices with the code below:

    It works perfectly for creating invoices, but when I try to create a quote with createQuote() I get:

    Fatal error: Uncaught Error: Call to undefined method InvoiceNinja\Models\Client::createQuote()

    Do you have a tiny snippet or hint for how to create a quote with the PHP api?

    Thanks!

    Terry

    echo "Creating Invoice";
    $client->createInvoice();
    $client->save();
    $invoice = $client->createInvoice();
    $invoice->addInvoiceItem('Diagnostic Charge', 'Diagnostic Charge (includes first 30 minutes)', 75, 1);
    #21415

    Hillel Coren
    Keymaster

    You can use createInvoice() to create quotes, you just need to set is_quote to true.

    #21419

    [email protected]
    Participant

    > You can use createInvoice() to create quotes, you just need to set is_quote to true.

    Ahhh. Sneaky! 😎

    Thank you again for an awesome product, it’s “just right” for my tiny service business.

    Terry

    #21420

    promoocodes
    Participant

    nice

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Posted in: