Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 15th February 2013, 13:58
arek_bednarczyk arek_bednarczyk is offline
Junior Member
 
Join Date: Jun 2009
Location: Poland
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
Default Billing module - SOAP-ENV:ServerCall to a member function fault() on a non-object

Hi,
I'm trying use a remote billing_invoice_get_pdf function, if invoice number is like 0001 pdf is created. But if number is like 2013/AB/0001 then this not work, and I see this one error message:

SOAP-ENV:ServerCall to a member function fault() on a non-object
SOAP Error: Call to a member function fault() on a non-object

Is this bug in billing remote module? With normal work in ispconfig everything work properly.

Br.
Arek
Reply With Quote
Sponsored Links
  #2  
Old 15th February 2013, 15:22
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Which billing module version and ispconfig version do you use?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 15th February 2013, 15:33
arek_bednarczyk arek_bednarczyk is offline
Junior Member
 
Join Date: Jun 2009
Location: Poland
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Which billing module version and ispconfig version do you use?
Sorry,

ISPConfig Version: 3.0.4.6
Billing module: REV-3
Reply With Quote
  #4  
Old 15th February 2013, 16:00
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Slashes in invoice numbers are not supported in that version of the billing module as the invoice number is used as filename for the pdf invoices, so only chars that are allowed as filename on Linux can be used inside a invoice number. The billingmodule prerelease for ISPConfig 3.0.5 supports slashes as the invoice naming has been changed.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 15th February 2013, 16:07
arek_bednarczyk arek_bednarczyk is offline
Junior Member
 
Join Date: Jun 2009
Location: Poland
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Slashes in invoice numbers are not supported in that version of the billing module as the invoice number is used as filename for the pdf invoices, so only chars that are allowed as filename on Linux can be used inside a invoice number. The billingmodule prerelease for ISPConfig 3.0.5 supports slashes as the invoice naming has been changed.
I know this, but I want save invoices as invoice[$invoice_id].pdf
Here is function for saving invoices:


Code:
function remote_billing_invoice_get_pdf($invoice_id) {
	require('lib/config.inc.php');
	
	$client = new SoapClient(null, array(	'location' => $soap_location,
                                     		'uri'      => $soap_uri,
									 												'trace' => 1,
									 												'exceptions' => 1));

	try {
		$session_id = $client->login($username,$password);
		
		//* Save the PDF file in the following path
		$file_path = 'invoices/invoice'.$invoice_id.'.pdf';
		
		//* Get the PDF file content (base64 encoded)
		$content = $client->billing_invoice_get_pdf($session_id, $invoice_id);
		
		//* Decode the content
		$content_decoded = base64_decode($content);
		
		//* Save the pdf file to disk
		file_put_contents($file_path,$content_decoded);

		// Logout remote user
		$client->logout($session_id);
	} catch (SoapFault $e) {
		echo $client->__getLastResponse();
		die('SOAP Error: '.$e->getMessage());
	}
}
Reply With Quote
  #6  
Old 15th February 2013, 16:38
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,983 Times in 3,903 Posts
Default

Quote:
I know this, but I want save invoices as invoice[$invoice_id].pdf
Here is function for saving invoices:
The problem is not your remote function here. As ispconfig billing module does not support slashes in invoice numbers in the rev3 release, the pdf invoice can not be saved to disk when you call the finalize function of the remote api or click on finalize in the interface. The function billing_invoice_get_pdf(...) is just trying to read the pdf file from disk that was created before and then hands it over to your script. So when the pdf can not be saved to disk in the first step, then you can not retrieve it with the billing_invoice_get_pdf later.

It might be possible to replace the internal get_invoice_filename(...) function of the interface/lib/classes/billing_functions.inc.php with the one from the rev 4 release. If you want to try that, send me an email to the address were you received the billing module from and I will send you the rev4 version RC.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 27th February 2013, 16:42
arek_bednarczyk arek_bednarczyk is offline
Junior Member
 
Join Date: Jun 2009
Location: Poland
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by till View Post
It might be possible to replace the internal get_invoice_filename(...) function of the interface/lib/classes/billing_functions.inc.php with the one from the rev 4 release. If you want to try that, send me an email to the address were you received the billing module from and I will send you the rev4 version RC.
Thanks!
As I remember this was arek[at]linux.pl address.
Reply With Quote
Reply

Bookmarks

Tags
billing module

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig Users Permissions guimnk Installation/Configuration 14 14th April 2011 18:26
ISPConfig3 Debian Squeeze Crontab - Log petrichbg Installation/Configuration 5 22nd March 2011 12:25
Proftpd + MySQL virtual users, can't connect geekman HOWTO-Related Questions 28 27th September 2010 18:03
ISPConfig 2 few problems Tarka Installation/Configuration 8 13th May 2010 13:30
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 17:26


All times are GMT +2. The time now is 16:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.