domain | shortname | name | status | editor | contributors | |
---|---|---|---|---|---|---|
rfc.opencannabis.info |
9/OCS-A |
OpenCannabis Accounting Extension |
raw |
Randal Stevens <[email protected]> |
|
- Version
1.0
- Status:
RAW
This specification's current status is considered RAW
, i.e. pre-DRAFT
. Distribution of this memo is unlimited.
This document describes an extension to the OpenCannabis Specification, version 1, that introduces accounting-related definitions structures, and services that compose, create and reference accounting.
"Accounting" in this context, refers to:
- Tax Jurisdictions
- Local Tax
- Federal Tax
- Protocol Definition:
accounting
: Bookkeeping, accounting, taxes, and so on. - accounting/Taxes.proto
{% nomnoml %}
#fill: #d5e7ee; #8ebff2 [FederalTax | country:opencannabis.geo.Country]
[LocalTax | municipality:string | province:opencannabis.geo.Province | country:opencannabis.geo.Country] {% endnomnoml %}
{% nomnoml %}
#fill: #d5e7ee; #8ebff2
[ProvincialTax | province:opencannabis.geo.Province | country:opencannabis.geo.Country]
[Tax | id:string | spec:TaxSpec | name:string | label:string | description:string]
{% endnomnoml %}
{% nomnoml %}
#fill: #d5e7ee; #8ebff2 [TaxJurisdiction | mode:TaxJurisdictionMode | local:LocalTax | provincial:ProvincialTax | federal:FederalTax]
[TaxSpec | basis:TaxBasis | jurisdiction:TaxJurisdiction | transaction_label:string | percentage:double | static_value:double]
[TaxBasis | ITEM:0 | ORDER_SUBTOTAL:1 | ORDER_TOTAL:2]
[TaxJurisdiction | LOCAL:0 | PROVINCE:1 | FEDERAL:2]
{% endnomnoml %}
Specifies information about a federally-imposed tax.
Field | Type | Label | Description |
---|---|---|---|
country | opencannabis.geo.Country | Province the municipality is in. |
Specifies information about a municipally- or locally-imposed tax.
Field | Type | Label | Description |
---|---|---|---|
municipality | string | Municipality imposing the tax. | |
province | opencannabis.geo.Province | Province the municipality is in. | |
country | opencannabis.geo.Country | Country the province is in. |
Specifies information about a provincially-imposed tax.
Field | Type | Label | Description |
---|---|---|---|
province | opencannabis.geo.Province | Province the municipality is in. | |
country | opencannabis.geo.Country | Country the province is in. |
Specifies a tax to be applied during a purchase.
Field | Type | Label | Description |
---|---|---|---|
id | string | ID code for this tax entry. | |
spec | TaxSpec | Specification for how the tax behaves. | |
name | string | Back-office name for this tax. | |
label | string | User-visible name for this tax. | |
description | string | Narrative description for the tax, to be displayed to back-office and end-users in some special circumstances. |
Specifies information about a particular tax jurisdiction.
Field | Type | Label | Description |
---|---|---|---|
mode | TaxJurisdictionMode | Operating mode of this tax jurisdiction. | |
local | LocalTax | Local tax jurisdiction information. | |
provincial | ProvincialTax | Provincial tax jurisdiction information. | |
federal | FederalTax | Federal tax jurisdiction information. |
Specification record for a type of taxes to apply.
Field | Type | Label | Description |
---|---|---|---|
basis | TaxBasis | The basis to calculate the tax value from. | |
jurisdiction | TaxJurisdiction | Jurisdiction that is levying the tax. | |
transaction_label | string | What to call this tax on receipts, and other end-user-visible materials. | |
percentage | double | Percentage rate for the tax. | |
static_value | double | Flat rate for the tax. |