Invoice

Invoice represents the invoice data in the system issued to customers.

Type

General entity

Fields

Field name

Type

Writable

Required

Description

date

string

The issue date in YYYY-MM-DD format.

due_date

string

The due date for payments in YYYY-MM-DD format

invoice_no

string

The unique invoice number.

status

InvoiceStatus

The status.

po_so_no

string

The related PO or SO number for reference.

memo

string

The additional memo for the recipient.

currency_code

string

The currency of this invoice depicted by code.

currency_rate

number

The currency rate when this invoice is issued. Leave it null to adopt the system rate.

inclusive_tax

boolean

The flag to indicate if the taxes are inclusive in this invoice.

tax_invoice

boolean

The flag to indicate if this invoice is a tax invoice for filing.

customer

PartnerReference

The customer, or recipient, of this invoice.

address_line1

string

The first line of billing address.

address_line2

string

The second of billing address.

discount

number

The discount amount in percentage. Eg. 10 for 10% off.

sub_total

number

The sub total in the invoice currency.

tax_total

number

The total tax amount in the invoice currency.

total

number

The total amount, with tax and discount considered, in the invoice currency.

total_in_booking_currency

number

The converted total amount in the bookkeeping currency.

due_amount

number

The remaining due amount in the invoice currency.

due_amount_in_booking_currency

number

The converted remaining due amount in the bookkeeping currency.

paid_amount

number

The already paid amount.

lines

InvoiceLine []

The line items of this invoice.

The total amount fields are derived from the line items and related payment data, thus not directly writable.

Sample

{
"date_created": 1555639815992,
"date_updated": 1562636824822,
"company_id": "a8ddc6fd-9f34-43c9-a3e2-ecac869cc5f1",
"date": "2019-04-19",
"memo": "",
"currency_code": "NPR",
"inclusive_tax": false,
"sub_total": 150.00000,
"tax_total": 10.50,
"total": 160.50,
"discount": null,
"currency_rate": 0.303420,
"total_in_booking_currency": 48.70,
"due_date": "2019-04-27",
"invoice_no": "INV00000020",
"po_so_no": "",
"customer": {
"company_id": "a8ddc6fd-9f34-43c9-a3e2-ecac869cc5f1",
"code": "CC-CYS",
"name": "ChooChoo Co. Ltd.",
"email": null,
"contact_name": null,
"note": null,
"_id": "705cf95b-2163-4817-9754-577f99810a9a"
},
"address_line1": "",
"address_line2": "",
"tax_invoice": false,
"status": "OVERDUE",
"paid_amount": 0.0,
"due_amount": 160.50,
"due_amount_in_booking_currency": 48.70,
"lines": [
{
"date_created": 1555639815992,
"date_updated": null,
"product": {
"company_id": "a8ddc6fd-9f34-43c9-a3e2-ecac869cc5f1",
"code": null,
"name": "Apple Cookie",
"description": "recenilanire",
"uom": null,
"_id": "4e28b516-b15b-4dcf-94bf-3b2e30c7426d"
},
"quantity": 1.00000,
"description": "recenilanire",
"tax": {
"company_id": "a8ddc6fd-9f34-43c9-a3e2-ecac869cc5f1",
"code": "VAT-7",
"name": "Value Added Tax (7%)",
"description": null,
"latest_rate": 0.07000,
"_id": "989bcfad-b710-493e-aca6-22f9554ca07e"
},
"unit_price": 150.00000,
"line_amount": 150.00000,
"tax_amount": 10.50000,
"total_amount": 160.50000,
"account": null,
"_id": "e4974d0f-a69e-49dd-a780-cd09e2c243d5"
}
],
"_id": "6bf957e7-dbde-4ccd-b835-ffbdc20511d3",
"_links": {
"self": {
"href": "https://api.pymlo.com/v1/businesses/a8ddc6fd-9f34-43c9-a3e2-ecac869cc5f1/income/invoices/6bf957e7-dbde-4ccd-b835-ffbdc20511d3"
}
}
}