billduapp / api_documentation

Documentation for Billdu.com REST API
0 stars 4 forks source link

Creating or editing invoice - unable to set issue or delivery date #4

Open stkubica opened 4 years ago

stkubica commented 4 years ago

Hello, I`m trying to implement functionality to create and edit invoices using the API. The problem is, with following call:

{
    "client": <clientid>,
    "note": "Note",
    "locale": "sk",
    "issue_date": "2019-11-20T15:08:07+0100",
    "maturity": "10",
    "payment": "transfer",
    "currency": "EUR",
    "delivery_date": "2019-11-10T15:08:07+0100",
    "items": [
        {
            "label": "Item 1",
            "price": 1.0,
            "tax": 0,
            "count": 1,
            "unit": "ks",
            "id": null,
            "server_id": null,
            "position": 0
        }
    ],
    "type": "invoice"
}

Despite the fact, that there are issue_date and delivery_date defined, the same fields in the final invoice are set to default date (today):

"issue_date": "2019-11-24T15:08:08+0100",
"delivery_date": "2019-11-24T15:08:08+0100",