
15th February 2013, 13:58
|
|
Junior Member
|
|
Join Date: Jun 2009
Location: Poland
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
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
|

15th February 2013, 15:22
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,182 Times in 3,201 Posts
|
|
Which billing module version and ispconfig version do you use?
|

15th February 2013, 15:33
|
|
Junior Member
|
|
Join Date: Jun 2009
Location: Poland
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by till
Which billing module version and ispconfig version do you use?
|
Sorry,
ISPConfig Version: 3.0.4.6
Billing module: REV-3
|

15th February 2013, 16:00
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,182 Times in 3,201 Posts
|
|
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.
|

15th February 2013, 16:07
|
|
Junior Member
|
|
Join Date: Jun 2009
Location: Poland
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by till
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());
}
}
|

15th February 2013, 16:38
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,182 Times in 3,201 Posts
|
|
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.
|

27th February 2013, 16:42
|
|
Junior Member
|
|
Join Date: Jun 2009
Location: Poland
Posts: 19
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by till
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.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 00:39.
|
|
Recent comments
1 day 22 min ago
1 day 3 hours ago
1 day 4 hours ago
1 day 5 hours ago
1 day 7 hours ago
1 day 9 hours ago
1 day 10 hours ago
2 days 2 hours ago
2 days 3 hours ago
2 days 6 hours ago