Jump to content
  • 0

Add tax to invoice lines


chriscpop

Question

I'm using invoice.add event to add lines to the created invoice. And when running the query, the first addition of the first two lines always don't add tax. If I run it again, all subsequent entries have tax added, and are working properly. Any help or hints where to find this issue?

$invoicelines[] = array(  
   "service_id" => '1',                 
   "description" =>' description ',
   "tax" => '1',
   "qty" => '1',                                   
    "amount" => 2
);
$invoicelines[] = array(  
   "service_id" => '2',                 
   "description" =>' description ',
   "tax" => '1',
   "qty" => '1',                              
   "amount" => 2
);

$vars = [
         'delivery' => ['email'],
         'lines' => $invoicelines
       ];
 $this->Invoices->edit($invoice_id, $vars);

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...