Jump to content

Help : usage of : localAPI - updateinvoice - not working


sirhan

Recommended Posts

Hello everyone..

 

I am having trouble in getting the "updateinvoice" working with localAPI().

 

Can anybody help me with the proper usage, and how to set 'array()' options for 'itemdescription' and 'itemamount' properly?

 

[php]
$command = 'updateinvoice';
$values = array();
$values = array(
		'invoiceid' => $invoice_id,
		'itemdescription' => array("1"=>$description0,"2"=>$description1),
		'itemamount' => array("1"=>$payable_amount,"2"=>null),
		'date' => date('Ymd'),
		'duedate' => date('Ymd'),
	);
$adminuser = "admin";
$results = localAPI($command,$values,$adminuser);
[/php]

 

Even though the api returns $results as success, the 'itemdescription' and 'itemamount' is not changing to $description0 and $description1 in the invoice :(

 

Can anybody show me the proper usage of updateinvoice ?

 

 

Thanks

 

http://docs.whmcs.com/API:Update_Invoice

Link to comment
Share on other sites

  • 1 year later...

Sorry about the different time, but we're having EXACTLY the same issue with the API UpdateInvoice not working despite the proper data.

 

Did you (or anybody else) have a solution for this issue? We're tracked this and it seems to be an WHMCS API bug into this function that, as you say, reports success but fails the call and does nothing.

 

Any advice on this will be appreciated.

 

 

Hello everyone..

 

I am having trouble in getting the "updateinvoice" working with localAPI().

 

Can anybody help me with the proper usage, and how to set 'array()' options for 'itemdescription' and 'itemamount' properly?

 

[php]
$command = 'updateinvoice';
$values = array();
$values = array(
		'invoiceid' => $invoice_id,
		'itemdescription' => array("1"=>$description0,"2"=>$description1),
		'itemamount' => array("1"=>$payable_amount,"2"=>null),
		'date' => date('Ymd'),
		'duedate' => date('Ymd'),
	);
$adminuser = "admin";
$results = localAPI($command,$values,$adminuser);
[/php]

 

Even though the api returns $results as success, the 'itemdescription' and 'itemamount' is not changing to $description0 and $description1 in the invoice :(

 

Can anybody show me the proper usage of updateinvoice ?

 

 

Thanks

 

http://docs.whmcs.com/API:Update_Invoice

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

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

Guest
Reply to this topic...

×   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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated