Saltar a contenido

Facturas de proveedor

Recurso client.bills (endpoint bills). Ver Compras y documentos de proveedor.

alegrapy.bills.Bills

Bases: Actions

Operations related to supplier bills (facturas de proveedor) endpoint.

__init__(client=None)

Initialize the resource.

list(start=0, limit=30, **kwargs)

List supplier bills.

order_field (date, name, dueDate) and order_direction (ASC, DESC) are sent only when passed by the caller.

iter_all(max_items=None, page_size=30, **filters)

Iterate lazily over supplier bills, validating filters eagerly.

close(id, date, category, observations=None)

Close a supplier bill by writing off its pending balance (POST /bills/{id}/close).

Note

Alegra requires date to be later than the bill's creation date.

add_comment(id, comments)

Add comment(s) to a supplier bill (POST /bills/{id}/comments).

Returns Alegra's response unchanged (typically {"code": 201, "message": <bill>} inside an HTTP 200).

delete_attachment(attachment_id)

Delete a bill attachment by attachment ID (DELETE /bills/attachment/{id}).