sirhan Posted July 3, 2011 Share Posted July 3, 2011 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 0 Quote Link to comment Share on other sites More sharing options...
nessys Posted July 24, 2012 Share Posted July 24, 2012 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 0 Quote Link to comment Share on other sites More sharing options...
williamlbell Posted August 9, 2012 Share Posted August 9, 2012 I am having the same problem and I have a ticket open with support about it. I will repost here when they respond....if anyone can help in the meantime please let us know. I am able to modify all properties of the invoice being created...but NOT add items or item amounts 0 Quote Link to comment Share on other sites More sharing options...
gbrennae Posted August 12, 2012 Share Posted August 12, 2012 Have you specified a admin user to execute the command under? When you use the LocalAPI the call should be LocalAPI('command', Array(params), 'adminuser'); when the command is executed it is executed under the authority of the adminuser. 0 Quote Link to comment Share on other sites More sharing options...
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.