[Spce-user] Invoice API generation problem

Rickey rickey58 at gmail.com
Fri Oct 28 02:12:45 EDT 2022

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 ''
--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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20221028/575612f4/attachment.html>

More information about the Spce-user mailing list