{
	"name": "table/external/ksef/order/order-invoice.json",
	"table_name": "order",
	"table_prefix": "ord",
	"record_type": ["invoice"],
	"local_table": "order",
	"local_record_type": "invoice",
	"format": {
		"date": "%Y-%m-%d",
		"datetime": "%Y-%m-%dT%H:%M:%SZ"
	},
	"field": [
		{
			"field_name": "ksefNumber",
			"local_field": "json_data.transfer_id",
			"field_type": "string",
			"info": "KSeF reference number"
		},
		{
			"field_name": "invoiceNumber",
			"local_field": "company_reference_number",
			"field_type": "string"
		},
		{
			"field_name": "nip",
			"local_field": "json_data.nip",
			"field_type": "string",
			"length": 10
		},
		{
			"field_name": "issueDate",
			"local_field": "order_date",
			"field_type": "date"
		},
		{
			"field_name": "totalGrossAmount",
			"local_field": "price_without_vat",
			"field_type": "decimal"
		},
		{
			"field_name": "totalNetAmount",
			"local_field": "price_with_vat",
			"field_type": "decimal"
		},
		{
			"field_name": "totalVatAmount",
			"local_field": "vat_price",
			"field_type": "decimal"
		},
		{
			"field_name": "currency",
			"local_field": "json_data.currency",
			"field_type": "string",
			"length": 3
		},
		{
			"field_name": "vendorName",
			"local_field": "json_data.vendor_name",
			"field_type": "string"
		},
		{
			"field_name": "buyerName",
			"local_field": "json_data.buyer_name",
			"field_type": "string"
		},
		{
			"field_name": "processingStatus",
			"local_field": "json_data.processing_status",
			"field_type": "string"
		},
		{
			"field_name": "receiptTimestamp",
			"local_field": "json_data.receipt_timestamp",
			"field_type": "datetime"
		}
	]
}
