function commerce_reports_tax_schema in Commerce Reporting 7.3
Same name and namespace in other branches
- 7.4 modules/tax/commerce_reports_tax.install \commerce_reports_tax_schema()
- 7 commerce_reports_tax/commerce_reports_tax.install \commerce_reports_tax_schema()
- 7.2 modules/tax/commerce_reports_tax.install \commerce_reports_tax_schema()
Implementation of hook_schema().
File
- modules/
tax/ commerce_reports_tax.install, line 10 - Install, update, and uninstall functions for the commerce_reports_tax module.
Code
function commerce_reports_tax_schema() {
$schema = array();
$schema['commerce_reports_tax'] = array(
'description' => 'Information about the tax rates applied to individual orders.',
'fields' => array(
'tax_rate' => array(
'description' => 'The machine-name of the applied rate.',
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
),
'order_id' => array(
'description' => 'Order ID.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'currency_code' => array(
'description' => 'The currency of the taxes collected, as per the currency of the total order amount.',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
'taxable' => array(
'type' => 'int',
'not null' => FALSE,
'default' => NULL,
'description' => 'The applied amount of tax.',
),
'taxed' => array(
'type' => 'int',
'not null' => FALSE,
'default' => NULL,
'description' => 'The applied amount of tax.',
),
),
'primary key' => array(
'tax_rate',
'order_id',
'currency_code',
),
);
return $schema;
}