Fixed: Tourism tax flow and code review changes implemented
This commit is contained in:
@@ -1205,6 +1205,79 @@ CREATE TABLE `PREFIX_order_detail_tax` (
|
||||
KEY `id_tax` (`id_tax`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
|
||||
|
||||
CREATE TABLE `PREFIX_tourism_tax` (
|
||||
`id_tax` int(11) unsigned NOT NULL,
|
||||
`tax_calc_type` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_per_night` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`is_per_person` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`tax_value` decimal(20,6) NOT NULL DEFAULT '0.000000',
|
||||
`is_tiered` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`has_child_rate` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`child_tax_value` decimal(20,6) NOT NULL DEFAULT '0.000000',
|
||||
`valid_from` date DEFAULT NULL,
|
||||
`valid_to` date DEFAULT NULL,
|
||||
`special_days` text,
|
||||
PRIMARY KEY (`id_tax`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
|
||||
|
||||
CREATE TABLE `PREFIX_tourism_tax_tier` (
|
||||
`id_tier` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id_tax` int(11) unsigned NOT NULL,
|
||||
`min_amount` decimal(20,6) NOT NULL DEFAULT '0.000000',
|
||||
`max_amount` decimal(20,6) NOT NULL DEFAULT '0.000000',
|
||||
`tax_value` decimal(20,6) NOT NULL DEFAULT '0.000000',
|
||||
PRIMARY KEY (`id_tier`),
|
||||
KEY `id_tax` (`id_tax`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
|
||||
|
||||
CREATE TABLE `PREFIX_tourism_tax_child_range` (
|
||||
`id_child_range` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id_tax` int(11) unsigned NOT NULL,
|
||||
`min_age` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`max_age` tinyint(3) unsigned NOT NULL DEFAULT '17',
|
||||
`tax_value` decimal(20,6) NOT NULL DEFAULT '0.000000',
|
||||
PRIMARY KEY (`id_child_range`),
|
||||
KEY `id_tax` (`id_tax`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
|
||||
|
||||
CREATE TABLE `PREFIX_order_tourism_tax` (
|
||||
`id_order_tourism_tax` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id_order` int(11) unsigned NOT NULL,
|
||||
`id_order_detail` int(11) unsigned NOT NULL,
|
||||
`id_htl_booking` int(11) unsigned NOT NULL,
|
||||
`id_service_product_order_detail` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
`id_hotel` int(11) unsigned NOT NULL,
|
||||
`id_tax` int(11) unsigned NOT NULL,
|
||||
`id_currency` int(11) unsigned NOT NULL,
|
||||
`num_nights` smallint(5) unsigned NOT NULL DEFAULT '1',
|
||||
`num_adults` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
`total_amount` decimal(20,6) NOT NULL DEFAULT '0.000000',
|
||||
`is_exempted` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`is_refunded` tinyint(1) NOT NULL DEFAULT '0',
|
||||
`date_add` datetime NOT NULL,
|
||||
`date_upd` datetime NOT NULL,
|
||||
PRIMARY KEY (`id_order_tourism_tax`),
|
||||
KEY `id_order` (`id_order`),
|
||||
KEY `id_order_detail` (`id_order_detail`),
|
||||
KEY `id_hotel` (`id_hotel`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
|
||||
|
||||
CREATE TABLE `PREFIX_order_tourism_tax_exemption` (
|
||||
`id_exemption` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`id_order_tourism_tax` int(11) unsigned NOT NULL,
|
||||
`id_htl_booking` int(11) unsigned NOT NULL,
|
||||
`id_service_product_order_detail` int(11) unsigned NOT NULL DEFAULT '0',
|
||||
`id_order` int(11) unsigned NOT NULL,
|
||||
`id_employee` int(11) unsigned NOT NULL,
|
||||
`note` text,
|
||||
`date_add` datetime NOT NULL,
|
||||
PRIMARY KEY (`id_exemption`),
|
||||
KEY `id_order_tourism_tax` (`id_order_tourism_tax`),
|
||||
KEY `id_htl_booking` (`id_htl_booking`),
|
||||
KEY `id_service_product_order_detail` (`id_service_product_order_detail`),
|
||||
KEY `id_order` (`id_order`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8 COLLATION;
|
||||
|
||||
CREATE TABLE `PREFIX_order_invoice` (
|
||||
`id_order_invoice` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`id_order` int(11) NOT NULL,
|
||||
|
||||
Reference in New Issue
Block a user