[Spce-user] Invoice API generation problem

Rene Krenn rkrenn at sipwise.com
Wed Nov 2 10:13:44 EDT 2022


Hello, you can assign the customer a profile package, where you can define any invoice period you like.

 

This appraoch ensures that you have a gapless trasnition from you old billing intervals to your desired new interval.

 

br

 

Von: Rickey [mailto:rickey58 at gmail.com] 
Gesendet: Freitag, 28. Oktober 2022 08:13
An: spce-user at lists.sipwise.com
Betreff: [Spce-user] Invoice API generation problem

 

Good day,

 

When trying to generate an invoice for a client for a period other than a full month via an API request:

curl -i -X POST -H 'Connection: close' -H 'Content-Type: application/json'   --user api_user:api_pass -k 'https://127.0.0.1:1443/api/invoices/' --data-binary '{ "customer_id" : "2", "template_id" : "4", "period_start": "2022-10-01 00:00:00", "period_end": "2022-10-13 23:59:59"  }'

 

I get the following message:
HTTP/2 500
server: nginx
date: Fri, 28 Oct 2022 06:02:52 GMT
content-type: application/json
content-length: 136
set-cookie: ngcp-panel=b2b7a852c977a6c20ff3423245ab0471d48cd2b6; path=/; expires=Fri, 28-Oct-2022 07:02:52 GMT; secure; HttpOnly
x-catalyst: 5.90128

{"code":"500","message":"Can't call method \"start\" on an undefined value at /usr/share/perl5/NGCP/Panel/Utils/Invoice.pm line 63.\n"}

 

Generating an invoice by the administration panel works correctly, however, it is not possible to specify a non-standard period.

The problem occurs on both versions: mr9.4.1, 9.5.4 and 9.5.5

 

BR,

Rickey

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20221102/8a83d329/attachment.html>


More information about the Spce-user mailing list